Objects
Object fields in Ango Annotation Format exports.
The Ango Annotation Format supports the following shapes:
Point
Bounding Box
Rotated Bounding Box
Polygon
Segmentation
Line
Polyline
Plus the special "PDF" type for natively annotating PDF files.
Objects in the Ango Annotation Format
Coordinate System
This is the coordinate system used when determining the position of points in the Ango Annotation Format (AAF).
The origin point lies at the top left corner, and each point has a (X, Y) coordinate pair determining its position, in pixels, on the image.
Polygon/Segmentation Masks
It is possible to obtain a mask of your polygon or segmentation annotations with a single click. In the Export tab, expand the Fields dropdown and activate the Mask URLs toggle. A Mask URL will be included with tasks that support it.
Code example:
Mask example:
Converting Masks to Ango Segmentation Format
Use the following script to convert masks to the format used in the Ango Annotation Format.
Bounding Box
x
- The X coordinate of the origin pointy
- The Y coordinate of the origin pointheight
- The height, in pixels, of the bounding boxwidth
- The width, in pixels, of the bounding box
The origin point is the point first clicked when placing the bounding box on the asset. It can therefore be any one of the four corners of the box.
Because of this, height and width values can be negative. For example, if the origin point is the bottom-right corner of the box, both width and height values will be negative. If the origin point is the bottom-left corner, then height will be negative, but width will be positive, and so on.
Rotated Bounding Box
x
- The X coordinate of the origin point of the rotated bounding boxy
- The Y coordinate of the origin point of the rotated bounding boxwidth
- The width of the rotated bounding box, in pixelsheight
- the height of the rotated bounding box, in pixelsrotation
- the angle of rotation of the rotated bounding box, in degrees. Range: -180|+180corners
- A list of X, Y coordinate pairs pertaining to the location of the four corners of the rotated bounding box.
Polygon
The polygon shape contains a list of X, Y coordinates of its points. Points are represented consecutively. The first point in the list is the first point that was clicked when creating the polygon.
Segmentation
Segmentations are composed of instances, zones, regions, and holes.
An instance may contain more than one zone. One zone contains exactly one region. A region can contain more than one hole.
Each of the points composing the segmentation is represented as an X/Y coordinate pair. For more information on how X/Y pairs work in the Ango Annotation Format, check out this section.
Segmentation point coordinates will not be visible in your export unless you activate the "Segmentation Points" toggle in the Export tab under the Fields dropdown.
Line/Polyline
The polyline shape contains a list of X, Y coordinates pertaining to the polyline. The order in which the points are presented is the order in which they were placed on the asset.
Point
The point shape contains the X, Y coordinate of the point in question.
PDF
Highlighted Text
Creating annotations by highlighting text on a PDF is nearly identical to manually drawing rects around each token (e.g. word) and transcribing the token. As a result, if you highlighted 4 words, you should see the coordinates of four rects in the export.
PDF Bounding Box
When using the PDF labeling tool, by pressing ALT, you can draw bounding boxes manually. More on how the PDF tool works here. The following is the export obtained after drawing such a box.
Last updated