import os import os from ultralytics import YOLO # model = YOLO("data.yaml") model = YOLO("runs/train-seg2/weights/last.pt") # success = model.export(format="onnx", half=False, dynamic=True, opset=17) success = model.export(format="onnx") print("export model well.") exit(1) data_file = "D:\DeepLearning\pytorch-gpu117\yolov8_study\\train-seg\data.yaml" model_file = "D:\DeepLearning\pytorch-gpu117\yolov8_study\\train-seg\yolov8-seg.yaml" model = YOLO(model_file) results = model.train(data=data_file, epochs=1000, batch=4) # ret = os.system("yolo task=detect mode=predict model=best.pt source=D:/DeepLearning/Dataset/car/car_201.jpg imgsz=640 show=True save=True") # # yolo mode=export model=best.pt format=onnx dynamic=False #simplify=True # print(ret)