Skip to content

vadimkantorov/metriclearningbench

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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 of Margin contrastive loss published at: https://github.com/apache/incubator-mxnet/tree/19ede063c4756fa49cfe741e654180aee33991c6/example/gluon/embedding_learning (temporarily removed in apache/mxnet#20602)

Examples

# 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

About

Metric learning models in PyTorch with results on CUB2011, CARS196, Stanford Online Products

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages