ultralytics / hub

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

Ultralytics Hub - Train from existing checkpoint/pt file #528

Closed jquaglia-uss closed 2 months ago

jquaglia-uss commented 6 months ago

Search before asking

Description

I think it would be a great feature to be able to kick off new trains from previous checkpoints/pt files/other Hub models.

I am burning through Colab credits because I need to start from scratch each time :)

Use case

This feature would be useful to anyone that wants to leverage a Colab A100 Runtime and finds themselves consistently using Hub to train models but burns through compute resources because each train must be initiated from COCO yolov8(size).pt

Additional

image

this could be the area where you could select "Custom Model" train kick off point.

UltralyticsAssistant commented 6 months ago

@jquaglia-uss hello! Thank you for your feature request and for contributing to the improvement of the Ultralytics HUB. 🌟

The ability to resume training from a saved checkpoint is indeed a valuable feature, and I understand how it can help save resources, especially when using platforms like Colab.

Your suggestion to have an option to select a "Custom Model" as a starting point for training is noted. While I can't provide a specific timeline or promise for the implementation of this feature, I can assure you that we continuously strive to enhance the user experience and functionality of our tools.

For now, you can refer to the Ultralytics HUB Docs for the current method of resuming training from checkpoints. The documentation outlines the steps to follow when you want to continue training using previously saved weights.

We appreciate your input and encourage you to keep an eye on our repository for updates. If you have any more ideas or questions, feel free to share them with us. Happy training! 🚀

kalenmike commented 6 months ago

@jquaglia-uss We are busy working on the UI to allow selection of a custom model in the train dialog, this will allow you to train on top of an existing model.

We have also already released with ultralytics 8.1.0 the option to create a HUB model from the CLI or with a Python script. This integration is still in its initial stages, however you will be able to achieve what you are after provided you have the weights and dataset locally.

from ultralytics import YOLO, hub

# Login to the Ultralytics HUB
hub.login(<API_KEY>, True)

# Create and train the model
model = YOLO('path/to/custom/weights.pt')
model.train(epochs=100, data='coco6')

The output will show a URL where you can access this new model in HUB.

https://github.com/ultralytics/ultralytics/pull/7316

kalenmike commented 6 months ago

@hassaanfarooq01 This got me thinking we should add the option to pass a HUB URL as a base model which fetches the weights and dataset and then allow the user to configure the training. I.E. Train a new model on top of an existing HUB model directly from the CLI.

jquaglia-uss commented 5 months ago

awesome! thanks for taking this into consideration! i think it would be a great feature because then users could manage their "current best generation" model inside of hub! it would really help incorporating mlOps into Hub.

UltralyticsAssistant commented 5 months ago

You're welcome, @jquaglia-uss! It's fantastic to hear that you're excited about the potential of this feature. Managing the "current best generation" model within the HUB would indeed streamline the process and enhance the MLOps capabilities for our users. Your feedback is invaluable, and it's suggestions like yours that help us evolve and better serve the community.

Rest assured, we take user requests seriously and aim to incorporate such features to improve the overall experience. Keep an eye on our updates, and thank you for being a part of the journey to make the Ultralytics HUB even better! If you have any more ideas or need assistance, don't hesitate to reach out. Happy modeling! 🌟

sergiuwaxmann commented 2 months ago

@jquaglia-uss @cw2708 Apologies for the late reply.

We released a few weeks ago a new feature that allows user to train new HUB models of top of existing HUB models. 🚀 You can train new HUB models of top of existing HUB models by using the "Custom" tab on the second step of the Train Model dialog and selecting one of your trained HUB models. custom_model