Skip to content

Conversation

@Zengxianxian727
Copy link

@Zengxianxian727 Zengxianxian727 commented Sep 7, 2020

License: CC BY-NC 4.0

Multi-Similarity Loss for Deep Metric Learning (MS-Loss)

This is the unofficial code with Paddlepaddle for the CVPR 2019 paper Multi-Similarity Loss with General Pair Weighting for Deep Metric Learning

And the official code is here

Initial Paddlepaddle 1.8.x

pip install paddlepaddle-gpu

Prepare the data and the pretrained model

The following script will prepare the CUB dataset for training by downloading to the ./resource/datasets/ folder; which will then build the data list (train.txt test.txt):

./scripts/prepare_cub.sh

Download the imagenet pretrained model of
bninception and put it in the folder. And then we should use it to generate the Paddlepaddle pretrained model.

python ./pretrained_model/pytorch2paddle.py

Installation

python setup.py develop build

Train and Test on CUB200-2011 with MS-Loss

./scripts/run_cub.sh

Trained models will be saved in the ./output/ folder if using the default config.

Best recall@1 is 65.1 (65.7 in the paper).

Contact

For any questions, please feel free to reach

zengxianxian727@foxmail.com

Citation

If you use this method or this code in your research, please cite as:

@inproceedings{wang2019multi,
title={Multi-Similarity Loss with General Pair Weighting for Deep Metric Learning},
author={Wang, Xun and Han, Xintong and Huang, Weilin and Dong, Dengke and Scott, Matthew R},
booktitle={Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition},
pages={5022--5030},
year={2019}
}

License

MS-Loss is CC-BY-NC 4.0 licensed, as found in the LICENSE file. It is released for academic research / non-commercial use only. If you wish to use for commercial purposes, please contact zengxianxian727@foxmail.com

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@Zengxianxian727
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants