提交 9f9d6ea4 编写于 作者: H HydrogenSulfate

polish docs

上级 a709d58e
English|[Chinese](../../zh_CN/inference_deployment/paddle_serving_deploy.md) English|[Chinese](../../zh_CN/inference_deployment/paddle_serving_deploy.md)
# Model Service deployment # Model Service deployment
--------
## Catalogue ## Catalogue
- [1. Introduction](#1) - [1. Introduction](#1)
- [2. Installation of Serving](#2) - [2. Installation of Serving](#2)
...@@ -181,7 +181,7 @@ test_cpp_serving_client.py # Script for sending C++ serving prediction requests ...@@ -181,7 +181,7 @@ test_cpp_serving_client.py # Script for sending C++ serving prediction requests
<a name="4"></a> <a name="4"></a>
## 4. Service Deployment for Image Recognition ## 4. Service Deployment for Image Recognition
In addition to the single-model deployment method introduced in [Chapter 3 Service Deployment for Image Classification](#3), we will introduce how to use the detection + classification model to complete the multi-model **image recognition service deployment** In addition to the single-model deployment method introduced in [Chapter 3 Service Deployment for Image Classification](#3), we will introduce how to use multiple models to complete the multi-model **image recognition service deployment**
When using PaddleServing for image recognition service deployment, **need to convert multiple saved inference models to Serving models**. The following takes the ultra-lightweight image recognition model in PP-ShiTu as an example to introduce the deployment of image recognition services. When using PaddleServing for image recognition service deployment, **need to convert multiple saved inference models to Serving models**. The following takes the ultra-lightweight image recognition model in PP-ShiTu as an example to introduce the deployment of image recognition services.
<a name="4.1"></a> <a name="4.1"></a>
### 4.1 Model Transformation ### 4.1 Model Transformation
...@@ -215,10 +215,10 @@ When using PaddleServing for image recognition service deployment, **need to con ...@@ -215,10 +215,10 @@ When using PaddleServing for image recognition service deployment, **need to con
After the transformation of the general recognition inference model is completed, there will be additional `general_PPLCNet_x2_5_lite_v1.0_serving/` and `general_PPLCNet_x2_5_lite_v1.0_client/` folders in the current folder, with the following structure: After the transformation of the general recognition inference model is completed, there will be additional `general_PPLCNet_x2_5_lite_v1.0_serving/` and `general_PPLCNet_x2_5_lite_v1.0_client/` folders in the current folder, with the following structure:
```shell ```shell
├── general_PPLCNet_x2_5_lite_v1.0_serving/ ├── general_PPLCNet_x2_5_lite_v1.0_serving/
│ ├── inference.pdiparams ├── inference.pdiparams
│ ├── inference.pdmodel ├── inference.pdmodel
│ ├── serving_server_conf.prototxt ├── serving_server_conf.prototxt
│ └── serving_server_conf.stream.prototxt └── serving_server_conf.stream.prototxt
└── general_PPLCNet_x2_5_lite_v1.0_client/ └── general_PPLCNet_x2_5_lite_v1.0_client/
├── serving_client_conf.prototxt ├── serving_client_conf.prototxt
......
简体中文|[English](../../en/inference_deployment/paddle_serving_deploy_en.md) 简体中文|[English](../../en/inference_deployment/paddle_serving_deploy_en.md)
# 模型服务化部署 # 模型服务化部署
--------
## 目录 ## 目录
- [1. 简介](#1) - [1. 简介](#1)
- [2. Serving 安装](#2) - [2. Serving 安装](#2)
...@@ -58,7 +58,7 @@ python3.7 -m pip install paddle-serving-server-gpu==0.7.0.post112 # GPU with CUD ...@@ -58,7 +58,7 @@ python3.7 -m pip install paddle-serving-server-gpu==0.7.0.post112 # GPU with CUD
``` ```
* 如果安装速度太慢,可以通过 `-i https://pypi.tuna.tsinghua.edu.cn/simple` 更换源,加速安装过程。 * 如果安装速度太慢,可以通过 `-i https://pypi.tuna.tsinghua.edu.cn/simple` 更换源,加速安装过程。
* 其他环境配置安装请参考: [使用Docker安装Paddle Serving](https://github.com/PaddlePaddle/Serving/blob/v0.7.0/doc/Install_CN.md) * 其他环境配置安装请参考[使用Docker安装Paddle Serving](https://github.com/PaddlePaddle/Serving/blob/v0.7.0/doc/Install_CN.md)
<a name="3"></a> <a name="3"></a>
...@@ -181,7 +181,8 @@ test_cpp_serving_client.py # rpc方式发送C++ serving预测请求的脚本 ...@@ -181,7 +181,8 @@ test_cpp_serving_client.py # rpc方式发送C++ serving预测请求的脚本
<a name="4"></a> <a name="4"></a>
## 4.图像识别服务部署 ## 4.图像识别服务部署
除了[第三章图像分类服务部署](#3)介绍的单模型部署方式,接下来会介绍如何使用检测+分类模型来完成多模型串联的**图像识别服务部署** 除了[第三章图像分类服务部署](#3)介绍的单模型部署方式,接下来会介绍如何使用多个模型来完成多模型串联的**图像识别服务部署**
使用 PaddleServing 做图像识别服务化部署时,**需要将保存的多个 inference 模型都转换为 Serving 模型**。 下面以 PP-ShiTu 中的超轻量图像识别模型为例,介绍图像识别服务的部署。 使用 PaddleServing 做图像识别服务化部署时,**需要将保存的多个 inference 模型都转换为 Serving 模型**。 下面以 PP-ShiTu 中的超轻量图像识别模型为例,介绍图像识别服务的部署。
<a name="4.1"></a> <a name="4.1"></a>
### 4.1 模型转换 ### 4.1 模型转换
...@@ -271,18 +272,18 @@ test_cpp_serving_client.py # rpc方式发送C++ serving预测请求的脚本 ...@@ -271,18 +272,18 @@ test_cpp_serving_client.py # rpc方式发送C++ serving预测请求的脚本
**注意:** 此处不需要修改 `picodet_PPLCNet_x2_5_mainbody_lite_v1.0_serving/` 目录下的 serving_server_conf.prototxt 中的 alias 名字。 **注意:** 此处不需要修改 `picodet_PPLCNet_x2_5_mainbody_lite_v1.0_serving/` 目录下的 serving_server_conf.prototxt 中的 alias 名字。
- 下载并解压已经构建后的检索库 index - 下载并解压已经构建后完成的检索库 index
```shell ```shell
# 回到deploy目录 # 回到deploy目录
cd ../ cd ../
# 下载构建的检索库 index # 下载构建完成的检索库 index
wget https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/rec/data/drink_dataset_v1.0.tar wget https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/rec/data/drink_dataset_v1.0.tar
# 解压构建的检索库 index # 解压构建完成的检索库 index
tar -xf drink_dataset_v1.0.tar tar -xf drink_dataset_v1.0.tar
``` ```
<a name="4.2"></a> <a name="4.2"></a>
### 4.2 服务部署和请求 ### 4.2 服务部署和请求
**注意:** 识别服务涉及到多个模型,出于性能考虑采用 PipeLine 部署方式。Pipeline 部署方式当前不支持 windows 平台。 **注意** 识别服务涉及到多个模型,出于性能考虑采用 PipeLine 部署方式。Pipeline 部署方式当前不支持 windows 平台。
- 进入到工作目录 - 进入到工作目录
```shell ```shell
cd ./deploy/paddleserving/recognition cd ./deploy/paddleserving/recognition
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册