基本思想:需求部署yolov8目标检测和旋转目标检测算法部署atlas 200dk 开发板上
一、转换模型 链接: https://pan.baidu.com/s/1hJPX2QvybI4AGgeJKO6QgQ?pwd=q2s5 提取码: q2s5
from ultralytics import YOLO
# Load a model
model = YOLO("yolov8s.yaml") # build a new model from scratch
model = YOLO("yolov8s.pt") # load a pretrained model (recommended for training)
# Use the model
results = model(r"F:\zhy\Git\McQuic\bus.jpg") # predict on an image
path = model.export(format="onnx") # export the model to ONNX format
精简模型
(base) root@davinci-mini:~/sxj731533730# python3 -m onnxsim yolov8s.onnx yolov8s_sim.onnx
Simplifying...
Finish! Here is the difference:
┏━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━┓
┃ ┃ Original Model ┃ Simplified Model ┃
┡━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━╇━━━━━━