An official PyTorch implementation of the paper "Learning by Aligning: Visible-Infrared Person Re-identification using Cross-Modal Correspondences", ICCV 2021.

Related tags

Computer Vision LbA
Overview

PyTorch implementation of Learning by Aligning (ICCV 2021)

This is an official PyTorch implementation of the paper "Learning by Aligning: Visible-Infrared Person Re-identification using Cross-Modal Correspondences", ICCV 2021.

For more details, visit our project site or see our paper.

Requirements

  • Python 3.8
  • PyTorch 1.7.1
  • GPU memory >= 11GB

Getting started

First, clone our git repository.

git clone https://github.com/cvlab-yonsei/LbA.git
cd LbA

Docker

You can use docker pull sanghslee/ps:1.7.1-cuda11.0-cudnn8-runtime

Prepare datasets

  • SYSU-MM01: download from this link.
    • For SYSU-MM01, you need to preprocess the .jpg files into .npy files by running:
      • python utils/pre_preprocess_sysu.py --data_dir /path/to/SYSU-MM01
    • Modify the dataset directory below accordingly.
      • L63 of train.py
      • L54 of test.py

Train

  • run python train.py --method full

  • Important:

    • Performances reported during training does not reflect exact performances of your model. This is due to 1) evaluation protocols of the datasets and 2) random seed configurations.
    • Make sure you seperately run test.py to obtain correct results to be reported in your paper.

Test

  • run python test.py --method full
  • The results should be around:
dataset method mAP rank-1
SYSU-MM01 baseline 49.54 50.43
SYSU-MM01 full 54.14 55.41

Pretrained weights

  • Download [SYSU-MM01]
  • The results should be:
dataset method mAP rank-1
SYSU-MM01 full 55.22 56.31

Bibtex

@article{park2021learning,
  title={Learning by Aligning: Visible-Infrared Person Re-identification using Cross-Modal Correspondences},
  author={Park, Hyunjong and Lee, Sanghoon and Lee, Junghyup and Ham, Bumsub},
  journal={arXiv preprint arXiv:2108.07422},
  year={2021}
}

Credits

Our implementation is based on Mang Ye's code here.

Comments
  • something about run this code

    something about run this code

    thanks for your code, there is something wrong when i run you code,in this line: loss = torch.mean(comask_pos * self.criterion(feat, feat_recon_pos, feat_recon_neg)) the wrong is:RuntimeError: The size of tensor a (9) must match the size of tensor b (18) at non-singleton dimension 3 could you give me some help?

    opened by zhuchuanleiqq 12
  • When running

    When running "train. Py", there is a problem on line 132 of the "model. Py" file:

    When running "train. Py", there is a problem on line(loss = torch.mean(comask_pos * self.criterion(feat, feat_recon_pos, feat_recon_neg))) 132 of the "model. Py" file: Traceback:RuntimeError: The size of tensor a (9) must match the size of tensor b (18) at non-singleton dimension 3

    opened by redsoup 1
  • Question about the training speed

    Question about the training speed

    Thanks for your work.

    When I tried to reproduce your results with an Nvidia 2080Ti (as recommended by the paper), however, the training speed seemed very slow. It nearly took 20 minutes for each epoch on SYSU-MM01, which mismatched with the reported 8 hours training time.

    I have already used cuda for acceleration. Thus, I wonder how did this happen. Thank you.

    opened by hansonchen1996 1
  • Problems about the performance

    Problems about the performance

    I have run your source code on both SYSU and RegDB datasets, but I didn't get the performance of your paper. So I want to know how to set the hyper-parameter to get the performance of your paper?

    opened by Mrkkew 1
  • Visualization problem

    Visualization problem

    Hello, Thanks for your great work, I am wondering about the visualization part, use mask and comask matrix in SYSU-MM01 dataset. Can I get some details about the steps of your visualization method? Thank you very much.

    opened by sunset233 0
Owner
CV Lab @ Yonsei University
CV Lab @ Yonsei University
code for our ICCV 2021 paper "DeepCAD: A Deep Generative Network for Computer-Aided Design Models"

DeepCAD This repository provides source code for our paper: DeepCAD: A Deep Generative Network for Computer-Aided Design Models Rundi Wu, Chang Xiao,

Rundi Wu 85 Dec 31, 2022
Dataset and Code for ICCV 2021 paper "Real-world Video Super-resolution: A Benchmark Dataset and A Decomposition based Learning Scheme"

Dataset and Code for RealVSR Real-world Video Super-resolution: A Benchmark Dataset and A Decomposition based Learning Scheme Xi Yang, Wangmeng Xiang,

Xi Yang 91 Nov 22, 2022
Official implementation of "An Image is Worth 16x16 Words, What is a Video Worth?" (2021 paper)

An Image is Worth 16x16 Words, What is a Video Worth? paper Official PyTorch Implementation Gilad Sharir, Asaf Noy, Lihi Zelnik-Manor DAMO Academy, Al

null 213 Nov 12, 2022
This is the official PyTorch implementation of the paper "TransFG: A Transformer Architecture for Fine-grained Recognition" (Ju He, Jie-Neng Chen, Shuai Liu, Adam Kortylewski, Cheng Yang, Yutong Bai, Changhu Wang, Alan Yuille).

TransFG: A Transformer Architecture for Fine-grained Recognition Official PyTorch code for the paper: TransFG: A Transformer Architecture for Fine-gra

Ju He 307 Jan 3, 2023
[ICCV, 2021] Cloud Transformers: A Universal Approach To Point Cloud Processing Tasks

Cloud Transformers: A Universal Approach To Point Cloud Processing Tasks This is an official PyTorch code repository of the paper "Cloud Transformers:

Visual Understanding Lab @ Samsung AI Center Moscow 27 Dec 15, 2022
Code for the paper "DewarpNet: Single-Image Document Unwarping With Stacked 3D and 2D Regression Networks" (ICCV '19)

DewarpNet This repository contains the codes for DewarpNet training. Recent Updates [May, 2020] Added evaluation images and an important note about Ma

CVLab@StonyBrook 354 Jan 1, 2023
The project is an official implementation of our paper "3D Human Pose Estimation with Spatial and Temporal Transformers".

3D Human Pose Estimation with Spatial and Temporal Transformers This repo is the official implementation for 3D Human Pose Estimation with Spatial and

Ce Zheng 363 Dec 28, 2022
Official PyTorch implementation for "Mixed supervision for surface-defect detection: from weakly to fully supervised learning"

Mixed supervision for surface-defect detection: from weakly to fully supervised learning [Computers in Industry 2021] Official PyTorch implementation

ViCoS Lab 169 Dec 30, 2022
[BMVC'21] Official PyTorch Implementation of Grounded Situation Recognition with Transformers

Grounded Situation Recognition with Transformers Paper | Model Checkpoint This is the official PyTorch implementation of Grounded Situation Recognitio

Junhyeong Cho 18 Jul 19, 2022
Implement 'Single Shot Text Detector with Regional Attention, ICCV 2017 Spotlight'

SSTDNet Implement 'Single Shot Text Detector with Regional Attention, ICCV 2017 Spotlight' using pytorch. This code is work for general object detecti

HotaekHan 84 Jan 5, 2022
A PyTorch implementation of ECCV2018 Paper: TextSnake: A Flexible Representation for Detecting Text of Arbitrary Shapes

TextSnake: A Flexible Representation for Detecting Text of Arbitrary Shapes A PyTorch implement of TextSnake: A Flexible Representation for Detecting

Prince Wang 417 Dec 12, 2022
Official implementation of Character Region Awareness for Text Detection (CRAFT)

CRAFT: Character-Region Awareness For Text detection Official Pytorch implementation of CRAFT text detector | Paper | Pretrained Model | Supplementary

Clova AI Research 2.5k Jan 3, 2023
Code for AAAI 2021 paper: Sequential End-to-end Network for Efficient Person Search

This repository hosts the source code of our paper: [AAAI 2021]Sequential End-to-end Network for Efficient Person Search. SeqNet achieves the state-of

Zj Li 218 Dec 31, 2022
SceneCollisionNet This repo contains the code for "Object Rearrangement Using Learned Implicit Collision Functions", an ICRA 2021 paper. For more info

SceneCollisionNet This repo contains the code for "Object Rearrangement Using Learned Implicit Collision Functions", an ICRA 2021 paper. For more info

NVIDIA Research Projects 31 Nov 22, 2022
Code for the head detector (HeadHunter) proposed in our CVPR 2021 paper Tracking Pedestrian Heads in Dense Crowd.

Head Detector Code for the head detector (HeadHunter) proposed in our CVPR 2021 paper Tracking Pedestrian Heads in Dense Crowd. The head_detection mod

Ramana Subramanyam 76 Dec 6, 2022
Source code of our TPAMI'21 paper Dual Encoding for Video Retrieval by Text and CVPR'19 paper Dual Encoding for Zero-Example Video Retrieval.

Dual Encoding for Video Retrieval by Text Source code of our TPAMI'21 paper Dual Encoding for Video Retrieval by Text and CVPR'19 paper Dual Encoding

null 81 Dec 1, 2022
An Implementation of the alogrithm in paper IncepText: A New Inception-Text Module with Deformable PSROI Pooling for Multi-Oriented Scene Text Detection

InceptText-Tensorflow An Implementation of the alogrithm in paper IncepText: A New Inception-Text Module with Deformable PSROI Pooling for Multi-Orien

GeorgeJoe 115 Dec 12, 2022
Implementation of our paper 'PixelLink: Detecting Scene Text via Instance Segmentation' in AAAI2018

Code for the AAAI18 paper PixelLink: Detecting Scene Text via Instance Segmentation, by Dan Deng, Haifeng Liu, Xuelong Li, and Deng Cai. Contributions

null 758 Dec 22, 2022
An Implementation of the seglink alogrithm in paper Detecting Oriented Text in Natural Images by Linking Segments

Tips: A more recent scene text detection algorithm: PixelLink, has been implemented here: https://github.com/ZJULearning/pixel_link Contents: Introduc

dengdan 484 Dec 7, 2022