train.py 239 B

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