Files
FastDeploy/examples/vision/segmentation/paddleseg/python/serving/README_CN.md
2023-01-18 13:23:50 +00:00

1.3 KiB
Raw Blame History

简体中文 | English

PaddleSegmentation Python轻量服务化部署示例

在部署前,需确认以下两个步骤

服务端:

# 下载部署示例代码
git clone https://github.com/PaddlePaddle/FastDeploy.git
cd FastDeploy/examples/vision/segmentation/paddleseg/python/serving

# 下载PP_LiteSeg模型文件
wget  https://bj.bcebos.com/paddlehub/fastdeploy/PP_LiteSeg_B_STDC2_cityscapes_with_argmax_infer.tgz
tar -xvf PP_LiteSeg_B_STDC2_cityscapes_with_argmax_infer.tgz

# 启动服务可修改server.py中的配置项来指定硬件、后端等
# 可通过--host、--port指定IP和端口号
fastdeploy simple_serving --app server:app

客户端:

# 下载部署示例代码
git clone https://github.com/PaddlePaddle/FastDeploy.git
cd FastDeploy/examples/vision/detection/paddledetection/python/serving

# 下载测试图片
wget https://gitee.com/paddlepaddle/PaddleDetection/raw/release/2.4/demo/000000014439.jpg

# 请求服务获取推理结果如有必要请修改脚本中的IP和端口号
python client.py