All Projects → imatge-upc → Retrieval 2017 Cam

imatge-upc / Retrieval 2017 Cam

Class-Weighted Convolutional Features for Image Retrieval (BMVC 2017)

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Retrieval 2017 Cam

Artificio
Deep Learning Computer Vision Algorithms for Real-World Use
Stars: ✭ 326 (+48.86%)
Mutual labels:  convolutional-neural-networks, transfer-learning, image-retrieval
Deep Ranking
Learning Fine-grained Image Similarity with Deep Ranking is a novel application of neural networks, where the authors use a new multi scale architecture combined with a triplet loss to create a neural network that is able to perform image search. This repository is a simplified implementation of the same
Stars: ✭ 64 (-70.78%)
Mutual labels:  convolutional-neural-networks, image-retrieval
Big transfer
Official repository for the "Big Transfer (BiT): General Visual Representation Learning" paper.
Stars: ✭ 1,096 (+400.46%)
Mutual labels:  convolutional-neural-networks, transfer-learning
Keras transfer cifar10
Object classification with CIFAR-10 using transfer learning
Stars: ✭ 120 (-45.21%)
Mutual labels:  convolutional-neural-networks, transfer-learning
Caffe Deepbinarycode
Supervised Semantics-preserving Deep Hashing (TPAMI18)
Stars: ✭ 206 (-5.94%)
Mutual labels:  convolutional-neural-networks, image-retrieval
Seismic Transfer Learning
Deep-learning seismic facies on state-of-the-art CNN architectures
Stars: ✭ 32 (-85.39%)
Mutual labels:  transfer-learning, vgg16
Vehicle Retrieval Kcnns
vehicle image retrieval using k CNNs ensemble method
Stars: ✭ 81 (-63.01%)
Mutual labels:  convolutional-neural-networks, image-retrieval
Food Recipe Cnn
food image to recipe with deep convolutional neural networks.
Stars: ✭ 448 (+104.57%)
Mutual labels:  convolutional-neural-networks, vgg16
Imagenet
Pytorch Imagenet Models Example + Transfer Learning (and fine-tuning)
Stars: ✭ 134 (-38.81%)
Mutual labels:  convolutional-neural-networks, transfer-learning
Image classifier
CNN image classifier implemented in Keras Notebook 🖼️.
Stars: ✭ 139 (-36.53%)
Mutual labels:  convolutional-neural-networks, transfer-learning
Cnnimageretrieval
CNN Image Retrieval in MatConvNet: Training and evaluating CNNs for Image Retrieval in MatConvNet
Stars: ✭ 168 (-23.29%)
Mutual labels:  convolutional-neural-networks, image-retrieval
Cnnimageretrieval Pytorch
CNN Image Retrieval in PyTorch: Training and evaluating CNNs for Image Retrieval in PyTorch
Stars: ✭ 931 (+325.11%)
Mutual labels:  convolutional-neural-networks, image-retrieval
Skin Cancer Image Classification
Skin cancer classification using Inceptionv3
Stars: ✭ 16 (-92.69%)
Mutual labels:  convolutional-neural-networks, transfer-learning
Teacher Student Training
This repository stores the files used for my summer internship's work on "teacher-student learning", an experimental method for training deep neural networks using a trained teacher model.
Stars: ✭ 34 (-84.47%)
Mutual labels:  convolutional-neural-networks, transfer-learning
Tensorflow 101
TensorFlow 101: Introduction to Deep Learning for Python Within TensorFlow
Stars: ✭ 642 (+193.15%)
Mutual labels:  convolutional-neural-networks, transfer-learning
Sru Deeplearning Workshop
دوره 12 ساعته یادگیری عمیق با چارچوب Keras
Stars: ✭ 66 (-69.86%)
Mutual labels:  convolutional-neural-networks, transfer-learning
Deep Learning With Python
Deep learning codes and projects using Python
Stars: ✭ 195 (-10.96%)
Mutual labels:  convolutional-neural-networks, vgg16
Hardnet
Hardnet descriptor model - "Working hard to know your neighbor's margins: Local descriptor learning loss"
Stars: ✭ 350 (+59.82%)
Mutual labels:  convolutional-neural-networks, image-retrieval
Image Caption Generator
A neural network to generate captions for an image using CNN and RNN with BEAM Search.
Stars: ✭ 126 (-42.47%)
Mutual labels:  convolutional-neural-networks, vgg16
Affnet
Code and weights for local feature affine shape estimation paper "Repeatability Is Not Enough: Learning Discriminative Affine Regions via Discriminability"
Stars: ✭ 191 (-12.79%)
Mutual labels:  convolutional-neural-networks, image-retrieval

Class-Weighted Convolutional Features for Image Retrieval

28th British Machine Vision Conference (BMVC 2017)

Albert Jimenez Xavier Giro-i-Nieto Jose M. Alvarez
Albert Jimenez Xavier Giro-i-Nieto Jose M.Alvarez

A joint collaboration between:

logo-gpi logo-data61
UPC Image Processing Group Data61

Abstract

Image retrieval in realistic scenarios targets large dynamic datasets of unlabeled images. In these cases, training or fine-tuning a model every time new images are added to the database is neither efficient nor scalable. Convolutional neural networks trained for image classification over large datasets have been proven effective feature extractors for image retrieval. The most successful approaches are based on encoding the activations of convolutional layers, as they convey the image spatial information. In this paper, we go beyond this spatial information and propose a local-aware encoding of convolutional features based on semantic information predicted in the target image. To this end, we obtain the most discriminative regions of an image using Class Activation Maps (CAMs). CAMs are based on the knowledge contained in the network and therefore, our approach, has the additional advantage of not requiring external information. In addition, we use CAMs to generate object proposals during an unsupervised re-ranking stage after a first fast search. Our experiments on two public available datasets for instance retrieval, Oxford5k and Paris6k, demonstrate the competitiveness of our approach outperforming the current state-of-the-art when using off-the-shelf models trained on ImageNet.

Encoding_pipeline

Publication

A preprint of this paper is available on arXiv and in the BMVC 2017 proceedings.

Please cite with the following Bibtex code:

@InProceedings{Jimenez_2017_BMVC,
author = {Jimenez, Albert and Alvarez, Jose M., and Giro-i-Nieto, Xavier},
title = {Class-Weighted Convolutional Features for Visual Instance Search},
booktitle = {28th British Machine Vision Conference (BMVC)},
month = {September},
year = {2017}
}

You may also want to refer to our publication with the more human-friendly Chicago style:

Albert Jimenez, Jose M. Alvarez, and Xavier Giro-i-Nieto. "Class-Weighted Convolutional Features for Visual Instance Search." In Proceedings of the 28th British Machine Vision Conference (BMVC). 2017.

Slides

<iframe src="//www.slideshare.net/slideshow/embed_code/key/3dG0uuBHScqPTa" width="595" height="485" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" style="border:1px solid #CCC; border-width:1px; margin-bottom:5px; max-width: 100%;" allowfullscreen> </iframe>

Results

Comparison with State of the Art

Comparison with State of the Art

Comparison with State of the Art - QE & RE

Qualitative Results

Qualitative Results of the Search

Code Usage

In this repository we provide the code used in our experiments. VGG-16 CAM experiments where carried out using Keras running over Theano. DenseNet and ResNet experiments were carried out using PyTorch.

In the next Section we explain how to run the code in Keras+Theano. To run the experiments using PyTorch, the requirements are the same plus having installed Pytorch and the torchvision package.

Prerequisites

Was done previous to Keras 2.0 but should work with that version as well.

Python packages necessary specified in requirements.txt run:

 pip install -r requirements.txt
 

Our Experiments have been carried out in these datasets:

Here we provide the weigths of the model (paste them in models folder):

How to run the code?

First thing to do (important!) is setting the path of your images and model weights. We provide lists (also modify path! - Find and Replace) that divide images in vertical and horizontal for faster processing. At the beggining of each script there are some parameters that can be tuned like image preprocessing. I have added a parser for arguments, at the beginning of each script it is shown an example of how to run them.

Feature Extraction

Both scripts extract Class-Weighted Vectors. The first one is used for the original datasets. The second for the distractors. You tune the preprocessing parameters of the images as well as the number of Class-Weighted Vectors extracted. In "Online Aggregation" the order of the stored vectors is the imagenet class order, while in "Offline Aggregation" the order of the vector is from class more probable to less probable (predicted by the network).

  • A_Oxf_Par_Feat_CAMs_Extraction.py
  • A_Dist_Feat_CAMs_Extraction.py

A_Oxf_Par_Feat_CAMs_Extraction.py  -d <dataset> -a <agreggation>

Aggregation, Ranking and Evaluation

In both scripts you can choose the dataset you want to evaluate and if use query expansion or re-ranking. The first one is for offline aggregation. The second one performs aggregation at the moment of testing.

  • B_Offline_Eval.py
  • B_Online_Aggregation_Eval.py

B_Online_Aggregation_Eval.py -d <dataset> --nc_q <nclasses_query> --pca <n_classes_pca> --qe <n_query_exp> --re <n_re_ranking> --nc_re <n_classes_re_ranking>

Aknowledgements

We would like to specially thank Albert Gil and Josep Pujal from our technical support team at the Image Processing Group at UPC.

AlbertGil-photo JosepPujal-photo
Albert Gil Josep Pujal

Contact

If you have any general doubt about our work or code which may be of interest for other researchers, please use the mailto:[email protected].

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].