Skip to content
/ DCCC Public

The official repository for Dynamic Clustering and Cluster Contrastive Learning (DCCC).

Notifications You must be signed in to change notification settings

theziqi/DCCC

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python >=3.5 PyTorch >=1.0

Dynamic Clustering and Cluster Contrastive Learning (DCCC)

The official repository for Dynamic Clustering and Cluster Contrastive Learning for Unsupervised Person Re-ID with Feature Distribution Alignment achieves state-of-the-art performances on 3 commonly used person re-ID including MSMT17, Market-1501 and DukeMTMC.

Overview of DCCC

What's New

[2023-12-14] Our work has been accepted by ICASSP 2024!

Performance

Results of DCCC

Requirements

pip install -r requirements.txt

Installation

python setup.py develop

Prepare Datasets

cd examples && mkdir data

Download the person datasets Market-1501, MSMT17, and DukeMTMC-reID. Then unzip them under the directory like

DCCC/examples/data
├── market1501
│   └── Market-1501-v15.09.15
├── dukemtmcreid
│   └── DukeMTMC-reID
├── msmt17
│   └── MSMT17_V1

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 logs/pretrained/.

mkdir logs && cd logs
mkdir pretrained

The file tree should be

DCCC/logs
└── pretrained
    └── resnet50_ibn_a.pth.tar

ImageNet-pretrained models for ResNet-50 will be automatically downloaded in the python script.

Training

We utilize 4 Telsa V100 GPUs for training. Note that

  • use --iters 200 (default) for datasets;
  • use --width 128 --height 256 (default) for person datasets;
  • use -a resnet50 (default) for the backbone of ResNet-50, and -a resnet_ibn50a for the backbone of IBN-ResNet.

To train the model(s) in the paper, run this command:

bash train.sh

Evaluation

We utilize 1 Telsa V100 GPU for testing. Note that

  • use --width 128 --height 256 (default) for person datasets;
  • use -a resnet50 (default) for the backbone of ResNet-50, and -a resnet_ibn50a for the backbone of IBN-ResNet.

To evaluate the model, run:

### Market-1501 ###
CUDA_VISIBLE_DEVICES=0 \
python examples/test.py \
  -d market1501 --resume logs/dccc/market_resnet50/model_best.pth.tar

Acknowledgements

Our DCCC partially refers open-sourced SpCL, we thank their awesome contribution.

Citation

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

@article{He2023DynamicCA,
  title={Dynamic Clustering and Cluster Contrastive Learning for Unsupervised Person Re-identification},
  author={Ziqi He and Mengjia Xue and Yunhao Du and Zhicheng Zhao and Fei Su},
  journal={ArXiv},
  year={2023},
  volume={abs/2303.06810},
  url={https://api.semanticscholar.org/CorpusID:257496756}
}

About

The official repository for Dynamic Clustering and Cluster Contrastive Learning (DCCC).

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published