All Projects → tjddus9597 → Proxy Anchor Cvpr2020

tjddus9597 / Proxy Anchor Cvpr2020

Licence: mit
Official PyTorch Implementation of Proxy Anchor Loss for Deep Metric Learning, CVPR 2020

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Proxy Anchor Cvpr2020

Image similarity
PyTorch Blog Post On Image Similarity Search
Stars: ✭ 80 (-57.45%)
Mutual labels:  image-retrieval
Kapture
kapture is a file format as well as a set of tools for manipulating datasets, and in particular Visual Localization and Structure from Motion data.
Stars: ✭ 128 (-31.91%)
Mutual labels:  image-retrieval
Pytorch deephash
Pytorch implementation of Deep Learning of Binary Hash Codes for Fast Image Retrieval, CVPRW 2015
Stars: ✭ 148 (-21.28%)
Mutual labels:  image-retrieval
Deepembeding
图像检索和向量搜索,similarity learning,compare deep metric and deep-hashing applying in image retrieval
Stars: ✭ 83 (-55.85%)
Mutual labels:  image-retrieval
Manifold Diffusion
Diffusion on manifolds for image retrieval
Stars: ✭ 102 (-45.74%)
Mutual labels:  image-retrieval
Fast Reid
SOTA Re-identification Methods and Toolbox
Stars: ✭ 2,287 (+1116.49%)
Mutual labels:  image-retrieval
Deep Ranking
Learning Fine-grained Image Similarity with Deep Ranking is a novel application of neural networks, where the authors use a new multi scale architecture combined with a triplet loss to create a neural network that is able to perform image search. This repository is a simplified implementation of the same
Stars: ✭ 64 (-65.96%)
Mutual labels:  image-retrieval
Cnn Cbir Benchmark
CNN CBIR benchmark (ongoing)
Stars: ✭ 171 (-9.04%)
Mutual labels:  image-retrieval
Hypertag
Knowledge Management for Humans using Machine Learning & Tags
Stars: ✭ 116 (-38.3%)
Mutual labels:  image-retrieval
Revisitop
Revisiting Oxford and Paris: Large-Scale Image Retrieval Benchmarking
Stars: ✭ 147 (-21.81%)
Mutual labels:  image-retrieval
Trace.moe Webextension
WebExtension for the Anime Reverse Search Engine to search by image
Stars: ✭ 89 (-52.66%)
Mutual labels:  image-retrieval
Delf enhanced
Wrapper of DELF Tensorflow Model
Stars: ✭ 98 (-47.87%)
Mutual labels:  image-retrieval
Libvot
A C++11 multithread library for image retrieval
Stars: ✭ 139 (-26.06%)
Mutual labels:  image-retrieval
Vehicle Retrieval Kcnns
vehicle image retrieval using k CNNs ensemble method
Stars: ✭ 81 (-56.91%)
Mutual labels:  image-retrieval
Person Reid Triplet Loss
Person re-ID baseline with triplet loss
Stars: ✭ 165 (-12.23%)
Mutual labels:  image-retrieval
Adsh Aaai2018
source code for paper "Asymmetric Deep Supervised Hashing" on AAAI-2018
Stars: ✭ 67 (-64.36%)
Mutual labels:  image-retrieval
Openibl
[ECCV-2020 (spotlight)] Self-supervising Fine-grained Region Similarities for Large-scale Image Localization. 🌏 PyTorch open-source toolbox for image-based localization (place recognition).
Stars: ✭ 128 (-31.91%)
Mutual labels:  image-retrieval
Revisiting deep metric learning pytorch
(ICML 2020) This repo contains code for our paper "Revisiting Training Strategies and Generalization Performance in Deep Metric Learning" (https://arxiv.org/abs/2002.08473) to facilitate consistent research in the field of Deep Metric Learning.
Stars: ✭ 172 (-8.51%)
Mutual labels:  image-retrieval
Cnnimageretrieval
CNN Image Retrieval in MatConvNet: Training and evaluating CNNs for Image Retrieval in MatConvNet
Stars: ✭ 168 (-10.64%)
Mutual labels:  image-retrieval
Liresolr
Putting LIRE into Solr - an ongoing project
Stars: ✭ 140 (-25.53%)
Mutual labels:  image-retrieval

Proxy Anchor Loss for Deep Metric Learning

Official PyTorch implementation of CVPR 2020 paper Proxy Anchor Loss for Deep Metric Learning.

A standard embedding network trained with Proxy-Anchor Loss achieves SOTA performance and most quickly converges.

This repository provides source code of experiments on four datasets (CUB-200-2011, Cars-196, Stanford Online Products and In-shop) and pretrained models.

Accuracy in [email protected] versus training time on the Cars-196

graph

Requirements

Datasets

  1. Download four public benchmarks for deep metric learning

  2. Extract the tgz or zip file into ./data/ (Exceptionally, for Cars-196, put the files in a ./data/cars196)

[Notice!] I found that the link that was previously uploaded for the CUB dataset was incorrect, so I corrected the link. (CUB-200 -> CUB-200-2011) If you have previously downloaded the CUB dataset from my repository, please download it again. Thanks to myeongjun for reporting this issue!

Training Embedding Network

Note that a sufficiently large batch size and good parameters resulted in better overall performance than that described in the paper. You can download the trained model through the hyperlink in the table.

CUB-200-2011

  • Train a embedding network of Inception-BN (d=512) using Proxy-Anchor loss
python train.py --gpu-id 0 \
                --loss Proxy_Anchor \
                --model bn_inception \
                --embedding-size 512 \
                --batch-size 180 \
                --lr 1e-4 \
                --dataset cub \
                --warm 1 \
                --bn-freeze 1 \
                --lr-decay-step 10
  • Train a embedding network of ResNet-50 (d=512) using Proxy-Anchor loss
python train.py --gpu-id 0 \
                --loss Proxy_Anchor \
                --model resnet50 \
                --embedding-size 512 \
                --batch-size 120 \
                --lr 1e-4 \
                --dataset cub \
                --warm 5 \
                --bn-freeze 1 \
                --lr-decay-step 5
Method Backbone [email protected] [email protected] [email protected] [email protected]
Proxy-Anchor512 Inception-BN 69.1 78.9 86.1 91.2
Proxy-Anchor512 ResNet-50 69.9 79.6 86.6 91.4

Cars-196

  • Train a embedding network of Inception-BN (d=512) using Proxy-Anchor loss
python train.py --gpu-id 0 \
                --loss Proxy_Anchor \
                --model bn_inception \
                --embedding-size 512 \
                --batch-size 180 \
                --lr 1e-4 \
                --dataset cars \
                --warm 1 \
                --bn-freeze 1 \
                --lr-decay-step 20
  • Train a embedding network of ResNet-50 (d=512) using Proxy-Anchor loss
python train.py --gpu-id 0 \
                --loss Proxy_Anchor \
                --model resnet50 \
                --embedding-size 512 \
                --batch-size 120 \
                --lr 1e-4 \
                --dataset cars \
                --warm 5 \
                --bn-freeze 1 \
                --lr-decay-step 10 
Method Backbone [email protected] [email protected] [email protected] [email protected]
Proxy-Anchor512 Inception-BN 86.4 91.9 95.0 97.0
Proxy-Anchor512 ResNet-50 87.7 92.7 95.5 97.3

Stanford Online Products

  • Train a embedding network of Inception-BN (d=512) using Proxy-Anchor loss
python train.py --gpu-id 0 \
                --loss Proxy_Anchor \
                --model bn_inception \
                --embedding-size 512 \
                --batch-size 180 \
                --lr 6e-4 \
                --dataset SOP \
                --warm 1 \
                --bn-freeze 0 \
                --lr-decay-step 20 \
                --lr-decay-gamma 0.25
Method Backbone [email protected] [email protected] [email protected] [email protected]
Proxy-Anchor512 Inception-BN 79.2 90.7 96.2 98.6

In-Shop Clothes Retrieval

  • Train a embedding network of Inception-BN (d=512) using Proxy-Anchor loss
python train.py --gpu-id 0 \
                --loss Proxy_Anchor \
                --model bn_inception \
                --embedding-size 512 \
                --batch-size 180 \
                --lr 6e-4 \
                --dataset Inshop \
                --warm 1 \
                --bn-freeze 0 \
                --lr-decay-step 20 \
                --lr-decay-gamma 0.25
Method Backbone [email protected] [email protected] [email protected] [email protected] [email protected]
Proxy-Anchor512 Inception-BN 91.9 98.1 98.7 99.0 99.1

Evaluating Image Retrieval

Follow the below steps to evaluate the provided pretrained model or your trained model.

Trained best model will be saved in the ./logs/folder_name.

# The parameters should be changed according to the model to be evaluated.
python evaluate.py --gpu-id 0 \
                   --batch-size 120 \
                   --model bn_inception \
                   --embedding-size 512 \
                   --dataset cub \
                   --resume /set/your/model/path/best_model.pth

Acknowledgements

Our code is modified and adapted on these great repositories:

Other Implementations

Thanks Geonmo and nixingyang for the good implementation :D

Citation

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

@InProceedings{Kim_2020_CVPR,
  author = {Kim, Sungyeon and Kim, Dongwon and Cho, Minsu and Kwak, Suha},
  title = {Proxy Anchor Loss for Deep Metric Learning},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
  month = {June},
  year = {2020}
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].