# Augment Dataset

Dataset augmentation creates new training images by applying controlled transformations to your existing labeled images while keeping bounding boxes perfectly aligned.

Used correctly, augmentation helps your model **generalize** (perform well on new images). Used incorrectly, it can **make training worse** by teaching the model unrealistic patterns.

***

## ⚖️ What Augmentation Is (and Is Not)

![Augmentation Examples](/files/6INxMtVaWbShM7neZMqd)

| **Augmentation IS...**                          | **Augmentation IS NOT...**                           |
| ----------------------------------------------- | ---------------------------------------------------- |
| A way to simulate lighting, rotation, or noise. | A substitute for missing camera angles or products.  |
| A tool to improve robustness in small datasets. | A fix for incorrect or "sloppy" initial labels.      |
| A method to reduce overfitting.                 | A guarantee of better results (over-doing it hurts). |

***

## Strategic Usage

<details>

<summary>When Augmentation Is Helpful</summary>

* **Small Datasets:** You have few images per class.
* **Environmental Variation:** You expect shifts in lighting (day/night), glare, or motion blur.
* **Overfitting:** Training accuracy is high, but real-world performance is low.
* **Rare Classes:** Some objects appear infrequently in your real data.

</details>

<details>

<summary>When Augmentation Is Unnecessary (or Risky)</summary>

* **Diverse Real Data:** You already have thousands of varied, real-world images.
* **Subtle Features:** Your inspection depends on tiny scratches or textures that blur/noise might destroy.
* **Stable Environments:** The lighting, camera, and product positions never change. For example, a fixed position object does not need rotation augmentation.

</details>

{% hint style="warning" %}
**Disk Space Alert:** Augmentation generates new physical files. Enabling many options can cause your dataset folder size to explode. **Run augmentation only after finishing manual labels and keeping a backup.**
{% endhint %}

***

## 🛠️ How the Augmentation Window Works

In the Image Annotation Window, navigate to **Tools** → **Augment Dataset**.

![Augmentation Selector window](/files/pINqJ0xlE5Fyw8x3uPbK)

### Interface Breakdown

| Section              | Function                                                                                              |
| -------------------- | ----------------------------------------------------------------------------------------------------- |
| **Quick Presets**    | One-click configurations to apply sensible starting defaults. ![Presets](/files/WFRXhPTpEesEfu9BGA7w) |
| **Quick Toggles**    | Enable/disable entire groups (e.g., Color, Noise) quickly. ![Toggles](/files/x3E4yfXXmqnY60AvGiKL)    |
| **Detailed Options** | Fine-tune intensity for Brightness, Contrast, Blur, Noise, and Perspective tweaks.                    |

***

## A Safe, Practical Workflow

1. **Clean Baseline:** Finish manual labeling first (or at least a clean subset).
2. **Backup:** Duplicate your dataset folder.
3. **Start Small:** Use a preset or minimal manual settings.
4. **Visual Audit:** Open the generated folder and check:
   * Are the bounding boxes still centered on the objects?
   * Do augmented images still look realistic?
5. **Train & Compare:** Compare the results of a model trained with and without augmentation.

***

## ❓ Troubleshooting

<details>

<summary>📉 "My model got worse after augmentation"</summary>

This often means the augmentation didn't match reality.

* **Try:** Reduce augmentation intensity.
* **Try:** Disable transforms that create unrealistic images (e.g., don't use 180° rotation if parts are always upright).

</details>

<details>

<summary>🖼️ "Boxes look wrong on augmented images"</summary>

* **Try:** Reduce geometric transforms (rotation/perspective).
* **Try:** Validate that your labels were tight and correct before augmentation.

</details>

<details>

<summary>📂 "It generated too many files"</summary>

* **Try:** Disable most transforms and keep only the ones you really need.
* **Try:** Use augmentation on a smaller subset of images.

</details>


---

# 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/annotate-data-for-object-detection/augment-dataset.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.
