• Stars
    star
    139
  • Rank 262,954 (Top 6 %)
  • Language
    MATLAB
  • Created almost 7 years ago
  • Updated over 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Pose-Normalized Image Generation for Person Re-identification

Pose-Normalized Image Generation for Person Re-identification

In current version, we release the codes of PN-GAN and re-id testing . The other parts of our project will be released later.

Framework:

framework

Prepare data:

Please download the reID dataset and organize it as follows (Market-1501 for example):

 dataset
    │── Market-1501 # for Market-1501 dataset
    β”‚        β”œβ”€β”€ bounding_box_train
    β”‚        β”œβ”€β”€ bounding_box_test
    β”‚        β”œβ”€β”€ query
    |        β”œβ”€β”€ bounding_box_train_pose # containing training pose images generated by AlphaPose or OpenPose
    |        β”œβ”€β”€ bounding_box_test_pose # containing test pose images generated by AlphaPose or OpenPose
    |        β”œβ”€β”€ query_pose # containing query pose images generated by AlphaPose or OpenPose
    |        β”œβ”€β”€ train_idx.txt # the TXT file that stores the training identites, e.g., 2, 7, 10, 11, ...
    |

How to run it:

Config:

imgs_path: the path to reID images (e.g., Market-1501/bounding_box_train/)

pose_path: the path to pose images (e.g., Market-1501/bounding_box_train_pose/, note that the name of pose image is the same as its corresponding reID image)

idx_path: the TXT file that stores the training identites (e.g., Market-1501/train_idx.txt/)

GAN:

(1) run GAN/train.py to train the GAN model. The model and log file will be saved in folder GAN/model and GAN/log respectively. The validate images will be synthesized in GAN/images;

or (2) run GAN/evaluate.py to generate images for specific testing image. The output will be saved in folder GAN/test.

Person re-ID:

(1) run viper_feature.py to extract features of probe and gallery, the features will be saved in folder ../feature/;

(2) run CMC_viper.py to compute cmc scores with python code, it will output three kinds of results:

- avg: 8 pose features are fused by average operation
- max: 8 pose features are fused by maximum operation
- concat: 8 pose features are fused by concatenation operation 

(3) (optional) run Market-1501_baseline/zzd_evaluation_res_faster.m to compute cmc scores with matlab code. You can modify the code in line 93 to obtain different result of each metric learning (e.g. 'dist_avg.mat', 'dist_max.mat', or 'dist_concat.mat'). It should get the same results with step 2.

Visualization

img

Acknowledgment:

The testing codes are modified from Tong Xiao's code, and also refer to Zhedong Zheng's codes.

Citation

If you find this project useful in your research, please consider cite:

@inproceedings{qian2018pose,
  title={Pose-normalized image generation for person re-identification},
  author={Qian, Xuelin and Fu, Yanwei and Xiang, Tao and Wang, Wenxuan and Qiu, Jie and Wu, Yang and Jiang, Yu-Gang and Xue, Xiangyang},
  booktitle={Proceedings of the European conference on computer vision (ECCV)},
  pages={650--667},
  year={2018}
}

Contact

Any questions or discussion are welcome!

Xuelin Qian ([email protected])