train.py 235 B

123456
  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=100)