Giter Site home page Giter Site logo

hyk1996 / degradation-invariant-reid-pytorch Goto Github PK

View Code? Open in Web Editor NEW
11.0 1.0 1.0 1.97 MB

The official implementation of IJCV 2022 paper "Learning Degradation-Invariant Representation for Robust Real-World Person Re-Identification".

License: Apache License 2.0

Python 100.00%

degradation-invariant-reid-pytorch's Introduction

Degradation-Invariant-Re-ID-pytorch

This repository contains the official implementation of the IJCV 2022 paper:

Learning Degradation-Invariant Representation for Robust Real-World Person Re-Identification
Yukun Huang1, Xueyang Fu1, Liang Li2, Zheng-Jun Zha1
1University of Science and Technology of China   2Institute of Computing Technology, Chinese Academy of Sciences

Introduction

We propose a real-world Degradation Invariance Learning (DIL) framework, which can utilize training image pairs with different supervision types for content-degradation feature disentanglement. Using DIL as a proxy task can facilitate both low- and high-level downstream tasks such as person re-identification and low-light image enhancement.

Dependencies

  • Python 3.8
  • PyTorch 1.8.0

Dataset

Download the MLR-CUHK03 dataset and reorganize the folders as follows:

├── resolution-reid
│   ├── MLR-CUHK03
│       ├── train
│       ├── val
│       ├── gallery
│       ├── query
│           ├── 0020
│               ├── 00020_c0_00000.jpg
│               ├── ...

To construct the cross-resolution MLR-CUHK03, MLR-VIPeR, and CAVIAR benchmarks, you may follow the AAAI 2018 paper "Deep Low-Resolution Person Re-Identification" and use the split protocol files provided in data_splits/ from Google Drive.

Model

Trained model are provided. You may download it from Google Drive, then move the outputs folder to your project's root directory.

Usage

1. Training

The first training stage aims to learn disentangled representations of image content and degradation, you can run:

python train_dil.py --dataset mlr_cuhk03 --data_root path/to/resolution-reid/

The second training stage is for downstream tasks. For person Re-ID, you can run:

python train_reid.py --dataset mlr_cuhk03 --data_root path/to/resolution-reid/ --teacher_root path/to/teacher/

The teacher model weights can be downloaded from Google Drive.

2. Re-ID Evaluation

To evaluate the Re-ID model on the MLR-CUHK03 dataset, you can run:

python test_reid.py --dataset mlr_cuhk03 --data_root path/to/resolution-reid/

The Re-ID performance of our provided model weights:

Rank@1=91.8 Rank@5=98.6 Rank@10=99.3 Rank@20=99.5 mAP=94.8

3. Visualization

You can run the following command to obtain visualization results of degradation manipulation:

python visualize.py

The visualization results of degradation swapping:

The visualization results of degradation memory replay:

Citation

If you find the code useful, please kindly cite our works:

@article{huang2022degradation,
  title={Learning Degradation-Invariant Representation for Robust Real-World Person Re-Identification},
  author={Huang, Yukun and Fu, Xueyang and Li, Liang and Zha, Zheng-Jun},
  journal={International Journal of Computer Vision},
  volume={130},
  number={11},
  pages={2770--2796},
  year={2022},
  publisher={Springer}
}

@inproceedings{huang2020degradation,
title={Real-World Person Re-Identification via Degradation Invariance Learning},
author={Huang, Yukun and Zha, Zheng-Jun and Fu, Xueyang and Hong, Richang and Li, Liang},
booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition},
pages={14084--14094},
year={2020}
}

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.