Skip to content

Commit

Permalink
Update python_deploy.md
Browse files Browse the repository at this point in the history
  • Loading branch information
will-jl944 authored Sep 23, 2021
1 parent e9e099b commit bfa522f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/python_deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ PaddleX已经集成了基于Python的高性能预测接口,在安装PaddleX后
接下来的预测部署将使用PaddleX python高性能预测接口,接口说明可参考[paddlex.deploy](./apis/deploy.md)


* 图片预测
* **图片预测**

```python
import paddlex as pdx
predictor = pdx.deploy.Predictor('./inference_model')
result = predictor.predict(img_file='test.jpg')
```

* 图片预测、并评估预测速度
* **图片预测、并评估预测速度**

**关于预测速度的说明**:加载模型后,前几张图片的预测速度会较慢,这是因为运行启动时涉及到内存显存初始化等步骤,通常在预测20-30张图片后模型的预测速度达到稳定。**如果需要评估预测速度,可通过指定预热轮数warmup_iters完成预热****为获得更加精准的预测速度,可指定repeats重复预测后取时间平均值**

Expand All @@ -31,7 +31,7 @@ result = predictor.predict(img_file='test.jpg',
repeats=100)
```

* 预测结果可视化
* **预测结果可视化**

Python部署所得预测结果支持使用`paddlex.det.visualize`(适用于目标检测和实例分割模型)或`paddlex.seg.visualize`(适用于语义分割模型)进行可视化。
```python
Expand Down

0 comments on commit bfa522f

Please sign in to comment.