[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
Continuous Diffusion Graph Neural Network

We present Graph Neural Diffusion (GRAND) that approaches deep learning on graphs as a continuous diffusion process and treats Graph Neural Networks (GNNs) as discretisations of an underlying PDE.

Twitter Research 227 Jan 05, 2023
Personalized Federated Learning using Pytorch (pFedMe)

Personalized Federated Learning with Moreau Envelopes (NeurIPS 2020) This repository implements all experiments in the paper Personalized Federated Le

Charlie Dinh 226 Dec 30, 2022
PyTorch code for our paper "Attention in Attention Network for Image Super-Resolution"

Under construction... Attention in Attention Network for Image Super-Resolution (A2N) This repository is an PyTorch implementation of the paper "Atten

Haoyu Chen 71 Dec 30, 2022
EncT5: Fine-tuning T5 Encoder for Non-autoregressive Tasks

EncT5 (Unofficial) Pytorch Implementation of EncT5: Fine-tuning T5 Encoder for Non-autoregressive Tasks About Finetune T5 model for classification & r

Jangwon Park 34 Jan 01, 2023
Python library for science observations from the James Webb Space Telescope

JWST Calibration Pipeline JWST requires Python 3.7 or above and a C compiler for dependencies. Linux and MacOS platforms are tested and supported. Win

Space Telescope Science Institute 386 Dec 30, 2022
RoMa: A lightweight library to deal with 3D rotations in PyTorch.

RoMa: A lightweight library to deal with 3D rotations in PyTorch. RoMa (which stands for Rotation Manipulation) provides differentiable mappings betwe

NAVER 90 Dec 27, 2022
Open Source Light Field Toolbox for Super-Resolution

BasicLFSR BasicLFSR is an open-source and easy-to-use Light Field (LF) image Super-Ressolution (SR) toolbox based on PyTorch, including a collection o

Squidward 50 Nov 18, 2022
WaveFake: A Data Set to Facilitate Audio DeepFake Detection

WaveFake: A Data Set to Facilitate Audio DeepFake Detection This is the code repository for our NeurIPS 2021 (Track on Datasets and Benchmarks) paper

Chair for Sys­tems Se­cu­ri­ty 27 Dec 22, 2022
Official PyTorch implementation of StyleGAN3

Modified StyleGAN3 Repo Changes Made tied to python 3.7 syntax .jpgs instead of .pngs for training sample seeds to recreate the 1024 training grid wit

Derrick Schultz (he/him) 83 Dec 15, 2022
Event queue (Equeue) dialect is an MLIR Dialect that models concurrent devices in terms of control and structure.

Event Queue Dialect Event queue (Equeue) dialect is an MLIR Dialect that models concurrent devices in terms of control and structure. Motivation The m

Cornell Capra 23 Dec 08, 2022
A curated list of neural network pruning resources.

A curated list of neural network pruning and related resources. Inspired by awesome-deep-vision, awesome-adversarial-machine-learning, awesome-deep-learning-papers and Awesome-NAS.

Yang He 1.7k Jan 09, 2023
CausaLM: Causal Model Explanation Through Counterfactual Language Models

CausaLM: Causal Model Explanation Through Counterfactual Language Models Authors: Amir Feder, Nadav Oved, Uri Shalit, Roi Reichart Abstract: Understan

Amir Feder 39 Jul 10, 2022
Code release for "COTR: Correspondence Transformer for Matching Across Images"

COTR: Correspondence Transformer for Matching Across Images This repository contains the inference code for COTR. We plan to release the training code

UBC Computer Vision Group 360 Jan 06, 2023
Source code for the ACL-IJCNLP 2021 paper entitled "T-DNA: Taming Pre-trained Language Models with N-gram Representations for Low-Resource Domain Adaptation" by Shizhe Diao et al.

T-DNA Source code for the ACL-IJCNLP 2021 paper entitled Taming Pre-trained Language Models with N-gram Representations for Low-Resource Domain Adapta

shizhediao 17 Dec 22, 2022
Bayesian Optimization using GPflow

Note: This package is for use with GPFlow 1. For Bayesian optimization using GPFlow 2 please see Trieste, a joint effort with Secondmind. GPflowOpt GP

GPflow 257 Dec 26, 2022
Scripts and misc. stuff related to the PortSwigger Web Academy

PortSwigger Web Academy Notes Mostly scripts to automate the exploits. Going in the order of the recomended learning path - starting with SQLi. Commun

pageinsec 17 Dec 30, 2022
LIAO Shuiying 6 Dec 01, 2022
use tensorflow 2.0 to tell a dog and cat from a specified picture

dog_or_cat use tensorflow 2.0 to tell a dog and cat from a specified picture This is one of the classic experiments for the introduction of deep learn

你这个代码我看不懂 1 Oct 22, 2021
This is a Python wrapper for TA-LIB based on Cython instead of SWIG.

TA-Lib This is a Python wrapper for TA-LIB based on Cython instead of SWIG. From the homepage: TA-Lib is widely used by trading software developers re

John Benediktsson 7.3k Jan 03, 2023
Learning RGB-D Feature Embeddings for Unseen Object Instance Segmentation

Unseen Object Clustering: Learning RGB-D Feature Embeddings for Unseen Object Instance Segmentation Introduction In this work, we propose a new method

NVIDIA Research Projects 132 Dec 13, 2022