Are you sure you want to delete this task? Once this task is deleted, it cannot be recovered.
wuzewu a6a68fa594 | 3 years ago | |
---|---|---|
.. | ||
README.md | 3 years ago | |
infer.py | 3 years ago |
本方案旨在提供一个PaddlePaddle跨平台图像分割模型的Python预测部署方案作为参考,用户通过一定的配置,加上少量的代码,即可把模型集成到自己的服务中,完成图像分割的任务。
请使用模型导出工具导出您的模型, 或点击下载我们的样例模型用于测试。
接着准备一张测试图片用于试验效果,我们提供了cityscapes验证集中的一张图片用于演示效果,如果您的模型是使用其他数据集训练的,请自行准备测试图片。
在终端输入以下命令进行预测:
python deploy/python/infer.py --config /path/to/deploy.yaml --image_path
参数说明如下:
参数名 | 用途 | 是否必选项 | 默认值 |
---|---|---|---|
config | 导出模型时生成的配置文件, 而非configs目录下的配置文件 | 是 | - |
image_path | 预测图片的路径或者目录 | 是 | - |
use_trt | 是否开启TensorRT来加速预测 | 否 | 否 |
use_int8 | 启动TensorRT预测时,是否以int8模式运行 | 否 | 否 |
batch_size | 单卡batch size | 否 | 配置文件中指定值 |
save_dir | 保存预测结果的目录 | 否 | output |
注意:
1. 当使用量化模型预测时,需要同时开启TensorRT预测和int8预测才会有加速效果
2. 使用TensorRT需要使用支持TRT功能的Paddle库,请参考附录下载对应的PaddlePaddle安装包,或者参考源码编译自行编译
飞桨高性能图像分割开发套件,端到端完成从训练到部署的全流程图像分割应用。
https://github.com/PaddlePaddle/PaddleSeg
Python Markdown Text Shell Java other
Dear OpenI User
Thank you for your continuous support to the Openl Qizhi Community AI Collaboration Platform. In order to protect your usage rights and ensure network security, we updated the Openl Qizhi Community AI Collaboration Platform Usage Agreement in January 2024. The updated agreement specifies that users are prohibited from using intranet penetration tools. After you click "Agree and continue", you can continue to use our services. Thank you for your cooperation and understanding.
For more agreement content, please refer to the《Openl Qizhi Community AI Collaboration Platform Usage Agreement》