English | 简体中文
行人属性识别在智慧社区,工业巡检,交通监控等方向都具有广泛应用,PP-Human中集成了属性识别模块,属性包含性别、年龄、帽子、眼镜、上衣下衣款式等。我们提供了预训练模型,用户可以直接下载使用。
任务 | 算法 | 精度 | 预测速度(ms) | 下载链接 |
---|---|---|---|---|
行人检测/跟踪 | PP-YOLOE | mAP: 56.3 MOTA: 72.0 |
检测: 16.2ms 跟踪:22.3ms |
下载链接 |
行人属性高精度模型 | PP-HGNet_small | mA: 95.4 | 单人 1.54ms | 下载链接 |
行人属性轻量级模型 | PP-LCNet_x1_0 | mA: 94.5 | 单人 0.54ms | 下载链接 |
行人属性精度与速度均衡模型 | PP-HGNet_tiny | mA: 95.2 | 单人 1.14ms | 下载链接 |
PaddleDetection/output_inference
路径下,并修改配置文件中模型路径,也可默认自动下载模型。设置deploy/pipeline/config/infer_cfg_pphuman.yml
中ATTR
的enable: Trueinfer_cfg_pphuman.yml
中配置项说明:
ATTR: #模块名称
model_dir: output_inference/PPLCNet_x1_0_person_attribute_945_infer/ #模型路径
batch_size: 8 #推理最大batchsize
enable: False #功能是否开启
#图片文件夹 python deploy/pipeline/pipeline.py --config deploy/pipeline/config/infer_cfg_pphuman.yml
--image_dir=images/ \
--device=gpu \
3. 视频输入时,启动命令如下
```python
#单个视频文件
python deploy/pipeline/pipeline.py --config deploy/pipeline/config/infer_cfg_pphuman.yml \
--video_file=test_video.mp4 \
--device=gpu \
#视频文件夹
python deploy/pipeline/pipeline.py --config deploy/pipeline/config/infer_cfg_pphuman.yml \
--video_dir=test_videos/ \
--device=gpu \
若修改模型路径,有以下两种方式:
./deploy/pipeline/config/infer_cfg_pphuman.yml
下可以配置不同模型路径,属性识别模型修改ATTR字段下配置-o ATTR.model_dir
修改模型路径:
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
测试效果如下:
数据来源及版权归属:天覆科技,感谢提供并开源实际场景数据,仅限学术研究使用
穿靴:是、否 ```
属性识别模型方案为StrongBaseline,模型结构更改为基于PP-HGNet、PP-LCNet的多分类网络结构,引入Weighted BCE loss提升模型效果。
@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}
}