-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Train Yolov8m Incremental #16283
Comments
👋 Hello @giantonti1801, thank you for reaching out to us at Ultralytics 🚀! This is an automated response, and an Ultralytics engineer will assist you soon. You’re tackling an interesting challenge with incremental learning. Let's go through some steps and tips to help you succeed: Incremental Training with YOLOv8It looks like you're trying to add new classes without losing the knowledge of the existing ones. Here are some recommendations:
Example Training CommandHere's a refined training command: yolo train data='/content/dataset/persona.v1/data.yaml' model='yolov8m.pt' epochs=50 batch=64 imgsz=640 lr0=0.0001 name='initial_train'
yolo train data='/content/dataset/carro.v1/data.yaml' model='/content/runs/detect/initial_train/weights/best.pt' epochs=50 batch=64 imgsz=640 lr0=0.0001 freeze=10 name='incremental_train' Resources and Community SupportFor detailed guides and support, check out these resources:
Keep experimenting and tweaking your settings. The community and the Ultralytics team are here to support you. If you have more specific details or logs, feel free to share them to get more precise assistance. Happy training! 😊 |
You need to have all the classes you want to keep in your dataset during training. Otherwise, the model will forget. |
👋 Hello there! We wanted to give you a friendly reminder that this issue has not had any recent activity and may be closed soon, but don't worry - you can always reopen it if needed. If you still have any questions or concerns, please feel free to let us know how we can help. For additional resources and information, please see the links below:
Feel free to inform us of any other issues you discover or feature requests that come to mind in the future. Pull Requests (PRs) are also always welcomed! Thank you for your contributions to YOLO 🚀 and Vision AI ⭐ |
Search before asking
Question
Hello friend, I am resorting to this means because I am about to give up. I am trying to do an incremental training with yolov8 and ultralitycs in google colab, the first training I did with the people class, the annotations at 0 in yaml perfectly configured with a single class and the pretrained model used yolov8m, I trained it with 50 epochs and used a data ser of just over 5000 images:! yolo train data = '/content/dataset/persona.v1/data.yaml' model = 'yolov8m.pt' epochs = 50 batch = 64 imgsz = 640 lr0 = 0.0005 name = 'primer_train_incremental' and so far so good, then the second training! yolo train data = '/content/dataset/carro.v1/data.yaml' model = '/content/runs/detect/primer_train_incremental2/weights/best.pt' epochs=50 batch=64 imgsz=640 lr0=0.0005 freeze=10 name='segundo_train_incremental' and use as pre-trained model the best.pt result of the first training with a car dataset of just over 5000 images and the annotations in 1 the yaml: nc: 2
names: ['persona','car'], but whatever I do I lose the previous training, that is, it stops detecting the person, I tried to freeze 5, 10, 15 and 20 layers, it is the maximum that my equipment allows me, but I always lose what was trained previously. What am I doing wrong?
Additional
I trained with Google Colab by freezing 5, 10, 15, 20 and I managed to freeze one with 30 layers but without any result so I lost the knowledge of the previous 79 classes which I want to take advantage of by adding more classes.
The text was updated successfully, but these errors were encountered: