runtimeerror: an attempt has been made to start a new process before the current process has finished its bootstrapping phase. if name == 'main':..........
修改main.py即可: from ultralytics import YOLO model = YOLO('yolov8m.pt') if name == 'main': # Use the model results = model.train(data="./data.yaml", epochs=3) # train the model results = model.val() # evaluate model performance on the validation set success = YOLO("yolov8m.pt").export(format="onnx",opset=16)