Giter VIP home page Giter VIP logo

udastrongbaseline's Introduction

UDAStrongBaseline

Open-source stronger baseline for unsupervised or domain adaptive object re-ID. We will udpate the strong baseline and group-aware label transfer method in domain adaptive person re-identifacation.

Introduction

*Our method only adopts the clustering algorithm and ReID baseline model with the moving average model.

UDAStrongBaseline is a transitional code based pyTorch framework for both unsupervised learning (USL) and unsupervised domain adaptation (UDA) in the context of object re-ID tasks. It provides stronger baselines on these tasks. It needs the enviorment: Python >=3.6 and PyTorch >=1.1. We will transfer all the codes to the fastreid in the future (ongoing).

Unsupervised domain adaptation (UDA) on Person re-ID

  • Direct infer models are trained on the source-domain datasets (source_pretrain) and directly tested on the target-domain datasets.
  • UDA methods (MMT, SpCL, etc.) starting from ImageNet means that they are trained end-to-end in only one stage without source-domain pre-training. MLT denotes to the implementation of our NeurIPS-2020. Please note that it is a pre-released repository for the anonymous review process, and the official repository will be released upon the paper published.

DukeMTMC-reID -> Market-1501

Method Backbone Pre-trained mAP(%) top-1(%) top-5(%) top-10(%) Train time
Direct infer ResNet50 DukeMTMC 32.2 64.9 78.7 83.4 ~1h
UDA_TP PR'2020 ResNet50 DukeMTMC 52.3 76.0 87.8 91.9 ~2h
MMT ICLR'2020 ResNet50 imagenet 80.9 92.2 97.6 98.4 ~6h
SpCL NIPS'2020 submission ResNet50 imagenet 78.2 90.5 96.6 97.8 ~3h
strong_baseline ResNet50 imagenet 75.6 90.9 96.6 97.8 ~3h
Our stronger_baseline ResNet50 DukeMTMC 77.4 91.0 96.4 97.7 ~3h
[Our stronger_baseline + GLT (Kmeans)] ResNet50 DukeMTMC 79.5 92.7 96.9 98.0 ~35h
[Our stronger_baseline + uncertainty (DBSCAN)] ResNet50 DukeMTMC 82.0 93.0 97.3 98.2 ~5h

Market-1501 -> DukeMTMC-reID

Method Backbone Pre-trained mAP(%) top-1(%) top-5(%) top-10(%) Train time
Direct infer ResNet50 Market1501 34.1 51.3 65.3 71.7 ~1h
UDA_TP PR'2020 ResNet50 Market1501 45.7 65.5 78.0 81.7 ~2h
MMT ICLR'2020 ResNet50 imagenet 67.7 80.3 89.9 92.9 ~6h
SpCL NIPS'2020 submission ResNet50 imagenet 70.4 83.8 91.2 93.4 ~3h
strong_baseline ResNet50 imagenet 60.4 75.9 86.2 89.8 ~3h
Our stronger_baseline ResNet50 Market1501 66.7 80.0 89.2 92.2 ~3h
[Our stronger_baseline + uncertainty (DBSCAN)] ResNet50 Market1501 71.3 83.3 90.8 93.1 ~5h

Requirements

Installation

git https://github.com/zkcys001/UDAStrongBaseline/
cd UDAStrongBaseline
pip install -r requirements
pip install faiss-gpu==1.6.3

Prepare Datasets

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

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

You can create the soft link to the dataset:

ln -s /path-to-data ./data

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

Training

We utilize 4 GPUs for training. Note that

1. Uncertainty:

Stage I: Pretrain Model on Source Domain

To train the uncertainty model in the source domain, run this command:

sh pretrain_uncertainty_market1501.sh

Stage II: End-to-end training with clustering

Utilizeing the GLT model based on DBSCAN clustering algorithm:

sh scripts/dbscan_uncertainty_duke2market.sh

2. GLT (group-aware label transfer, CVPR 2021):

Stage I: Pretrain Model on Source Domain

To train the GLT model in the source domain, run this command:

sh scripts/pretrain_market1501.sh

Stage II: End-to-end training with clustering

Utilizeing the GLT model based on K-means clustering algorithm:

sh scripts/GLT_kmeans_duke2market.sh

3. Stronger Baseline:

Stage I: Pretrain Model on Source Domain

To train the baseline in the source domain, run this command:

sh scripts/pretrain_market1501.sh

Stage II: End-to-end training with clustering

Utilizeing the baseline or uncertainty model(s) based on DBSCAN clustering algorithm:

sh scripts/dbscan_baseline_market2duke.sh

Acknowledgement

Some parts of UDAstrongbaseline are from MMT and fastreid. We would like to thank for these projects, and we will update our method .

Citation

If you find this code useful for your research, please use the following BibTeX entry.

@article{zheng2020exploiting,
  title={Exploiting Sample Uncertainty for Domain Adaptive Person Re-Identification},
  author={Zheng, Kecheng and Lan, Cuiling and Zeng, Wenjun and Zhang, Zhizheng and Zha, Zheng-Jun},
  journal={AAAI},
  year={2021}
}

@article{zheng2021labeltransfer,
  title={Group-aware Label Transfer for Domain Adaptive Person Re-identification},
  author={Zheng, Kecheng and Liu, Wu and Mei, Tao and Luo, Jiebo and Zha, Zheng-Jun},
  journal={CVPR},
  year={2021}
}

udastrongbaseline's People

Contributors

zkcys001 avatar tomhardy1138 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.