> 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」とマークされた既存画像に augmentations を適用するステップです。このプロセスにより、モデルの汎化能力が向上し、未見の画像に対してより効果的に動作するようになります。

{% hint style="success" %}
まずは augmentations を使わずにプロジェクトを開始することをおすすめします。これにより、元のデータセットの品質を評価できます。augmentations を追加して、データセットの性能が期待どおりでない場合でも、モデルの性能と比較できる基準がありません。

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

augmentations は、いくつかの重要な理由から、学習時ではなく dataset version（「offline augmentation」）を通じて適用されます：

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

## Augmentations の適用方法

augmentations は常に、training images に対して [preprocessing steps](/roboflow/roboflow-jp/datasets/dataset-versions/image-preprocessing.md)。選択した augmentations はまとめて重ねて適用され、各拡張画像には、拡張設定と各設定の値がランダム化された状態で適用されます。このプロセス中に重複として現れる画像は、作成されたバージョンから除外されます。

たとえば、「flip horizontally」と「salt and pepper noise」の augmentations を選択すると、特定の画像はランダムに左右反転され、ランダムな salt and pepper noise が付加されます。

### Augmentations の制限

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

たとえば 3x を選択すると、最終的な dataset version には各 training source image に [preprocessing steps](/roboflow/roboflow-jp/datasets/dataset-versions/image-preprocessing.md) 適用され、さらに選択した設定に基づいて各画像に 2 回のランダムな augmentations が加えられます。

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

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

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

## Augmentation オプション

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

### 画像レベルの拡張

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

### バウンディングボックスレベルの拡張

バウンディングボックスレベルの拡張では、ソース画像のバウンディングボックス内の内容だけを変更して新しい学習データを作成します。これにより、開発者は問題の条件により適した学習データを作成するための、より大きな制御を得られます。

A [2019 年の論文](https://arxiv.org/pdf/1906.11172.pdf) で Google の研究者は、モデルに最適なデータを作成するためにバウンディングボックスのみの augmentation を使用するという考えを紹介しました。この論文で研究者たちは、バウンディングボックスのみの修正が体系的な改善を生むこと、特に小規模データセットで学習されたモデルにおいて有効であることを示しました。

{% 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">画像レベルの拡張</th><th data-type="checkbox">バウンディングボックス拡張</th><th>拡張タイプ<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 拡張</a></td><td>true</td><td>true</td><td><span data-option="sdEDfdaf9Z03">Basic</span></td></tr><tr><td><a href="/pages/d6f07620af318d0b877731ad9ff97889c9b077f6">90° 回転拡張</a></td><td>true</td><td>true</td><td><span data-option="sdEDfdaf9Z03">Basic</span></td></tr><tr><td><a href="/pages/24cf7fef1c71e2bad728a7589fe0fd725618a253">Crop 拡張</a></td><td>true</td><td>true</td><td><span data-option="sdEDfdaf9Z03">Basic</span></td></tr><tr><td><a href="/pages/9316dbdf44c06e640134911710b3eea495391ccd">回転拡張</a></td><td>true</td><td>true</td><td><span data-option="sdEDfdaf9Z03">Basic</span></td></tr><tr><td><a href="/pages/4815810c5de432941c37f585981819382c5862f8">Shear 拡張</a></td><td>true</td><td>true</td><td><span data-option="sdEDfdaf9Z03">Basic</span></td></tr><tr><td><a href="/pages/f9e02bc0a0e76a372cfccdbed028b7d3683d1984">グレースケール拡張</a></td><td>true</td><td>false</td><td><span data-option="sdEDfdaf9Z03">Basic</span></td></tr><tr><td><a href="/pages/7e45905a483829909a6190448e89ad55e0ef9f7a">色相拡張</a></td><td>true</td><td>false</td><td><span data-option="sdEDfdaf9Z03">Basic</span></td></tr><tr><td><a href="/pages/36bf85cad54f83d82079463e69a39a13911e6ed7">彩度拡張</a></td><td>true</td><td>false</td><td><span data-option="sdEDfdaf9Z03">Basic</span></td></tr><tr><td><a href="/pages/49de4c10ec5e5ffd83f0766b13ad73a6fc2fb7e2">明るさ拡張</a></td><td>true</td><td>true</td><td><span data-option="sdEDfdaf9Z03">Basic</span></td></tr><tr><td><a href="/pages/5c799d0178ec36eef495c15f7049a2a126ff7115">露出拡張</a></td><td>true</td><td>true</td><td><span data-option="sdEDfdaf9Z03">Basic</span></td></tr><tr><td><a href="/pages/d08ceffdeead398aa21cb0cbb3aca2fd9f6d3d86">ぼかし拡張</a></td><td>true</td><td>true</td><td><span data-option="sdEDfdaf9Z03">Basic</span></td></tr><tr><td><a href="/pages/3b63a716b48c45c532afea15915db5edba1ede49">ノイズ拡張</a></td><td>true</td><td>true</td><td><span data-option="sdEDfdaf9Z03">Basic</span></td></tr><tr><td><a href="/pages/21a20629da86ed96579e02a22b09be53bd0c7eff">カメラゲイン拡張</a></td><td>true</td><td>true</td><td><span data-option="sdEDfdaf9Z03">Basic</span></td></tr><tr><td><a href="/pages/8ad0793363f588db99151c671fcc9696ff1c7f0c">モーションブラー拡張</a></td><td>true</td><td>true</td><td><span data-option="sdEDfdaf9Z03">Basic</span></td></tr><tr><td><a href="/pages/fe463e5f380191057ad909416f2adbfaa58ee4d9">Cutout 拡張</a></td><td>true</td><td>false</td><td><span data-option="Z8F06MhppTfn">Enhanced</span></td></tr><tr><td><a href="/pages/8fc7a60ce8516c28b60a16c8664e34c392605ad5">Mosaic 拡張</a></td><td>true</td><td>false</td><td><span data-option="Z8F06MhppTfn">Enhanced</span></td></tr></tbody></table>

## Learn More

* [Data Augmentation の究極ガイド](https://blog.roboflow.com/data-augmentation/)
* [Object Detection のための画像拡張方法](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, and the optional `goal` query parameter:

```
GET https://docs.roboflow.com/roboflow/roboflow-jp/datasets/dataset-versions/image-augmentation.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
