This repository is an implementation of Deep Metric Learning via Facility Location on tensorflow. We build this on Cifar100 and Densenet-40. This paper is available here. For the loss layer implementation, look at here. For the Densenet implementation, look at here.
@inproceedings{songCVPR17,
Author = {Hyun Oh Song and Stefanie Jegelka and Vivek Rathod and Kevin Murphy},
Title = {Deep Metric Learning via Facility Location},
Booktitle = {Computer Vision and Pattern Recognition (CVPR)},
Year = {2017}
}
tensorflow
(see: tensorflow-gpu installation instructions).pip install -r requirements.txt
get required support.metric_learning_densenet.py
for training-params and densenet-params. We pick Cifar100 as our training data, because it's tiny, save GPU-memory (when batch size 64, it cost about 4.6G GPU-Memory) and good for doing research.python metric_learning_densenet.py
, the data_provider
with automaticlly handle data download and process. After that, start Densenet-Cluster-loss training.metric_learning_densenet.py
train on Imagenet.metric_learning_densenet.py
extract feature embeddings on cifar test set, the embeddings is saved with .npy
format used for evaluation process.python visualization/tsne.py
can plot and save the cluster result on Cifar database.