> For the complete documentation index, see [llms.txt](https://docs.imerit-prod.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.imerit-prod.io/annotation-tool/drawing-tools/rectangle.md).

# Rectangle

A **Rectangle** or **2D Bounding Box (BBox)** is a rectangular annotation tool used to enclose and label objects within a 2D image. It is defined by the top-left and bottom-right corners, creating a box that contains the object of interest.

***

## Use Case

The rectangle tool is commonly used in image annotation for computer vision tasks like object detection, tracking, and classification. By drawing bounding boxes around objects in an image, annotators provide key data that helps train models to identify and locate objects within images, such as vehicles, pedestrians, or animals. It's a simple yet powerful tool for marking the presence and position of objects in 2D space.&#x20;

{% hint style="info" %}
Rectangle can be created only in camera sensors.&#x20;
{% endhint %}

<figure><img src="https://lh7-us.googleusercontent.com/docsz/AD_4nXfftS5KlXRlkjnKvwfknnAAjzIMylwRLbqb4Bi6KFSCuOOBCpsyu7CGw0ZrihQj_eylpbYXtXUublkBtBgYvazZeh0UBoNWh45aahU0KsCLxRjHOHyuM3fdUEqx4vcUeG89RbjqyfsV2oTRecSXmkDGhhg?key=lGhAQLv5xC3Ciuwf6zBTGQ" alt=""><figcaption></figcaption></figure>

***

## Create Rectangle

1. Click on the '+' icon of the class from the [class list](https://docs.imerit-prod.io/annotation-tool/drawing-tools/pages/t1P8d2reKe3nZWAkN2Kh#id-3.-class-list).
2. Select Rectangle from the drawing tool list.

   <figure><img src="https://lh7-us.googleusercontent.com/docsz/AD_4nXd7DH5pQ426eFV0SE2l9D6pW7kQujNcpDHqEJwqBR6TUTTkTd3rs2o-oXZ7mtordAyvTaEQuDqIvngCDKxL1U2nfN4_PN9pGGwPdmvOCjFR3ziQybG0GkNImTmFxvDmpbrnjiI_LkvsWa5cxCk6srBABa1F?key=lGhAQLv5xC3Ciuwf6zBTGQ" alt=""><figcaption></figcaption></figure>
3. The cursor pointer shows a red circle marker while hovering over the image.
4. Make the first two clicks to define one side of the rectangle. Users will be able to see the red box on moving the mouse. Click with the mouse at the appropriate place and confirm the annotation.

   <figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXdNRzTEdXEZNnRrBXJfhfvzjOAH7zVuN-1SATl340Ih6sJ10dkhLU6MRZRNDCf2Jaew5AClyiS0GtNm2QDfHcgMX2K43wn5kyQd0FWTiYaa6nE2HG0-WDXe-DacPzMNmrSUei5mY6WTIv6ujANt4QpWMrmD?key=lGhAQLv5xC3Ciuwf6zBTGQ" alt=""><figcaption></figcaption></figure>
5. Enter the [annotation details](https://docs.imerit-prod.io/annotation-tool/drawing-tools/pages/rZkaXOIF73IyAuNXrSbe#id-6.-annotation-detail-input).
6. The saved instance will appear on the c[lass list](https://docs.imerit-prod.io/annotation-tool/drawing-tools/pages/t1P8d2reKe3nZWAkN2Kh#id-3.-class-list) with a 2D icon (car\_54 #1) next to the instance name to denote it is made in the image sensor. It shares the same ID as the instance present in the point cloud of the same object (car\_54).

   <figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXfboShB52hTBzHIrQvBbNZxmIIRvvbMaAgHESvgDxS6_dNDUHC8iB_pP3bqhdw6mea6laFN6nK_wpC5aVjiLKNB1y3iDWsCEVdi5valkAKyXXdE1Nbcwi4jLg0gg5-f98UoKttVSXCT2MXNBnwwE8tSNyti?key=lGhAQLv5xC3Ciuwf6zBTGQ" alt=""><figcaption></figcaption></figure>

***

## Modify Rectangle

The rectangle can be re-selected and modified

* Select a vertex to modify two edges together and drag.
* Select an edge to modify one edge and drag.

Learn rectangle dimension modification and moving [shortcuts](/annotation-tool/tool-shortcuts.md#drawing-tools-and-modification).

***

## Key Point With Vertical Line

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

The drawable rectangle supports a keypoint within the drawable. The subject matter expert will create a rectangle and automatically the keypoint will be available in the centre (provided it was setup during recipe creation - Learn how to enable [Key Point With Vertical Line](/project-setup/create-recipe/2.-classes.md#keypoint-with-vertical-line)). The SME can then update the keypoint position to the desired location within the rectangle.

***

## Copy Paste Rectangle

2D Polygons can be copy and pasted in another image sensor where it does not exist (`Ctrl+C` / `Ctrl+V`). The [annotation detail input ](https://docs.imerit-prod.io/annotation-tool/drawing-tools/pages/rZkaXOIF73IyAuNXrSbe#id-6.-annotation-detail-input)prompts user for input on pasting annotation. By default, the pasted rectangle will share the same instance ID as the one of the copied rectangle.&#x20;

{% hint style="success" %}
Copy/ Pasting of Rectangle works inter-frame (across frames where the same instance ID doesn't exist.
{% endhint %}
