Merge pull request #1660 from RainFrost1/cp_ppshitu_lite
[cherry-pick] 更新ppshitu lite readmepull/1663/head
commit
af1a2ea2c1
|
@ -1,6 +1,6 @@
|
|||
# PP-ShiTu在Paddle-Lite端侧部署
|
||||
|
||||
本教程将介绍基于[Paddle Lite](https://github.com/PaddlePaddle/Paddle-Lite) 在移动端部署PaddleDetection模型的详细步骤。
|
||||
本教程将介绍基于[Paddle Lite](https://github.com/PaddlePaddle/Paddle-Lite) 在移动端部署PaddleClas PP-ShiTu模型的详细步骤。
|
||||
|
||||
Paddle Lite是飞桨轻量化推理引擎,为手机、IOT端提供高效推理能力,并广泛整合跨平台硬件,为端侧部署及应用落地问题提供轻量化的部署方案。
|
||||
|
||||
|
@ -11,13 +11,21 @@ Paddle Lite是飞桨轻量化推理引擎,为手机、IOT端提供高效推理
|
|||
- 安卓手机(armv7或armv8)
|
||||
|
||||
### 1.1 准备交叉编译环境
|
||||
交叉编译环境用于编译 Paddle Lite 和 PaddleDetection 的C++ demo。
|
||||
交叉编译环境用于编译 Paddle Lite 和 PaddleClas 的PP-ShiTu Lite demo。
|
||||
支持多种开发环境,不同开发环境的编译流程请参考对应文档,请确保安装完成Java jdk、Android NDK(R17以上)。
|
||||
|
||||
1. [Docker](https://paddle-lite.readthedocs.io/zh/latest/source_compile/compile_env.html#docker)
|
||||
2. [Linux](https://paddle-lite.readthedocs.io/zh/latest/source_compile/compile_env.html#linux)
|
||||
3. [MAC OS](https://paddle-lite.readthedocs.io/zh/latest/source_compile/compile_env.html#mac-os)
|
||||
|
||||
```shell
|
||||
# 配置完成交叉编译环境后,更新环境变量
|
||||
# for docker、Linux
|
||||
source ~/.bashrc
|
||||
# for Mac OS
|
||||
source ~/.bash_profile
|
||||
```
|
||||
|
||||
### 1.2 准备预测库
|
||||
|
||||
预测库有两种获取方式:
|
||||
|
@ -92,10 +100,10 @@ rm -f ppshitu_lite_models_v1.0.tar
|
|||
|
||||
```shell
|
||||
# 如果测试单张图像
|
||||
python generate_json_config.py --det_model_path ppshitu_lite_models_v1.0/mainbody_PPLCNet_x2_5_640_v1.0_lite.nb --rec_model_path ppshitu_lite_models_v1.0/general_PPLCNet_x2_5_quant_v1.0_lite.nb --rec_label_path ppshitu_lite_models_v1.0/label.txt --img_path images/demo.jpg
|
||||
python generate_json_config.py --det_model_path ppshitu_lite_models_v1.0/mainbody_PPLCNet_x2_5_640_quant_v1.0_lite.nb --rec_model_path ppshitu_lite_models_v1.0/general_PPLCNet_x2_5_quant_v1.0_lite.nb --rec_label_path ppshitu_lite_models_v1.0/label.txt --img_path images/demo.jpg
|
||||
# or
|
||||
# 如果测试多张图像
|
||||
python generate_json_config.py --det_model_path models/mainbody_det.nb --rec_model_path models/rec.nb --rec_label_path models/label.txt --img_dir images
|
||||
python generate_json_config.py --det_model_path ppshitu_lite_models_v1.0/mainbody_PPLCNet_x2_5_640_quant_v1.0_lite.nb --rec_model_path ppshitu_lite_models_v1.0/general_PPLCNet_x2_5_quant_v1.0_lite.nb --rec_label_path ppshitu_lite_models_v1.0/label.txt --img_dir images
|
||||
|
||||
# 执行完成后,会在lit_shitu下生成shitu_config.json配置文件
|
||||
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 82 KiB After Width: | Height: | Size: 83 KiB |
Loading…
Reference in New Issue