opencv/samples/dnn/dnn_model_runner/dnn_conversion/paddlepaddle
2021-05-14 03:35:44 +00:00
..
data Merge pull request #19976 from jiangjiajun:master 2021-05-13 21:59:41 +03:00
paddle_resnet50.py Merge pull request #19976 from jiangjiajun:master 2021-05-13 21:59:41 +03:00
README.md Update requirements and README for PaddlePaddle sample 2021-05-14 03:35:44 +00:00

Run PaddlePaddle model by OpenCV

This tutorial shows how to run PaddlePaddle model by opencv.

Environment Setup

pip install paddlepaddle-gpu
pip install paddlehub
pip install paddle2onnx

Run PaddlePaddle model demo

Run the example code as below,

python paddle_resnet50.py

there are 3 part of this execution

    1. Export PaddlePaddle ResNet50 model to onnx format;
    1. Use cv2.dnn.readNetFromONNX load model file;
    1. Preprocess image file and do inference.