[BMVC2021] The official implementation of "DomainMix: Learning Generalizable Person Re-Identification Without Human Annotations"

Overview

DomainMix

[BMVC2021] The official implementation of "DomainMix: Learning Generalizable Person Re-Identification Without Human Annotations"

[paper] [demo] [Chinese blog]

DomainMix works fine on both PaddlePaddle and PyTorch.

Framework:

Requirement

  • Python 3.7
  • Pytorch 1.7.0
  • sklearn 0.23.2
  • PIL 5.4.1
  • Numpy 1.19.4
  • Torchvision 0.8.1

Reproduction Environment

  • Test our models: 1 Tesla V100 GPU.
  • Train new models: 4 Telsa V100 GPUs.
  • Note that the required for GPU is not very strict, and 6G memory per GPU is minimum.

Preparation

  1. Dataset

We evaluate our algorithm on RandPerson, Market-1501, CUHK03-NP and MSMT17. You should download them by yourselves and prepare the directory structure like this:

*DATA_PATH
      *data
         *randperson_subset
             *randperson_subset
                 ...
         *market1501
             *Market-1501-v15.09.15
                 *bounding_box_test
                 ...
         *cuhk03_np
             *detected
             *labeled
         *msmt17
             *MSMT17_V1
                 *test
                 *train
                 ...
  1. Pretrained Models

We use ResNet-50 and IBN-ResNet-50 as backbones. The pretrained models for ResNet-50 will be downloaded automatically. When training with the backbone of IBN-ResNet-50, you should download the pretrained models from here, and save it like this:

*DATA_PATH
      *logs
         *pretrained
             resnet50_ibn_a.pth.tar
  1. Our Trained Models

We provide our trained models as follows. They should be saved in ./logs/trained

Market1501:

DomainMix(43.5% mAP) DomainMix-IBN(45.7% mAP)

CUHK03-NP:

DomainMix(16.7% mAP) DomainMix-IBN(18.3% mAP)

MSMT17:

DomainMix(9.3% mAP) DomainMix-IBN(12.1% mAP)

Train

We use RandPerson+MSMT->Market as an example, other DG tasks will follow similar pipelines.

CUDA_VISIBLE_DEVICES=0,1,2,3 python train.py \
-dsy randperson_subset -dre msmt17 -dun market1501 \
-a resnet50 --margin 0.0 --num-instances 4 -b 64 -j 4 --warmup-step 5 \
--lr 0.00035 --milestones 10 15 30 40 50 --iters 2000 \
--epochs 60 --eval-step 1 --logs-dir logs/randperson_subsetmsTOm/domainmix

Test

We use RandPerson+MSMT->Market as an example, other DG tasks will follow similar pipelines.

CUDA_VISIBLE_DEVICES=0 python test.py -b 256 -j 8 --dataset-target market1501 -a resnet50 \
--resume logs/trained/model_best_435.pth.tar

Acknowledgement

Some parts of our code are from MMT and SpCL. Thanks Yixiao Ge for her contribution.

Citation

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

@inproceedings{
  wang2021domainmix,
  title={DomainMix: Learning Generalizable Person Re-Identification Without Human Annotations},
  author={Wenhao Wang and Shengcai Liao and Fang Zhao and Kangkang Cui and Ling Shao},
  booktitle={British Machine Vision Conference},
  year={2021}
}
Owner
Wenhao Wang
I am a student from Beihang University. My research interests include person re-identification, unsupervised domain adaptation, and domain generalization.
Wenhao Wang
Repo for EchoVPR: Echo State Networks for Visual Place Recognition

EchoVPR Repo for EchoVPR: Echo State Networks for Visual Place Recognition Currently under development Dirs: data: pre-collected hidden representation

Anil Ozdemir 4 Oct 04, 2022
A simple and lightweight genetic algorithm for optimization of any machine learning model

geneticml This package contains a simple and lightweight genetic algorithm for optimization of any machine learning model. Installation Use pip to ins

Allan Barcelos 8 Aug 10, 2022
NeWT: Natural World Tasks

NeWT: Natural World Tasks This repository contains resources for working with the NeWT dataset. โ— At this time the binary tasks are not publicly avail

Visipedia 26 Oct 18, 2022
PixelPick This is an official implementation of the paper "All you need are a few pixels: semantic segmentation with PixelPick."

PixelPick This is an official implementation of the paper "All you need are a few pixels: semantic segmentation with PixelPick." [Project page] [Paper

Gyungin Shin 59 Sep 25, 2022
Official implementation of "Variable-Rate Deep Image Compression through Spatially-Adaptive Feature Transform", ICCV 2021

Variable-Rate Deep Image Compression through Spatially-Adaptive Feature Transform This repository is the implementation of "Variable-Rate Deep Image C

Myungseo Song 47 Dec 13, 2022
Automatic Data-Regularized Actor-Critic (Auto-DrAC)

Auto-DrAC: Automatic Data-Regularized Actor-Critic This is a PyTorch implementation of the methods proposed in Automatic Data Augmentation for General

89 Dec 13, 2022
Solutions and questions for AoC2021. Merry christmas!

Advent of Code 2021 Merry christmas! ๐ŸŽ„ ๐ŸŽ… To get solutions and approximate execution times for implementations, please execute the run.py script in t

Wilhelm ร…gren 5 Dec 29, 2022
Official code release for 3DV 2021 paper Human Performance Capture from Monocular Video in the Wild.

Official code release for 3DV 2021 paper Human Performance Capture from Monocular Video in the Wild.

Chen Guo 58 Dec 24, 2022
Official PyTorch implementation of "Uncertainty-Based Offline Reinforcement Learning with Diversified Q-Ensemble" (NeurIPS'21)

Uncertainty-Based Offline Reinforcement Learning with Diversified Q-Ensemble This is the code for reproducing the results of the paper Uncertainty-Bas

43 Nov 23, 2022
An atmospheric growth and evolution model based on the EVo degassing model and FastChem 2.0

EVolve Linking planetary mantles to atmospheric chemistry through volcanism using EVo and FastChem. Overview EVolve is a linked mantle degassing and a

Pip Liggins 2 Jan 17, 2022
Code for ICLR 2021 Paper, "Anytime Sampling for Autoregressive Models via Ordered Autoencoding"

Anytime Autoregressive Model Anytime Sampling for Autoregressive Models via Ordered Autoencoding , ICLR 21 Yilun Xu, Yang Song, Sahaj Gara, Linyuan Go

Yilun Xu 22 Sep 08, 2022
Attendance Monitoring with Face Recognition using Python

Attendance Monitoring with Face Recognition using Python A python GUI integrated attendance system using face recognition to take attendance. In this

Vaibhav Rajput 2 Jun 21, 2022
A simple implementation of Kalman filter in Multi Object Tracking

kalman Filter in Multi-object Tracking A simple implementation of Kalman filter in Multi Object Tracking ๆœฌๅฎž็Žฐๆ˜ฏๅœจhttps://github.com/liuchangji/kalman-fil

124 Dec 29, 2022
Photo-Realistic Single Image Super-Resolution Using a Generative Adversarial Network

Super Resolution Examples We run this script under TensorFlow 2.0 and the TensorLayer2.0+. For TensorLayer 1.4 version, please check release. ๐Ÿš€ ๐Ÿš€ ๐Ÿš€

TensorLayer Community 2.9k Jan 08, 2023
Deep Learning for Morphological Profiling

Deep Learning for Morphological Profiling An end-to-end implementation of a ML System for morphological profiling using self-supervised learning to di

Danielh Carranza 0 Jan 20, 2022
Database Reasoning Over Text project for ACL paper

Database Reasoning over Text This repository contains the code for the Database Reasoning Over Text paper, to appear at ACL2021. Work is performed in

Facebook Research 320 Dec 12, 2022
AugMix: A Simple Data Processing Method to Improve Robustness and Uncertainty

AugMix Introduction We propose AugMix, a data processing technique that mixes augmented images and enforces consistent embeddings of the augmented ima

Google Research 876 Dec 17, 2022
(Preprint) Official PyTorch implementation of "How Do Vision Transformers Work?"

(Preprint) Official PyTorch implementation of "How Do Vision Transformers Work?"

xxxnell 656 Dec 30, 2022
PyTorch reimplementation of Diffusion Models

PyTorch pretrained Diffusion Models A PyTorch reimplementation of Denoising Diffusion Probabilistic Models with checkpoints converted from the author'

Patrick Esser 265 Jan 01, 2023
The materials used in the SaxonJS tutorial presented at Declarative Amsterdam, 2021

SaxonJS-Tutorial-2021, version 1.0.4 Last updated on 4 November, 2021. Table of contents Background Prerequisites Starting a web server Running a Java

Saxonica 11 Oct 23, 2022