ultralytics / hub

Ultralytics HUB tutorials and support
https://hub.ultralytics.com
GNU Affero General Public License v3.0
107 stars 11 forks source link

Add to existing model. #635

Closed cw2708 closed 1 month ago

cw2708 commented 1 month ago

Add to a custom trained model.

Question

Say I want to train a model that detects different dog breeds and I train the model with 3 classes. Later down the road can I come back to that model add a class and train again to add that specific dog breed to the model with the other 3 or do you need to retrain from scratch.

Additional

No response

github-actions[bot] commented 1 month ago

👋 Hello @cw2708, thank you for raising an issue about Ultralytics HUB 🚀! Please visit our HUB Docs to learn more:

If this is a 🐛 Bug Report, please provide screenshots and steps to reproduce your problem to help us get started working on a fix.

If this is a ❓ Question, please provide as much information as possible, including dataset, model, environment details etc. so that we might provide the most helpful response.

We try to respond to all issues as promptly as possible. Thank you for your patience!

pderrenger commented 1 month ago

Hello! 😊 Great question! To add a new class to your existing model, you would generally need to retrain from scratch with the new class included in your dataset. This is because your model's architecture is designed to predict the classes it was originally trained on, and integrating a new class would require adjusting the model's output layer and relearning features specific to the new class.

However, you can leverage techniques like transfer learning, where you can start with your pre-trained model and continue training with a dataset that includes the original classes plus the new one. This approach can save time and resources compared to training a model from scratch, especially if you already have a solid dataset and a well-trained base model.

For more details and specific guidance, check out the Ultralytics HUB Docs: https://docs.ultralytics.com/hub.

Hope this helps! Let us know if you have any more questions. 🌟

sergiuwaxmann commented 1 month ago

Hello @cw2708! Exciting news from our team! We're on the brink of introducing a feature to Ultralytics HUB that will empower users to further leverage their existing models by enabling training directly on top of them. I will announce the release here: https://github.com/ultralytics/hub/issues/528.

cw2708 commented 1 month ago

Thank you @pderrenger and @sergiuwaxmann for the follow up to my question really appreciate it. Super excited to see that implementing checkpoints for training modules is in progress I can not wait I am already loving using YOLO and this being implemented would be incredible.

Good Luck Guys

pderrenger commented 1 month ago

Hi there! We're thrilled to hear about your excitement and satisfaction with YOLO! 😊 Your enthusiasm truly fuels our commitment to making our tools even better. Keep an eye out for updates on the training module checkpoints feature – we believe it will make your experience even more incredible! Thanks for sharing your positive vibes and good luck wishes; they mean a lot to us and the entire YOLO community. Happy detecting! 🌟