[Doc]Add English version of documents in examples (#1070)

* Update and rename README_EN.md to README_CN.md

* Update README.md

* Update and rename README_EN.md to README_CN.md

* Update README.md

* Update and rename README_EN.md to README_CN.md

* Update README.md

* Update README_EN.md

* Rename README_EN.md to README_CN.md

* Update and rename README_EN.md to README_CN.md

* Update README.md

* Update README_EN.md

* Update README.md

* Update and rename README_EN.md to README_CN.md

* Update README.md

* Update and rename README_EN.md to README_CN.md

* Update README.md

* Update and rename README_EN.md to README_CN.md

* Update README.md

* Update and rename README_EN.md to README_CN.md

* Update README.md

* Update and rename README_EN.md to README_CN.md

* Update README.md

* Update and rename README_EN.md to README_CN.md

* Update README.md

* Update and rename README_EN.md to README_CN.md

* Update README.md

* Update and rename README_EN.md to README_CN.md

* Update README.md

* Update and rename README_EN.md to README_CN.md

* Update README.md

* Update and rename README_EN.md to README_CN.md

* Update README.md

* Update and rename README_EN.md to README_CN.md

* Update README.md

* Update and rename README_EN.md to README_CN.md

* Update README.md

* Update and rename README_EN.md to README_CN.md

* Update README.md

* Update and rename README_EN.md to README_CN.md

* Update README.md

* Update and rename README_EN.md to README_CN.md

* Update README.md

* Update and rename README_EN.md to README_CN.md

* Update README.md

* Update and rename README_EN.md to README_CN.md

* Update README.md

* Update and rename README_EN.md to README_CN.md

* Update README.md

* Update and rename README_EN.md to README_CN.md

* Update and rename README_EN.md to README_CN.md

* Update README.md

* Update README.md

* Update and rename README_EN.md to README_CN.md

* Update README.md

* Update and rename README_EN.md to README_CN.md

* Update README.md

* Update and rename README_EN.md to README_CN.md

* Update README.md

* Update and rename README_EN.md to README_CN.md

* Update README.md

* Update and rename README_EN.md to README_CN.md

* Update README.md

* Update and rename README_EN.md to README_CN.md

* Update README.md

* Update and rename README_EN.md to README_CN.md

* Update README.md

* Update and rename README_EN.md to README_CN.md

* Update README.md

* Update and rename README_EN.md to README_CN.md

* Update README.md

* Update and rename README_EN.md to README_CN.md

* Update README.md

* Update and rename README_EN.md to README_CN.md

* Update README.md

* Update and rename README_EN.md to README_CN.md

* Update README.md

* Update and rename README_EN.md to README_CN.md

* Update README.md

* Update and rename README_EN.md to README_CN.md

* Update README.md

* Update and rename README_EN.md to README_CN.md

* Update README.md

* Update and rename README_EN.md to README_CN.md

* Update README.md

* Update and rename README_EN.md to README_CN.md

* Update README.md

* Update README_EN.md

* Rename README_EN.md to README_CN.md

* Update README.md

* Update and rename README_EN.md to README_CN.md

* Update README.md

* Update and rename README_EN.md to README_CN.md

* Update README.md

* Update and rename README_EN.md to README_CN.md

* Update README.md

* Update and rename README_EN.md to README_CN.md

* Update README.md

* Update and rename README_EN.md to README_CN.md

* Update README.md

* Update and rename README_EN.md to README_CN.md

* Update README.md

* Update and rename README_EN.md to README_CN.md

* Update README.md

* Update and rename README_EN.md to README_CN.md

* Update README.md

* Update and rename README_EN.md to README_CN.md

* Update README.md

* Update and rename README_EN.md to README_CN.md

* Update README.md

* Update and rename README_EN.md to README_CN.md

* Update README.md

* Update and rename README_EN.md to README_CN.md

* Update README.md

* Update and rename README_EN.md to README_CN.md

* Update README.md

* Update and rename README_EN.md to README_CN.md

* Update README.md

* Update and rename README_EN.md to README_CN.md

* Update README.md

* Update and rename README_EN.md to README_CN.md

* Update README.md

* Update and rename README_EN.md to README_CN.md

* Update README.md

* Update and rename README_EN.md to README_CN.md

* Update README.md

* Update and rename README_EN.md to README_CN.md

* Update README.md

* Update and rename README_EN.md to README_CN.md

* Update README.md

* Update and rename README_EN.md to README_CN.md

* Update README.md

* Update and rename README_EN.md to README_CN.md

* Update README.md

* Update and rename README_EN.md to README_CN.md

* Update README.md

* Update and rename README_EN.md to README_CN.md

* Update README.md

* Update and rename README_EN.md to README_CN.md

* Update README.md

* Update and rename README_EN.md to README_CN.md

* Update README.md

* Update and rename README_EN.md to README_CN.md

* Update README.md

* Update and rename README_EN.md to README_CN.md

* Update README.md

* Update and rename README_EN.md to README_CN.md

* Update README.md

* Update and rename README_EN.md to README_CN.md

* Update README.md

* Update and rename README_EN.md to README_CN.md

* Update README.md

* Update and rename README_EN.md to README_CN.md

* Update README.md

* Update and rename README_EN.md to README_CN.md

* Update README.md

* Update and rename README_EN.md to README_CN.md

* Update README.md

* Update and rename README_EN.md to README_CN.md

* Update README.md

* Update and rename README_EN.md to README_CN.md

* Update README.md

* Update and rename README_EN.md to README_CN.md

* Update README.md

* Update and rename README_EN.md to README_CN.md

* Update README.md

* Update and rename README_EN.md to README_CN.md

* Update README.md

* Update and rename README_EN.md to README_CN.md

* Update README.md

* Update and rename README_EN.md to README_CN.md

* Update README.md

* Update and rename README_EN.md to README_CN.md

* Update README.md

* Update and rename README_EN.md to README_CN.md

* Update README.md

* Update and rename README_EN.md to README_CN.md

* Update README.md

* Update and rename README_EN.md to README_CN.md

* Update README.md

* Update and rename README_EN.md to README_CN.md

* Update README.md

* Update and rename README_EN.md to README_CN.md

* Update README.md

* Update and rename README_EN.md to README_CN.md

* Update README.md

* Update README.md

* Update README.md

* Update README_CN.md

* Update README.md

* Update README_CN.md

* Update README_CN.md

* Update README.md

* Update README_CN.md

* Update README.md

* Update README_CN.md

* Update README.md

* Update README_CN.md

* Update README.md

* Update README_CN.md

* Update README_CN.md

* Update README.md

* Update README.md

* Update README_CN.md

* Update README.md

* Update README_CN.md

* Update README_CN.md

* Update README.md

* Update README_CN.md

* Update README.md

* Update README_CN.md

* Update README.md

* Update README_CN.md

* Update README.md

* Update README_CN.md

* Update README.md

* Update README.md

* Update and rename README_CN.md to README_EN.md

* Update README_CN.md

* Update README.md

* Update README_CN.md

* Update README.md

* Update README.md

* Update README_CN.md

* Update README.md

* Update README_CN.md

* Update README.md

* Update README_CN.md

* Update README.md

* Update README_CN.md

* Update README_CN.md

* Update README.md

* Update README_CN.md

* Update README.md

* Update and rename README_EN.md to README_CN.md

* Update README.md

* Update README_CN.md

* Update README.md

* Update README_CN.md

* Update README.md

* Update README_CN.md

* Update README_CN.md

* Update README.md

* Update export.md

* Create export_cn.md

* Update README.md

* Create README_CN.md

* Update README.md

* Create README_CN.md
This commit is contained in:
Hu Chuqi
2023-01-06 09:34:28 +08:00
committed by GitHub
parent c9a086ec38
commit bb96a6fe8f
313 changed files with 14807 additions and 4810 deletions

View File

@@ -1,81 +1,81 @@
# PP-TinyPose Python部署示例
English | [简体中文](README_CN.md)
# PP-TinyPose Python Deployment Example
在部署前,需确认以下两个步骤
Before deployment, two steps require confirmation
- 1. 软硬件环境满足要求,参考[FastDeploy环境要求](../../../../../docs/cn/build_and_install/download_prebuilt_libraries.md)
- 2. 根据开发环境下载预编译部署库和samples代码参考[FastDeploy预编译库](../../../../../docs/cn/build_and_install/download_prebuilt_libraries.md)
- 1. Software and hardware should meet the requirements. Please refer to [FastDeploy Environment Requirements](../../../../../docs/cn/build_and_install/download_prebuilt_libraries.md)
- 2. Download the precompiled deployment library and samples code according to your development environment. Refer to [FastDeploy Precompiled Library](../../../../../docs/cn/build_and_install/download_prebuilt_libraries.md)
本目录下提供`pptinypose_infer.py`快速完成PP-TinyPoseCPU/GPU以及GPU上通过TensorRT加速部署的`单图单人关键点检测`示例。执行如下脚本即可完成
>> **注意**: PP-Tinypose单模型目前只支持单图单人关键点检测因此输入的图片应只包含一个人或者进行过裁剪的图像。多人关键点检测请参考[PP-TinyPose Pipeline](../../det_keypoint_unite/python/README.md)
This directory provides the `Multi-person keypoint detection in a single image` example that `pptinypose_infer.py` fast finishes the deployment of PP-TinyPose on CPU/GPU and GPU accelerated by TensorRT. The script is as follows
>> **Attention**: single model currently only supports single-person keypoint detection in a single image. Therefore, the input image should contain one person only or should be cropped. For multi-person keypoint detection, refer to [PP-TinyPose Pipeline](../../det_keypoint_unite/python/README.md)
```bash
#下载部署示例代码
# Download the example code for deployment
git clone https://github.com/PaddlePaddle/FastDeploy.git
cd FastDeploy/examples/vision/keypointdetection/tiny_pose/python
# 下载PP-TinyPose模型文件和测试图片
# Download PP-TinyPose model files and test images
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推理
# CPU inference
python pptinypose_infer.py --tinypose_model_dir PP_TinyPose_256x192_infer --image hrnet_demo.jpg --device cpu
# GPU推理
# GPU inference
python pptinypose_infer.py --tinypose_model_dir PP_TinyPose_256x192_infer --image hrnet_demo.jpg --device gpu
# GPU上使用TensorRT推理 注意TensorRT推理第一次运行有序列化模型的操作有一定耗时需要耐心等待
# TensorRT inference on GPUAttention: It is somewhat time-consuming for the operation of model serialization when running TensorRT inference for the first time. Please be patient.
python pptinypose_infer.py --tinypose_model_dir PP_TinyPose_256x192_infer --image hrnet_demo.jpg --device gpu --use_trt True
# 昆仑芯XPU推理
# KunlunXin XPU inference
python pptinypose_infer.py --tinypose_model_dir PP_TinyPose_256x192_infer --image hrnet_demo.jpg --device kunlunxin
```
运行完成可视化结果如下图所示
The visualized result after running is as follows
<div align="center">
<img src="https://user-images.githubusercontent.com/16222477/196386764-dd51ad56-c410-4c54-9580-643f282f5a83.jpeg", width=359px, height=423px />
</div>
## PP-TinyPose Python接口
## PP-TinyPose Python Interface
```python
fd.vision.keypointdetection.PPTinyPose(model_file, params_file, config_file, runtime_option=None, model_format=ModelFormat.PADDLE)
```
PP-TinyPose模型加载和初始化,其中model_file, params_file以及config_file为训练模型导出的Paddle inference文件,具体请参考其文档说明[模型导出](https://github.com/PaddlePaddle/PaddleDetection/blob/release/2.5/deploy/EXPORT_MODEL.md)
PP-TinyPose model loading and initialization, among which model_file, params_file, and config_file are the Paddle inference files exported from the training model. Refer to [Model Export](https://github.com/PaddlePaddle/PaddleDetection/blob/release/2.5/deploy/EXPORT_MODEL.md) for more information
**参数**
**Parameter**
> * **model_file**(str): 模型文件路径
> * **params_file**(str): 参数文件路径
> * **config_file**(str): 推理部署配置文件
> * **runtime_option**(RuntimeOption): 后端推理配置默认为None即采用默认配置
> * **model_format**(ModelFormat): 模型格式默认为Paddle格式
> * **model_file**(str): Model file path
> * **params_file**(str): Parameter file path
> * **config_file**(str): Inference deployment configuration file
> * **runtime_option**(RuntimeOption): Backend inference configuration. None by default, which is the default configuration
> * **model_format**(ModelFormat): Model format. Paddle format by default
### predict函数
### predict function
> ```python
> PPTinyPose.predict(input_image)
> ```
>
> 模型预测结口,输入图像直接输出检测结果。
> Model prediction interface. Input images and output detection results.
>
> **参数**
> **Parameter**
>
> > * **input_image**(np.ndarray): 输入数据注意需为HWCBGR格式
> > * **input_image**(np.ndarray): Input data in HWC or BGR format
> **返回**
> **Return**
>
> > 返回`fastdeploy.vision.KeyPointDetectionResult`结构体,结构体说明参考文档[视觉模型预测结果](../../../../../docs/api/vision_results/)
> > Return `fastdeploy.vision.KeyPointDetectionResult` structure. Refer to [Vision Model Prediction Results](../../../../../docs/api/vision_results/) for the description of the structure.
### 类成员属性
#### 后处理参数
用户可按照自己的实际需求,修改下列后处理参数,从而影响最终的推理和部署效果
### Class Member Property
#### Post-processing Parameter
Users can modify the following pre-processing parameters to their needs, which affects the final inference and deployment results
> > * **use_dark**(bool): 是否使用DARK进行后处理[参考论文](https://arxiv.org/abs/1910.06278)
> > * **use_dark**(bool): • Whether to use DARK for post-processing. Refer to [Reference Paper](https://arxiv.org/abs/1910.06278)
## 其它文档
## Other Documents
- [PP-TinyPose 模型介绍](..)
- [PP-TinyPose C++部署](../cpp)
- [模型预测结果说明](../../../../../docs/api/vision_results/)
- [如何切换模型推理后端引擎](../../../../../docs/cn/faq/how_to_change_backend.md)
- [PP-TinyPose Model Description](..)
- [PP-TinyPose C++ Deployment](../cpp)
- [Model Prediction Results](../../../../../docs/api/vision_results/)
- [How to switch the model inference backend engine](../../../../../docs/cn/faq/how_to_change_backend.md)

View File

@@ -0,0 +1,82 @@
[English](README.md) | 简体中文
# 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
# 昆仑芯XPU推理
python pptinypose_infer.py --tinypose_model_dir PP_TinyPose_256x192_infer --image hrnet_demo.jpg --device kunlunxin
```
运行完成可视化结果如下图所示
<div align="center">
<img src="https://user-images.githubusercontent.com/16222477/196386764-dd51ad56-c410-4c54-9580-643f282f5a83.jpeg", width=359px, height=423px />
</div>
## PP-TinyPose Python接口
```python
fd.vision.keypointdetection.PPTinyPose(model_file, params_file, config_file, runtime_option=None, model_format=ModelFormat.PADDLE)
```
PP-TinyPose模型加载和初始化其中model_file, params_file以及config_file为训练模型导出的Paddle inference文件具体请参考其文档说明[模型导出](https://github.com/PaddlePaddle/PaddleDetection/blob/release/2.5/deploy/EXPORT_MODEL.md)
**参数**
> * **model_file**(str): 模型文件路径
> * **params_file**(str): 参数文件路径
> * **config_file**(str): 推理部署配置文件
> * **runtime_option**(RuntimeOption): 后端推理配置默认为None即采用默认配置
> * **model_format**(ModelFormat): 模型格式默认为Paddle格式
### predict函数
> ```python
> PPTinyPose.predict(input_image)
> ```
>
> 模型预测结口,输入图像直接输出检测结果。
>
> **参数**
>
> > * **input_image**(np.ndarray): 输入数据注意需为HWCBGR格式
> **返回**
>
> > 返回`fastdeploy.vision.KeyPointDetectionResult`结构体,结构体说明参考文档[视觉模型预测结果](../../../../../docs/api/vision_results/)
### 类成员属性
#### 后处理参数
用户可按照自己的实际需求,修改下列后处理参数,从而影响最终的推理和部署效果
> > * **use_dark**(bool): 是否使用DARK进行后处理[参考论文](https://arxiv.org/abs/1910.06278)
## 其它文档
- [PP-TinyPose 模型介绍](..)
- [PP-TinyPose C++部署](../cpp)
- [模型预测结果说明](../../../../../docs/api/vision_results/)
- [如何切换模型推理后端引擎](../../../../../docs/cn/faq/how_to_change_backend.md)