English | 简体中文
Pedestrian attribute recognition has been widely used in the intelligent community, industrial, and transportation monitoring. Many attribute recognition modules have been gathered in PP-Human, including gender, age, hats, eyes, clothing and up to 26 attributes in total. Also, the pre-trained models are offered here and users can download and use them directly.
Task | Algorithm | Precision | Inference Speed(ms) | Download Link |
---|---|---|---|---|
High-Precision Model | PP-HGNet_small | mA: 95.4 | per person 1.54ms | Download |
Fast Model | PP-LCNet_x1_0 | mA: 94.5 | per person 0.54ms | Download |
Balanced Model | PP-HGNet_tiny | mA: 95.2 | per person 1.14ms | Download |
PaddleDetection/output_inference/
../output_inference
, and set the "enable: True" in ATTR of infer_cfg_pphuman.ymlThe meaning of configs of infer_cfg_pphuman.yml
:
ATTR: #module name
model_dir: output_inference/PPLCNet_x1_0_person_attribute_945_infer/ #model path
batch_size: 8 #maxmum batchsize when inference
enable: False #whether to enable this model
#image directory python deploy/pipeline/pipeline.py --config deploy/pipeline/config/infer_cfg_pphuman.yml
--image_dir=images/ \
--device=gpu \
3. When inputting the video, run the command as follows:
```python
#a single video file
python deploy/pipeline/pipeline.py --config deploy/pipeline/config/infer_cfg_pphuman.yml \
--video_file=test_video.mp4 \
--device=gpu \
#directory of videos
python deploy/pipeline/pipeline.py --config deploy/pipeline/config/infer_cfg_pphuman.yml \
--video_dir=test_videos/ \
--device=gpu \
If you want to change the model path, there are two methods:
./deploy/pipeline/config/infer_cfg_pphuman.yml
you can configurate different model paths. In attribute recognition models, you can modify the configuration in the field of ATTR.-o ATTR.model_dir
in the command line following the --config to change the model path:
python
python deploy/pipeline/pipeline.py --config deploy/pipeline/config/infer_cfg_pphuman.yml \
-o ATTR.model_dir=output_inference/PPLCNet_x1_0_person_attribute_945_infer/\
--video_file=test_video.mp4 \
--device=gpu
The test result is:
Data Source and Copyright:Skyinfor Technology. Thanks for the provision of actual scenario data, which are only used for academic research here.
Boots: Yes; No ```
The model adopted in the attribute recognition is StrongBaseline, where the structure is the multi-class network structure based on PP-HGNet、PP-LCNet, and Weighted BCE loss is introduced for effect optimization.
@article{jia2020rethinking,
title={Rethinking of pedestrian attribute recognition: Realistic datasets with efficient method},
author={Jia, Jian and Huang, Houjing and Yang, Wenjie and Chen, Xiaotang and Huang, Kaiqi},
journal={arXiv preprint arXiv:2005.11909},
year={2020}
}