单目3D初始代码

This commit is contained in:
zhao.zhu
2026-06-24 09:35:46 +08:00
commit 04a5895b6b
1153 changed files with 340700 additions and 0 deletions

View File

@@ -0,0 +1,537 @@
---
comments: true
description: Learn how to train YOLO models on cloud GPUs with Ultralytics Platform, including remote training and real-time metrics streaming.
keywords: Ultralytics Platform, cloud training, GPU training, remote training, YOLO, model training, machine learning
---
# Cloud Training
[Ultralytics Platform](https://platform.ultralytics.com) Cloud Training offers single-click training on cloud GPUs, making model training accessible without complex setup. Train YOLO models with real-time metrics streaming and automatic checkpoint saving.
```mermaid
graph LR
A[Configure] --> B[Start Training]
B --> C[Provision GPU]
C --> D[Download Dataset]
D --> E[Train]
E --> F[Stream Metrics]
F --> G[Save Checkpoints]
G --> H[Complete]
style A fill:#2196F3,color:#fff
style B fill:#FF9800,color:#fff
style E fill:#9C27B0,color:#fff
style H fill:#4CAF50,color:#fff
```
## Training Dialog
Start training from the platform UI by clicking **New Model** on any project page (or **Train** from a dataset page). The training dialog has two tabs: **Cloud Training** and **Local Training**.
![Ultralytics Platform Training Dialog Cloud Tab](https://cdn.jsdelivr.net/gh/ultralytics/assets@main/docs/platform/platform-training-dialog-cloud-tab.avif)
### Step 1: Select Base Model
Choose from official YOLO26 models or your own trained models:
| Category | Description |
| --------------- | ---------------------------------------- |
| **Official** | All 25 YOLO26 models (5 sizes x 5 tasks) |
| **Your Models** | Your completed models for fine-tuning |
Official models are organized by task type ([Detect](../../tasks/detect.md), [Segment](../../tasks/segment.md), [Pose](../../tasks/pose.md), [OBB](../../tasks/obb.md), [Classify](../../tasks/classify.md)) with sizes from nano to xlarge.
### Step 2: Select Dataset
Choose a dataset to train on (see [Datasets](../data/datasets.md)):
| Option | Description |
| ----------------- | --------------------------------- |
| **Official** | Curated datasets from Ultralytics |
| **Your Datasets** | Datasets you've uploaded |
!!! note "Dataset Requirements"
Datasets must be in `ready` status with at least 1 image in the train split, 1 image in the validation or test split, and at least 1 labeled image.
!!! warning "Task Mismatch"
A task mismatch warning appears if the model task (e.g., detect) doesn't match the dataset task (e.g., segment). Training will fail if you proceed with mismatched tasks. Ensure both model and dataset use the same task type, as described in the [task guides](../../tasks/index.md).
### Step 3: Configure Parameters
Set core training parameters:
| Parameter | Description | Default |
| -------------- | --------------------------------------------------------------------------- | ------- |
| **Epochs** | Number of training iterations | 100 |
| **Batch Size** | Samples per iteration | 16 |
| **Image Size** | Input resolution (320/416/512/640/1280 dropdown, or 32-4096 in YAML editor) | 640 |
| **Run Name** | Optional name for the training run | auto |
### Step 4: Advanced Settings (Optional)
Expand **Advanced Settings** to access the full YAML-based parameter editor with 40+ training parameters organized by group (see [configuration reference](../../usage/cfg.md)):
| Group | Parameters |
| ----------------------- | -------------------------------------------------------------------------------- |
| **Learning Rate** | lr0, lrf, momentum, weight_decay, warmup_epochs, warmup_momentum, warmup_bias_lr |
| **Optimizer** | SGD, MuSGD, Adam, AdamW, NAdam, RAdam, RMSProp, Adamax |
| **Loss Weights** | box, cls, dfl, pose, kobj, label_smoothing |
| **Color Augmentation** | hsv_h, hsv_s, hsv_v |
| **Geometric Augment.** | degrees, translate, scale, shear, perspective |
| **Flip & Mix Augment.** | flipud, fliplr, mosaic, mixup, copy_paste |
| **Training Control** | patience, seed, deterministic, amp, cos_lr, close_mosaic, save_period |
| **Dataset** | fraction, freeze, single_cls, rect, multi_scale, resume |
Parameters are task-aware (e.g., `copy_paste` only shows for segment tasks, `pose`/`kobj` only for pose tasks). A **Modified** badge appears when values differ from defaults, and you can reset all to defaults with the reset button.
??? example "Example: Tuning Augmentation for Small Datasets"
For small datasets (<1000 images), increase augmentation to reduce overfitting:
```yaml
mosaic: 1.0 # Keep mosaic on
mixup: 0.3 # Add mixup blending
copy_paste: 0.3 # Add copy-paste (segment only)
fliplr: 0.5 # Horizontal flip
degrees: 10.0 # Slight rotation
scale: 0.9 # Aggressive scaling
```
### Step 5: Select GPU (Cloud Tab)
Choose your GPU from Ultralytics Cloud:
![Ultralytics Platform Training Dialog Gpu Selector And Cost](https://cdn.jsdelivr.net/gh/ultralytics/assets@main/docs/platform/platform-training-dialog-gpu-selector-and-cost.avif)
| GPU | VRAM | Cost/Hour |
| ------------ | ------ | --------- |
| RTX 2000 Ada | 16 GB | $0.24 |
| RTX A4500 | 20 GB | $0.24 |
| RTX A5000 | 24 GB | $0.26 |
| RTX 4000 Ada | 20 GB | $0.38 |
| L4 | 24 GB | $0.39 |
| A40 | 48 GB | $0.40 |
| RTX 3090 | 24 GB | $0.46 |
| RTX A6000 | 48 GB | $0.49 |
| RTX 4090 | 24 GB | $0.59 |
| RTX 6000 Ada | 48 GB | $0.77 |
| L40S | 48 GB | $0.86 |
| RTX 5090 | 32 GB | $0.89 |
| L40 | 48 GB | $0.99 |
| A100 PCIe | 80 GB | $1.39 |
| A100 SXM | 80 GB | $1.49 |
| RTX PRO 6000 | 96 GB | $1.89 |
| H100 PCIe | 80 GB | $2.39 |
| H100 SXM | 80 GB | $2.69 |
| H100 NVL | 94 GB | $3.07 |
| H200 NVL | 143 GB | $3.39 |
| H200 SXM | 141 GB | $3.59 |
| B200 | 180 GB | $4.99 |
!!! tip "GPU Selection"
- **RTX PRO 6000**: 96 GB Blackwell generation, recommended default for most jobs
- **A100 SXM**: Required for large batch sizes or big models
- **H100/H200**: Maximum performance for time-sensitive training
- **B200**: NVIDIA Blackwell architecture for cutting-edge workloads
The dialog shows your current **balance** and a **Top Up** button. An estimated cost and duration are calculated based on your configuration (model size, dataset images, epochs, GPU speed).
### Step 6: Start Training
Click **Start Training** to launch your job. The Platform:
1. Provisions a GPU instance
2. Downloads your dataset
3. Begins training
4. Streams metrics in real-time
### Training Job Lifecycle
Training jobs progress through the following statuses:
| Status | Description |
| ------------- | ---------------------------------------------------- |
| **Pending** | Job submitted, waiting for GPU allocation |
| **Starting** | GPU provisioned, downloading dataset and model |
| **Running** | Training in progress, metrics streaming in real-time |
| **Completed** | Training finished successfully |
| **Failed** | Training failed (see console logs for details) |
| **Cancelled** | Training was cancelled by the user |
!!! success "Free Credits"
New accounts receive signup credits — $5 for personal emails and $25 for company emails. [Check your balance](../account/billing.md) in Settings > Billing.
![Ultralytics Platform Training Progress With Charts](https://cdn.jsdelivr.net/gh/ultralytics/assets@main/docs/platform/platform-training-progress-with-charts.avif)
## Monitor Training
View real-time training progress on the model page's **Train** tab:
### Charts Subtab
![Ultralytics Platform Model Training Live Charts](https://cdn.jsdelivr.net/gh/ultralytics/assets@main/docs/platform/platform-model-training-live-charts.avif)
| Metric | Description |
| ------------- | ---------------------------- |
| **Loss** | Training and validation loss |
| **mAP** | Mean Average Precision |
| **Precision** | Correct positive predictions |
| **Recall** | Detected ground truths |
### Console Subtab
Live console output with ANSI color support, progress bars, and error detection.
### System Subtab
Real-time GPU utilization, memory, temperature, CPU, and disk usage.
### Checkpoints
Checkpoints are saved automatically:
- **Every epoch**: Latest weights saved
- **Best model**: Highest mAP checkpoint preserved
- **Final model**: Weights at training completion
## Cancel Training
Click **Cancel Training** on the model page to stop a running job:
- The compute instance is terminated
- Credits stop being charged
- Checkpoints saved up to that point are preserved
## Remote Training
```mermaid
graph LR
A[Local GPU] --> B[Train]
B --> C[ultralytics Package]
C --> D[Stream Metrics]
D --> E[Platform Dashboard]
style A fill:#FF9800,color:#fff
style C fill:#2196F3,color:#fff
style E fill:#4CAF50,color:#fff
```
Train on your own hardware while streaming metrics to the platform.
!!! warning "Package Version Requirement"
Platform integration requires **ultralytics>=8.4.14**. Lower versions will NOT work with Platform.
```bash
pip install -U ultralytics
```
### Setup API Key
1. Go to [`Settings > Profile`](../account/api-keys.md) (API Keys section)
2. Create a new key (or the platform auto-creates one when you open the Local Training tab)
3. Set the environment variable:
```bash
export ULTRALYTICS_API_KEY="your_api_key"
```
### Train with Streaming
Use the `project` and `name` parameters to stream metrics:
=== "CLI"
```bash
yolo train model=yolo26n.pt data=coco.yaml epochs=100 \
project=username/my-project name=experiment-1
```
=== "Python"
```python
from ultralytics import YOLO
model = YOLO("yolo26n.pt")
model.train(
data="coco.yaml",
epochs=100,
project="username/my-project",
name="experiment-1",
)
```
The **Local Training** tab in the training dialog shows a pre-configured command with your API key, selected parameters, and advanced arguments included.
### Using Platform Datasets
Train with datasets stored on the platform using the [`ul://` URI format](../data/datasets.md#dataset-uri):
=== "CLI"
```bash
yolo train model=yolo26n.pt data=ul://username/datasets/my-dataset epochs=100 \
project=username/my-project name=exp1
```
=== "Python"
```python
from ultralytics import YOLO
model = YOLO("yolo26n.pt")
model.train(
data="ul://username/datasets/my-dataset",
epochs=100,
project="username/my-project",
name="exp1",
)
```
The `ul://` URI format automatically downloads and configures your dataset. The model is automatically linked to the dataset on the platform (see [Using Platform Datasets](../api/index.md#using-platform-datasets)).
## Billing
Training costs are based on GPU usage:
### Cost Estimation
Before training starts, the platform estimates total cost by:
1. **Estimating seconds per epoch** from dataset size, model complexity, image size, batch size, and GPU speed
2. **Calculating total training time** by multiplying seconds per epoch by the number of epochs, then adding startup overhead
3. **Computing the estimated cost** from total training hours multiplied by the GPU's hourly rate
**Factors affecting cost:**
| Factor | Impact |
| -------------------- | ----------------------------------------------------------------------------------------------------- |
| **Dataset Size** | More images = longer training time (baseline: ~2.8s compute per 1000 images on RTX 4090) |
| **Model Size** | Larger models (m, l, x) train slower than (n, s) |
| **Number of Epochs** | Direct multiplier on training time |
| **Image Size** | Larger imgsz increases computation: 320px=0.25x, 640px=1.0x (baseline), 1280px=4.0x |
| **Batch Size** | Larger batches are more efficient (batch 32 = ~0.85x time, batch 8 = ~1.2x time vs batch 16 baseline) |
| **GPU Speed** | Faster GPUs reduce training time (e.g., H100 SXM = ~3.4x faster than RTX 4090) |
| **Startup Overhead** | Up to 5 minutes for instance initialization, data download, and warmup (scales with dataset size) |
### Cost Examples
!!! note "Estimates"
Cost estimates are approximate and depend on many factors. The training dialog shows a real-time estimate before you start training.
| Scenario | GPU | Estimated Cost |
| -------------------------------- | ------------ | -------------- |
| 500 images, YOLO26n, 50 epochs | RTX 4090 | ~$0.50 |
| 1000 images, YOLO26n, 100 epochs | RTX PRO 6000 | ~$5 |
| 5000 images, YOLO26s, 100 epochs | H100 SXM | ~$23 |
### Billing Flow
```mermaid
graph LR
A[Estimate Cost] --> B[Balance Check]
B --> C[Train]
C --> D[Charge Actual Runtime]
style A fill:#2196F3,color:#fff
style B fill:#FF9800,color:#fff
style C fill:#9C27B0,color:#fff
style D fill:#4CAF50,color:#fff
```
Cloud training billing flow:
1. **Estimate**: Cost calculated before training starts
2. **Balance Check**: Available credits are checked before launch
3. **Train**: Job runs on selected compute
4. **Charge**: Final cost is based on actual runtime
!!! success "Consumer Protection"
Billing tracks actual compute usage, including partial runs that are cancelled.
### Payment Methods
| Method | Description |
| ------------------- | ------------------------ |
| **Account Balance** | Pre-loaded credits |
| **Pay Per Job** | Charge at job completion |
!!! note "Minimum Balance"
Training start requires a positive available balance and enough credits for the estimated job cost.
### View Training Costs
After training, view detailed costs in the **Billing** tab:
- Per-epoch cost breakdown
- Total GPU time
- Download cost report
![Ultralytics Platform Training Billing Details](https://cdn.jsdelivr.net/gh/ultralytics/assets@main/docs/platform/platform-training-billing-details.avif)
## Training Tips
### Choose the Right Model Size
| Model | Parameters | Best For |
| ------- | ---------- | ----------------------- |
| YOLO26n | 2.4M | Real-time, edge devices |
| YOLO26s | 9.5M | Balanced speed/accuracy |
| YOLO26m | 20.4M | Higher accuracy |
| YOLO26l | 24.8M | Production accuracy |
| YOLO26x | 55.7M | Maximum accuracy |
### Optimize Training Time
!!! tip "Cost-Saving Strategies"
1. **Start small**: Test with 10-20 epochs on a budget GPU to verify your dataset and config work
2. **Use appropriate GPU**: RTX PRO 6000 handles most workloads well
3. **Validate dataset**: Fix labeling issues before spending on training
4. **Monitor early**: Cancel training if loss plateaus — you only pay for compute time used
### Troubleshooting
| Issue | Solution |
| -------------------- | ------------------------------------ |
| Training stuck at 0% | Check dataset format, retry |
| Out of memory | Reduce batch size or use larger GPU |
| Poor accuracy | Increase epochs, check data quality |
| Training slow | Consider faster GPU |
| Task mismatch error | Ensure model and dataset tasks match |
## FAQ
### How long does training take?
Training time depends on:
- Dataset size
- Model size
- Number of epochs
- GPU selected
Typical times (1000 images, 100 epochs):
| Model | RTX PRO 6000 | A100 |
| ------- | ------------ | ------ |
| YOLO26n | 20 min | 20 min |
| YOLO26m | 40 min | 40 min |
| YOLO26x | 80 min | 80 min |
### Can I train overnight?
Yes, training continues until completion. You'll receive a notification when training finishes. Make sure your account has sufficient balance for epoch-based training.
### What happens if I run out of credits?
Training pauses at the end of the current epoch. Your checkpoint is saved, and you can resume after adding credits.
### Can I use custom training arguments?
Yes, expand the **Advanced Settings** section in the training dialog to access a YAML editor with 40+ configurable parameters. Non-default values are included in both cloud and local training commands.
### Can I train from a dataset page?
Yes, the **Train** button on dataset pages opens the training dialog with the dataset pre-selected and locked. You then select a project and model to begin training.
## Training Parameters Reference
=== "Core"
| Parameter | Type | Default | Range | Description |
| -------------- | ---- | ------- | -------- | ------------------------------------ |
| `epochs` | int | 100 | 1-10000 | Number of training epochs |
| `batch` | int | 16 | 1-512 | Batch size |
| `imgsz` | int | 640 | 32-4096 | Input image size |
| `patience` | int | 100 | 1-1000 | Early stopping patience |
| `seed` | int | 0 | 0-2147483647 | Random seed for reproducibility |
| `deterministic`| bool | True | - | Deterministic training mode |
| `amp` | bool | True | - | Automatic mixed precision |
| `close_mosaic` | int | 10 | 0-50 | Disable mosaic in final N epochs |
| `save_period` | int | -1 | -1-100 | Save checkpoint every N epochs |
| `workers` | int | 8 | 0-64 | Dataloader workers |
| `cache` | select | false | ram/disk/false | Cache images |
=== "Learning Rate"
| Parameter | Type | Default | Range | Description |
| --------------- | ----- | ------- | --------- | --------------------- |
| `lr0` | float | 0.01 | 0.0001-0.1 | Initial learning rate |
| `lrf` | float | 0.01 | 0.01-1.0 | Final LR factor |
| `momentum` | float | 0.937 | 0.6-0.98 | SGD momentum |
| `weight_decay` | float | 0.0005 | 0.0-0.001 | L2 regularization |
| `warmup_epochs` | float | 3.0 | 0-5 | Warmup epochs |
| `warmup_momentum` | float | 0.8 | 0.5-0.95 | Warmup momentum |
| `warmup_bias_lr` | float | 0.1 | 0.0-0.2 | Warmup bias LR |
| `cos_lr` | bool | False | - | Cosine LR scheduler |
=== "Augmentation"
| Parameter | Type | Default | Range | Description |
| ------------ | ----- | ------- | ------- | -------------------- |
| `hsv_h` | float | 0.015 | 0.0-0.1 | HSV hue augmentation |
| `hsv_s` | float | 0.7 | 0.0-1.0 | HSV saturation |
| `hsv_v` | float | 0.4 | 0.0-1.0 | HSV value |
| `degrees` | float | 0.0 | -45-45 | Rotation degrees |
| `translate` | float | 0.1 | 0.0-1.0 | Translation fraction |
| `scale` | float | 0.5 | 0.0-1.0 | Scale factor |
| `shear` | float | 0.0 | -10-10 | Shear degrees |
| `perspective`| float | 0.0 | 0.0-0.001 | Perspective transform|
| `fliplr` | float | 0.5 | 0.0-1.0 | Horizontal flip prob |
| `flipud` | float | 0.0 | 0.0-1.0 | Vertical flip prob |
| `mosaic` | float | 1.0 | 0.0-1.0 | Mosaic augmentation |
| `mixup` | float | 0.0 | 0.0-1.0 | Mixup augmentation |
| `copy_paste` | float | 0.0 | 0.0-1.0 | Copy-paste (segment) |
=== "Dataset"
| Parameter | Type | Default | Range | Description |
| ------------- | ----- | ------- | ------- | ------------------------------------ |
| `fraction` | float | 1.0 | 0.1-1.0 | Fraction of dataset to use |
| `freeze` | int | null | 0-100 | Number of layers to freeze |
| `single_cls` | bool | False | - | Treat all classes as one class |
| `rect` | bool | False | - | Rectangular training |
| `multi_scale` | float | 0.0 | 0.0-1.0 | Multi-scale training range |
| `val` | bool | True | - | Run validation during training |
| `resume` | bool | False | - | Resume training from checkpoint |
=== "Optimizer"
| Value | Description |
| --------- | ----------------------------- |
| `auto` | Automatic selection (default) |
| `SGD` | Stochastic Gradient Descent |
| `MuSGD` | Muon SGD optimizer |
| `Adam` | Adam optimizer |
| `AdamW` | Adam with weight decay |
| `NAdam` | NAdam optimizer |
| `RAdam` | RAdam optimizer |
| `RMSProp` | RMSProp optimizer |
| `Adamax` | Adamax optimizer |
=== "Loss Weights"
| Parameter | Type | Default | Range | Description |
| ---------------- | ----- | ------- | --------- | --------------------------- |
| `box` | float | 7.5 | 1-50 | Box loss weight |
| `cls` | float | 0.5 | 0.2-4 | Classification loss weight |
| `dfl` | float | 1.5 | 0.4-6 | Distribution focal loss |
| `pose` | float | 12.0 | 1-50 | Pose loss weight (pose only)|
| `kobj` | float | 1.0 | 0.5-10 | Keypoint objectness (pose) |
| `label_smoothing`| float | 0.0 | 0.0-0.1 | Label smoothing factor |
!!! tip "Task-Specific Parameters"
Some parameters only apply to specific tasks:
- **Detection tasks only** (detect, segment, pose, OBB — not classify): `box`, `dfl`, `degrees`, `translate`, `shear`, `perspective`, `mosaic`, `mixup`, `close_mosaic`
- **Segment only**: `copy_paste`
- **Pose only**: `pose` (loss weight), `kobj` (keypoint objectness)

188
docs/en/platform/train/index.md Executable file
View File

@@ -0,0 +1,188 @@
---
comments: true
description: Learn about model training in Ultralytics Platform including project organization, cloud training, and real-time metrics streaming.
keywords: Ultralytics Platform, model training, cloud training, YOLO, GPU training, machine learning, deep learning
---
# Model Training
[Ultralytics Platform](https://platform.ultralytics.com) provides comprehensive tools for training YOLO models, from organizing experiments to running cloud training jobs with real-time metrics streaming.
## Overview
The Training section helps you:
- **Organize** models into [projects](projects.md) for easier management
- **Train** on cloud GPUs with a single click
- **Monitor** real-time metrics during training
- **Compare** model performance across experiments
- **Export** to 17+ deployment formats (see [supported formats](models.md#supported-formats))
![Ultralytics Platform Train Overview](https://cdn.jsdelivr.net/gh/ultralytics/assets@main/docs/platform/platform-train-overview.avif)
## Workflow
```mermaid
graph LR
A[📁 Project] --> B[⚙️ Configure]
B --> C[🚀 Train]
C --> D[📈 Monitor]
D --> E[📦 Export]
style A fill:#4CAF50,color:#fff
style B fill:#2196F3,color:#fff
style C fill:#FF9800,color:#fff
style D fill:#9C27B0,color:#fff
style E fill:#00BCD4,color:#fff
```
| Stage | Description |
| ------------- | -------------------------------------------------------------------------- |
| **Project** | Create a workspace to organize related models |
| **Configure** | Select [dataset](../data/datasets.md), base model, and training parameters |
| **Train** | Run on cloud GPUs or your local hardware |
| **Monitor** | View real-time loss curves and metrics |
| **Export** | Convert to 17+ deployment formats ([details](models.md#supported-formats)) |
## Training Options
Ultralytics Platform supports multiple training approaches:
| Method | Description | Best For |
| ------------------------------------------------------- | --------------------------------------------- | -------------------------- |
| **[Cloud Training](cloud-training.md)** | Train on Ultralytics Cloud GPUs | No local GPU, scalability |
| **[Local Training](cloud-training.md#remote-training)** | Train locally, stream metrics to the platform | Existing hardware, privacy |
| **[Colab Training](cloud-training.md#remote-training)** | Use Google Colab with platform integration | Free GPU access |
## GPU Options
Available GPUs for cloud training on Ultralytics Cloud:
| GPU | VRAM | Cost/Hour | Best For |
| ------------ | ------ | --------- | ------------------------- |
| RTX 2000 Ada | 16 GB | $0.24 | Small datasets, testing |
| RTX A4500 | 20 GB | $0.24 | Small-medium datasets |
| RTX A5000 | 24 GB | $0.26 | Medium datasets |
| RTX 4000 Ada | 20 GB | $0.38 | Medium datasets |
| L4 | 24 GB | $0.39 | Inference optimized |
| A40 | 48 GB | $0.40 | Larger batch sizes |
| RTX 3090 | 24 GB | $0.46 | Great price/performance |
| RTX A6000 | 48 GB | $0.49 | Large models |
| RTX 4090 | 24 GB | $0.59 | Best price/performance |
| RTX 6000 Ada | 48 GB | $0.77 | Large batch training |
| L40S | 48 GB | $0.86 | Large batch training |
| RTX 5090 | 32 GB | $0.89 | Latest generation |
| L40 | 48 GB | $0.99 | Large models |
| A100 PCIe | 80 GB | $1.39 | Production training |
| A100 SXM | 80 GB | $1.49 | Production training |
| RTX PRO 6000 | 96 GB | $1.89 | Recommended default |
| H100 PCIe | 80 GB | $2.39 | High-performance training |
| H100 SXM | 80 GB | $2.69 | Fastest training |
| H100 NVL | 94 GB | $3.07 | Maximum performance |
| H200 NVL | 143 GB | $3.39 | Maximum memory |
| H200 SXM | 141 GB | $3.59 | Maximum performance |
| B200 | 180 GB | $4.99 | Largest models |
!!! tip "Signup Credits"
New accounts receive signup credits for training. Check [Billing](../account/billing.md) for details.
## Real-Time Metrics
During training, view live metrics across three subtabs:
```mermaid
graph LR
A[Charts] --> B[Loss Curves]
A --> C[Performance Metrics]
D[Console] --> E[Live Logs]
D --> F[Error Detection]
G[System] --> H[GPU Utilization]
G --> I[Memory & Temp]
style A fill:#2196F3,color:#fff
style D fill:#FF9800,color:#fff
style G fill:#9C27B0,color:#fff
```
| Subtab | Metrics |
| ----------- | ------------------------------------------------------ |
| **Charts** | Box/class/DFL loss, mAP50, mAP50-95, precision, recall |
| **Console** | Live training logs with ANSI color and error detection |
| **System** | GPU utilization, memory, temperature, CPU, disk |
!!! info "Automatic Checkpoints"
The Platform automatically saves checkpoints at every epoch. The **best model** (highest mAP) and **final model** are always preserved.
## Quick Start
Get started with cloud training in under a minute:
=== "Cloud (UI)"
1. Create a project in the sidebar
2. Click **New Model**
3. Select a model, dataset, and GPU
4. Click **Start Training**
=== "Remote (CLI)"
```bash
export ULTRALYTICS_API_KEY="your_api_key"
yolo train model=yolo26n.pt data=ul://username/datasets/my-dataset \
epochs=100 project=username/my-project name=exp1
```
=== "Remote (Python)"
```python
from ultralytics import YOLO
model = YOLO("yolo26n.pt")
model.train(
data="ul://username/datasets/my-dataset",
epochs=100,
project="username/my-project",
name="exp1",
)
```
## Quick Links
- [**Projects**](projects.md): Organize your models and experiments
- [**Models**](models.md): Manage trained checkpoints
- [**Cloud Training**](cloud-training.md): Train on cloud GPUs
## FAQ
### How long does training take?
Training time depends on:
- Dataset size (number of images)
- Model size (n, s, m, l, x)
- Number of epochs
- GPU type selected
A typical training run with 1000 images, YOLO26n, 100 epochs on RTX PRO 6000 takes about 2-3 hours. Smaller runs (500 images, 50 epochs on RTX 4090) complete in under an hour. See [cost examples](cloud-training.md#cost-examples) for detailed estimates.
### Can I train multiple models simultaneously?
Yes. Concurrent cloud training limits depend on your plan: Free allows 3, Pro allows 10, and Enterprise is unlimited. For additional parallel training, use remote training from multiple machines.
### What happens if training fails?
If training fails:
1. Checkpoints are saved at each epoch
2. You can resume from the last checkpoint
3. Credits are only charged for completed compute time
### How do I choose the right GPU?
| Scenario | Recommended GPU |
| ----------------------------- | ---------------- |
| Most training jobs | RTX PRO 6000 |
| Large datasets or batch sizes | H100 SXM or H200 |
| Budget-conscious | RTX 4090 |

375
docs/en/platform/train/models.md Executable file
View File

@@ -0,0 +1,375 @@
---
comments: true
description: Learn how to manage, analyze, and export trained models in Ultralytics Platform with support for 17+ deployment formats.
keywords: Ultralytics Platform, models, model management, export, ONNX, TensorRT, CoreML, YOLO
---
# Models
[Ultralytics Platform](https://platform.ultralytics.com) provides comprehensive model management for training, analyzing, and deploying YOLO models. Upload pretrained models or train new ones directly on the platform.
![Ultralytics Platform Model Page Overview Tab](https://cdn.jsdelivr.net/gh/ultralytics/assets@main/docs/platform/platform-model-page-overview-tab.avif)
## Upload Model
Upload existing model weights to the platform:
1. Navigate to your project
2. **Drag and drop** `.pt` files onto the project page or models sidebar
3. Model metadata is parsed automatically from the file
Multiple files can be uploaded simultaneously (up to 3 concurrent).
![Ultralytics Platform Model Drag Drop Upload](https://cdn.jsdelivr.net/gh/ultralytics/assets@main/docs/platform/platform-model-drag-drop-upload.avif)
Supported model formats:
| Format | Extension | Description |
| ------- | --------- | ------------------------- |
| PyTorch | `.pt` | Native Ultralytics format |
After upload, the platform parses model metadata:
- Task type ([detect](../../tasks/detect.md), [segment](../../tasks/segment.md), [pose](../../tasks/pose.md), [OBB](../../tasks/obb.md), [classify](../../tasks/classify.md))
- Architecture (YOLO26n, YOLO26s, etc.)
- Class names and count
- Input size and parameters
- Training results and metrics (if present in checkpoint)
## Train Model
Train a new model directly on the platform:
1. Navigate to your project
2. Click **New Model**
3. Select base model and dataset
4. Configure training parameters
5. Choose cloud or local training
6. Start training
See [Cloud Training](cloud-training.md) for detailed instructions.
## Model Lifecycle
```mermaid
graph LR
A[Upload .pt] --> B[Overview]
C[Train] --> B
B --> D[Predict]
B --> E[Export]
B --> F[Deploy]
E --> G[17+ Formats]
F --> H[Endpoint]
style A fill:#4CAF50,color:#fff
style C fill:#FF9800,color:#fff
style E fill:#2196F3,color:#fff
style F fill:#9C27B0,color:#fff
```
## Model Page Tabs
Each model page has the following tabs:
| Tab | Content |
| ------------ | --------------------------------------------- |
| **Overview** | Model metadata, key metrics, dataset link |
| **Train** | Training charts, console output, system stats |
| **Predict** | Interactive browser inference |
| **Export** | Format conversion with GPU selection |
| **Deploy** | Endpoint creation and management |
### Overview Tab
Displays model metadata and key metrics:
- Model name (editable), status badge, task type
- Final metrics (mAP50, mAP50-95, precision, recall)
- Metric sparkline charts showing training progression
- Training arguments (epochs, batch size, image size, etc.)
- Dataset link (when trained with a Platform dataset)
- Download button for model weights
![Ultralytics Platform Model Overview Metrics And Args](https://cdn.jsdelivr.net/gh/ultralytics/assets@main/docs/platform/platform-model-overview-metrics-and-args.avif)
### Train Tab
The Train tab has three subtabs:
#### Charts Subtab
Interactive training metric charts showing loss curves and performance metrics over epochs:
| Chart Group | Metrics |
| ----------------- | ---------------------------------------------- |
| **Metrics** | mAP50, mAP50-95, precision, recall |
| **Train Loss** | train/box_loss, train/cls_loss, train/dfl_loss |
| **Val Loss** | val/box_loss, val/cls_loss, val/dfl_loss |
| **Learning Rate** | lr/pg0, lr/pg1, lr/pg2 |
![Ultralytics Platform Model Train Charts Subtab](https://cdn.jsdelivr.net/gh/ultralytics/assets@main/docs/platform/platform-model-train-charts-subtab.avif)
#### Console Subtab
Live console output from the training process:
- Real-time log streaming during training
- Epoch progress bars and validation results
- Error detection with highlighted error banners
- ANSI color support for formatted output
![Ultralytics Platform Model Train Console Subtab](https://cdn.jsdelivr.net/gh/ultralytics/assets@main/docs/platform/platform-model-train-console-subtab.avif)
#### System Subtab
GPU and system metrics during training:
| Metric | Description |
| -------------- | -------------------------- |
| **GPU Util** | GPU utilization percentage |
| **GPU Memory** | GPU memory usage |
| **GPU Temp** | GPU temperature |
| **CPU Usage** | CPU utilization |
| **RAM** | System memory usage |
| **Disk** | Disk usage |
![Ultralytics Platform Model Train System Subtab](https://cdn.jsdelivr.net/gh/ultralytics/assets@main/docs/platform/platform-model-train-system-subtab.avif)
### Predict Tab
Run interactive inference directly in the browser:
- Upload an image, paste a URL, or use webcam
- Results display with bounding boxes, masks, or keypoints
- Auto-inference when an image is provided
- Supports all task types ([detect](../../tasks/detect.md), [segment](../../tasks/segment.md), [pose](../../tasks/pose.md), [OBB](../../tasks/obb.md), [classify](../../tasks/classify.md))
!!! tip "Quick Testing"
The Predict tab runs inference on Ultralytics Cloud, so you don't need a local GPU. Results are displayed with interactive overlays matching the model's task type.
### Export Tab
Export your model to 17+ deployment formats. See [Export Model](#export-model) below and the core [Export mode guide](../../modes/export.md) for full details.
### Deploy Tab
Create and manage dedicated inference endpoints. See [Deployments](../deploy/index.md) for details.
## Validation Plots
After training completes, view detailed validation analysis:
### Confusion Matrix
Interactive heatmap showing prediction accuracy per class:
![Ultralytics Platform Model Confusion Matrix](https://cdn.jsdelivr.net/gh/ultralytics/assets@main/docs/platform/platform-model-confusion-matrix.avif)
### PR/F1 Curves
Performance curves at different confidence thresholds:
![Ultralytics Platform Model Pr F1 Curves](https://cdn.jsdelivr.net/gh/ultralytics/assets@main/docs/platform/platform-model-pr-f1-curves.avif)
| Curve | Description |
| ------------------------ | ---------------------------------------- |
| **Precision-Recall** | Trade-off between precision and recall |
| **F1-Confidence** | F1 score at different confidence levels |
| **Precision-Confidence** | Precision at different confidence levels |
| **Recall-Confidence** | Recall at different confidence levels |
## Export Model
```mermaid
graph LR
A[Select Format] --> B[Configure Args]
B --> C[Export]
C --> D{GPU Required?}
D -->|Yes| E[Cloud GPU Export]
D -->|No| F[CPU Export]
E --> G[Download]
F --> G
style A fill:#2196F3,color:#fff
style C fill:#FF9800,color:#fff
style G fill:#4CAF50,color:#fff
```
Export your model to 17+ deployment formats:
1. Navigate to the **Export** tab
2. Select target format
3. Configure export arguments (image size, half precision, dynamic, etc.)
4. For GPU-required formats (TensorRT), select a GPU type
5. Click **Export**
6. Download when complete
![Ultralytics Platform Model Export Tab Format List](https://cdn.jsdelivr.net/gh/ultralytics/assets@main/docs/platform/platform-model-export-tab-format-list.avif)
### Supported Formats
The Platform supports export to [17+ deployment formats](../../modes/export.md#export-formats): ONNX, TorchScript, OpenVINO, TensorRT, CoreML, TF SavedModel, TF GraphDef, TF Lite, TF Edge TPU, TF.js, PaddlePaddle, NCNN, MNN, RKNN, IMX500, Axelera, and ExecuTorch.
### Format Selection Guide
| Target | Recommended Format | Notes |
| ------------------ | ------------------- | -------------------------------------------------------------- |
| **NVIDIA GPUs** | TensorRT | Maximum inference speed |
| **Intel Hardware** | OpenVINO | CPUs, GPUs, and VPUs |
| **Apple Devices** | CoreML | iOS, macOS, Apple Silicon |
| **Android** | TF Lite or NCNN | Best mobile performance |
| **Web Browsers** | TF.js or ONNX | ONNX via ONNX Runtime Web |
| **Edge Devices** | TF Edge TPU or RKNN | Coral and Rockchip (see [supported chips](#rknn-chip-support)) |
| **General** | ONNX | Works with most runtimes |
![Ultralytics Platform Model Export Progress](https://cdn.jsdelivr.net/gh/ultralytics/assets@main/docs/platform/platform-model-export-progress.avif)
### RKNN Chip Support
When exporting to RKNN format, select your target Rockchip device:
| Chip | Description |
| ------- | -------------------- |
| RK3588 | High-end edge SoC |
| RK3576 | Mid-range edge SoC |
| RK3568 | Mid-range edge SoC |
| RK3566 | Mid-range edge SoC |
| RK3562 | Entry-level edge SoC |
| RV1103 | Vision processor |
| RV1106 | Vision processor |
| RV1103B | Vision processor |
| RV1106B | Vision processor |
| RK2118 | AI processor |
| RV1126B | Vision processor |
### Export Job Lifecycle
Export jobs progress through the following statuses:
| Status | Description |
| ------------- | ------------------------------------ |
| **Queued** | Export job is waiting to start |
| **Starting** | Export job is initializing |
| **Running** | Export is in progress |
| **Completed** | Export finished — download available |
| **Failed** | Export failed (see error message) |
| **Cancelled** | Export was cancelled by the user |
!!! tip "Export Time"
Export time varies by format. TensorRT exports may take several minutes due to engine optimization. GPU-required formats (TensorRT) run on Ultralytics Cloud GPUs — the default export GPU is RTX 5090.
### Bulk Export Actions
- **Export All**: Click `Export All` to start export jobs for all CPU-based formats with default settings.
- **Delete All Exports**: Click `Delete All` to remove all exports for the model.
### Format Restrictions
Some export formats have architecture or task restrictions:
| Format | Restriction |
| ---------------- | --------------------------------------------------------------- |
| **IMX500** | Only available for YOLOv8 and YOLO11 models |
| **Axelera** | Only available for detection models |
| **PaddlePaddle** | Not available for YOLO26 detection/segmentation/pose/OBB models |
## Clone Model
Clone a model to a different project:
1. Open the model page
2. Click the **Clone** button
3. Select the destination project
4. Click **Clone**
The model and its weights are copied to the target project.
## Download Model
Download your model weights:
1. Navigate to the model's **Overview** tab
2. Click the **Download** button
3. The original `.pt` file downloads automatically
Exported formats can be downloaded from the **Export** tab after export completes.
## Dataset Linking
Models can be linked to their source dataset:
- View which dataset was used for training
- Click the dataset card on the Overview tab to navigate to it
- Track data lineage
When training with Platform datasets using the [`ul://` URI format](../data/datasets.md#dataset-uri), linking is automatic.
!!! example "Dataset URI Format"
```bash
# Train with a Platform dataset — linking is automatic
yolo train model=yolo26n.pt data=ul://username/datasets/my-dataset epochs=100
```
The `ul://` scheme resolves to your Platform dataset. The trained model's Overview tab will show a link back to this dataset (see [Using Platform Datasets](../api/index.md#using-platform-datasets)).
## Visibility Settings
Control who can see your model:
| Setting | Description |
| ----------- | ------------------------------- |
| **Private** | Only you can access |
| **Public** | Anyone can view on Explore page |
To change visibility, click the visibility badge (e.g., `private` or `public`) on the model page. Switching to private takes effect immediately. Switching to public shows a confirmation dialog before applying.
## Delete Model
Remove a model you no longer need:
1. Open model actions menu
2. Click **Delete**
3. Confirm deletion
!!! note "Trash and Restore"
Deleted models go to Trash for 30 days. Restore from [Settings > Trash](../account/trash.md).
## FAQ
### What model architectures are supported?
Ultralytics Platform fully supports all YOLO architectures with dedicated projects:
- [**YOLO26**](../../models/yolo26.md): n, s, m, l, x variants (latest, recommended) — [platform.ultralytics.com/ultralytics/yolo26](https://platform.ultralytics.com/ultralytics/yolo26)
- [**YOLO11**](../../models/yolo11.md): n, s, m, l, x variants — [platform.ultralytics.com/ultralytics/yolo11](https://platform.ultralytics.com/ultralytics/yolo11)
- [**YOLOv8**](../../models/yolov8.md): n, s, m, l, x variants — [platform.ultralytics.com/ultralytics/yolov8](https://platform.ultralytics.com/ultralytics/yolov8)
- [**YOLOv5**](../../models/yolov5.md): n, s, m, l, x variants — [platform.ultralytics.com/ultralytics/yolov5](https://platform.ultralytics.com/ultralytics/yolov5)
All architectures support 5 task types: [detect](../../tasks/detect.md), [segment](../../tasks/segment.md), [pose](../../tasks/pose.md), [OBB](../../tasks/obb.md), and [classify](../../tasks/classify.md).
### Can I download my trained model?
Yes, download your model weights from the model page:
1. Click the download icon on the Overview tab
2. The original `.pt` file downloads automatically
3. Exported formats can be downloaded from the Export tab
### How do I compare models across projects?
Currently, model comparison is within projects. To compare across projects:
1. Clone models to a single project, or
2. Export metrics and compare externally
### What's the maximum model size?
There's no strict limit, but very large models (>2GB) may have longer upload and processing times.
### Can I fine-tune pretrained models?
Yes! You can use any of the official YOLO26 models as a base, or select one of your own completed models from the model selector in the training dialog. The Platform supports fine-tuning from any uploaded checkpoint.

View File

@@ -0,0 +1,234 @@
---
comments: true
description: Learn how to organize and manage projects in Ultralytics Platform for efficient model development.
keywords: Ultralytics Platform, projects, model management, experiment tracking, YOLO
---
# Projects
[Ultralytics Platform](https://platform.ultralytics.com) projects provide an effective solution for organizing and managing your models. Group related models together to facilitate easier management, comparison, and development.
```mermaid
graph TB
P[Project] --> M1[Model 1]
P --> M2[Model 2]
P --> M3[Model 3]
M1 --> C[Charts Dashboard]
M2 --> C
M3 --> C
M1 --> T[Comparison Table]
M2 --> T
M3 --> T
style P fill:#4CAF50,color:#fff
style C fill:#2196F3,color:#fff
style T fill:#FF9800,color:#fff
```
## Create Project
Navigate to **Projects** in the sidebar and click **Create Project**.
![Ultralytics Platform Projects List](https://cdn.jsdelivr.net/gh/ultralytics/assets@main/docs/platform/platform-projects-list.avif)
??? tip "Quick Create"
You can also create a project from the Home page quick actions.
Enter your project details:
- **Name**: A descriptive name for your project (a random name is auto-generated)
- **Description**: Optional notes about the project purpose
- **Visibility**: Public (anyone can view) or Private (only you can access)
- **License**: Optional license for your project (AGPL-3.0, Apache-2.0, MIT, GPL-3.0, BSD-3-Clause, LGPL-3.0, MPL-2.0, EUPL-1.1, Unlicense, Ultralytics-Enterprise, and more)
![Ultralytics Platform New Project Dialog Name Visibility License](https://cdn.jsdelivr.net/gh/ultralytics/assets@main/docs/platform/platform-new-project-dialog-name-visibility-license.avif)
Click **Create** to finalize. Your new project appears in the Projects list and sidebar.
## Project Page
The project page has two main areas:
| Area | Description |
| ------------------ | ------------------------------------------------------------------------------------------------------------------- |
| **Models Sidebar** | Resizable list of all models in the project with search, status filters, sort options, and checkboxes for selection |
| **Main Panel** | Charts dashboard or comparison table (toggle between views) |
![Ultralytics Platform Project Page Sidebar And Charts](https://cdn.jsdelivr.net/gh/ultralytics/assets@main/docs/platform/platform-project-page-sidebar-and-charts.avif)
### Project Header
The header displays:
- **Project icon** (customizable color, letter, or uploaded image)
- **Editable name** (click to rename; slug auto-updates)
- **License badge**
- **Model count**, completed/running/failed counts, total size
- **Clone count** and **last updated** timestamp
- **Description** (click to edit)
Action buttons in the header:
| Button | Description |
| ------------- | ---------------------------------------------- |
| **New Model** | Opens the [training dialog](cloud-training.md) |
| **Clone** | Clone project and all models (public projects) |
| **Star** | Star/unstar the project |
| **Share** | Social sharing for public projects |
| **Refresh** | Refresh project data |
| **Delete** | Move project to trash |
### View Modes
Toggle between two view modes using the view controls:
- **Charts view**: Interactive charts dashboard showing loss curves and metric comparisons for selected models
- **Table view**: Comparison table showing training arguments and final metrics side-by-side with a diff mode to highlight differing columns
![Ultralytics Platform Project Comparison Table View](https://cdn.jsdelivr.net/gh/ultralytics/assets@main/docs/platform/platform-project-comparison-table-view.avif)
### Models Sidebar
The resizable sidebar lists all models in the project:
- **Checkboxes** to select which models appear in charts/table
- **Search** to filter models by name
- **View options** for status filter (All, Completed, Running, Starting, Pending, Failed, Cancelled), grouping by task, and sort order
- **Drag and drop** `.pt` files directly onto the sidebar to upload models ([model upload details](models.md#upload-model))
- **Training progress** shown for running models (epoch count and progress bar)
Click any model to open its [model page](models.md).
## Project Icon
Customize your project icon:
1. Click the icon next to the project name
2. Choose a **color** and **letter**, or upload a custom **image**
3. Changes save automatically
## Visibility Settings
Control who can see your project:
| Setting | Description |
| ----------- | ------------------------------------------------ |
| **Public** | Anyone can view on [Explore](../explore.md) page |
| **Private** | Only you and collaborators |
## Share with Collaborators
Share private projects with other users:
1. Click the **Share** button on the project page
2. Enter the collaborator's username or email
3. Set their role
4. Click **Invite**
Collaborators with editor access can upload models and start training within your project. See [Teams](../account/settings.md#teams-tab) for role permissions.
## Clone Project
Clone a public project to your own account:
1. Visit the public project page
2. Click **Clone Project**
3. The project and all its models are copied to your account as a private project
!!! info "Clone Behavior"
Cloned projects are always created as **private** in your account. The clone count is displayed on the original project. If the original has a copyleft license (e.g., AGPL-3.0), the clone inherits and locks that license.
## Compare Models
### Charts Dashboard
Compare model performance using the charts dashboard:
1. Select models in the sidebar using checkboxes
2. View overlaid metric curves grouped by type (metrics, train loss, validation loss, learning rate)
3. Drag charts to rearrange, resize by dragging edges
4. Hover to see exact values, click legend items to hide/show models, click a model line to navigate to that model
Available chart groups:
| Group | Charts |
| ----------------- | ---------------------------------------------- |
| **Metrics** | mAP50, mAP50-95, precision, recall |
| **Train Loss** | train/box_loss, train/cls_loss, train/dfl_loss |
| **Val Loss** | val/box_loss, val/cls_loss, val/dfl_loss |
| **Learning Rate** | lr/pg0, lr/pg1, lr/pg2 |
!!! tip "Interactive Charts"
- Hover to see exact values
- Click legend items to hide/show models
- Drag to zoom into specific regions
- Click a model line to navigate to that model's page
- Rearrange and resize charts; layout persists across sessions
### Comparison Table
Switch to table view for side-by-side comparison of training arguments and final metrics:
1. Click the **Table** view mode toggle
2. See all selected models as rows with training args and metrics as columns
3. Use the **Diff** button to highlight only columns where values differ across models
## Upload Models
Upload existing `.pt` model files:
1. **Drag and drop** files onto the project page or models sidebar
2. Multiple files can be uploaded simultaneously (up to 3 concurrent uploads)
3. Model metadata (task, architecture, class names, training results) is parsed automatically from the `.pt` file
4. Charts update instantly from locally parsed data while the upload completes in the background
!!! example "Supported Files"
Only PyTorch `.pt` files from Ultralytics YOLO training are supported. The Platform parses embedded metadata including training results, arguments, task type, and class names. See [Models](models.md) for format details.
## Edit Project
Update project name, description, or settings:
1. Click the project name to edit it inline
2. Click the description to edit it inline
3. Click the icon to customize it
4. Click the license badge to change the license
![Ultralytics Platform Projects Settings](https://cdn.jsdelivr.net/gh/ultralytics/assets@main/docs/platform/platform-projects-settings.avif)
## Delete Project
Remove a project you no longer need:
1. Click the **Delete** button (trash icon) in the header
2. Confirm deletion
!!! warning "Cascading Delete"
Deleting a project also deletes all models inside it. This action moves items to [Trash](../account/trash.md) where they can be restored within 30 days.
## FAQ
### How many models can a project contain?
There's no hard limit on models per project. However, for better organization, we recommend:
- Group related experiments (same dataset/task)
- Archive old experiments
- Use meaningful project names
### Can I restore a deleted project?
Yes, deleted projects go to Trash and can be restored within 30 days:
1. Go to [Settings > Trash](../account/trash.md)
2. Find the project
3. Click **Restore**
### Can I transfer models between projects?
Yes, you can clone a model to a different project using the clone model dialog from the [model page](models.md#clone-model).