Metric learning models in PyTorch, recall@1
| CUB2011 | CARS196 | Stanford Online Products | |
|---|---|---|---|
| Margin contrastive loss, semi-hard | 0.58 @ epoch60 | 0.80 @ epoch60 | 0.7526 @ epoch90 | 
| Lifted structured embedding | |||
| Triplet loss | 
Original impl published at: https://github.com/apache/incubator-mxnet/blob/master/example/gluon/embedding_learning/model.py
# evaluation results are saved in ./data/log.txt
# train margin contrastive loss on CUB2011 using ResNet-50
python train.py --dataset cub2011 --model margin --base resnet50
# download GoogLeNet weights and train using LiftedStruct loss
wget -P ./data https://github.com/vadimkantorov/metriclearningbench/releases/download/data/googlenet.h5
python train.py --dataset cub2011 --model liftedstruct --base inception_v1_googlenet
# evaluate raw final layer embeddings on CUB2011 using ResNet-50
python train.py --dataset cub2011 --model untrained  --epochs 1