Code Monkey home page Code Monkey logo

pplr's Introduction

Part-based Pseudo Label Refinement (PPLR)

Official PyTorch implementation of Part-based Pseudo Label Refinement for Unsupervised Person Re-identification (CVPR 2022).

Updates

  • [07/2022] Pretrained weights are released.
  • [06/2022] Code is released.

Overview

overview

We propose a Part-based Pseudo Label Refinement (PPLR) framework that reduces the label noise by employing the complementary relationship between global and part features. Specifically, we design a cross agreement score as the similarity of k-nearest neighbors between feature spaces to exploit the reliable complementary relationship. Based on the cross agreement, we refine pseudo-labels of global features by ensembling the predictions of part features, which collectively alleviate the noise in global feature clustering. We further refine pseudo-labels of part features by applying label smoothing according to the suitability of given labels for each part. Our PPLR learns discriminative representations with rich local contexts. Also, it operates in a self-ensemble manner without auxiliary teacher networks, which is computationally efficient.

Getting Started

Installation

git clone https://github.com/yoonkicho/PPLR
cd PPLR
python setup.py develop

Preparing Datasets

cd examples && mkdir data

Download the object re-ID datasets Market-1501, MSMT17, and VeRi-776 to PPLR/examples/data. The directory should look like

PPLR/examples/data
├── Market-1501-v15.09.15
├── MSMT17_V1
└── VeRi

Training

We utilize 4 TITAN RTX GPUs for training. We use 384x128 sized images for Market-1501 and MSMT17 and 256x256 sized images for VeRi-776.

Training without camera labels

For Market-1501:

CUDA_VISIBLE_DEVICE=0,1,2,3 \
python examples/train_pplr.py \
-d market1501 --logs-dir $PATH_FOR_LOGS

For MSMT17:

CUDA_VISIBLE_DEVICE=0,1,2,3 \
python examples/train_pplr.py \
-d msmt17 --logs-dir $PATH_FOR_LOGS

For VeRi-776:

CUDA_VISIBLE_DEVICE=0,1,2,3 \
python examples/train_pplr.py \
-d veri -n 8 --height 256 --width 256 --eps 0.7 --logs-dir $PATH_FOR_LOGS

Training with camera labels

For Market-1501:

CUDA_VISIBLE_DEVICE=0,1,2,3 \
python examples/train_pplr_cam.py \
-d market1501 --eps 0.4 --logs-dir $PATH_FOR_LOGS

For MSMT17:

CUDA_VISIBLE_DEVICE=0,1,2,3 \
python examples/train_pplr_cam.py \
-d msmt17 --eps 0.6 --lam-cam 1.0 --logs-dir $PATH_FOR_LOGS

For VeRi-776:

CUDA_VISIBLE_DEVICE=0,1,2,3 \
python examples/train_pplr_cam.py \
-d veri -n 8 --height 256 --width 256 --eps 0.7 --logs-dir $PATH_FOR_LOGS

Testing

We use a single TITAN RTX GPU for testing.

You can download pre-trained weights from this link.

For Market-1501:

CUDA_VISIBLE_DEVICE=0\
python examples/test.py \
-d market1501 --resume $PATH_FOR_MODEL

For MSMT17:

CUDA_VISIBLE_DEVICE=0\
python examples/test.py \
-d msmt17 --resume $PATH_FOR_MODEL

For VeRi-776:

CUDA_VISIBLE_DEVICE=0\
python examples/test.py \
-d veri --height 256 --width 256 --resume $PATH_FOR_MODEL

Acknowledgement

Some parts of the code is borrowed from SpCL.

Citation

If you find this code useful for your research, please consider citing our paper

@inproceedings{cho2022part,
  title={Part-based Pseudo Label Refinement for Unsupervised Person Re-identification},
  author={Cho, Yoonki and Kim, Woo Jae and Hong, Seunghoon and Yoon, Sung-Eui},
  booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  pages={7308--7318},
  year={2022}
}

pplr's People

Contributors

yoonkicho 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.