# PP-TinyPose Python部署示例 在部署前,需确认以下两个步骤 - 1. 软硬件环境满足要求,参考[FastDeploy环境要求](../../../../../docs/cn/build_and_install/download_prebuilt_libraries.md) - 2. 根据开发环境,下载预编译部署库和samples代码,参考[FastDeploy预编译库](../../../../../docs/cn/build_and_install/download_prebuilt_libraries.md) 本目录下提供`pptinypose_infer.py`快速完成PP-TinyPose在CPU/GPU,以及GPU上通过TensorRT加速部署的`单图单人关键点检测`示例。执行如下脚本即可完成 >> **注意**: PP-Tinypose单模型目前只支持单图单人关键点检测,因此输入的图片应只包含一个人或者进行过裁剪的图像。多人关键点检测请参考[PP-TinyPose Pipeline](../../det_keypoint_unite/python/README.md) ```bash #下载部署示例代码 git clone https://github.com/PaddlePaddle/FastDeploy.git cd FastDeploy/examples/vision/keypointdetection/tiny_pose/python # 下载PP-TinyPose模型文件和测试图片 wget https://bj.bcebos.com/paddlehub/fastdeploy/PP_TinyPose_256x192_infer.tgz tar -xvf PP_TinyPose_256x192_infer.tgz wget https://bj.bcebos.com/paddlehub/fastdeploy/hrnet_demo.jpg # CPU推理 python pptinypose_infer.py --tinypose_model_dir PP_TinyPose_256x192_infer --image hrnet_demo.jpg --device cpu # GPU推理 python pptinypose_infer.py --tinypose_model_dir PP_TinyPose_256x192_infer --image hrnet_demo.jpg --device gpu # GPU上使用TensorRT推理 (注意:TensorRT推理第一次运行,有序列化模型的操作,有一定耗时,需要耐心等待) python pptinypose_infer.py --tinypose_model_dir PP_TinyPose_256x192_infer --image hrnet_demo.jpg --device gpu --use_trt True ``` 运行完成可视化结果如下图所示