Giter VIP home page Giter VIP logo

groupsampling's Introduction

Python >=3.5 PyTorch >=1.0

Group Sampling

Rethinking Sampling Strategies for Unsupervised Person Re-identification
Xumeng Han, Xuehui Yu, Guorong Li, Jian Zhao, Gang Pan, Qixiang Ye, Jianbin Jiao and Zhenjun Han
IEEE Transactions on Image Processing (TIP) 2023 (arXiv:2107.03024)

Requirements

Installation

git clone https://github.com/wavinflaghxm/GroupSampling.git
cd GroupSampling
python setup.py develop

Prepare Datasets

cd examples && mkdir data

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

GroupSampling/examples/data
├── market1501
│   └── Market-1501-v15.09.15
├── dukemtmc
│   └── DukeMTMC-reID
└── msmt17
    └── MSMT17_V2

Training

We utilize 1 GTX-2080TI GPU for training.

  • Use --group-n 256 for Market-1501, --group-n 128 for DukeMTMC-reID, and --group-n 1024 for MSMT17.

Market-1501:

CUDA_VISIBLE_DEVICES=0 python examples/train.py -d market1501 --logs-dir logs/market_resnet50 --group-n 256

DukeMTMC-reID:

CUDA_VISIBLE_DEVICES=0 python examples/train.py -d dukemtmc --logs-dir logs/duke_resnet50 --group-n 128

MSMT17:

CUDA_VISIBLE_DEVICES=0 python examples/train.py -d msmt17 --logs-dir logs/msmt_resnet50 --group-n 1024 --iters 800

We recommend using 4 GPUs to train MSMT17 for better performance.

CUDA_VISIBLE_DEVICES=0,1,2,3 python examples/train.py -d msmt17 --logs-dir logs/msmt_resnet50-gpu4 --group-n 1024 -b 256 --momentum 0.1 --lr 0.00005

Evaluation

To evaluate the model, run:

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

Some examples:

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

Results

results

Citation

If you find this work useful for your research, please cite:

@article{han2022rethinking,
  title={Rethinking Sampling Strategies for Unsupervised Person Re-Identification}, 
  author={Han, Xumeng and Yu, Xuehui and Li, Guorong and Zhao, Jian and Pan, Gang and Ye, Qixiang and Jiao, Jianbin and Han, Zhenjun},
  journal={IEEE Transactions on Image Processing}, 
  year={2023},
  volume={32},
  pages={29-42},
  doi={10.1109/TIP.2022.3224325}}

Acknowledgements

Codes are built upon SpCL. Thanks to Yixiao Ge for opening source.

groupsampling's People

Contributors

wavinflaghxm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

groupsampling's Issues

The results of the experiment cannot be reproduced

Hi!
After reproducing your code, I found that I couldn't get the same experimental results as your article. :(

So I want to ask for your help and look forward to your reply. :)

Thanks and best wishes.

It's the para and data list for dukemtmc
image

and it's the final result
image

By the way, I also use one GPU NVIDIA Tesla P100 to run this project.

list_train.txt

你好,请问哪里可以找到list_train.txt等文件,训练msmt17数据集时,出现这个错误。
image

How to input pretrained model?

Hello!

When I reproduced your code, I found that I couldn't achieve the same effect as you. The reason is that the pre-trained model is not loaded. But your GitHub does not introduce how to install pre-training models and provide pre-training download files.

Where is the pre-trained model loaded in your code? Could you provide the corresponding pre-training model files?

Looking forward to your reply, thanks!
:)

msmt

msmt數據集可以提供一下嗎? readme中測試是不是有問題

Update the test.py file~~~

The test script is still the original version in SpCL. Please kindly update the test script. Thanks~~~

请教关于预训练模型的问题?

请问一下作者,复现代码所需的预训练模型应该怎样设置文件路径呢?

以及所需的预训练模型文件可否提供?

期待您的答复,谢谢!

:)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.