Person re-identification (Re-ID) is the task of identifying a person-of-interest (query person) at other time and/or location captured using same or different camera at same or different orientation. Re-ID is addressed as image-retrieval problem where we have a set of images of different person, called as gallery, and we retrieve the most similar person to the query person from the gallery.
In this work we implement Locally Aware Transformer (LA-TF) on PKU-Reid dataset, and make design changes to address its limitations. Report is available here.
Model | CMC@rank-1 | CMC@rank-5 | mAP | Download |
---|---|---|---|---|
LA-TF | 95 | 99.4 | 91.1 | model |
LA-TF++ (ours) | 98.8 | 1.0 | 94.7 | model |
pip install -r requirements.txt
Locally-Aware Transformer (Baseline)
python train_baseline.py --train_data_dir ./data/train --model_name la-tf_baseline --model_dir ./model
LA-TF++ (Our model)
python run-train.py --train_data_dir ./data/train --model_name la-tf++_final --model_dir ./model
python run-test.py --model_path <path-to-saved-model> --test_data ./data/val
The script run-test.py
takes in the query and gallery images (present in the test_data
) and computes the following metrics:
- CMC@rank-1
- CMC@rank-5
- mean Average Precision (mAP)
python run-test.py --model_path <path-to-saved-model> --test_data ./data/val --visualize --save_preds <path-to-save-images>
The dataset has 114 unique persons. The train and val set contain 62 and 12 persons, respectively. Each person has been captured using 2 cameras from 8 different angles.
- Locally Aware Transformer (LA-TF) is adaped from Person Re-Identification with a Locally Aware Transformer.
- Triplet Loss and Label Smoothing are adapted from Alignedreid++.
Computer Vision course project (course webpage) taken by Prof. Chetan Arora