Code Monkey home page Code Monkey logo

ssg's Introduction

Self-similarity Grouping: A Simple Unsupervised Cross Domain Adaptation Approach for Person Re-identificatio(SSG)

Implementation of the paper Self-similarity Grouping: A Simple Unsupervised Cross Domain Adaptation Approach for Person Re-identification, ICCV 2019 (Oral)

The SSG approach proposed in the paper is simple yet effective and achieves the state-of-arts on three re-ID datasets: Market1501, DukdMTMC and MSMT17.

Illustration of the Self-similarity Grouping.

Running the experiments

Step 1: Train on source dataset

Run source_train.py via

python source_train.py \
    --dataset <name_of_source_dataset>\
    --resume <dir_of_source_trained_model>\
    --data_dir <dir_of_source_data>\
    --logs_dir <dir_to_save_source_trained_model>

To replicate the results in the paper, you can download pre-trained models on Market1501, DukeMTMC and MSMT17 from GoogleDrive. There maybe some bugs in source_train.py, please refer to DomainAdaptiveReID to obtained the pretrained model or just use the pretrained model provided by us. And you can find all models after adaptation from GoogleDrive. Our models can be trained with PyTorch 0.4.1 or PyTorch 1.0.

Step 2: Run Self-similarity Grouping

python selftraining.py \
    --src_dataset <name_of_source_dataset>\
    --tgt_dataset <name_of_target_dataset>\
    --resume <dir_of_source_trained_model>\
    --iteration <number of iteration>\
    --data_dir <dir_of_source_target_data>\
    --logs_dir <dir_to_save_model_after_adaptation>\
    --gpu-devices <gpu ids>\
    --num-split <number of split>

Or just command

./run.sh

Step 3: Run Clustering-guided Semi-Supervised Training

python semitraining.py \
    --src_dataset <name_of_source_dataset>\
    --tgt_dataset <name_of_target_dataset>\
    --resume <dir_of_source_trained_model>\
    --iteration <number of iteration>\
    --data_dir <dir_of_source_target_data>\
    --logs_dir <dir_to_save_model_after_adaptation>\
    --gpu-devices <gpu ids>\
    --num-split <number of split>\
    --sample <sample method>

Results

Step 1: After training on source dataset

Source Dataset Rank-1 mAP
DukeMTMC 82.6 70.5
Market1501 92.5 80.8
MSMT17 73.6 48.6

Step 2: After adaptation

SRC --> TGT Before Adaptation Adaptation by SSG Adaptation by SSG++
Rank-1 mAP Rank-1 mAP Rank-1 mAP
Market1501 --> DukeMTMC30.516.173.053.476.060.3
DukeMTMC --> Market150154.626.680.058.386.268.7
Market1501 --> MSMT17 8.62.731.613.237.616.6
DukeMTMC --> MSMT17 12.383.8232.213.341.618.3

Issues

  • The pre-trained model is trained with Pytorch 0.4.1, there may be some error when loading it by Pytorch with higher version. This link should be helpful
  • The source_training.py codes may have some bugs, I suggest you directly using our pretrained baseline model. And I will fix the bugs soon.
  • To reproduce results listed in paper, I recommend to use two GPUs with batch size of 32. And in general, the experimental results may have be a little different from the results listed in paper (+/-1%).

Acknowledgement

Our code is based on open-reid and DomainAdaptiveReID.

ssg's People

Contributors

oasisyang avatar

Watchers

James Cloos avatar paper2code - bot 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.