• Stars
    star
    133
  • Rank 272,600 (Top 6 %)
  • Language
    Python
  • Created about 3 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Hard-sample Guided Hybrid Contrast Learning for Unsupervised Person Re-Identification

HHCL-ReID visitors

Tweet PWC PWC

This repository is the official implementation of our paper "Hard-sample Guided Hybrid Contrast Learning for Unsupervised Person Re-Identification!".

framework_HCCL

Requirements


git clone https://github.com/bupt-ai-cz/HHCL-ReID.git
cd HHCL-ReID
pip install -r requirements.txt
python setup.py develop

Prepare Datasets


Download the datasets Market-1501,MSMT17,DukeMTMC-reID from this link and unzip them under the directory like:

HHCL-ReID/examples/data
β”œβ”€β”€ market1501
β”‚   └── Market-1501-v15.09.15
└── dukemtmcreid
    └── DukeMTMC-reID

Prepare ImageNet Pre-trained Models for IBN-Net

When training with the backbone of IBN-ResNet, you need to download the ImageNet-pretrained model from this link and save it under the path of examples/pretrained/.

HHCL-ReID/examples
└── pretrained
    └── resnet50_ibn_a.pth.tar

Training


We utilize 4 GTX-2080TI GPUs for training. Examples:

Market-1501:

CUDA_VISIBLE_DEVICES=0,1,2,3 python examples/train.py -b 256 -a resnet50 -d market1501 --iters 200 --eps 0.45 --momentum 0.1 --num-instances 16 --pooling-type avg --memorybank CMhybrid --epochs 60 --logs-dir examples/logs/market1501/resnet50_avg_cmhybrid

DukeMTMC-reID:

CUDA_VISIBLE_DEVICES=0,1,2,3 python examples/train.py -b 256 -a resnet50 -d dukemtmcreid --iters 200 --eps 0.6 --momentum 0.1 --num-instances 16 --pooling-type avg --memorybank CMhybrid --epochs 60 --logs-dir examples/logs/dukemtmcreid/resnet50_avg_cmhybrid
  • use -a resnet50 (default) for the backbone of ResNet-50, and -a resnet_ibn50a for the backbone of IBN-ResNet;
  • use --pooling-type gem for Generalized Mean Pooling (GEM) pooling and --smooth for label smoothing.

Evaluation


To evaluate my model on ImageNet, run:

CUDA_VISIBLE_DEVICES=0 python examples/test.py -d $DATASET --resume $PATH --pooling-type avg

Results


Our model achieves the following performance on :

Dataset Market1501 DukeMTMC-reID
Setting mAP R1 R5 R10 mAP R1 R5 R10
Fully Unsupervised 84.2 93.4 97.7 98.5 73.3 85.1 92.4 94.6
Supervised 87.2 94.6 98.5 99.1 80.0 89.8 95.2 96.7

You can download the above models in the paper from Google Drive

Citation


If you find this code useful for your research, please cite our paper

@article{hu2021hard,
  title={Hard-sample Guided Hybrid Contrast Learning for Unsupervised Person Re-Identification},
  author={Hu, Zheng and Zhu, Chuang and He, Gang},
  journal={arXiv preprint arXiv:2109.12333},
  year={2021}
}

Acknowledgements


This project is not possible without multiple great opensourced codebases. We list them below.

More Repositories

1

LLVIP

LLVIP: A Visible-infrared Paired Dataset for Low-light Vision
Jupyter Notebook
618
star
2

Meta-SelfLearning

Meta Self-learning for Multi-Source Domain Adaptation: A Benchmark
Python
198
star
3

BCI

BCI: Breast Cancer Immunohistochemical Image Generation through Pyramid Pix2pix
Python
146
star
4

CAC-UNet-DigestPath2019

1st to MICCAI DigestPath2019 challenge (https://digestpath2019.grand-challenge.org/Home/) on colonoscopy tissue segmentation and classification task. (MICCAI 2019) https://teacher.bupt.edu.cn/zhuchuang/en/index.htm
Python
94
star
5

IAST-ECCV2020

IAST: Instance Adaptive Self-training for Unsupervised Domain Adaptation (ECCV 2020) https://teacher.bupt.edu.cn/zhuchuang/en/index.htm
Python
84
star
6

BALNMP

Predicting Axillary Lymph Node Metastasis in Early Breast Cancer Using Deep Learning on Primary Tumor Biopsy Slides, BCNB Dataset
Python
53
star
7

PGDF

Sample Prior Guided Robust Model Learning to Suppress Noisy Labels
Python
31
star
8

HSA-NRL

Hard Sample Aware Noise Robust Learning forHistopathology Image Classification
Python
29
star
9

HIAST

This is the official implementation of "Hard-aware Instance Adaptive Self-training for Unsupervised Cross-domain Semantic Segmentation".
Python
10
star
10

Thyroid-Cytopathological-Diagnosis-with-AMIL_MSFF

Attention Based Multi-Instance Thyroid Cytopathological Diagnosis with Multi-Scale Feature Fusion
Python
9
star
11

TCVC

Code of paper "Temporal Consistent Automatic Video Colorization via Semantic Correspondence"
Python
8
star
12

Glomeruli-Instance-Segmentation

Python
7
star
13

bupt-ai-cz

The introduction and news of CVSM Group.
7
star
14

Label-Noise-Robust-Training

Noise Robust Learning with Hard Example Aware for Pathological Image classification
Python
6
star
15

Thyroid-Nodule-Ultrasound-Image-Classification

Thyroid Nodule Ultrasound Image Classification Through Hybrid Feature Cropping Network
6
star
16

MPFN

Ischemic Stroke Lesion Segmentation Using Multi-Plane Information Fusion
5
star
17

ProML

code for "Semi-supervised Domain Adaptation via Prototype-based Multi-level Learning"
Python
5
star
18

ANRN

Python
5
star
19

IAST-CAC-UNet-LLCNN-BreastCancerCNN-ImageRetrieval_DF_CDVS-Highly_Efficient_Follicular_Segmentation

Codes and Data for CVSM Group: 1. IAST: Instance Adaptive Self-training for Unsupervised Domain Adaptation (ECCV 2020); 2.
4
star
20

WUDA

WUDA
2
star
21

TCNL

Python
1
star
22

SMAF

code for paper β€œA SELF-TRAINING FRAMEWORK BASED ON MULTI-SCALE ATTENTION FUSION FOR WEAKLY SUPERVISED SEMANTIC SEGMENTATION”
1
star