1、安装onnxruntime
参考:https://github.com/PINTO0309/onnxruntime4raspberrypi
wget -O onnxruntime-1.9.1-cp37-none-linux_armv7l.whl https://github.com/PINTO0309/onnxruntime4raspberrypi/releases/download/v1.9.1/onnxruntime-1.9.1-cp37-none-linux_armv7l.whl_np1195
pip3 install onnxruntime-1.9.1-cp37-none-linux_armv7l.whl
2、安装cv2
pip3 install --upgrade opencv-python
版本:
3、代码
参考:https://github.com/hpc203/yolov5-lite-onnxruntime
摄像头更改源码main.py
import cv2
import numpy as np
import argp