Home

Awesome

Densely-Anchored Sampling for Deep Metric Learning (ECCV 2022)

PWC PWC PWC

Created by Lizhao Liu, Shangxin Huang from South China University of Technology.

This repository contains the official PyTorch-implementation of our ECCV 2022 paper Densely-Anchored Sampling for Deep Metric Learning.

In particular, we release the code for reproducing the results of Table (1) and Table (2) in the main paper.

<br> <img src="image/DAS_hd.png" align="center">

Suggestions are always welcome!


Usage

Environment

Dataset Preparation

We use three datasets: CUB, CARS, SOP in the paper. Download them via links below and unzip them after downloaded.

After unzip, the data fold structure will look like these:

cub200/cars196
└───images
|    └───001.Black_footed_Albatross
|           │   Black_Footed_Albatross_0001_796111
|           │   ...
|    ...
online_products
└───images
|    └───bicycle_final
|           │   111085122871_0.jpg
|    ...
|
└───Info_Files
|    │   bicycle.txt
|    │   ...
in-shop
└─img
|    └─MEN
|         └─Denim
|               └─id_00000080
|                  │   01_1_front.jpg
|                  │   ...
|               ...
|         ...
|    ...
|
└─Eval
|  │   list_eval_partition.txt

Reproduce the results in Table (1) and Table (2)

bash table1.sh
bash table2.sh

Quantitative Results

<img src="image/table1.png" align="center"> <img src="image/table2.png" align="center"> <img src="image/fig1.png" align="center">

Qualitative Results

<img src="image/CARS_compare.jpg" align="center"> <img src="image/ONLINE_Margin_compare.jpg" align="center"> <img src="image/DFS_top6.png" align="center"> <img src="image/MTS_visual.png" align="center">

Acknowledgement

We borrow many codes from Revisiting_Deep_Metric_Learning_PyTorch. Please show some support!

Citation

If you find this code helpful for your research, please consider citing

@inproceedings{liu2022das,
  title={DAS: Densely-Anchored Sampling for Deep Metric Learning},
  author={Liu, Lizhao and Huang, Shangxin and Zhuang, Zhuangwei and Yang, Ran and Tan, Mingkui and Wang, Yaowei},
  booktitle={European Conference on Computer Vision},
  year={2022},
  organization={Springer}
}