Files
FastDeploy/examples/vision/detection/yolov5/python/serving/README_CN.md
Wang Xinyu aea454a856 [Serving] Simple serving YOLOv5 and PP-OCRv3 example, add uvicorn to fastdeploy tools (#986)
* ppocrv3 simple serving

* add uvicorn to fd tools

* update ppdet simple serving readme

* yolov5 simple serving

* not import simple serving by default

* remove config from envs

* update comment
2022-12-28 10:03:42 +08:00

1.2 KiB
Raw Blame History

简体中文 | English

YOLOv5 Python轻量服务化部署示例

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

服务端:

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

# 下载模型文件
wget https://bj.bcebos.com/paddlehub/fastdeploy/yolov5s_infer.tar
tar xvf yolov5s_infer.tar

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

客户端:

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

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

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