mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-12-24 13:28:13 +08:00
* 第一次提交 * 补充一处漏翻译 * deleted: docs/en/quantize.md * Update one translation * Update en version * Update one translation in code * Standardize one writing * Standardize one writing * Update some en version * Fix a grammer problem * Update en version for api/vision result * Merge branch 'develop' of https://github.com/charl-u/FastDeploy into develop * Checkout the link in README in vision_results/ to the en documents * Modify a title * Add link to serving/docs/ * Finish translation of demo.md * Update english version of serving/docs/ * Update title of readme * Update some links * Modify a title * Update some links * Update en version of java android README * Modify some titles * Modify some titles * Modify some titles * modify article to document * update some english version of documents in examples * Add english version of documents in examples/visions * Sync to current branch * Add english version of documents in examples
37 lines
1.7 KiB
Markdown
37 lines
1.7 KiB
Markdown
English | [简体中文](README_CN.md)
|
|
# PaddleSeg Deployment Examples for Python
|
|
|
|
Before deployment, the following step need to be confirmed:
|
|
|
|
- 1. Hardware and software environment meets the requirements, please refer to [Environment Requirements for FastDeploy](../../../../../../docs/en/build_and_install/rknpu2.md).
|
|
|
|
【Note】If you are deploying **PP-Matting**, **PP-HumanMatting** or **ModNet**, please refer to [Matting Model Deployment](../../../../matting/).
|
|
|
|
This directory provides `infer.py` for a quick example of PPHumanseg deployment on RKNPU. This can be done by running the following script.
|
|
|
|
```bash
|
|
# Download the deploying demo code.
|
|
git clone https://github.com/PaddlePaddle/FastDeploy.git
|
|
cd FastDeploy/examples/vision/segmentation/paddleseg/python
|
|
|
|
# Download images.
|
|
wget https://paddleseg.bj.bcebos.com/dygraph/pp_humanseg_v2/images.zip
|
|
unzip images.zip
|
|
|
|
# Inference.
|
|
python3 infer.py --model_file ./Portrait_PP_HumanSegV2_Lite_256x144_infer/Portrait_PP_HumanSegV2_Lite_256x144_infer_rk3588.rknn \
|
|
--config_file ./Portrait_PP_HumanSegV2_Lite_256x144_infer/deploy.yaml \
|
|
--image images/portrait_heng.jpg
|
|
```
|
|
|
|
|
|
## Notes
|
|
The input requirement for the model on RKNPU is to use NHWC format, and image normalization will be embedded into the model when converting the RKNN model, so we need to call DisableNormalizeAndPermute(C++) or disable_normalize_and_permute(Python) first when deploying with FastDeploy to disable normalization and data format conversion in the preprocessing stage.
|
|
|
|
## Other Documents
|
|
|
|
- [PaddleSeg Model Description](..)
|
|
- [PaddleSeg C++ Deployment](../cpp)
|
|
- [Description of the prediction](../../../../../../docs/api/vision_results/)
|
|
- [Convert PPSeg and RKNN model](../README.md)
|