Skip to content
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

Training a Model incrementally #1011

Open
1 task done
webdevmatt07 opened this issue Feb 4, 2025 · 2 comments
Open
1 task done

Training a Model incrementally #1011

webdevmatt07 opened this issue Feb 4, 2025 · 2 comments
Labels
detect Object Detection issues, PR's enhancement New feature or request question Further information is requested

Comments

@webdevmatt07
Copy link

Search before asking

Question

I'm looking to create an incremental model from an existing model without having to run all the data through the training. I would only like to run the additional data. This additional data could be images that are labeled with existing classes or data that is labeled with new classes.

We are using label studio to label the data and then ultralytics to create / update the model

Additional

No response

@webdevmatt07 webdevmatt07 added the question Further information is requested label Feb 4, 2025
@UltralyticsAssistant UltralyticsAssistant added detect Object Detection issues, PR's enhancement New feature or request labels Feb 4, 2025
@UltralyticsAssistant
Copy link
Member

👋 Hello @webdevmatt07, thank you for reaching out about Ultralytics HUB 🚀! Please check out our HUB Docs to learn more about using HUB effectively:

  • Quickstart. Start training and deploying YOLO models with HUB in seconds.
  • Datasets: Preparing and Uploading. Learn how to prepare and upload your datasets to HUB in YOLO format.
  • Projects: Creating and Managing. Group your models into projects for improved organization.
  • Models: Training and Exporting. Train YOLOv5 and YOLOv8 models on your custom datasets and export them to various formats for deployment.
  • Integrations. Explore different integration options for your trained models, such as TensorFlow, ONNX, OpenVINO, CoreML, and PaddlePaddle.
  • Ultralytics HUB App. Learn about the Ultralytics App for iOS and Android, which allows you to run models directly on your mobile device.
    • iOS. Learn about YOLO CoreML models accelerated on Apple's Neural Engine on iPhones and iPads.
    • Android. Explore TFLite acceleration on mobile devices.
  • Inference API. Understand how to use the Inference API for running your trained models in the cloud to generate predictions.

If your issue relates to incremental training or introduces specific bugs or challenges, sharing additional details will help us understand it better. If this is a 🐛 Bug Report, could you provide a minimum reproducible example (MRE) along with screenshots or logs to demonstrate the issue? This will help us dive deeper into your scenario.

If this is a ❓ Question, it would also be helpful to expand on your use case, especially concerning:

  • The specifics of your additional data and classes
  • Your current model version and setup
  • Any challenges encountered in Label Studio to Ultralytics workflows

Your input helps us assist you faster! This is an automated response, but no worries—a member of the Ultralytics team will get back to you soon too 😊 Thank you for your patience and for being part of the Ultralytics community!

@pderrenger
Copy link
Member

@webdevmatt07 thanks for reaching out! Incremental training—essentially fine-tuning an existing model on new data—can be achieved using Ultralytics HUB workflows. In HUB, you can start a new training session using your existing model's checkpoint. Here are a few points to consider:

  1. If you're looking to update your model with additional data (whether it’s new images for existing classes or data for new classes), you can prepare a dataset that only includes the new annotations. When starting your training session, specify your previously trained model’s weights (typically via the resume option) so that training continues from your existing checkpoint.

  2. For new classes, ensure your model configuration (e.g., the classification head) is updated accordingly. Incremental training that introduces new classes may require modifying the final layers of your model. You might need to merge the new class definitions with the existing ones so the model maintains knowledge of both.

  3. Our HUB UI supports these workflows: simply upload your new dataset via the Datasets page, then use the “Train Model” workflow to pick your project. In the advanced configuration, you can set the resume training flag or load a checkpoint from your existing model. This way, you avoid re-training on the full original dataset.

If you run into issues, please verify that you’re using the latest version of the Ultralytics package and HUB SDK. Often, problems with resume training or incremental updates can be resolved by ensuring everything is up-to-date.

Let me know if you need any more details or a code example, and thanks again for your question! Big thanks to the entire YOLO community and team for driving these innovations forward.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
detect Object Detection issues, PR's enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants