Prerequisite: Python 3.10.13 and Pytorch 2.2.0
-
Install Pytorch
-
Download and prepare the dataset as follow:
a. PETA
- Datset內容
../Dataset/peta/images/*.png ../Dataset/peta/PETA.mat ../Dataset/peta/README
- 執行底下程式,整理 training 需要用到的資料包成 dictionary,生成 peta_partition.pkl 後再做後續 training
python script/dataset/transform_peta.py
b. RAP
../Dataset/rap/RAP_dataset/*.png ../Dataset/rap/RAP_annotation/RAP_annotation.mat
python script/dataset/transform_rap.py
c. PA100K
../Dataset/pa100k/data/*.png ../Dataset/pa100k/annotation.mat
python script/dataset/transform_pa100k.py
d. RAP(v2)
../Dataset/rap2/RAP_dataset/*.png ../Dataset/rap2/RAP_annotation/RAP_annotation.mat
python script/dataset/transform_rap2.py
-
File location
PAR_PATH ├── Dataset │ ├── pa100k │ │ │── data │ │ │── annotation.mat │ │── PETA │ │ │── images │ │ │── PETA.mat │ │── rapv2 │ │ │── RAP_annotation │ │ │── RAP_dataset │ │── RAPv1 ├── pedestrian_attribute_recognition | │── script | │ ├── dataset | │ │ ├── transform_pa100k.py | │ │ ├── transform_peta.py | │ │ ├── transform_rap.py | │ │ ├── transform_rap2.py | │ ├── experiment | │ │ ├── train.sh | │ │ ├── test.sh | │ │ ├── train_deepmar_resnet50.py | │ │ ├── baseline | │ │ | ├── ... | │── exp | │ ├── deepmar_resnet50 ├── ...
sh script/experiment/train.sh
sh script/experiment/test.sh
@inproceedings{li2015deepmar,
author = {Dangwei Li and Xiaotang Chen and Kaiqi Huang},
title = {Multi-attribute Learning for Pedestrian Attribute Recognition in Surveillance Scenarios},
booktitle = {ACPR},
pages={111--115},
year = {2015}
}
Partial codes are based on the repository from Dangwei Li.
The code should only be used for academic research.