# 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 an [Nvidia GPU](/introduction/system-requirements.md) and properly installed [CUDA / cuDNN](/getting-started/installation-and-licensing.md).

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="/files/CKJe1oxIGAP2mTLLxzab" 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="/files/0vGFxQhkn2Mn0GfjT3Iy" 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="/files/3aDmlsICBUL7tA5PyqcD" 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="/files/q0HW3QuFY2zxe8uRz5Cc" 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="/files/6D7MAwQOj9w5fbqMJdsW" 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="/files/gGIJ68VCuNSX8tgmC1vb" 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="/files/bVdBrw0Pd6xK0HUXJ3iF" 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="/files/sB634WyB0lN5xDaMMBvU" 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


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.augelab.com/key-features/train-custom-ai-models-with-training-window.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
