> For the complete documentation index, see [llms.txt](https://docs.augelab.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.augelab.com/key-features/train-custom-ai-models-with-training-window.md).

# Train Object Detection(YOLO) Models

The **Object Detection Training Window** trains YOLO-based object detection models using your annotated dataset.

{% hint style="info" %}
Training is best with a compatible [Nvidia GPU](/introduction/system-requirements.md) and the AugeLab Studio AI/GPU package enabled.

If the training window is disabled or shows missing runtime/dependency errors, open the [Module Downloader Window](/augelab-studio-interface/external-features/module-downloader.md) and install the required AI tools.
{% endhint %}

<figure><img src="https://63608322-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbH8gla5D8g5pQAK8IzR8%2Fuploads%2Fgit-blob-1836774d8a7cdef8b17d117807f495bb7ac6d447%2Fobject-detection-first-look.jpg?alt=media" alt=""><figcaption></figcaption></figure>

## Getting Started

1. Launch AugeLab Studio.
2. Open `AI Tools` → [**Object Detection Training Window**](/key-features/train-custom-ai-models-with-training-window.md)
3. Prepare:
   * a **dataset folder** and **class names file** prepared with AugeLab Studio’s [Annotation Tool](/key-features/annotate-data-for-object-detection/annotation-window-how-to.md)
   * or a **dataset folder** containing images and YOLO label files (`.txt`) in the **same folder**
   * a **class names file** in `.names` format (one class name per line)

{% hint style="info" %}
The training window scans your dataset and shows **Dataset Analytics** (total images, annotated/unannotated counts, and the class list) to help you catch mistakes early.
{% endhint %}

## 1) Configuration

The current training window uses a simple **Configuration** panel instead of a menu-only workflow.

### Select Dataset Folder

Choose the folder that contains your training images.

<figure><img src="https://63608322-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbH8gla5D8g5pQAK8IzR8%2Fuploads%2Fgit-blob-2b17b34bbc103314e341af52cc19e2fd7b57f9b5%2Fobject-detection-load-dataset.jpg?alt=media" alt=""><figcaption></figcaption></figure>

Notes:

* Only files in this folder are used (keep your training images in one folder)
* Supported image extensions include: `.jpg`, `.jpeg`, `.png`, `.bmp`, `.tiff`, `.tif`

### Select Class Names File (`.names`)

Choose your class list file.

<figure><img src="https://63608322-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbH8gla5D8g5pQAK8IzR8%2Fuploads%2Fgit-blob-9f3e8bca103aa7e6e2be1f6c575cb285d25f16b7%2Fobject-detection-load-class-file.jpg?alt=media" alt=""><figcaption></figcaption></figure>

{% hint style="warning" %}
If the `.names` file is empty, the training window will treat it as an error. Make sure it contains one class name per line.
{% endhint %}

### Model Type

Choose a model variant from **Model Type**.

<figure><img src="https://63608322-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbH8gla5D8g5pQAK8IzR8%2Fuploads%2Fgit-blob-ea77e81a049145f79229afb14df880c3d06f9618%2Fobject-detection-models.jpg?alt=media" alt=""><figcaption></figcaption></figure>

In general:

* **Robust Ones** variants are slower but can reach higher accuracy, YOLOv4-Scaled is a good default
* **Fast** variants train faster and are easier on low-spec PCs
* **Micro / Nano** are designed for very small / edge-device style models

### Optional: Custom Weights

You can start from custom/pretrained weights (Darknet `.weights` / backbone `.conv.*`).

<figure><img src="https://63608322-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbH8gla5D8g5pQAK8IzR8%2Fuploads%2Fgit-blob-1b45441ed602b02d4bd537ca4ca1cf83340c0aeb%2Fobject-detection-continue-weights.jpg?alt=media" alt=""><figcaption></figcaption></figure>

Good use cases:

* Continuing a previous run
* Faster convergence on similar datasets

{% hint style="warning" %}
If you change **Model Type**, it’s safest to clear and re-select weights that match the chosen model.
{% endhint %}

## 2) Advanced Settings

Advanced Settings allows you to tune training behavior (memory use, speed, and accuracy).

<figure><img src="https://63608322-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbH8gla5D8g5pQAK8IzR8%2Fuploads%2Fgit-blob-a81e0934256751e86a3edd648b7a9d90162b9449%2Fobject-detection-open-adv-set.jpg?alt=media" alt=""><figcaption></figcaption></figure>

The most important settings:

* **Dataset Split Ratio (Train/Val)**: how much data is used for validation (affects mAP reporting)
* **Network Input Size (Width/Height)**: bigger can help small objects, but uses more VRAM and slows training
* **Batch Size / Subdivisions**: main knobs for GPU memory errors
  * If you see “Out of Memory”, **increase subdivisions** or **decrease batch size**
* **Recalculate Anchors**: can improve results on custom datasets (recommended for new datasets)
* **Calculate Optimal Network Size**: optional auto-selection helper
* **GPUs to Use**: for multi-GPU systems (e.g., `0` or `0,1`)
* **mAP During Training**: shows accuracy progress but can slow training a bit
* **Clear Previous Training**: start fresh vs. resume
* **Live Augmentation Options**: applies on-the-fly variations during training (does not create extra files)

<figure><img src="https://63608322-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbH8gla5D8g5pQAK8IzR8%2Fuploads%2Fgit-blob-20ed387a71aa62d4f7f51c946f826e6c3342f7e7%2Fobject-detection-adv-set.jpg?alt=media" alt=""><figcaption></figcaption></figure>

## 3) Start / Stop Training

Once Dataset + Classes are valid, the main button becomes active.

1. Click **Start Training**
2. Monitor:
   * the **Log** area (console output)
   * the **Training Chart** window (loss / mAP)
3. Click **Stop Training** to terminate the process

<figure><img src="https://63608322-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbH8gla5D8g5pQAK8IzR8%2Fuploads%2Fgit-blob-69fc17ac46d597193d442f3c0656efddba15c59e%2Fobject-detection-start-training.jpg?alt=media" alt="" width="563"><figcaption><p>Training Logging</p></figcaption></figure>

{% hint style="warning" %}
Closing the training window while training is running will terminate the training process.
{% endhint %}

## After Training

When training finishes (or you stop it), check the output directory referenced in the log/status messages.

Next steps:

* Load your trained model into your workflow (inference)
* Validate results on a holdout set or real camera footage
