rksltnl/Deep-Metric-Learning-CVPR16
Tentang
Repositori utama untuk Deep Metric Learning melalui Lifted Structured Feature Embedding.
Pembelajaran dan pendidikanPertumbuhan bintang terukur
- dalam 24 jam
- 0
- dalam 7 hari
- -1
- dalam 15 hari
- -1
- dalam 1 bulan
- Mengumpulkan riwayat
Perubahan bersih pada periode yang tumpang tindih, bukan total harian. Pengukuran yang belum tersedia dibiarkan kosong. Bintang menunjukkan perhatian, bukan kualitas.
README.md
AsliDeep Metric Learning via Lifted Structured Feature Embedding
This repository has the source code and the Stanford Online Products dataset for the paper "Deep Metric Learning via Lifted Structured Feature Embedding" (CVPR16). The paper is available on cv-foundation. If you just need the Caffe code, check out the Submodule. For the loss layer implementation, look at here.
Citing this work
If you find this work useful in your research, please consider citing:
@inproceedings{songCVPR16,
Author = {Hyun Oh Song and Yu Xiang and Stefanie Jegelka and Silvio Savarese},
Title = {Deep Metric Learning via Lifted Structured Feature Embedding},
Booktitle = {Computer Vision and Pattern Recognition (CVPR)},
Year = {2016}
}
Installation
- Install prerequsites for
Caffe(see: Caffe installation instructions) - Compile the
Caffe-Deep-Metric-Learning-CVPR16Github submodule.
Prerequisites
- Download pretrained GoogLeNet model from here
- Download the ILSVRC12 ImageNet mean file for mean subtraction. Refer to Caffe the ImageNet examples here.
- Modify and run
code/gen_splits.mto create train/test split. - Modify and run
code/gen_images.mto prepare the preprocessed images.
Training Procedure
- Generate the LMDB file to convert the training set of images to the DB format. Example scripts are in
code/directory.
- Modify and run
code/compile.mto mex compile the cpp files used for LMDB generation. - Modify
code/config.mto set save paths. - Run
code/gen_caffe_dataset_multilabel_m128.mto start the LMDB generation process.
- Create the
model/train*.prototxtandmodel/solver*.prototxtfiles. Please refer to the included*.prototxtfiles inmodel/directory for examples. You also need to provide the path to the ImageNet mean file (usually calledimagenet_mean.binaryproto) you downloaded in step 2. - Inside the caffe submodule, launch the Caffe training procedure.
caffe/build/tools/caffe train -solver [path-to-training-prototxt-file] -weights [path-to-pretrained-googlenet] -gpu [gpuid]
Feature extraction after training
- Modify and run
code/gen_caffe_validation_imageset.mto convert the test images to LMDB format. - Modify the test set path in
model/extract_googlenet*.prototxt. - Modify the model and test set path and run
code/compute_googlenet_distance_matrix_cuda_embeddings_liftedstructsim_softmax_pair_m128.py.
Clustering and Retrieval evaluation code
- Use
code/evaluation/evaluate_clustering.mto evaluate the clustering performance. - Use
code/evaluation/evaluate_recall.mto evaluate recall@K for image retrieval.
Stanford Online Products dataset
You can download the Stanford Online Products dataset (2.9G) from ftp://cs.stanford.edu/cs/cvgl/Stanford_Online_Products.zip or https://drive.google.com/uc?export=download&id=1TclrpQOF_ullUP99wk_gjGN8pKvtErG8
- We also have the text meta data for each product images. Please let us know if you're interested in using them.
Our Pre-trained Models
You can download our pre-trained models on the Cars196 dataset, the CUB200 dataset and the Online Products dataset (265M) from ftp://cs.stanford.edu/cs/cvgl/pretrained_models.zip
Licence
MIT Licence
Jelajahi proyek terkait
Memuat…