# Ultralytics YOLO 🚀, AGPL-3.0 license
# Default training settings and hyperparameters for medium-augmentation COCO trainingtask: detect # (str) YOLO task, i.e. detect, segment, classify, pose#任务类型
mode: train # (str) YOLO mode, i.e. train, val, predict, export, track, benchmark #任务模式
训练配置
# Train settings -------------------------------------------------------------------------------------------------------
model: # (str, optional) path to model file, i.e. yolov8n.pt, yolov8n.yaml # 预训练权重文件了路径,或者模型配置yaml路径
data: # (str, optional) path to data file, i.e. coco128.yaml #数据位置
epochs: 100 # (int) number of epochs to train for #迭代轮数
patience: 50 # (int) epochs to wait for no observable improvement for early stopping of training #效果不再提升后的等待轮数
batch: 16 # (int) number of images per batch (-1 for AutoBatch) #一组数据的图片个数
imgsz: 640 # (int | list) input images size as int for train and val modes, or list[w,h] for predict and export modes #图像尺寸
save: True # (bool) save train checkpoints and predict results # 是否保存训练权重和预测结果
save_period: -1 # (int) Save checkpoint every x epochs (disabled if < 1) #每隔多少轮保存一次权重文件
cache: False # (bool) True/ram, disk or False. Use cache for data loading #使用使用训练数据的缓存文件
device: # (int | str | list, optional) device to run on, i.e. cuda device=0 or device=0,1,2,3 or device=cpu #使用的设备
workers: 8 # (int) number of worker threads for data loading (per RANK if DDP) #多线程训练
project: # (str, optional) project name # 模型任务结果保存路径,默认在run里
name: # (str, optional) experiment name, results saved to 'project/name' directory #任务名字,推荐自定义,在run/detect里显示不同的文件名
exist_ok: False #