From 5043f8c674e15025a12608284a4e8eda4c8ecc61 Mon Sep 17 00:00:00 2001 From: suixin1424 <1424531758@qq.com> Date: Sat, 10 Feb 2024 15:31:18 +0800 Subject: [PATCH] Update README.md --- README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/README.md b/README.md index b6ff9a2..5527888 100644 --- a/README.md +++ b/README.md @@ -38,3 +38,16 @@ if (!net.empty()) } ``` +## python推理 + +```python +from cv2 import dnn +import numpy as np + +net = dnn.readNetFromONNX("mouse.onnx") +matblob = np.array([[100,200]]) +net.setInput(matblob) +print('input = {}'.format(matblob)) +output = net.forward() +print('output = {}'.format(output)) +```