All Projects → clovaai → symmetrical-synthesis

clovaai / symmetrical-synthesis

Licence: MIT License
Official Tensorflow implementation of "Symmetrical Synthesis for Deep Metric Learning" (AAAI 2020)

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to symmetrical-synthesis

CVPR2020 PADS
(CVPR 2020) This repo contains code for "PADS: Policy-Adapted Sampling for Visual Similarity Learning", which proposes learnable triplet mining with Reinforcement Learning.
Stars: ✭ 57 (-14.93%)
Mutual labels:  metric-learning, cars196, cub200-2011
proxy-synthesis
Official PyTorch implementation of "Proxy Synthesis: Learning with Synthetic Classes for Deep Metric Learning" (AAAI 2021)
Stars: ✭ 30 (-55.22%)
Mutual labels:  metric-learning, image-retrieval, cars196
Powerful Benchmarker
A PyTorch library for benchmarking deep metric learning. It's powerful.
Stars: ✭ 272 (+305.97%)
Mutual labels:  metric-learning, image-retrieval
Person reid baseline pytorch
Pytorch ReID: A tiny, friendly, strong pytorch implement of object re-identification baseline. Tutorial 👉https://github.com/layumi/Person_reID_baseline_pytorch/tree/master/tutorial
Stars: ✭ 2,963 (+4322.39%)
Mutual labels:  metric-learning, image-retrieval
Batch Dropblock Network
Official source code of "Batch DropBlock Network for Person Re-identification and Beyond" (ICCV 2019)
Stars: ✭ 304 (+353.73%)
Mutual labels:  metric-learning, image-retrieval
Hardnet
Hardnet descriptor model - "Working hard to know your neighbor's margins: Local descriptor learning loss"
Stars: ✭ 350 (+422.39%)
Mutual labels:  metric-learning, image-retrieval
Pytorch Metric Learning
The easiest way to use deep metric learning in your application. Modular, flexible, and extensible. Written in PyTorch.
Stars: ✭ 3,936 (+5774.63%)
Mutual labels:  metric-learning, image-retrieval
Pytorch Image Retrieval
A PyTorch framework for an image retrieval task including implementation of N-pair Loss (NIPS 2016) and Angular Loss (ICCV 2017).
Stars: ✭ 203 (+202.99%)
Mutual labels:  metric-learning, 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 (+156.72%)
Mutual labels:  metric-learning, image-retrieval
GPQ
Generalized Product Quantization Network For Semi-supervised Image Retrieval - CVPR 2020
Stars: ✭ 60 (-10.45%)
Mutual labels:  metric-learning, image-retrieval
Ranked-List-Loss-for-DML
CVPR 2019: Ranked List Loss for Deep Metric Learning, with extension for TPAMI submission
Stars: ✭ 56 (-16.42%)
Mutual labels:  image-retrieval, image-clustering
MetricLearning-mnist-pytorch
Playground of Metric Learning with MNIST @pytorch. We provide ArcFace, CosFace, SphereFace, CircleLoss and visualization.
Stars: ✭ 19 (-71.64%)
Mutual labels:  metric-learning
art
Exploring the connections between artworks with deep "Visual Analogies"
Stars: ✭ 73 (+8.96%)
Mutual labels:  image-retrieval
keras rmac
RMAC implementation in Keras
Stars: ✭ 80 (+19.4%)
Mutual labels:  image-retrieval
Heated Up Softmax Embedding
Project page for Heated-up Softmax Embedding
Stars: ✭ 42 (-37.31%)
Mutual labels:  metric-learning
advrank
Adversarial Ranking Attack and Defense, ECCV, 2020.
Stars: ✭ 19 (-71.64%)
Mutual labels:  metric-learning
WeFEND-AAAI20
Dataset for paper "Weak Supervision for Fake News Detection via Reinforcement Learning" published in AAAI'2020.
Stars: ✭ 67 (+0%)
Mutual labels:  aaai2020
dml
R package for Distance Metric Learning
Stars: ✭ 58 (-13.43%)
Mutual labels:  metric-learning
PoC-Examples
This repository contains synthesizable examples which use the PoC-Library.
Stars: ✭ 27 (-59.7%)
Mutual labels:  synthesis
DOLG-pytorch
Unofficial PyTorch Implementation of "DOLG: Single-Stage Image Retrieval with Deep Orthogonal Fusion of Local and Global Features"
Stars: ✭ 69 (+2.99%)
Mutual labels:  image-retrieval

Symmetrical Synthesis for Deep Metric Learning

Official Tensorflow implementation of Symmetrical Synthesis for Deep Metric Learning (AAAI 2020)

Geonmo Gu*, Byungsoo Ko* (* Authors contributed equally.)

@NAVER/LINE Vision

Overview

Symmetrical Synthesis

Symmetrical Synthesis (Symm) is a novel method of synthetic hard sample generation for deep metric learning.

How it Works

After some iterations, symmetrical synthesis generates synthetic points around the class clusters, which are used as hard samples to push the other class with stronger power.

Experimental Results

Getting Started

Requirements

$ pip3 install -r requirements.txt

Prepare Data

  1. Download pretrained GoogleNet model. ref
$ wget https://github.com/Wei2624/Feature_Embed_GoogLeNet/raw/master/tf_ckpt_from_caffe.mat
  1. Download CAR DB and cook.
$ wget http://ai.stanford.edu/~jkrause/car196/car_ims.tgz
$ tar -xzf car_ims.tgz
$ mv car_ims
$ wget http://ai.stanford.edu/~jkrause/car196/cars_annos.mat

# on ../symm_public folder
$ cd dataset
$ python3 cooking_CARS.py --car_folder=/your/car_ims/folder \
--save_path=/your/converted/carDB/will/be/saved/here

Train a Model

  • Available losses: N-pair, Symm + N-pair, Angular, Symm + Angular

Symm + N-pair

$ python3 train.py --backbone=googlenet \
--pretrained_model_path=/your/folder/tf_ckpt_from_caffe.mat \
--image_path=/your/converted/carDB/will/be/saved/here \
--run_gpu=0 \
--save_path=/your/trained/model/will/be/saved/here \
--losses=symm_npair --dim_features=512 \
--input_size=227 --learning_rate=0.0001 \
--decay_steps=5000 --decay_stop_steps=15000 \
--decay_stop_value=0.00001 --decay_ratio=0.5 \
--save_model_steps=100

Test a Model

$ python3 test.py --run_gpu=1 --model_path=/your/trained/model/will/be/saved/here \
--image_path=/your/converted/carDB/will/be/saved/here \
--batch_size=512 --backbone=googlenet \
--pretrained_model_path=/your/folder/tf_ckpt_from_caffe.mat \
--log_path=eval_log_car \
--input_size=227 --start_idx=0 --dim_features=512
  • Best recall@1: 0.77 (0.765 in paper)

Check Test Results

$ tensorboard --logdir=eval_log_car --port=10000

Acknowledgements

Citation

If you find Symmetrical Synthesis useful in your research, please consider to cite the following paper.

@inproceedings{gu2020symmetrical,
    title={Symmetrical Synthesis for Deep Metric Learning},
    author={Geonmo Gu and Byungsoo Ko},
    booktitle={Proceedings of the AAAI Conference on Artificial Intelligence},
    year={2020}
}

License

Copyright (c) 2020-present NAVER Corp.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
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].