Files
FastDeploy/examples/vision/segmentation/paddleseg/sophgo/python
Dantès 34bea7649d [Backend] add sophgo backend (#1015)
* Add Sophgo Device

add sophgo backend in fastdeploy

add resnet50, yolov5s, liteseg examples.

* replace sophgo lib with download links; fix model.cc bug

* modify CodeStyle

* remove unuseful files;change the names of sophgo device and sophgo
backend

* sophgo support python and add python examples

* remove unuseful rows in cmake according pr

Co-authored-by: Zilong Xing <zilong.xing@sophgo.com>
2023-01-04 15:49:17 +08:00
..
2023-01-04 15:49:17 +08:00
2023-01-04 15:49:17 +08:00

PaddleSeg Python部署示例

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

本目录下提供infer.py快速完成 pp_liteseg 在SOPHGO TPU上部署的示例。执行如下脚本即可完成

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

# 下载图片
wget https://paddleseg.bj.bcebos.com/dygraph/demo/cityscapes_demo.png

# 推理
python3 infer.py --model_file ./bmodel/pp_liteseg_1684x_f32.bmodel --config_file ./bmodel/deploy.yaml --image cityscapes_demo.png

# 运行完成后返回结果如下所示
运行结果保存在sophgo_img.png中

其它文档