11 lines
332 B
Python
11 lines
332 B
Python
import warnings
|
||
warnings.filterwarnings('ignore')
|
||
from ultralytics import YOLO
|
||
|
||
# onnx onnxsim onnxruntime onnxruntime-gpu
|
||
|
||
# 导出参数官方详解链接:https://docs.ultralytics.com/modes/export/#usage-examples
|
||
|
||
if __name__ == '__main__':
|
||
model = YOLO('yolov8n.pt')
|
||
model.export(format='onnx', simplify=True, opset=13) |