Giter Site home page Giter Site logo

mgcc's Introduction

【AAAI 2024 】Text-based Occluded Person Re-identification via Multi-Granularity Contrastive Consistency Learning

This repository offers the official implementation of MGCC in PyTorch.

Overview

Requirements

  • PyTorch version = 1.7.1

  • Install other libraries via

pip install -r requirements.txt

Data preparation

  • CUHK-PEDES

    Download the CUHK-PEDES dataset from here

    Organize them in ./dataset/CUHK-PEDES/ folder as follows:

    |-- dataset/
    |   |-- CUHK-PEDES/
    |       |-- imgs
                |-- cam_a
                |-- cam_b
                |-- ...
    |       |-- CUHK-PEDES.json
    |-- others/
    
  • ICFG-PEDES

    Download the ICFG-PEDES dataset from here

    Organize them in ./dataset/ICFG-PEDES/ folder as follows:

    |-- dataset/
    |   |-- ICFG-PEDES/
    |       |-- imgs
                |-- test
                |-- train 
    |       |-- ICFG_PEDES.json
    |-- others/
    
  • RSTPReid

    Download the RSTPReid dataset from here

    Organize them in ./dataset/RSTPReid/ folder as follows:

    |-- dataset/
    |   |-- RSTPReid/
    |       |-- imgs
    |       |-- RSTPReid.json
    |-- others/
    
  • Occlusion Instance Augmentation

    After changing the parameters of parse_args fuction in process_data.py according to different datasets, run the process_data.py in the dataset folder.

How to Run

  • About the pretrained CLIP and Bert checkpoints

    Download the pretrained CLIP checkpoints from here and save it in path ./src/pretrain/clip-vit-base-patch32/

    Download the pretrained Bert checkpoints from here and save it in path ./src/pretrain/bert-base-uncased/

  • About the running scripts

    Use CUHK-PEDES as examples:

    sh experiment/CUHK-PEDES/train.sh
    

    After training done, you can test your model by run:

    sh experiment/CUHK-PEDES/test.sh
    

    As for the usage of different parameters, you can refer to src/option/options.py for the detailed meaning of each parameter.

Citation

If you find our method useful in your work, please consider staring 🌟 this repo and citing 📑 our paper:

@inproceedings{wu2024text,
  title={Text-based Occluded Person Re-identification via Multi-Granularity Contrastive Consistency Learning},
  author={Wu, Xinyi and Ma, Wentao and Guo, Dan and Zhou, Tongqing and Zhao, Shan and Cai, Zhiping},
  booktitle={Proceedings of the AAAI Conference on Artificial Intelligence},
  volume={38},
  number={6},
  pages={6162--6170},
  year={2024}
}

Acknowledgments

The implementation of our paper relies on resources from SSAN, CLIP and XCLIP. We thank the original authors for their open-sourcing.

mgcc's People

Contributors

littlexinyi avatar

Stargazers

 avatar Ning Chen avatar  avatar Li Zixuan avatar  avatar Chenyang Yu avatar  avatar  avatar Qin Yang avatar  avatar

Watchers

Kostas Georgiou avatar  avatar

mgcc's Issues

Parameter setting

Thank you for your great work! How to set parameters in options.py(like IDloss) to reproduce the results in the paper?

About the paper appendix

Thanks for your contributions! I am wondering where can I get the appendix of this paper? ~~~///(^v^)\~~~

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.