> 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/datasets/versions/dataset-versions/image-augmentation/augmentation-types/flip-augmentation.md).

# Flip Augmentation

Randomly flip images horizontally or vertically so your model is insensitive to subject orientation, and learn when flipping hurts.

Flip mirrors an image, along with its annotations, so your model learns to recognize objects facing either way. A model that has only seen an object facing left can miss the same object facing right.

## Settings

* "Horizontal": mirrors the image left to right.
* "Vertical": mirrors the image top to bottom.

Each direction you select is applied to about half of the augmented images, so some images stay unflipped. Flip is not available for keypoint detection.

## When to Use

Use a horizontal flip when an object is just as valid mirrored, which is true for most objects (ex: a car facing left or right, a product on a conveyor, a person seen from either side).

Use a vertical flip when up and down are arbitrary, which mostly happens in top-down images (ex: aerial and satellite views, microscopy, a camera looking straight down at a table).

## When Not to Use

Skip a flip when it changes what the image means, because the label stays the same:

* Text: flipped text becomes mirror writing your model never sees in production.
* Left versus right: a horizontal flip turns a left-turn sign into a right-turn sign, and a left hand into a right hand.
* Asymmetric objects: logos and some defects lose their meaning when mirrored.
* A fixed up direction: in ground-level photos, a vertical flip puts the sky at the bottom.

A quick test: if the flipped image, with its original label, would still be a correct example in the real world, the flip is safe.

## Example

<figure><img src="https://2252499186-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNVfRxNsvCh4GOyqrjmzX%2Fuploads%2Fgit-blob-2bcd2355baf54203ee84590c23a4f2f6180d9646%2Faugmentation-example-flip.png?alt=media" alt="The image flipped horizontally and vertically, with the boxes mirrored"><figcaption><p>Example: a horizontal and a vertical flip. The boxes are mirrored with the image, and the text on the boxes is mirrored too.</p></figcaption></figure>

<figure><img src="https://2252499186-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNVfRxNsvCh4GOyqrjmzX%2Fuploads%2Fgit-blob-5d61b6980192bf2d2f3be851f14dedcd99761a81%2Faugmentation-flip-modal.png?alt=media" alt="The Flip modal with Horizontal checked and a preview of the image mirrored left to right"><figcaption><p>The Flip settings with "Horizontal" selected.</p></figcaption></figure>
