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

Related tags

Computer VisionLbA
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
PyNeuro is designed to connect NeuroSky's MindWave EEG device to Python and provide Callback functionality to provide data to your application in real time.

PyNeuro PyNeuro is designed to connect NeuroSky's MindWave EEG device to Python and provide Callback functionality to provide data to your application

Zach Wang 45 Dec 30, 2022
Image processing is one of the most common term in computer vision

Image processing is one of the most common term in computer vision. Computer vision is the process by which computers can understand images and videos, and how they are stored, manipulated, and retri

Happy N. Monday 3 Feb 15, 2022
Repository relating to the CVPR21 paper TimeLens: Event-based Video Frame Interpolation

TimeLens: Event-based Video Frame Interpolation This repository is about the High Speed Event and RGB (HS-ERGB) dataset, used in the 2021 CVPR paper T

Robotics and Perception Group 544 Dec 19, 2022
Virtual Zoom Gesture using OpenCV

Virtual_Zoom_Gesture I have created a virtual zoom gesture where we can Zoom in and Zoom out any image and even we can move that image anywhere on the

Mudit Sinha 2 Dec 26, 2021
A tool to enhance your old/damaged pictures built using python & opencv.

Breathe Life into your Old Pictures Table of Contents About The Project Getting Started Prerequisites Usage Contact Acknowledgments About The Project

Shah Anwaar Khalid 5 Dec 16, 2021
Document blur detection based on Laplacian operator and text detection.

Document Blur Detection For general blurred image, using the variance of Laplacian operator is a good solution. But as for the blur detection of docum

JoeyLr 5 Oct 20, 2022
ARU-Net - Deep Learning Chinese Word Segment

ARU-Net: A Neural Pixel Labeler for Layout Analysis of Historical Documents Contents Introduction Installation Demo Training Introduction This is the

128 Sep 12, 2022
A little but useful tool to explore OCR data extracted with `pytesseract` and `opencv`

Screenshot OCR Tool Extracting data from screen time screenshots in iOS and Android. We are exploring 3 options: Simple OCR with no text position usin

Gabriele Marini 1 Dec 07, 2021
The CIS OCR PostCorrectionTool

The CIS OCR Post Correction Tool PoCoTo Source code for the Java-based PoCoTo client enabling fast interactive batch corrections of complete OCR error

CIS OCR Group 36 Dec 15, 2022
Crop regions in napari manually

napari-crop Crop regions in napari manually Usage Create a new shapes layer to annotate the region you would like to crop: Use the rectangle tool to a

Robert Haase 4 Sep 29, 2022
Tracking the latest progress in Scene Text Detection and Recognition: Must-read papers well organized

SceneTextPapers Tracking the latest progress in Scene Text Detection and Recognition: must-read papers well organized Information about this repositor

Shangbang Long 763 Jan 01, 2023
Image processing in Python

scikit-image: Image processing in Python Website (including documentation): https://scikit-image.org/ Mailing list: https://mail.python.org/mailman3/l

Image Processing Toolbox for SciPy 5.2k Dec 30, 2022
Automatically fishes for you while you are afk :)

Dank-memer-afk-script A simple and quick way to make easy money in Dank Memer! How to use Open a discord channel which has the Dank Memer bot enabled.

Pranav Doshi 9 Nov 11, 2022
[EMNLP 2021] Improving and Simplifying Pattern Exploiting Training

ADAPET This repository contains the official code for the paper: "Improving and Simplifying Pattern Exploiting Training". The model improves and simpl

Rakesh R Menon 138 Dec 26, 2022
利用Paddle框架复现CRAFT

CRAFT-Paddle 利用Paddle框架复现CRAFT CRAFT 本项目基于paddlepaddle框架复现CRAFT,并参加百度第三届论文复现赛,将在2021年5月15日比赛完后提供AIStudio链接~敬请期待 参考项目: CRAFT: Character-Region Awarenes

QuanHao Guo 2 Mar 07, 2022
Detect textlines in document images

Textline Detection Detect textlines in document images Introduction This tool performs border, region and textline detection from document image data

QURATOR-SPK 70 Jun 30, 2022
Code release for Hu et al., Learning to Segment Every Thing. in CVPR, 2018.

Learning to Segment Every Thing This repository contains the code for the following paper: R. Hu, P. Dollár, K. He, T. Darrell, R. Girshick, Learning

Ronghang Hu 417 Oct 03, 2022
Random maze generator and solver

Maze Generator and Solver I wrote a maze generator that works with two commonly known algorithms: Depth First Search and Randomized Prims. Both of the

Daniel Pérez 10 Sep 23, 2022
Resizing Canny Countour In Python

Resizing_Canny_Countour Install Visual Studio Code , https://code.visualstudio.com/download Select Python and install with terminal( pip install openc

Walter Ng 1 Nov 07, 2021