> 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/rotation-augmentation.md).

# Rotation Augmentation

Randomly rotate images clockwise or counter-clockwise up to a chosen degree to handle camera roll, and learn how bounding boxes change.

Rotation tilts an image by a random angle, clockwise or counter-clockwise, up to a limit you set. Your model learns to recognize objects when the camera or subject is not perfectly level (camera roll).

## Settings

* Degrees, set with the slider: the largest rotation, from 0° to 45°. The default is 15°. Each augmented image is rotated by a random angle between minus and plus this value.

Rotation is not available for keypoint detection.

## How Bounding Boxes Change

When an image rotates, each bounding box rotates with it and becomes a tilted rectangle. Bounding boxes must stay upright, so Roboflow replaces each one with the smallest upright box that contains the tilted one. That new box is larger than the original for any box that is not a square, and the difference grows with the angle and with how long and thin the box is.

Rotating also moves the image corners out of frame. The corners of the original image are cut off, and the empty corners of the output are filled with padding.

## When to Use

* The camera is not fixed relative to your subjects (ex: a mobile app, a handheld or drone camera), so objects appear at slight angles.
* You want more variety to reduce overfitting, even with a fixed camera.

## When Not to Use

* Many of your bounding boxes are long and thin. The enclosing boxes grow on rotation, which teaches the model to predict boxes that are too large.
* Objects never tilt in production (ex: street signs seen from a car).
* Important content sits in the image corners, which rotation cuts off.

## Choosing a Range

Match the range to the tilt you expect in production. A range of 5° to 15° suits most tasks. The "Create New Version" page warns you above 15°. Use a wider range only when real images arrive at steep angles, and avoid it when boxes are long and thin. For quarter and half turns, use [90° Rotate](https://docs.roboflow.com/datasets/versions/dataset-versions/image-augmentation/augmentation-types/90o-rotate-augmentation.md).

## Example

<figure><img src="https://2252499186-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNVfRxNsvCh4GOyqrjmzX%2Fuploads%2Fgit-blob-c925802e1249b0968a62dbeced2347ef96e30347%2Faugmentation-example-rotation.png?alt=media" alt="The image rotated by -15° and +15°, with black corners and boxes enlarged to enclose the rotated objects"><figcaption><p>Example: the default maximum of 15° in each direction. The corners fill with black, and each box grows to enclose its rotated corners.</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-c7f887746264e380914ebc1b7b2fabf9e7816285%2Faugmentation-rotation-modal.png?alt=media" alt="The Rotation modal with the slider at 15 degrees and previews rotated -15 and 15 degrees with black corners"><figcaption><p>A 15° limit and its two extremes. The exposed corners are filled with black.</p></figcaption></figure>
