在yolov5的export.py
可以改这里的数字,在v8运行转onnx代码是
import warnings
warnings.filterwarnings('ignore')
from ultralytics import YOLO
model = YOLO('yolov8n.pt')
results = model.export(format='onnx')
只需要写成这样
import warnings
warnings.filterwarnings('ignore')
from ultralytics import YOLO
model = YOLO('yolov8n.pt')
results = model.export(format='onnx', opset=13)
opset=这里就OK