YOLOv8如何进行断点续训?

train.py中有一个参数是resume,在yolov5中,这个参数只需要设定为True,其就会继续上次没有训练完的任务,但是在yolov8中其是指定一个pt的路径,只需要在resume中指定对应未完成任务中的last.pt即可,如下所示:
正常训练:

python train.py --weight yolov8n.pt --yaml ultralytics/models/v8/yolov8n.yaml --data /xxx/data.yaml --workers 8 --batch 32 --fraction 0.1

续训:

python train.py --data /home/xxx/data.yaml --workers 8 --batch 32 --fraction 0.1 --resume runs/xxx/weights/last.pt

你可能感兴趣的:(yolov8改进,YOLO,机器学习,人工智能)