Giter Site home page Giter Site logo

abandonsea / gcl Goto Github PK

View Code? Open in Web Editor NEW

This project forked from chenhao2345/gcl

0.0 0.0 0.0 935 KB

Implementation for CVPR2021 paper "Joint Generative and Contrastive Learning for Unsupervised Person Re-identification"

License: MIT License

Python 99.04% Shell 0.96%

gcl's Introduction

Joint Generative and Contrastive Learning for Unsupervised Person Re-identification

This is the official PyTorch implementation of the CVPR 2021 paper Joint Generative and Contrastive Learning for Unsupervised Person Re-identification.

[Video] [Poster]

missing missing

Installation

Install GCL

Requirements

  • Python 3.6
  • Pytorch 1.2.0
git clone https://github.com/chenhao2345/GCL
cd GCL
python setup.py develop

Prepare Datasets

cd examples && mkdir data

Download the raw datasets DukeMTMC-reID, Market-1501, MSMT17, and then unzip them under the directory like

GCL/examples/data
├── dukemtmc-reid
│   └── DukeMTMC-reID
├── market1501
└── msmt17
    └── MSMT17_V1(or MSMT17_V2)

Install HMR for Mesh Estimation

Download our extracted meshes from Google Drive. Unzip them under the directory like

GCL/examples/mesh
├── dukeMTMC
├── market
└── msmt17

Or refer to HMR ro get meshes for ReID datasets.

Train GCL

Only support 1 GPU (GPU memory > 20GB) training for the moment.

Stage 1: Warm up identity encoder

Train a ResNet50 with an unsupervised method, for example, JVTC(or download our trained models from Google Drive) and MLC.

GCL/examples/logs
└── JVTC
    └── market
        └── resnet50_market075_epoch00045.pth
    └── duke
        └── resnet50_duke075_epoch00040.pth

Stage 2: Warm up structure encoder and discriminator

Adjust path for dataset, mesh, pre-trained identity encoder.

sh train_stage2_market.sh

Stage 3: Joint training

sh train_stage3_market.sh

TensorBoard Visualization

Stage 2:

For example,

tensorboard --logdir logs/market_init_JVTC_unsupervised/

Stage 3:

For example,

tensorboard --logdir logs/market_init_JVTC_unsupervised/stage3/

Citation

@InProceedings{Chen_2021_CVPR,
    author    = {Chen, Hao and Wang, Yaohui and Lagadec, Benoit and Dantcheva, Antitza and Bremond, Francois},
    title     = {Joint Generative and Contrastive Learning for Unsupervised Person Re-Identification},
    booktitle = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
    month     = {June},
    year      = {2021},
    pages     = {2004-2013}
}

gcl's People

Contributors

chenhao2345 avatar wyhsirius avatar

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.