Docs: HUB Updates (#12804)

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
Sergiu Waxmann 2024-05-18 22:57:34 +03:00 committed by GitHub
parent 4afcb35186
commit d25dd182d6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 760 additions and 514 deletions

View file

@ -1,23 +1,16 @@
---
comments: true
description: Learn how to efficiently train AI models using Ultralytics HUB, a streamlined solution for model creation, training, evaluation, and deployment.
keywords: Ultralytics, HUB Models, AI model training, model creation, model training, model evaluation, model deployment
description: Streamline your AI model training on custom datasets with Ultralytics HUB. Efficient, user-friendly, and powerful.
keywords: Ultralytics HUB, AI model training, custom datasets, YOLOv8, real-time updates, model deployment, Ultralytics
---
# Ultralytics HUB Models
[Ultralytics HUB](https://hub.ultralytics.com/) models provide a streamlined solution for training vision AI models on custom datasets.
[Ultralytics HUB](https://bit.ly/ultralytics_hub) models provide a streamlined solution for training vision AI models on custom datasets.
The process is user-friendly and efficient, involving a simple three-step creation and accelerated training powered by Ultralytics YOLOv8. Real-time updates on model metrics are available during training, allowing users to monitor progress at each step. Once training is completed, models can be previewed and easily deployed to real-world applications. Therefore, Ultralytics HUB offers a comprehensive yet straightforward system for model creation, training, evaluation, and deployment.
The entire process of training a model is detailed on our [Cloud Training Page](cloud-training.md).
![Preview of the Models](https://github.com/ultralytics/ultralytics/assets/19519529/a02e1441-f5f6-4935-ad75-ec18e425d8bd)
## Train Model
The process is user-friendly and efficient, involving a simple three-step creation and accelerated training powered by Ultralytics YOLOv8. During training, real-time updates on model metrics are available so that you can monitor each step of the progress. Once training is completed, you can preview your model and easily deploy it to real-world applications. Therefore, [Ultralytics HUB](https://bit.ly/ultralytics_hub) offers a comprehensive yet straightforward system for model creation, training, evaluation, and deployment.
<p align="center">
<br>
<iframe loading="lazy" width="720" height="405" src="https://www.youtube.com/embed/YVlkq5H2tAQ"
title="YouTube video player" frameborder="0"
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
@ -27,115 +20,268 @@ The entire process of training a model is detailed on our [Cloud Training Page](
<strong>Watch:</strong> Ultralytics HUB Training and Validation Overview
</p>
Navigate to the [Models](https://hub.ultralytics.com/models) page by clicking on the **Models** button in the sidebar.
## Train Model
Training a model using HUB is a 4-step process:
Navigate to the [Models](https://hub.ultralytics.com/models) page by clicking on the **Models** button in the sidebar and click on the **Train Model** button on the top right of the page.
- **Execute the pre-requisites script**: Run the provided scripts to prepare the virtual environment.
- **Provide the API and start Training**: Once the model is prepared, provide the API key as instructed and execute the code block.
- **Check the results and Metrics**: Upon successful execution, a link is provided to the Metrics Page. This page offers comprehensive details on the trained model, including specifications, loss metrics, dataset information, and image distributions. Additionally, the 'Deploy' tab provides access to the trained model's documentation and license details.
- **Test your model**: Ultralytics HUB offers testing using custom images, device cameras, or links to test on `iPhone` or `Android` devices.
![Ultralytics HUB screenshot of the Models page with an arrow pointing to the Models button in the sidebar and one to the Train Model button](https://raw.githubusercontent.com/ultralytics/assets/main/docs/hub/models/hub_train_model_2.jpg)
![Ultralytics HUB screenshot of the Home page](https://github.com/ultralytics/ultralytics/assets/19519529/61428720-aa93-4689-b209-ead7f06fa488)
??? tip "Tip"
!!! tip "Tip"
You can train a model directly from the [Home](https://hub.ultralytics.com/home) page.
You can also train a model directly from the [Home](https://hub.ultralytics.com/home) page.
![Ultralytics HUB screenshot of the Home page with an arrow pointing to the Train Model card](https://raw.githubusercontent.com/ultralytics/assets/main/docs/hub/models/hub_train_model_1.jpg)
![Ultralytics HUB screenshot of the Home page with an arrow pointing to the Train Model card](https://github.com/ultralytics/ultralytics/assets/19519529/6f9f06f7-e663-4fa7-800c-98675bf1405b)
Click on the **Train Model** button on the top right of the page to trigger the **Train Model** dialog.
The **Train Model** dialog has three simple steps:
This action will trigger the **Train Model** dialog which has three simple steps:
### 1. Dataset
Select the dataset for training and click **Continue**.
In this step, you have to select the dataset you want to train your model on. After you selected a dataset, click **Continue**.
![Ultralytics HUB screenshot of the Train Model dialog with an arrow pointing to a dataset and one to the Continue button](https://github.com/ultralytics/ultralytics/assets/19519529/7ff90f2a-c61e-472f-a573-f725a5bddc1c)
![Ultralytics HUB screenshot of the Train Model dialog with an arrow pointing to a dataset and one to the Continue button](https://raw.githubusercontent.com/ultralytics/assets/main/docs/hub/models/hub_train_model_3.jpg)
??? tip "Tip"
You can skip this step if you train a model directly from the Dataset page.
![Ultralytics HUB screenshot of the Dataset page with an arrow pointing to the Train Model button](https://raw.githubusercontent.com/ultralytics/assets/main/docs/hub/datasets/hub_upload_dataset_9.jpg)
### 2. Model
Choose the project, model name, and architecture. Read more about available architectures in our [YOLOv8](../models/yolov8.md) (and [YOLOv5](../models/yolov5.md)) documentation.
In this step, you have to choose the project in which you want to create your model, the name of your model and your model's architecture.
Click **Continue** when satisfied with the configuration.
![Ultralytics HUB screenshot of the Train Model dialog with arrows pointing to the project dropdown, model name and Continue button](https://raw.githubusercontent.com/ultralytics/assets/main/docs/hub/models/hub_train_model_4.jpg)
![Ultralytics HUB screenshot of the Train Model dialog with an arrow pointing to a model architecture and one to the Continue button](https://github.com/ultralytics/ultralytics/assets/19519529/a7a412b3-3e87-48de-b117-c506338f36fb)
??? note "Note"
Ultralytics HUB will try to pre-select the project.
If you opened the **Train Model** dialog as described above, [Ultralytics HUB](https://bit.ly/ultralytics_hub) will pre-select the last project you used.
If you opened the **Train Model** dialog from the Project page, [Ultralytics HUB](https://bit.ly/ultralytics_hub) will pre-select the project you were inside of.
![Ultralytics HUB screenshot of the Project page with an arrow pointing to the Train Model button](https://raw.githubusercontent.com/ultralytics/assets/main/docs/hub/projects/hub_create_project_5.jpg)
In case you don't have a project created yet, you can set the name of your project in this step and it will be created together with your model.
!!! Info "Info"
You can read more about the available [YOLOv8](https://docs.ultralytics.com/models/yolov8) (and [YOLOv5](https://docs.ultralytics.com/models/yolov5)) architectures in our documentation.
By default, your model will use a pre-trained model (trained on the [COCO](https://docs.ultralytics.com/datasets/detect/coco) dataset) to reduce training time. You can change this behavior and tweak your model's configuration by opening the **Advanced Model Configuration** accordion.
![Ultralytics HUB screenshot of the Train Model dialog with an arrow pointing to the Advanced Model Configuration accordion](https://raw.githubusercontent.com/ultralytics/assets/main/docs/hub/models/hub_train_model_5.jpg)
!!! note "Note"
By default, your model will use a pre-trained model (trained on the [COCO](../datasets/detect/coco.md) dataset) to reduce training time.
You can easily change the most common model configuration options (such as the number of epochs) but you can also use the **Custom** option to access all [Train Settings](https://docs.ultralytics.com/modes/train/#train-settings) relevant to [Ultralytics HUB](https://bit.ly/ultralytics_hub).
Advanced options are available to modify this behavior.
Alternatively, you start training from one of your previously trained models by clicking on the **Custom** tab.
## Preview Model
![Ultralytics HUB screenshot of the Train Model dialog with an arrow pointing to the Custom tab](https://raw.githubusercontent.com/ultralytics/assets/main/docs/hub/models/hub_train_model_6.jpg)
Ultralytics HUB offers various ways to preview trained models.
When you're happy with your model configuration, click **Continue**.
You can upload an image in the **Test** card under the **Preview** tab to preview your model.
### 3. Train
![Ultralytics HUB screenshot of the Preview tab (Test card) inside the Model page](https://github.com/ultralytics/ultralytics/assets/19519529/a732d13a-8da9-40a8-9f5e-c766bec3fbe9)
In this step, you will start training you model.
Use our Ultralytics Cloud API to effortlessly [run inference](inference-api.md) with your custom model.
??? note "Note"
![Ultralytics HUB screenshot of the Preview tab (Ultralytics Cloud API card) inside the Model page](https://github.com/ultralytics/ultralytics/assets/19519529/77ae0f6c-d89e-433c-b404-77f71c06def5)
When you are on this step, you have the option to close the **Train Model** dialog and start training your model from the Model page later.
Preview your model in real-time on your [iOS](https://apps.apple.com/xk/app/ultralytics/id1583935240) or [Android](https://play.google.com/store/apps/details?id=com.ultralytics.ultralytics_app) device by [downloading](https://ultralytics.com/app_install) our [Ultralytics HUB Mobile Application](app/index.md).
![Ultralytics HUB screenshot of the Model page with an arrow pointing to the Start Training card](https://raw.githubusercontent.com/ultralytics/assets/main/docs/hub/cloud-training/hub_cloud_training_2.jpg)
![Ultralytics HUB screenshot of the Deploy tab inside the Model page with an arrow pointing to the Real-Time Preview card](https://github.com/ultralytics/ultralytics/assets/19519529/8d711052-5ab1-43bc-bc25-a8802a24b301)
[Ultralytics HUB](https://bit.ly/ultralytics_hub) offers three training options:
## Train the model
- [Ultralytics Cloud](./cloud-training.md)
- Google Colab
- Bring your own agent
Ultralytics HUB offers three training options:
#### a. Ultralytics Cloud
- **Ultralytics Cloud** - Learn more about training via the Ultralytics [Cloud Training Page](cloud-training.md)
- **Google Colab**
- **Bring your own agent**
You need to [upgrade](./pro.md#upgrade) to the [Pro Plan](./pro.md) in order to access [Ultralytics Cloud](./cloud-training.md).
## Training the Model on Google Colab
![Ultralytics HUB screenshot of the Train Model dialog](https://raw.githubusercontent.com/ultralytics/assets/main/docs/hub/models/hub_train_model_7.jpg)
To start training using Google Colab, follow the instructions on the Google Colab notebook.
To train models using our [Cloud Training](./cloud-training.md) solution, read the [Ultralytics Cloud Training](./cloud-training.md) documentation.
<a href="https://colab.research.google.com/github/ultralytics/hub/blob/main/hub.ipynb" target="_blank">
#### b. Google Colab
To start training your model using [Google Colab](https://colab.research.google.com/github/ultralytics/hub/blob/master/hub.ipynb), follow the instructions shown in the [Ultralytics HUB](https://bit.ly/ultralytics_hub) **Train Model** dialog or on the [Google Colab](https://colab.research.google.com/github/ultralytics/hub/blob/master/hub.ipynb) notebook.
<a href="https://colab.research.google.com/github/ultralytics/hub/blob/master/hub.ipynb" target="_blank">
<img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab">
</a>
![Google Colab Screenshot](https://github.com/ultralytics/ultralytics/assets/19519529/f19d2e04-d33c-446b-91f9-80396e02b68f)
![Ultralytics HUB screenshot of the Train Model dialog with arrows pointing to instructions](https://raw.githubusercontent.com/ultralytics/assets/main/docs/hub/models/hub_train_model_8.jpg)
## Bring your own Agent
When the training starts, you can click **Done** and monitor the training progress on the Model page.
Create an API endpoint through Ultralytics HUB to train the Model locally. Follow the provided steps, and access training details via the link generated on the Agent terminal.
![Ultralytics HUB screenshot of the Train Model dialog with an arrow pointing to the Done button](https://raw.githubusercontent.com/ultralytics/assets/main/docs/hub/models/hub_train_model_9.jpg)
![Bring your own agent screenshot](https://github.com/ultralytics/ultralytics/assets/19519529/7d8dcd7a-19ec-4ada-87bf-1a1ba1d01ceb)
![Ultralytics HUB screenshot of the Model page of a model that is currently training](https://raw.githubusercontent.com/ultralytics/assets/main/docs/hub/models/hub_train_model_10.jpg)
!!! note "Note"
In case the training stops and a checkpoint was saved, you can resume training your model from the Model page.
![Ultralytics HUB screenshot of the Model page with an arrow pointing to the Resume Training card](https://raw.githubusercontent.com/ultralytics/assets/main/docs/hub/models/hub_train_model_11.jpg)
#### c. Bring your own agent
To start training your model using your own agent, follow the instructions shown in the [Ultralytics HUB](https://bit.ly/ultralytics_hub) **Train Model** dialog.
![Ultralytics HUB screenshot of the Train Model dialog with arrows pointing to instructions](https://raw.githubusercontent.com/ultralytics/assets/main/docs/hub/models/hub_train_model_12.jpg)
Install the `ultralytics` package from [PyPI](https://pypi.org/project/ultralytics).
```bash
pip install -U ultralytics
```
Next, use the Python code provided to start training the model.
When the training starts, you can click **Done** and monitor the training progress on the Model page.
![Ultralytics HUB screenshot of the Train Model dialog with an arrow pointing to the Done button](https://raw.githubusercontent.com/ultralytics/assets/main/docs/hub/models/hub_train_model_13.jpg)
![Ultralytics HUB screenshot of the Model page of a model that is currently training](https://raw.githubusercontent.com/ultralytics/assets/main/docs/hub/models/hub_train_model_14.jpg)
!!! note "Note"
In case the training stops and a checkpoint was saved, you can resume training your model from the Model page.
![Ultralytics HUB screenshot of the Model page with an arrow pointing to the Resume Training card](https://raw.githubusercontent.com/ultralytics/assets/main/docs/hub/models/hub_train_model_15.jpg)
## Analyze Model
After you [train a model](#train-model), you can analyze the model metrics.
The **Train** tab presents the most important metrics carefully grouped based on the task.
![Ultralytics HUB screenshot of the Model page of a trained model](https://raw.githubusercontent.com/ultralytics/assets/main/docs/hub/models/hub_analyze_model_1.jpg)
To access all model metrics, click on the **Charts** tab.
![Ultralytics HUB screenshot of the Preview tab inside the Model page with an arrow pointing to the Charts tab](https://raw.githubusercontent.com/ultralytics/assets/main/docs/hub/models/hub_analyze_model_2.jpg)
??? tip "Tip"
Each chart can be enlarged for better visualization.
![Ultralytics HUB screenshot of the Train tab inside the Model page with an arrow pointing to the expand icon of one of the charts](https://raw.githubusercontent.com/ultralytics/assets/main/docs/hub/models/hub_analyze_model_3.jpg)
![Ultralytics HUB screenshot of the Train tab inside the Model page with one of the charts expanded](https://raw.githubusercontent.com/ultralytics/assets/main/docs/hub/models/hub_analyze_model_4.jpg)
Furthermore, to properly analyze the data, you can utilize the zoom feature.
![Ultralytics HUB screenshot of the Train tab inside the Model page with one of the charts expanded and zoomed](https://raw.githubusercontent.com/ultralytics/assets/main/docs/hub/models/hub_analyze_model_5.jpg)
## Preview Model
After you [train a model](#train-model), you can preview it by clicking on the **Preview** tab.
In the **Test** card, you can select a preview image from the dataset used during training or upload an image from your device.
![Ultralytics HUB screenshot of the Preview tab inside the Model page with an arrow pointing to Charts tab and one to the Test card](https://raw.githubusercontent.com/ultralytics/assets/main/docs/hub/models/hub_preview_model_1.jpg)
!!! note "Note"
You can also use your camera to take a picture and run inference on it directly.
![Ultralytics HUB screenshot of the Preview tab inside the Model page with an arrow pointing to Camera tab inside the Test card](https://raw.githubusercontent.com/ultralytics/assets/main/docs/hub/models/hub_preview_model_2.jpg)
Furthermore, you can preview your model in real-time directly on your [iOS](https://apps.apple.com/xk/app/ultralytics/id1583935240) or [Android](https://play.google.com/store/apps/details?id=com.ultralytics.ultralytics_app) mobile device by [downloading](https://ultralytics.com/app_install) our [Ultralytics HUB App](app/index.md).
![Ultralytics HUB screenshot of the Deploy tab inside the Model page with arrow pointing to the Real-Time Preview card](https://raw.githubusercontent.com/ultralytics/assets/main/docs/hub/models/hub_preview_model_3.jpg)
## Deploy Model
Export your model to 13 different formats, including ONNX, OpenVINO, CoreML, TensorFlow, Paddle, and more.
After you [train a model](#train-model), you can export it to 13 different formats, including ONNX, OpenVINO, CoreML, TensorFlow, Paddle and many others.
![Ultralytics HUB screenshot of the Deploy tab inside the Model page with all formats exported](https://github.com/ultralytics/ultralytics/assets/19519529/083a929d-2bbd-45f8-9dec-2767949caaba)
![Ultralytics HUB screenshot of the Deploy tab inside the Model page with an arrow pointing to the Export card and all formats exported](https://raw.githubusercontent.com/ultralytics/assets/main/docs/hub/models/hub_deploy_model_1.jpg)
??? tip "Tip"
You can customize the export options of each format if you open the export actions dropdown and click on the **Advanced** option.
![Ultralytics HUB screenshot of the Deploy tab inside the Model page with an arrow pointing to the Advanced option of one of the formats](https://raw.githubusercontent.com/ultralytics/assets/main/docs/hub/models/hub_deploy_model_2.jpg)
!!! note "Note"
You can re-export each format if you open the export actions dropdown and click on the **Advanced** option.
You can also use our [Inference API](./inference-api.md) in production.
![Ultralytics HUB screenshot of the Deploy tab inside the Model page with an arrow pointing to the Ultralytics Inference API card](https://raw.githubusercontent.com/ultralytics/assets/main/docs/hub/inference-api/hub_inference_api_1.jpg)
Read the [Ultralytics Inference API](./inference-api.md) documentation for more information.
## Share Model
Ultralytics HUB's sharing functionality provides a convenient way to share models. Control the general access of your models, setting them to "Private" or "Unlisted".
!!! info "Info"
Navigate to the Model page, open the model actions dropdown, and click on the **Share** option.
[Ultralytics HUB](https://bit.ly/ultralytics_hub)'s sharing functionality provides a convenient way to share models with others. This feature is designed to accommodate both existing [Ultralytics HUB](https://bit.ly/ultralytics_hub) users and those who have yet to create an account.
![Ultralytics HUB screenshot of the Model page with an arrow pointing to the Share option](https://github.com/ultralytics/ultralytics/assets/19519529/ac98724e-9267-4557-a792-33073c47bbff)
??? note "Note"
Set the general access and click **Save**.
You have control over the general access of your models.
![Ultralytics HUB screenshot of the Share Model dialog with an arrow pointing to the dropdown and one to the Save button](https://github.com/ultralytics/ultralytics/assets/19519529/65afcd99-1f9e-4be8-b287-096a7c74fc0e)
You can choose to set the general access to "Private", in which case, only you will have access to it. Alternatively, you can set the general access to "Unlisted" which grants viewing access to anyone who has the direct link to the model, regardless of whether they have an [Ultralytics HUB](https://bit.ly/ultralytics_hub) account or not.
Now, anyone with the direct link can view your model.
Navigate to the Model page of the model you want to share, open the model actions dropdown and click on the **Share** option. This action will trigger the **Share Model** dialog.
!!! tip "Tip"
![Ultralytics HUB screenshot of the Model page with an arrow pointing to the Share option](https://raw.githubusercontent.com/ultralytics/assets/main/docs/hub/models/hub_share_model_1.jpg)
Easily copy the model's link shown in the **Share Model** dialog by clicking on it.
??? tip "Tip"
You can also share a model directly from the [Models](https://hub.ultralytics.com/models) page or from the Project page of the project where your model is located.
![Ultralytics HUB screenshot of the Models page with an arrow pointing to the Share option of one of the models](https://raw.githubusercontent.com/ultralytics/assets/main/docs/hub/models/hub_share_model_2.jpg)
Set the general access to "Unlisted" and click **Save**.
![Ultralytics HUB screenshot of the Share Model dialog with an arrow pointing to the dropdown and one to the Save button](https://raw.githubusercontent.com/ultralytics/assets/main/docs/hub/models/hub_share_model_3.jpg)
Now, anyone who has the direct link to your model can view it.
??? tip "Tip"
You can easily click on the model's link shown in the **Share Model** dialog to copy it.
![Ultralytics HUB screenshot of the Share Model dialog with an arrow pointing to the model's link](https://raw.githubusercontent.com/ultralytics/assets/main/docs/hub/models/hub_share_model_4.jpg)
## Edit and Delete Model
## Edit Project
Navigate to the Model page, open the model actions dropdown, and click on the **Edit** option to update the model. To delete the model, select the **Delete** option.
Navigate to the Model page of the model you want to edit, open the model actions dropdown and click on the **Edit** option. This action will trigger the **Update Model** dialog.
![Ultralytics HUB screenshot of the Model page with an arrow pointing to the Edit option](https://github.com/ultralytics/ultralytics/assets/19519529/5c2db731-45dc-4f04-ac0f-9ad600c140a1)
![Ultralytics HUB screenshot of the Model page with an arrow pointing to the Edit option](https://raw.githubusercontent.com/ultralytics/assets/main/docs/hub/models/hub_edit_model_1.jpg)
??? tip "Tip"
You can also edit a model directly from the [Models](https://hub.ultralytics.com/models) page or from the Project page of the project where your model is located.
![Ultralytics HUB screenshot of the Models page with an arrow pointing to the Edit option of one of the models](https://raw.githubusercontent.com/ultralytics/assets/main/docs/hub/models/hub_edit_model_2.jpg)
Apply the desired modifications to your model and then confirm the changes by clicking **Save**.
![Ultralytics HUB screenshot of the Update Model dialog with an arrow pointing to the Save button](https://raw.githubusercontent.com/ultralytics/assets/main/docs/hub/models/hub_edit_model_3.jpg)
## Delete Project
Navigate to the Model page of the model you want to delete, open the model actions dropdown and click on the **Delete** option. This action will delete the model.
![Ultralytics HUB screenshot of the Model page with an arrow pointing to the Delete option](https://raw.githubusercontent.com/ultralytics/assets/main/docs/hub/models/hub_delete_model_1.jpg)
??? tip "Tip"
You can also delete a model directly from the [Models](https://hub.ultralytics.com/models) page or from the Project page of the project where your model is located.
![Ultralytics HUB screenshot of the Models page with an arrow pointing to the Delete option of one of the models](https://raw.githubusercontent.com/ultralytics/assets/main/docs/hub/models/hub_delete_model_2.jpg)
!!! note "Note"
If you change your mind, you can restore the model from the [Trash](https://hub.ultralytics.com/trash) page.
![Ultralytics HUB screenshot of the Trash page with an arrow pointing to the Restore option of one of the models](https://raw.githubusercontent.com/ultralytics/assets/main/docs/hub/models/hub_delete_model_3.jpg)