Skip to content

Commit 3a30034

Browse files
picsalexUltralyticsAssistantglenn-jocherfcakyon
authored
Add new YOLO Data Augmentation guide (ultralytics#20124)
Co-authored-by: UltralyticsAssistant <[email protected]> Co-authored-by: Glenn Jocher <[email protected]> Co-authored-by: Ultralytics Assistant <[email protected]> Co-authored-by: fatih akyon <[email protected]>
1 parent 1b8aa65 commit 3a30034

File tree

11 files changed

+390
-27
lines changed

11 files changed

+390
-27
lines changed

docs/en/datasets/explorer/explorer.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ keywords: Ultralytics Explorer, data exploration, semantic search, vector simila
1515
<a href="https://docs.ultralytics.com/ru">Русский</a> |
1616
<a href="https://docs.ultralytics.com/de">Deutsch</a> |
1717
<a href="https://docs.ultralytics.com/fr">Français</a> |
18-
<a href="https://docs.ultralytics.com/es/">Español</a> |
18+
<a href="https://docs.ultralytics.com/es">Español</a> |
1919
<a href="https://docs.ultralytics.com/pt">Português</a> |
2020
<a href="https://docs.ultralytics.com/tr">Türkçe</a> |
2121
<a href="https://docs.ultralytics.com/vi">Tiếng Việt</a> |

docs/en/guides/conda-quickstart.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ This guide provides a comprehensive introduction to setting up a Conda environme
2828

2929
## Prerequisites
3030

31-
- You should have Anaconda or Miniconda installed on your system. If not, download and install it from [Anaconda](https://www.anaconda.com/) or [Miniconda](https://docs.conda.io/projects/miniconda/en/latest/).
31+
- You should have Anaconda or Miniconda installed on your system. If not, download and install it from [Anaconda](https://www.anaconda.com/) or [Miniconda](https://www.anaconda.com/docs/main).
3232

3333
---
3434

docs/en/guides/docker-quickstart.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ Ultralytics offers several Docker images optimized for various platforms and use
8080
- **Dockerfile-jetson-jetpack6:** Optimized for [NVIDIA Jetson](https://docs.ultralytics.com/guides/nvidia-jetson/) devices running [NVIDIA JetPack 6](https://developer.nvidia.com/embedded/jetpack-sdk-61).
8181
- **Dockerfile-jupyter:** For interactive development using JupyterLab in the browser.
8282
- **Dockerfile-python:** Minimal Python environment for lightweight applications.
83-
- **Dockerfile-conda:** Includes [Miniconda3](https://docs.conda.io/projects/miniconda/en/latest/) and Ultralytics package installed via Conda.
83+
- **Dockerfile-conda:** Includes [Miniconda3](https://www.anaconda.com/docs/main) and Ultralytics package installed via Conda.
8484

8585
To pull the latest image:
8686

docs/en/guides/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ Here's a compilation of in-depth guides to help you master different aspects of
2828
- [YOLO Common Issues](yolo-common-issues.md) ⭐ RECOMMENDED: Practical solutions and troubleshooting tips to the most frequently encountered issues when working with Ultralytics YOLO models.
2929
- [YOLO Performance Metrics](yolo-performance-metrics.md) ⭐ ESSENTIAL: Understand the key metrics like mAP, IoU, and [F1 score](https://www.ultralytics.com/glossary/f1-score) used to evaluate the performance of your YOLO models. Includes practical examples and tips on how to improve detection accuracy and speed.
3030
- [YOLO Thread-Safe Inference](yolo-thread-safe-inference.md) 🚀 NEW: Guidelines for performing inference with YOLO models in a thread-safe manner. Learn the importance of thread safety and best practices to prevent race conditions and ensure consistent predictions.
31+
- [YOLO Data Augmentation](yolo-data-augmentation.md) 🚀 NEW: Master the complete range of data augmentation techniques in YOLO, from basic transformations to advanced strategies for improving model robustness and performance.
3132
- [Model Deployment Options](model-deployment-options.md): Overview of YOLO [model deployment](https://www.ultralytics.com/glossary/model-deployment) formats like ONNX, OpenVINO, and TensorRT, with pros and cons for each to inform your deployment strategy.
3233
- [K-Fold Cross Validation](kfold-cross-validation.md) 🚀 NEW: Learn how to improve model generalization using K-Fold cross-validation technique.
3334
- [Hyperparameter Tuning](hyperparameter-tuning.md) 🚀 NEW: Discover how to optimize your YOLO models by fine-tuning hyperparameters using the Tuner class and genetic evolution algorithms.

docs/en/guides/nvidia-jetson.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -550,7 +550,7 @@ The below table represents the benchmark results for five different models (YOLO
550550

551551
Benchmarked with Ultralytics {{ benchmark_version }}
552552

553-
[Explore more benchmarking efforts by Seeed Studio](https://www.seeedstudio.com/blog/2023/03/30/yolov8-performance-benchmarks-on-nvidia-jetson-devices) running on different versions of NVIDIA Jetson hardware.
553+
[Explore more benchmarking efforts by Seeed Studio](https://www.seeedstudio.com/blog/2023/03/30/yolov8-performance-benchmarks-on-nvidia-jetson-devices/) running on different versions of NVIDIA Jetson hardware.
554554

555555
## Reproduce Our Results
556556

docs/en/guides/yolo-data-augmentation.md

Lines changed: 357 additions & 0 deletions
Large diffs are not rendered by default.

docs/en/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ keywords: Ultralytics, YOLO, YOLO11, object detection, image segmentation, deep
1212
<a href="https://docs.ultralytics.com/ru">Русский</a> |
1313
<a href="https://docs.ultralytics.com/de">Deutsch</a> |
1414
<a href="https://docs.ultralytics.com/fr">Français</a> |
15-
<a href="https://docs.ultralytics.com/es/">Español</a> |
15+
<a href="https://docs.ultralytics.com/es">Español</a> |
1616
<a href="https://docs.ultralytics.com/pt">Português</a> |
1717
<a href="https://docs.ultralytics.com/tr">Türkçe</a> |
1818
<a href="https://docs.ultralytics.com/vi">Tiếng Việt</a> |

docs/en/macros/augmentation-args.md

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,19 @@
1-
| Argument | Type | Default | Range | Description |
2-
| ----------------- | ------- | --------------- | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
3-
| `hsv_h` | `float` | `0.015` | `0.0 - 1.0` | Adjusts the hue of the image by a fraction of the color wheel, introducing color variability. Helps the model generalize across different lighting conditions. |
4-
| `hsv_s` | `float` | `0.7` | `0.0 - 1.0` | Alters the saturation of the image by a fraction, affecting the intensity of colors. Useful for simulating different environmental conditions. |
5-
| `hsv_v` | `float` | `0.4` | `0.0 - 1.0` | Modifies the value (brightness) of the image by a fraction, helping the model to perform well under various lighting conditions. |
6-
| `degrees` | `float` | `0.0` | `-180 - +180` | Rotates the image randomly within the specified degree range, improving the model's ability to recognize objects at various orientations. |
7-
| `translate` | `float` | `0.1` | `0.0 - 1.0` | Translates the image horizontally and vertically by a fraction of the image size, aiding in learning to detect partially visible objects. |
8-
| `scale` | `float` | `0.5` | `>=0.0` | Scales the image by a gain factor, simulating objects at different distances from the camera. |
9-
| `shear` | `float` | `0.0` | `-180 - +180` | Shears the image by a specified degree, mimicking the effect of objects being viewed from different angles. |
10-
| `perspective` | `float` | `0.0` | `0.0 - 0.001` | Applies a random perspective transformation to the image, enhancing the model's ability to understand objects in 3D space. |
11-
| `flipud` | `float` | `0.0` | `0.0 - 1.0` | Flips the image upside down with the specified probability, increasing the data variability without affecting the object's characteristics. |
12-
| `fliplr` | `float` | `0.5` | `0.0 - 1.0` | Flips the image left to right with the specified probability, useful for learning symmetrical objects and increasing dataset diversity. |
13-
| `bgr` | `float` | `0.0` | `0.0 - 1.0` | Flips the image channels from RGB to BGR with the specified probability, useful for increasing robustness to incorrect channel ordering. |
14-
| `mosaic` | `float` | `1.0` | `0.0 - 1.0` | Combines four training images into one, simulating different scene compositions and object interactions. Highly effective for complex scene understanding. |
15-
| `mixup` | `float` | `0.0` | `0.0 - 1.0` | Blends two images and their labels, creating a composite image. Enhances the model's ability to generalize by introducing label noise and visual variability. |
16-
| `copy_paste` | `float` | `0.0` | `0.0 - 1.0` | Copies and pastes objects across images, useful for increasing object instances and learning object occlusion. Requires segmentation labels. |
17-
| `copy_paste_mode` | `str` | `'flip'` | - | Copy-Paste augmentation method selection among the options of (`"flip"`, `"mixup"`). |
18-
| `auto_augment` | `str` | `'randaugment'` | - | Automatically applies a predefined augmentation policy (`randaugment`, `autoaugment`, `augmix`), optimizing for classification tasks by diversifying the visual features. |
19-
| `erasing` | `float` | `0.4` | `0.0 - 0.9` | Randomly erases a portion of the image during classification training, encouraging the model to focus on less obvious features for recognition. |
20-
| `crop_fraction` | `float` | `1.0` | `0.1 - 1.0` | Crops the classification image to a fraction of its size to emphasize central features and adapt to object scales, reducing background distractions. |
1+
| Argument | Type | Default | Range | Description |
2+
| ----------------------------------------------------------------------------------------- | ------- | --------------- | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
3+
| [`hsv_h`](../guides/yolo-data-augmentation.md/#hue-adjustment-hsv_h) | `float` | `0.015` | `0.0 - 1.0` | Adjusts the hue of the image by a fraction of the color wheel, introducing color variability. Helps the model generalize across different lighting conditions. |
4+
| [`hsv_s`](../guides/yolo-data-augmentation.md/#saturation-adjustment-hsv_s) | `float` | `0.7` | `0.0 - 1.0` | Alters the saturation of the image by a fraction, affecting the intensity of colors. Useful for simulating different environmental conditions. |
5+
| [`hsv_v`](../guides/yolo-data-augmentation.md/#brightness-adjustment-hsv_v) | `float` | `0.4` | `0.0 - 1.0` | Modifies the value (brightness) of the image by a fraction, helping the model to perform well under various lighting conditions. |
6+
| [`degrees`](../guides/yolo-data-augmentation.md//#rotation-degrees) | `float` | `0.0` | `0.0 - 180` | Rotates the image randomly within the specified degree range, improving the model's ability to recognize objects at various orientations. |
7+
| [`translate`](../guides/yolo-data-augmentation.md/#translation-translate) | `float` | `0.1` | `0.0 - 1.0` | Translates the image horizontally and vertically by a fraction of the image size, aiding in learning to detect partially visible objects. |
8+
| [`scale`](../guides/yolo-data-augmentation.md/#scale-scale) | `float` | `0.5` | `>=0.0` | Scales the image by a gain factor, simulating objects at different distances from the camera. |
9+
| [`shear`](../guides/yolo-data-augmentation.md/#shear-shear) | `float` | `0.0` | `-180 - +180` | Shears the image by a specified degree, mimicking the effect of objects being viewed from different angles. |
10+
| [`perspective`](../guides/yolo-data-augmentation.md/#perspective-perspective) | `float` | `0.0` | `0.0 - 0.001` | Applies a random perspective transformation to the image, enhancing the model's ability to understand objects in 3D space. |
11+
| [`flipud`](../guides/yolo-data-augmentation.md/#flip-up-down-flipud) | `float` | `0.0` | `0.0 - 1.0` | Flips the image upside down with the specified probability, increasing the data variability without affecting the object's characteristics. |
12+
| [`fliplr`](../guides/yolo-data-augmentation.md/#flip-left-right-fliplr) | `float` | `0.5` | `0.0 - 1.0` | Flips the image left to right with the specified probability, useful for learning symmetrical objects and increasing dataset diversity. |
13+
| [`bgr`](../guides/yolo-data-augmentation.md/#bgr-channel-swap-bgr) | `float` | `0.0` | `0.0 - 1.0` | Flips the image channels from RGB to BGR with the specified probability, useful for increasing robustness to incorrect channel ordering. |
14+
| [`mosaic`](../guides/yolo-data-augmentation.md/#mosaic-mosaic) | `float` | `1.0` | `0.0 - 1.0` | Combines four training images into one, simulating different scene compositions and object interactions. Highly effective for complex scene understanding. |
15+
| [`mixup`](../guides/yolo-data-augmentation.md/#mixup-mixup) | `float` | `0.0` | `0.0 - 1.0` | Blends two images and their labels, creating a composite image. Enhances the model's ability to generalize by introducing label noise and visual variability. |
16+
| [`copy_paste`](../guides/yolo-data-augmentation.md/#copy-paste-copy_paste) | `float` | `0.0` | `0.0 - 1.0` | _Segmentation only_. Copies and pastes objects across images to increase object instances. |
17+
| [`copy_paste_mode`](../guides/yolo-data-augmentation.md/#copy-paste-mode-copy_paste_mode) | `str` | `'flip'` | - | _Segmentation only_. Specifies the `copy-paste` strategy to use. Options include `'flip'` and `'mixup'`. |
18+
| [`auto_augment`](../guides/yolo-data-augmentation.md/#auto-augment-auto_augment) | `str` | `'randaugment'` | - | _Classification only_. Applies a predefined augmentation policy (`'randaugment'`, `'autoaugment'`, or `'augmix'`) to enhance model performance through visual diversity. |
19+
| [`erasing`](../guides/yolo-data-augmentation.md/#random-erasing-erasing) | `float` | `0.4` | `0.0 - 0.9` | _Classification only_. Randomly erases regions of the image during training to encourage the model to focus on less obvious features. |

docs/en/quickstart.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ Ultralytics offers a variety of installation methods, including pip, conda, and
6666

6767
### Conda Docker Image
6868

69-
Ultralytics Conda Docker images are also available from [DockerHub](https://hub.docker.com/r/ultralytics/ultralytics). These images are based on [Miniconda3](https://docs.conda.io/projects/miniconda/en/latest/) and provide a straightforward way to start using `ultralytics` in a Conda environment.
69+
Ultralytics Conda Docker images are also available from [DockerHub](https://hub.docker.com/r/ultralytics/ultralytics). These images are based on [Miniconda3](https://www.anaconda.com/docs/main) and provide a straightforward way to start using `ultralytics` in a Conda environment.
7070

7171
```bash
7272
# Set image name as a variable

docs/mkdocs_github_authors.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616
1717
avatar: https://avatars.githubusercontent.com/u/131261051?v=4
1818
username: MatthewNoyce
19+
20+
avatar: https://avatars.githubusercontent.com/u/132259399?v=4
21+
username: picsalex
1922
2023
avatar: https://avatars.githubusercontent.com/u/135830346?v=4
2124
username: UltralyticsAssistant

mkdocs.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,7 @@ nav:
347347
- YOLO Common Issues: guides/yolo-common-issues.md
348348
- YOLO Performance Metrics: guides/yolo-performance-metrics.md
349349
- YOLO Thread-Safe Inference: guides/yolo-thread-safe-inference.md
350+
- YOLO Data Augmentation: guides/yolo-data-augmentation.md
350351
- Model Deployment Options: guides/model-deployment-options.md
351352
- K-Fold Cross Validation: guides/kfold-cross-validation.md
352353
- Hyperparameter Tuning: guides/hyperparameter-tuning.md
@@ -654,7 +655,9 @@ nav:
654655

655656
# Plugins including 301 redirects navigation ---------------------------------------------------------------------------
656657
plugins:
657-
- macros
658+
- macros:
659+
include_yaml:
660+
- ultralytics/cfg/default.yaml
658661
# - search:
659662
# lang: en
660663
- mkdocstrings:

0 commit comments

Comments
 (0)