imatge-upc / retrieval-2017-cam Goto Github PK
View Code? Open in Web Editor NEWClass-Weighted Convolutional Features for Image Retrieval (BMVC 2017)
Home Page: http://imatge-upc.github.io/retrieval-2017-cam/
Class-Weighted Convolutional Features for Image Retrieval (BMVC 2017)
Home Page: http://imatge-upc.github.io/retrieval-2017-cam/
Hi, thanks for your effort.
In the paper,
Optionally, an additional convolutional layer can be added before the GAP (CAM layer) to recover the accuracy drop after removing the fully-connected layers.
It means that there is a new conv layer is added, so how do you train the new network?
Do you only train the new conv layer? Which dataset do you use to train the network?ImageNet, or Oxford buildings?
Thanks for your reply.
Hey,
Thanks for your effort. As described it the papaer,
In short, the last fully-connected layers are replaced with a Global Average Pooling (GAP) layer and a linear classifier. Optionally, an additional convolutional layer can be added before the GAP (CAM layer) torecover the accuracy drop after removing the fully-connected layers.
Could you please show the parameters of the additional convolutional layer? Is it 512 feature maps with 1x1 kernel?
Thank you.
hello, thanks for your codes, would you want to share the pytorch code version evaluate codes ?thanks
Hello, when I run the PyTorch code, the mean AP of the Oxford data set is only 0.142,does anyone know why this happens?I hardly modified any code.
Hi, thanks for your work.
I have a question about the boxes mapping in keras_code/B_Online_Aggregation_Eval.py.
In line 251, we get the groundtruth box with x, y, dx, dy:
x, y, dx, dy = f_list[1], f_list[2], f_list[3], f_list[4]
and make them in multiples of 16 in line 254-255:
f_x, f_y, f_dx, f_dy = int((x - (x % 16)) / 16), int((y - (y % 16)) / 16), \ int((dx - (dx % 16)) / 16), int((dy - (dy % 16)) / 16)
The query image is processed with resizing to either 1024*720 or 720*1024 in line 276:
img_p = preprocess_images(img, size[0], size[1], mean_value)
The processed image is then fed into the network to get features in line 278-279:
features, cams, roi = extract_feat_cam_fast(model, get_output, conv_layer_features, 1, img_p, num_cams, class_list[0, 0:num_cams])
However, after that we get the descriptors by slicing features with f_x, f_y, f_dx, f_dy in line 281-282:
d_wp = weighted_cam_pooling(features[:, :, f_y:f_dy, f_x:f_dx], cams[:, :, f_y:f_dy, f_x:f_dx])
I'm a little confused since we get the features by feeding the resized images, while the box indices for slicing features are not resized accordingly. I'll be really grateful for your reply :)
Hi, I am trying to extract features for 1 million images. However, it is too slow. I have to wait for at least four days even I tried the fast version. What is the speed of yours?
Plus is this warning related to the speed? should I fix it for speeding up?
WARNING (theano.tensor.blas): We did not find a dynamic library in the library_dir of the library we use for blas. If you use ATLAS, make sure to compile it with dynamics library.
Thanks.
Traceback (most recent call last): File "A_Oxf_Par_Feat_CAMs_Extraction.py", line 71, in <module> model = vggcam(nb_classes) File "/home/linjie/src/CAM/keras_code/vgg_cam.py", line 27, in vggcam model.add(Convolution2D(64, 3, 3, activation='relu')) File "/home/linjie/anaconda2/lib/python2.7/site-packages/keras/models.py", line 522, in add output_tensor = layer(self.outputs[0]) File "/home/linjie/anaconda2/lib/python2.7/site-packages/keras/engine/topology.py", line 592, in __call__ self.build(input_shapes[0]) File "/home/linjie/anaconda2/lib/python2.7/site-packages/keras/layers/convolutional.py", line 129, in build raise ValueError('The channel dimension of the inputs ' ValueError: The channel dimension of the inputs should be defined. Found
None.
Hi, I met this problem when I ran A_Oxf_Par_Feat_CAMs_Extraction.py . It seems like the parameters of the function vggcam is incomplete. Does anyone know how to solve this problem?
Thank you.
when running A_Oxf_Par_Feat_CAMs_Extraction.py, an error occurs: No module named cam_utils
where can I find this module. thanks for helping
I do not understand the parameter N_PCA in Section 4.3, such as its use, and why it is introduced. I am looking forward to your reply.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.