Merge pull request #20082 from jiangjiajun:master

This commit is contained in:
Alexander Alekhin 2021-05-14 10:56:26 +00:00
commit bb92eb5a93
2 changed files with 17 additions and 4 deletions

View File

@ -1,6 +1,18 @@
# Run PaddlePaddle model by OpenCV
This tutorial shows how to run PaddlePaddle model by opencv, run the example code as below,
This tutorial shows how to run PaddlePaddle model by opencv.
## Environment Setup
```shell
pip install paddlepaddle-gpu
pip install paddlehub
pip install paddle2onnx
```
## Run PaddlePaddle model demo
Run the example code as below,
```shell
python paddle_resnet50.py
@ -8,6 +20,6 @@ python paddle_resnet50.py
there are 3 part of this execution
- 1. Export PaddlePaddle ResNet50 model to onnx format
- 2. Use `cv2.dnn.readNetFromONNX` load model file
- 3. Preprocess image file and do inference
- 1. Export PaddlePaddle ResNet50 model to onnx format;
- 2. Use `cv2.dnn.readNetFromONNX` load model file;
- 3. Preprocess image file and do inference.

View File

@ -10,4 +10,5 @@ tensorflow-gpu>=2.1.0
paddlepaddle>=2.0.0
paddlepaddle-gpu>=2.0.0
paddlehub>=2.1.0
paddle2onnx>=0.5.1