All Projects → XinshaoAmosWang → Ranked-List-Loss-for-DML

XinshaoAmosWang / Ranked-List-Loss-for-DML

Licence: BSD-3-Clause license
CVPR 2019: Ranked List Loss for Deep Metric Learning, with extension for TPAMI submission

Programming Languages

shell
77523 projects

Projects that are alternatives of or similar to Ranked-List-Loss-for-DML

symmetrical-synthesis
Official Tensorflow implementation of "Symmetrical Synthesis for Deep Metric Learning" (AAAI 2020)
Stars: ✭ 67 (+19.64%)
Mutual labels:  image-retrieval, image-clustering
LabelRelaxation-CVPR21
Official PyTorch Implementation of Embedding Transfer with Label Relaxation for Improved Metric Learning, CVPR 2021
Stars: ✭ 37 (-33.93%)
Mutual labels:  image-retrieval, deep-metric-learning
Pytorch Metric Learning
The easiest way to use deep metric learning in your application. Modular, flexible, and extensible. Written in PyTorch.
Stars: ✭ 3,936 (+6928.57%)
Mutual labels:  image-retrieval, deep-metric-learning
FastAP-metric-learning
Code for CVPR 2019 paper "Deep Metric Learning to Rank"
Stars: ✭ 93 (+66.07%)
Mutual labels:  learning-to-rank, deep-metric-learning
proxy-synthesis
Official PyTorch implementation of "Proxy Synthesis: Learning with Synthetic Classes for Deep Metric Learning" (AAAI 2021)
Stars: ✭ 30 (-46.43%)
Mutual labels:  image-retrieval, deep-metric-learning
Image-Retrieval
Image retrieval program made in Tensorflow supporting VGG16, VGG19, InceptionV3 and InceptionV4 pretrained networks and own trained Convolutional autoencoder.
Stars: ✭ 56 (+0%)
Mutual labels:  image-retrieval
OCDVAEContinualLearning
Open-source code for our paper: Unified Probabilistic Deep Continual Learning through Generative Replay and Open Set Recognition
Stars: ✭ 56 (+0%)
Mutual labels:  open-set-recognition
SnapMix
SnapMix: Semantically Proportional Mixing for Augmenting Fine-grained Data (AAAI 2021)
Stars: ✭ 127 (+126.79%)
Mutual labels:  fine-grained-recognition
cisip-FIRe
Fast Image Retrieval (FIRe) is an open source project to promote image retrieval research. It implements most of the major binary hashing methods to date, together with different popular backbone networks and public datasets.
Stars: ✭ 40 (-28.57%)
Mutual labels:  image-retrieval
ltr-tools
Set of command line tools for Learning To Rank
Stars: ✭ 13 (-76.79%)
Mutual labels:  learning-to-rank
src
tools for fast reading of docs
Stars: ✭ 40 (-28.57%)
Mutual labels:  learning-to-rank
fastrank
My most frequently used learning-to-rank algorithms ported to rust for efficiency. Try it: "pip install fastrank".
Stars: ✭ 43 (-23.21%)
Mutual labels:  learning-to-rank
Huawei DIGIX ImageRetri Top2
2020 DIGIX GLOBAL AI CHALLENGE - Digital Device Image Retrieval - Top2 WEARE队
Stars: ✭ 63 (+12.5%)
Mutual labels:  image-retrieval
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 (+1.79%)
Mutual labels:  deep-metric-learning
FAIRY
Fast and scalable search of whole-slide images via self-supervised deep learning - Nature Biomedical Engineering
Stars: ✭ 43 (-23.21%)
Mutual labels:  image-retrieval
natural-language-joint-query-search
Search photos on Unsplash based on OpenAI's CLIP model, support search with joint image+text queries and attention visualization.
Stars: ✭ 143 (+155.36%)
Mutual labels:  image-retrieval
cnn-for-image-retrieval
🌅The code of post "Image retrieval using MatconvNet and pre-trained imageNet"
Stars: ✭ 623 (+1012.5%)
Mutual labels:  image-retrieval
GPQ
Generalized Product Quantization Network For Semi-supervised Image Retrieval - CVPR 2020
Stars: ✭ 60 (+7.14%)
Mutual labels:  image-retrieval
EMNLP2020
This is official Pytorch code and datasets of the paper "Where Are the Facts? Searching for Fact-checked Information to Alleviate the Spread of Fake News", EMNLP 2020.
Stars: ✭ 55 (-1.79%)
Mutual labels:  learning-to-rank
img classification deep learning
No description or website provided.
Stars: ✭ 19 (-66.07%)
Mutual labels:  image-retrieval

Ranked-List-Loss-for-Deep-Metric-Learning

[Paper] [Slides] [Poster]

Code is under legal check. Please feel free to drop me an email if you want it for academic use only.

This work is being extended for TPAMI submission, with the main target to improve this work further.

In deep metric learning, The improvements over time have been marginal?

Citation

If you find our code and paper help your research, please kindly cite our work:

InProceedings{Wang_2019_CVPR,
author = {Wang, Xinshao and Hua, Yang and Kodirov, Elyor and Hu, Guosheng and Garnier, Romain and Robertson, Neil M.},
title = {Ranked List Loss for Deep Metric Learning},
booktitle = {The IEEE Conference on Computer Vision and Pattern Recognition (CVPR)},
month = {June},
year = {2019}
}

To Visualise the Repository Tree Structure

cd ./Ranked-List-Loss-for-Deep-Metric-Learning
tree

Dependencies and Setup

The core functions are implemented using C++ in the caffe framework. We use matlab interfaces matcaffe for data preparation.

  • Clone our repository: Simply copy and execute following commands in the command line

    git clone [email protected]:XinshaoAmosWang/Ranked-List-Loss-for-D
    eep-Metric-Learning.git
    cd Ranked-List-Loss-for-Deep-Metric-Learning/
  • Install dependencies on Ubuntu 16.04

    sudo apt-get install libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev libhdf5-serial-dev protobuf-compiler
    sudo apt-get install --no-install-recommends libboost-all-dev
    sudo apt-get install libopenblas-dev
    sudo apt-get install python-dev
    sudo apt-get install libgflags-dev libgoogle-glog-dev liblmdb-dev
  • Install MATLAB 2017b

    Download and Run the install binary file

    ./install
  • Compile Caffe and matlab interface

    Note you may need to change some paths in Makefile.config according your system environment and MATLAB path

    cd CaffeMex_RLL_GR_V03_Simp
    make -j8  && make matcaffe

Usage

Training on Stanford Online Product dataset.

  • Data preparation for SOP

    Downlaod Stanford_Online_Products dataset from ftp://cs.stanford.edu/cs/cvgl/Stanford_Online_Products.zip

    For simplicity, you can use the data mat file in pre_post_process directory, which is ready training and testing scripts. To solve the data path, you can do eithor a or b:

      a. Changing the path within the mat files. 
      b. A Simpler way: Create a soft link of your data
      e.g sudo ln -s /.../Stanford_Online_Products /home/xinshao/Papers_Projects/Data/Stanford_Online_Products
    
  • Train & Test

    Run the training and testing scripts in the training folder of a specific setting defined by its corresponding prototxt folder.

Training on In-shop Clothes

Our trained models on SOP, In-shop Clothes

Training on custom datasets

You only need to create training/testing mat files with the same structure as SOP_TrainImagePathBoxCell.mat and SOP_TestImagePathBoxCell.mat in directory SOP_GoogLeNet_Ori_V05/pre_pro_process.

e.g. SOP_TrainImagePathBoxCell.mat contains , TrainImagePathBoxCell storing all image paths and class_ids storing their corresponding semantic labels.

Application on person re-identification

Common questions

1. What does ranking mean?

  • Given a query, the objective is to rank its postive set in front of its negative set by a distance margin.

  • We do not need to consider the exact order of examples within the positive and negative sets.

2. How is a loss function related with deep metric learning?

Please see our discussion in the paper.

Acknowledgements

Our work benefits from:

Licence

BSD 3-Clause "New" or "Revised" License

Contact

Xinshao Wang (You can call me Amos as well) xinshao dot wang at eng dot ox dot ac dot uk

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].