rksltnl/Deep-Metric-Learning-CVPR16
关于
基于提升式结构化特征嵌入的深度度量学习主仓库
学习与教育实测星标增长
- 24小时
- 0
- 7天
- -1
- 15天
- -1
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文Deep 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
探索相关项目
加载中…