This repository provides source code for conducting extensive experiments and reproducing the most popular Deep Metric Learning approaches. It is written in Pytorch and makes use of Kevin's Musgrave library Pytorch Metric Learning.
Moreover, here you will find an implementation of the following loss functions:
- Contrastive
- Triplet
- Lifted Structure
- N Pair
- Proxy NCA
- Arc Face
- Margin
- Multi Similarity
- Soft Triple
- Proxy Anchor
-
Download four public benchmarks for deep metric learning
- CUB-200-2011
- Cars-196 (Img, Annotation)
- Stanford Online Products (Link)
- In-shop Clothes Retrieval (Link)
-
Extract the tgz or zip file into
./data/
(Exceptionally, for Cars-196, put the files in a./data/cars196
)