aioz-ai / CVPRW21_GPS

Graph-based Person Signature for Person Re-Identifications (CVPRW 21)
https://blog.ai.aioz.io/research/gps-reid/
MIT License
16 stars 8 forks source link
graph-based-learning identifications person-reid person-signature reid

Graph-based Person Signature for Person Re-Identifications (GPS)

This repository is the implementation of GPS for Person Re-Identifications task. Our model achieved 87.8, 78.7 on mean Average Precision (mAP) and 95.2, 88.2 on Cumulative Matching Characteristic (CMC) R-1 over Market1501 and DukeMTMC-ReID datasets, respectively. For the detail, please refer to link.

This repository is based on and inspired by @Hao Luo's work. We sincerely thank for their sharing of the codes.

Summary

The proposed framework

Illustration of the proposed framework

Prerequisites

Python3

Please install dependence package by run following command:

pip install -r requirements.txt

Datasets

Market1501

This directory is constructed as follow:

|---dataset   
|---|---market1501   
|---|---|---bounding_box_test
|---|---|---bounding_box_train
|---|---|---gt_bbox
|---|---|---gt_query
|---|---|---query
|---|---|---attribute
|---|---|---Masks
|---|---|---adj.pkl
|---|---|---glove.pkl
|---|---|---image_mask_path_dict.pkl
|---|---|...

DukeMTMC-ReID

This directory is constructed as follow:

|---dataset   
|---|---dukemtmc
|---|---|---bounding_box_test
|---|---|---bounding_box_train
|---|---|---query
|---|---|---attribute
|---|---|---Masks
|---|---|---adj.pkl
|---|---|---glove.pkl
|---|---|---image_mask_path_dict.pkl
|---|---|...

Thanks to Yutian Lin (github) for providing the Market1501 and DukeMTMC-ReID attributes.

Training

You should download the pretrained weight of ResNet50 model via link and put to pretrained/resnet50-pretrained/ directory.

To train GPS model on Market1501 dataset, please follow:

$ python train.py --config_file configs/market1501_gps_softmax_triplet_center.yml

To train GPS model on DukeMTMC-ReID dataset, please follow:

$ python train.py --config_file configs/dukemtmc_gps_softmax_triplet_center.yml

The training scores will be printed every epoch.

Testing

In this repo, we include the pre-trained weight of GPS_market1501 and GPS_dukemtmc models.

For GPS_market1501 pretrained model. Please download the link and move to pretrained/ directory. The trained GPS_market1501 model can be tested in Market1501 test split via:

$ python test.py --config_file configs/market1501_gps_softmax_triplet_center.yml MODEL.PRETRAIN_CHOICE "('self')" TEST.WEIGHT "('pretrained/GPS_market1501.pth')"

For GPS_dukemtmc pretrained model. Please download the link and move to pretrained. The trained GPS_dukemtmc model can be tested in DukeMTMC-ReID test split via:

$ python test.py --config_file configs/dukemtmc_gps_softmax_triplet_center.yml MODEL.PRETRAIN_CHOICE "('self')" TEST.WEIGHT "('pretrained/GPS_dukemtmc.pth')"

Citation

If you use this code as part of any published research, we'd really appreciate it if you could cite the following paper:

@InProceedings{Nguyen_2021_CVPR,
    author    = {Nguyen, Binh X. and Nguyen, Binh D. and Do, Tuong and Tjiputra, Erman and Tran, Quang D. and Nguyen, Anh},
    title     = {Graph-Based Person Signature for Person Re-Identifications},
    booktitle = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) Workshops},
    month     = {June},
    year      = {2021},
    pages     = {3492-3501}
}

License

MIT License

AIOZ © 2021 All rights reserved.

More information

AIOZ AI Homepage: https://ai.aioz.io

AIOZ Network: https://aioz.network