Skip to content
Implementation of Hardness-Aware Deep Metric Learning (CVPR 2019 Oral) in Tensorflow.
Branch: master
Clone or download
Latest commit 1854f99 Mar 18, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.idea
datasets Add files via upload Mar 14, 2019
lib Update Loss_ops.py Mar 18, 2019
tfRecord_creater Initial Commit Feb 24, 2019
FLAGS.py Update FLAGS.py Mar 15, 2019
README.md
main_npair.py
test.py

README.md

Hardness-Aware Deep Metric Learning

Implementation of Hardness-Aware Deep Metric Learning (CVPR 2019 Oral) in Tensorflow.

Work in progress.

Please use the citation provided below if it is useful to your research:

Wenzhao Zheng, Zhaodong Chen, Jiwen Lu, and Jie Zhou, Hardness-Aware Deep Metric Learning, arXiv, abs/1903.05503, 2019.

@article{zheng2019hardness,
  title={Hardness-Aware Deep Metric Learning},
  author={Zheng, Wenzhao and Chen, Zhaodong and Lu, Jiwen and Zhou, Jie},
  journal={arXiv preprint arXiv:1903.05503},
  year={2019}
}

Dependencies

pip install tensorflow==1.10.0

Dataset

Stanford Cars Dataset (Cars196)

-- Download from (https://ai.stanford.edu/~jkrause/cars/car_dataset.html) or use datasets/cars196_downloader.py.

-- Convert to hdf5 file using cars196_converter.py.

-- Put it in datasets/data/cars196/cars196.hdf5.

Pretrained model

GoogleNet V1 pretrained model can be downloaded from (https://github.com/Wei2624/Feature_Embed_GoogLeNet)

Usage

For Cars196 dataset:

python main_npair.py --dataSet='cars196' --batch_size=128 --Regular_factor=5e-3 --init_learning_rate=7e-5 --load_formalVal=False --embedding_size=128 --loss_l2_reg=3e-3 --init_batch_per_epoch=500 --batch_per_epoch=64 --max_steps=8000 --beta=1e+4 --lr_gen=1e-2 --num_class=99 --_lambda=0.5 --s_lr=1e-3

Code Reference

deep_metric_learning (https://github.com/ronekko/deep_metric_learning) by ronekko for dataset codes.

You can’t perform that action at this time.