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
Python bindings for JIGSAW: a Delaunay-based unstructured mesh generator.

JIGSAW: An unstructured mesh generator JIGSAW is an unstructured mesh generator and tessellation library; designed to generate high-quality triangulat

Darren Engwirda 26 Dec 13, 2022
A simple component to display annotated text in Streamlit apps.

Annotated Text Component for Streamlit A simple component to display annotated text in Streamlit apps. For example: Installation First install Streaml

Thiago Teixeira 312 Dec 30, 2022
📷 Face Recognition using Haar-Cascade Classifier, OpenCV, and Python

Face-Recognition-System Face Recognition using Haar-Cascade Classifier, OpenCV and Python. This project is based on face detection and face recognitio

1 Jan 10, 2022
Image Smoothing and Blurring Using OpenCV

Image-Smoothing-and-Blurring-Using-OpenCV This repository contains codes for performing image smoothing and blurring using OpenCV. There are different

Happy N. Monday 3 Feb 15, 2022
A tool for extracting text from scanned documents (via OCR), with user-defined post-processing.

The project is based on older versions of tesseract and other tools, and is now superseded by another project which allows for more granular control o

Maxim 32 Jul 24, 2022
A version of nrsc5-gui that merges the interface developed by cmnybo with the architecture developed by zefie in order to start a new baseline that is not heavily dependent upon Python processing.

NRSC5-DUI is a graphical interface for nrsc5. It makes it easy to play your favorite FM HD radio stations using an RTL-SDR dongle. It will also displa

61 Dec 22, 2022
A fastai/PyTorch package for unpaired image-to-image translation.

Unpaired image-to-image translation A fastai/PyTorch package for unpaired image-to-image translation currently with CycleGAN implementation. This is a

Tanishq Abraham 120 Dec 02, 2022
Convert scans of handwritten notes to beautiful, compact PDFs

Convert scans of handwritten notes to beautiful, compact PDFs

Matt Zucker 4.8k Jan 01, 2023
Discord QR Scam Code Generator + Token grab mobile device.

A Python script that automatically generates a Nitro scam QR code and grabs the Discord token when scanned.

Visual 9 Nov 22, 2022
Natural language detection

Detect the language of text. What’s so cool about franc? franc can support more languages(†) than any other library franc is packaged with support for

Titus 3.8k Jan 02, 2023
Extract tables from scanned image PDFs using Optical Character Recognition.

ocr-table This project aims to extract tables from scanned image PDFs using Optical Character Recognition. Install Requirements Tesseract OCR sudo apt

Abhijeet Singh 209 Dec 06, 2022
Train custom VR face tracking parameters

Pal Buddy Guy: The anipal's best friend This is a small script to improve upon the tracking capabilities of the Vive Pro Eye and facial tracker. You c

7 Dec 12, 2021
document image degradation

ocrodeg The ocrodeg package is a small Python library implementing document image degradation for data augmentation for handwriting recognition and OC

NVIDIA Research Projects 134 Nov 18, 2022
This is the code for our paper DAAIN: Detection of Anomalous and AdversarialInput using Normalizing Flows

Merantix-Labs: DAAIN This is the code for our paper DAAIN: Detection of Anomalous and Adversarial Input using Normalizing Flows which can be found at

Merantix 14 Oct 12, 2022
Learning Camera Localization via Dense Scene Matching, CVPR2021

This repository contains code of our CVPR 2021 paper - "Learning Camera Localization via Dense Scene Matching" by Shitao Tang, Chengzhou Tang, Rui Hua

tangshitao 65 Dec 01, 2022
Let's explore how we can extract text from forms

Form Segmentation Let's explore how we can extract text from any forms / scanned pages. Objectives The goal is to find an algorithm that can extract t

Philip Doxakis 42 Jun 05, 2022
Textboxes implementation with Tensorflow (python)

tb_tensorflow A python implementation of TextBoxes Dependencies TensorFlow r1.0 OpenCV2 Code from Chaoyue Wang 03/09/2017 Update: 1.Debugging optimize

Jayne Shin (신재인) 20 May 31, 2019
This repo contains several opencv projects done while learning opencv in python.

opencv-projects-python This repo contains both several opencv projects done while learning opencv by python and opencv learning resources [Basic conce

Fatin Shadab 2 Nov 03, 2022
A Screen Translator/OCR Translator made by using Python and Tesseract, the user interface are made using Tkinter. All code written in python.

About An OCR translator tool. Made by me by utilizing Tesseract, compiled to .exe using pyinstaller. I made this program to learn more about python. I

Fauzan F A 41 Dec 30, 2022
Forked from argman/EAST for the ICPR MTWI 2018 CHALLENGE

EAST_ICPR: EAST for ICPR MTWI 2018 CHALLENGE Introduction This is a repository forked from argman/EAST for the ICPR MTWI 2018 CHALLENGE. Origin Reposi

Haozheng Li 157 Aug 23, 2022