Train pre-trained yoloV8 model for more epochs #17180
Replies: 3 comments 2 replies
-
👋 Hello @Peter-coding, thank you for reaching out and for using Ultralytics 🚀! We appreciate your detailed message. For extending your training, your approach seems logical, but there may be some nuances 🧩 to consider. An automated response like this can't fully address them, but fear not, an Ultralytics engineer will be on hand soon to provide more specific guidance. If this is a 🐛 Bug Report, we recommend sharing a minimum reproducible example if there are concerns about unexpected behavior during your training phases. For optimizing your training process, please ensure that your environment is up to date. Upgrade to the latest pip install -U ultralytics Take advantage of the power of our community to further enhance your learning and model-building journey. Join us on Discord 🎧 for conversation in real-time, or discuss your in-depth technical inquiries on Discourse. Lastly, if you're eager to experiment in different environments, feel free to explore any of these up-to-date setups which come preconfigured: We hope this helps, and we're excited to see what you accomplish with another round of training! Stay tuned for more personalized insights from our support team. 🌟 |
Beta Was this translation helpful? Give feedback.
-
@Peter-coding hi Peter, To continue training, using |
Beta Was this translation helpful? Give feedback.
-
You can follow this https://www.reddit.com/r/Ultralytics/comments/1eolwl8/the_correct_way_to_train_from_a_previously/ |
Beta Was this translation helpful? Give feedback.
-
Dear Ultralytics,
I have finished a 100 epoch training on a yolov8s model, on my custom dataset, with:
yolo task=detect mode=train epochs=100 data=data_custom.yaml model=yolov8s.pt imgsz=640 batch=8 workers=8 device=0
After finishing, I got good results:
I want to train the finished model for more epochs, I want to extend it by 100 more epochs.
I run a new training on the finished model, with last.pt (on the same custom dataset, I changed nothing):
yolo task=detect mode=train data=data_custom.yaml model=last.pt epochs=100 imgsz=640 batch=16 device=0 workers=0 patience=30
Results of the second training is:
As you can see, the train/box_loss, train/cls_loss and train/dfl_loss increased after the second training, but the others increased:
The learning rate on training 1 started from ~0,00333146 and went to 0.000199 on epoch 100.
The learning rate on training 1 started from ~0,00332959 and went to 0,001684 on epoch 85 (I set patience to 30, thats why it stopped on epoch 85 of the second training)
My questions are:
Second training start:
I have saved a copy of the first training's best.pt and last.pt. Do you think I need to train it from there again, with an other view of point? What should I adjust?
Thank you,
Peter
Beta Was this translation helpful? Give feedback.
All reactions