This repository contains an MATLAB implementation of the following paper:
Shanmin Pang, Jihua Zhu, Jiaxing Wang, Vicente Ordonez and Jianru Xue, Discriminative CNN image representations via replication equation for object retrieval, Pattern Recognition, Vol 83, 2018, pp 150-160.
This code implements
a) ReSW image representation
b) Image/object retrieval based on ReSW on public datasets: Oxford5k, Paris6k and Holidays.
The code is written by: Jin Ma (m799133891@stu.xjtu.edu.cn) and Shanmin Pang (pangsm@xjtu.edu.cn). If you have any question, please contact Jin Ma or Shanmin Pang.
Dependencies
- MatConvNet v1.0-beta18 or above (http://www.vlfeat.org/matconvnet/).
- Optional but highly recommended: Yael_matlab (http://yael.gforge.inria.fr/index.html). All affiliated functions used in this program have already been contained in 'utils' folder.
- For siaMAC features, see this page: siaMAC(http://cmp.felk.cvut.cz/cnnimageretrieval/)
- For netvlad features, see this page: netvlad (https://github.com/Relja/netvlad)
Models:
Three models used in our experiment are as follows:
- Vgg16: imagenet-matconvnet-vgg-verydeep-16 (http://www.vlfeat.org/matconvnet/models/imagenet-matconvnet-vgg-verydeep-16.mat)
- SiaMAC: retrievalSfM120k-siamac-vgg (http://cmp.felk.cvut.cz/cnnimageretrieval/networks/retrieval-SfM-120k/retrievalSfM120k-gem-vgg.mat)
- Netvlad: The best model of netvlad(VGG-16+NetVLAD+whitening, trained on Pittsburgh) http://www.di.ens.fr/willow/research/netvlad/data/models/vd16_pitts30k_conv5_3_vlad_preL2_intra_white.mat
Dataset
- Oxford5k: http://www.robots.ox.ac.uk/~vgg/data/oxbuildings/
- Paris6k: http://www.robots.ox.ac.uk/~vgg/data/parisbuildings/
- INRIA Holidays: https://lear.inrialpes.fr/~jegou/data.php#holidays
- Flickr 100k: http://www.robots.ox.ac.uk/~vgg/data/oxbuildings/flickr100k.html
- Extract features: See 'feature_extract.m'/'feature_query.m'/'feature_100k.m' file, please change the pathname to the correct folder where you store images.
- 'Test.m' file shows details of our experiment, including computation of final representation and image retrieval process.