# Types of Annotation

JTheta supports manual bounding box creation, polygon annotation, instance segmentation, and semantic segmentation.

{% hint style="info" %}
"Visit the [Annotation](https://jtheta-ai.gitbook.io/docs.jtheta.ai/project-management/integrations) page to quickly get started and annotate your data efficiently."
{% endhint %}

{% content-ref url="" %}
[](https://jtheta-ai.gitbook.io/docs.jtheta.ai/project-management/integrations)
{% endcontent-ref %}

#### Bounding Box

In the context of annotation on the JTheta platform, a bounding box refers to a rectangular annotation tool used to mark and define regions of interest (ROIs) within an image. These regions are often used for labeling objects, text, or features in an image for purposes like:

* Object Detection: Identifying specific objects in an image (e.g., cars, people, animals)

#### How Bounding Boxes Work in JTheta

* Drawing the Box: You click and drag on the image to draw a rectangular region around the object or area of interest.
* Labeling: Assign a specific label or tag to the bounding box to describe what it contains (e.g., "Car," "Person").
* Adjustments: Resize or move the box as needed for accuracy.

Bounding boxes are an essential part of annotation workflows, enabling structured and precise data labeling for documentation or AI training purposes. Let me know if you'd like to explore the features in more detail!

{% embed url="<https://youtu.be/qvqUCMVnQ9k>" %}

**Polygon**

In the JTheta annotation platform, a polygon is a flexible annotation tool used to outline objects or regions in an image with irregular or non-rectangular shapes. It is especially useful for annotating objects that do not fit neatly into rectangular bounding boxes, such as:

* Curved or Complex Shapes: Roads, rivers, or irregularly shaped objects.
* Precise Boundaries: Objects like animals, vehicles, or building structures with unique contours.
* Fine-Grained Annotation: Areas requiring detailed outlines, like facial features or product components.

#### How Polygon Works in JTheta

1. Placing Points:
   * Click on the image to place points around the object's perimeter.
   * Each point becomes a vertex of the polygon.
2. Connecting Points:
   * As you place points, they are automatically connected by straight lines to form the polygon's edges.
3. Completing the Polygon:
   * Close the shape by connecting the last point to the first, forming a complete polygon.
4. Labeling:
   * Assign a label or category to the polygon to describe the annotated object or region.
5. Editing:
   * Adjust points and edges as needed to refine the shape for better accuracy.

Polygons provide higher precision compared to bounding boxes and are commonly used in applications like object segmentation, AI training datasets, and detailed documentation.

<figure><img src="https://915904128-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCL8YSVktRuUeO61g4KO9%2Fuploads%2FqNZ5Yc8QYFF2xdELqCQb%2F2poly.png?alt=media&#x26;token=d924a8d0-c9c1-4527-bdd5-01658acc0bb0" alt=""><figcaption></figcaption></figure>

**Auto Snapping Polygon - Auto-Snapping using SAM**

Auto-snapping polygon is a feature in image annotation tools that helps users draw polygons more efficiently by automatically aligning polygon vertices (points) to the nearest relevant edges or boundaries in the image. This feature is particularly useful when annotating objects with well-defined edges or contours, as it reduces the manual effort of precisely placing each vertex and ensures greater accuracy.

​

#### Key Features of Auto-Snapping Polygons:

1. Edge Detection: Automatically detects the edges or contours of objects in the image.
2. Precision: Vertices snap to the nearest boundary, improving annotation accuracy.
3. Time-Saving: Reduces the time required for manual adjustments of vertices.
4. User Control: Often includes toggles to enable or disable snapping based on user preference.
5. Smoothness: Provides a smoother annotation experience, especially for complex shapes.

This feature is commonly used in machine learning projects for training data preparation, where accurate object boundaries are critical for model performance.

"In jtheta, we provide an Auto-Snapping Polygon Tool feature, as shown in the image below. This tool simplifies the annotation process by automatically generating a polygon around the object with just a click. Once you point to an object and click, the tool detects the object's edges and creates a polygon, significantly reducing manual effort."

<figure><img src="https://915904128-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCL8YSVktRuUeO61g4KO9%2Fuploads%2FLV3aK07l3qDnKKy3Fsbx%2Fauto%20snapping.png?alt=media&#x26;token=3b6e5aa3-ec9f-456c-a57e-d5d81be82cce" alt=""><figcaption></figcaption></figure>

<figure><img src="https://915904128-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCL8YSVktRuUeO61g4KO9%2Fuploads%2FqNZ5Yc8QYFF2xdELqCQb%2F2poly.png?alt=media&#x26;token=d924a8d0-c9c1-4527-bdd5-01658acc0bb0" alt=""><figcaption></figcaption></figure>

**Semantic Segmentation**

Semantic segmentation is a computer vision task that involves dividing an image into regions and assigning a label to every pixel based on the object or category it belongs to. This process creates a pixel-level understanding of the image, where each pixel is classified into predefined categories, such as "car," "tree," "road," or "sky."

​

#### Key Features of Semantic Segmentation:

1. Pixel-Level Classification: Every pixel in the image is assigned a class label.
2. Uniform Labeling: All pixels belonging to the same class are grouped under the same label, regardless of whether they are part of separate instances (e.g., all cars are labeled as "car").
3. Applications:​
   * Medical Imaging: Segmenting regions like organs or tumors.
   * Satellite Imaging: Classifying land, water, vegetation, and urban areas.

#### Example:

In an image of a city street:

* The road pixels are labeled as "road."
* The car pixels are labeled as "car."
* The building pixels are labeled as "building." Semantic segmentation would not differentiate between individual cars but would classify all as "car."

<figure><img src="https://915904128-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCL8YSVktRuUeO61g4KO9%2Fuploads%2FtsL72Z0YgAUZQh7XA7QV%2Fsemantic%20segmentation.png?alt=media&#x26;token=7b1474ad-6af0-453b-952c-b88bc28f0473" alt=""><figcaption></figcaption></figure>

<figure><img src="https://915904128-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCL8YSVktRuUeO61g4KO9%2Fuploads%2FbuxOlDTJFvQMgQsTtEi5%2Fsemantic%20segmentation2.png?alt=media&#x26;token=ac8f2ff4-ce4e-4d03-a615-09dca8d79a5e" alt=""><figcaption></figcaption></figure>

**Instance Segmentation**

Instance segmentation is a computer vision task that identifies, delineates, and classifies individual instances of objects in an image. Unlike semantic segmentation, which labels all pixels belonging to a category without differentiating between individual objects, instance segmentation provides both pixel-level masks and instance-specific information for each detected object.

#### Key Features of Instance Segmentation:

1. Object Differentiation: Distinguishes between different objects of the same class (e.g., two cars in the same image will have separate masks and labels).
2. Pixel-Level Accuracy: Provides precise object boundaries for each instance.
3. Classification and Localization: Combines object detection (bounding boxes) and segmentation to locate and classify objects in the image.

​

#### How It Differs from Semantic Segmentation:

* Semantic Segmentation: Labels pixels by class (e.g., "car," "tree," "road"), without distinguishing between separate objects of the same class.
* Instance Segmentation: Identifies individual objects within the same class and provides separate masks for each instance.

#### Example:

In an image of a parking lot with three cars:

* Semantic Segmentation: All car pixels are labeled as "car."
* Instance Segmentation: Each car is assigned a unique identifier (e.g., "car 1," "car 2," "car 3") and has its own mask.

Instance segmentation is a key component of many real-world AI systems, where both the identity and precise shape of objects are critical.

<figure><img src="https://915904128-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCL8YSVktRuUeO61g4KO9%2Fuploads%2FotbPocPCPX7aFrFudnmp%2Finstance%20segmentation%201.png?alt=media&#x26;token=8d1cbbb2-52ee-4fed-8e90-1779b9a0deab" alt=""><figcaption></figcaption></figure>

<figure><img src="https://915904128-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCL8YSVktRuUeO61g4KO9%2Fuploads%2Fks226y0PsxtVWXeezpZ4%2Finstance%20segmentation%202.png?alt=media&#x26;token=513afa81-1833-47eb-9d1f-89a3031ccbcd" alt=""><figcaption></figcaption></figure>
