> For the complete documentation index, see [llms.txt](https://docs.roboflow.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.roboflow.com/roboflow/roboflow-jp/datasets/dataset-versions/image-augmentation.md).

# 画像拡張

Image augmentation は、データセット内で「Train」とマークされた既存の画像に拡張を適用するステップです。このプロセスは、モデルの汎化能力を向上させ、その結果、未見の画像でもより効果的に性能を発揮できるようにします。

{% hint style="success" %}
まずは拡張なしでプロジェクトを始めることをおすすめします。これにより、元のデータセットの品質を評価できます。拡張を追加したあとにデータセットの性能が期待どおりでなければ、モデル性能を比較する基準がなくなってしまいます。

拡張なしでモデルの性能が良くない場合は、クラスバランス、データ表現、データセットサイズを確認する必要があるかもしれません。拡張なしでモデルの学習に成功したデータセットがあるなら、拡張を追加してモデル性能のさらなる改善を図れます。
{% endhint %}

Augmentations は、学習時ではなく dataset version（「offline augmentation」）を通じて適用されます。その主な理由は次のとおりです：

1. **モデルの再現性が高まります**。Roboflowでは、各画像にどのような拡張が適用されたかをコピーとして保持できます。たとえば、暗い画像より明るい画像のほうがモデルの性能が良いと分かった場合は、低照度の学習データをもっと集めるべきです。
2. **学習時間が短縮されます**。Augmentations はCPUに制約される処理です。GPUで学習しながらオンザフライで拡張を行うと、各 epoch でCPUが拡張データを提供するのをGPUが待つことがよくあります。それが積み重なっていきます！
3. **学習コストが削減されます**。Augmentations はCPUに制約される処理のため、高価なレンタルGPUは、学習用の画像が供給されるのを待っていることがよくあります。

## Augmentations の適用方法

Augmentations は常に、学習画像に対して [前処理ステップ](/roboflow/roboflow-jp/datasets/dataset-versions/image-preprocessing.md)の後に適用されます。選択した拡張は、拡張設定ごとのランダム化と各設定値を伴って重ねて適用され、各拡張画像に反映されます。この処理中に重複として現れた画像は、作成された version から除外されます。

たとえば、「水平方向に反転」と「塩胡椒ノイズ」を拡張として選択した場合、ある画像はランダムに水平方向反転され、ランダムな塩胡椒ノイズが付加されます。

### Augmentations の制限

Augmentations を含む dataset version を作成する際は、「Maximum Version Size」オプションで含める拡張画像の最大数を選択できます。

たとえば3xを選択すると、最終的な dataset version には各学習元画像に [前処理ステップ](/roboflow/roboflow-jp/datasets/dataset-versions/image-preprocessing.md) 適用され、選択した設定に基づいて各画像のランダムな拡張が2回ずつ含まれます。

データセットに100枚の画像があり、train/valid/test の分割が70/20/10で、3xの拡張を選択した場合、最終的なデータセットはおおよそ210/20/10の分割になります。

<figure><img src="/files/c584f7e5f4328cced68aaf5909c07c080838476d" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
最終的な version の画像数は、重複排除を行い、「Filter Null」のような特定のオプションによって出力から画像が削除されることがあるため、この推定より少なくなる場合があります。
{% endhint %}

## Augmentation Options

Roboflow の Augmentations は「Basic」または「Enhanced」で、2つの異なるレベルで適用できます。

### Image Level Augmentations

Image Level Augmentations は、個々のオブジェクトや領域ではなく画像全体に変換を適用することで、新しい学習データを作成します。画像全体を変更することで、開発者はより幅広い視覚条件をシミュレートでき、モデルが新しいデータへよりよく汎化できるようになります。

### Bounding Box Level Augmentations

Bounding Box Level Augmentations は、ソース画像のバウンディングボックス内の内容だけを変更して、新しい学習データを作成します。これにより、開発者は問題の条件により適した学習データを作成するための、より高い制御性を得られます。

A [2019年の論文](https://arxiv.org/pdf/1906.11172.pdf) を発表したGoogleの研究者たちは、モデルに最適なデータを作成するためにバウンディングボックスのみの拡張を使うという考えを導入しました。この論文では、特に小規模データセットで学習されたモデルにおいて、バウンディングボックスのみの変更が体系的な改善をもたらすことが示されました。

{% hint style="info" %}
Enhanced Augmentations と Bounding Box Augmentations は **premium** 機能です。

最新のプランとそれに関連する機能については、 [pricing page](https://roboflow.com/pricing).
{% endhint %}

<table><thead><tr><th></th><th data-type="checkbox">Image Level Augmentation</th><th data-type="checkbox">Bounding Box Augmentation</th><th>Augmentation Type<select><option value="Z8F06MhppTfn" label="Enhanced" color="blue"></option><option value="sdEDfdaf9Z03" label="Basic" color="blue"></option></select></th></tr></thead><tbody><tr><td><a href="/pages/d979490cffedf4c4f33235621e62442699d49d59">Flip Augmentation</a></td><td>true</td><td>true</td><td><span data-option="sdEDfdaf9Z03">Basic</span></td></tr><tr><td><a href="/pages/d6f07620af318d0b877731ad9ff97889c9b077f6">90° Rotate Augmentation</a></td><td>true</td><td>true</td><td><span data-option="sdEDfdaf9Z03">Basic</span></td></tr><tr><td><a href="/pages/24cf7fef1c71e2bad728a7589fe0fd725618a253">Crop Augmentation</a></td><td>true</td><td>true</td><td><span data-option="sdEDfdaf9Z03">Basic</span></td></tr><tr><td><a href="/pages/9316dbdf44c06e640134911710b3eea495391ccd">Rotation Augmentation</a></td><td>true</td><td>true</td><td><span data-option="sdEDfdaf9Z03">Basic</span></td></tr><tr><td><a href="/pages/4815810c5de432941c37f585981819382c5862f8">Shear Augmentation</a></td><td>true</td><td>true</td><td><span data-option="sdEDfdaf9Z03">Basic</span></td></tr><tr><td><a href="/pages/f9e02bc0a0e76a372cfccdbed028b7d3683d1984">Grayscale Augmentation</a></td><td>true</td><td>false</td><td><span data-option="sdEDfdaf9Z03">Basic</span></td></tr><tr><td><a href="/pages/7e45905a483829909a6190448e89ad55e0ef9f7a">Hue Augmentation</a></td><td>true</td><td>false</td><td><span data-option="sdEDfdaf9Z03">Basic</span></td></tr><tr><td><a href="/pages/36bf85cad54f83d82079463e69a39a13911e6ed7">Saturation Augmentation</a></td><td>true</td><td>false</td><td><span data-option="sdEDfdaf9Z03">Basic</span></td></tr><tr><td><a href="/pages/49de4c10ec5e5ffd83f0766b13ad73a6fc2fb7e2">Brightness Augmentation</a></td><td>true</td><td>true</td><td><span data-option="sdEDfdaf9Z03">Basic</span></td></tr><tr><td><a href="/pages/5c799d0178ec36eef495c15f7049a2a126ff7115">Exposure Augmentation</a></td><td>true</td><td>true</td><td><span data-option="sdEDfdaf9Z03">Basic</span></td></tr><tr><td><a href="/pages/d08ceffdeead398aa21cb0cbb3aca2fd9f6d3d86">Blur Augmentation</a></td><td>true</td><td>true</td><td><span data-option="sdEDfdaf9Z03">Basic</span></td></tr><tr><td><a href="/pages/3b63a716b48c45c532afea15915db5edba1ede49">Noise Augmentation</a></td><td>true</td><td>true</td><td><span data-option="sdEDfdaf9Z03">Basic</span></td></tr><tr><td><a href="/pages/21a20629da86ed96579e02a22b09be53bd0c7eff">Camera Gain Augmentation</a></td><td>true</td><td>true</td><td><span data-option="sdEDfdaf9Z03">Basic</span></td></tr><tr><td><a href="/pages/8ad0793363f588db99151c671fcc9696ff1c7f0c">Motion Blur Augmentation</a></td><td>true</td><td>true</td><td><span data-option="sdEDfdaf9Z03">Basic</span></td></tr><tr><td><a href="/pages/fe463e5f380191057ad909416f2adbfaa58ee4d9">Cutout Augmentation</a></td><td>true</td><td>false</td><td><span data-option="Z8F06MhppTfn">Enhanced</span></td></tr><tr><td><a href="/pages/8fc7a60ce8516c28b60a16c8664e34c392605ad5">Mosaic Augmentation</a></td><td>true</td><td>false</td><td><span data-option="Z8F06MhppTfn">Enhanced</span></td></tr></tbody></table>

## Learn More

* [データ拡張の究極ガイド](https://blog.roboflow.com/data-augmentation/)
* [物体検出のための画像拡張方法](https://blog.roboflow.com/object-detection-augmentation/)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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.roboflow.com/roboflow/roboflow-jp/datasets/dataset-versions/image-augmentation.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.
