2021-06-20 22:00:16 +00:00
---
title: Annotations
---
2021-07-06 11:29:38 +00:00
With ClearML Enterprise, annotations can be applied to video and image frames. [Frames ](single_frames.md ) support
2021-06-20 22:00:16 +00:00
two types of annotations: **Frame objects** and **Frame labels** .
2021-10-21 06:40:53 +00:00
Annotation Tasks can be used to efficiently organize the annotation of frames in Hyper-Dataset versions (see
2021-06-20 22:00:16 +00:00
[Annotations Task Page ](webapp/webapp_annotator.md )).
2021-07-15 13:46:18 +00:00
For information about how to view, create, and manage annotations using the WebApp, see [Annotating Images and Videos ](webapp/webapp_annotator.md#annotating-images-and-video ).
2021-06-20 22:00:16 +00:00
2021-09-02 07:48:37 +00:00
## Frame Objects
2021-06-20 22:00:16 +00:00
Frame objects are labeled Regions of Interest (ROIs), which can be bounded by polygons (including rectangles), ellipses,
or key points. These ROIs are useful for object detection, classification, or semantic segmentation.
2021-07-06 11:29:38 +00:00
Frame objects can include ROI labels, confidence levels, and masks for semantic segmentation. In ClearML Enterprise,
2021-06-20 22:00:16 +00:00
one or more labels and sources dictionaries can be associated with an ROI (although multiple source ROIs are not frequently used).
2021-09-02 07:48:37 +00:00
## Frame Labels
2021-06-20 22:00:16 +00:00
Frame labels are applied to an entire frame, not a region in a frame.
## Usage
2021-09-02 07:48:37 +00:00
### Adding a Frame Object
2021-06-20 22:00:16 +00:00
2021-11-17 10:12:10 +00:00
To add a frame object annotation to a SingleFrame, use the [`SingleFrame.add_annotation` ](../references/hyperdataset/singleframe.md#add_annotation )
method.
2021-06-20 22:00:16 +00:00
```python
# a bounding box labeled "test" at x=10,y=10 with width of 30px and height of 20px
frame.add_annotation(box2d_xywh=(10, 10, 30, 20), labels=['test'])
```
2021-11-17 10:12:10 +00:00
The `box2d_xywh` argument specifies the coordinates of the annotation's bounding box, and the `labels` argument specifies
2021-06-20 22:00:16 +00:00
a list of labels for the annotation.
2022-01-18 11:23:47 +00:00
Enter the annotation's boundaries in one of the following ways:
2021-11-17 10:12:10 +00:00
* `poly2d_xy` - A list of floating points (x,y) to create for single polygon, or a list of floating points lists for a
complex polygon.
* `ellipse2d_xyrrt` - A List consisting of cx, cy, rx, ry, and theta for an ellipse.
* And more! See [`SingleFrame.add_annotation` ](../references/hyperdataset/singleframe.md#add_annotation ) for further options.
2021-06-20 22:00:16 +00:00
2021-09-02 07:48:37 +00:00
### Adding a Frame Label
2021-06-20 22:00:16 +00:00
Adding a frame label is similar to creating a frame objects, except that coordinates don't need to be specified, since
the whole frame is being referenced.
2021-07-15 13:46:18 +00:00
Use the `SingleFrame.add_annotation` method, but use only the `labels` parameter.
2021-06-20 22:00:16 +00:00
```python
# labels for the whole frame
frame.add_annotation(labels=['frame level label one','frame level label two'])
```