from ultralytics import YOLO if __name__ == "__main__": model = YOLO("yolov8n.pt") # 创建一个模型,加载预训练的算子(coco数据集,imagenet数据集,voc) model.train(data="dataset.yaml", epochs=30)