AnnoStation
Sign UpAboutTermsPrivacy
English
English
  • AnnoStation Knowledge Base
  • Getting Started
    • Introduction to AnnoStation
    • Quick start
  • Mastering AnnoStation
    • Organization
      • Member types
    • Setting up a Project
      • Adding datasets
        • Importing images
        • Connecting to external data
      • Organizing datasets
      • Defining labels
      • Adding Project members
        • Project member roles
      • Assigning annotators
    • Working with a Project
      • Selecting target files to perform actions
      • Searching for images
      • Sorting and Filtering
      • Report panel
    • Workflow and status management
    • Annotating an image
      • Annotation tools
    • Reviewing annotation
    • Collaboration
      • Comments
      • Sharing Projects with external Organization
        • Project member roles in shared Projects
        • Workflow in shared Projects
    • Exporting datasets
  • Resources
    • JSON format
      • Annotation
      • Examples
    • Keyboard shortcuts
    • FAQ
Powered by GitBook
On this page
  • Annotation
  • Segmentation (RLE)
  • vector

Was this helpful?

  1. Resources
  2. JSON format

Annotation

PreviousJSON formatNextExamples

Last updated 4 years ago

Was this helpful?

Annotation

An image is composed of array of pixels, and we have two ways to annotate on the pixels, by using the segmentation tool (as RLE - run-length encoding) and vector tool.

Segmentation (RLE)

RLE (run-length encoding) object is used only when the label type is segmentation, and each label contains only one RLE object. When annotating with RLE, we basically annotate the pixel in the image:

An RLE object is represented as:

{
  "type": STRING,
  "segmentation": [
    [x, y, length from x to right],
    ...
  ]
}
  • type: Type of the segmentation, which currently supports rle only.

  • segmentation: Two-dimensional array for RLE.

    • The minimal unit of segmentation is a 1x1 pixel area, which is an integer.

    • For example, given by the 4x4 pixel image below with annotation, the array will be:

{
  "segmentation": [
    [2, 0, 2],
    [0, 1, 3],
    [2, 2, 1]
  ]
}

vector

A vector object is used only when the label type is vector, and each label can contain multiple vector objects. When annotating with vector, we basically describe the coordinates of the annotation in the image:

A vector object is represented as:

{
  "type": STRING,
  "attributes": [
    {
      "name": STRING,
      "values": [STRING]
    }
  ],
  "segmentation": [x1, y1, x2, y2, ..., xn, yn]
}
  • type: Type of the vector object, currently supports polygon, boundingBox, path and point.

  • attributes: Custom attributes to describe the vector object.

    • name: Name of the attribute.

    • values: Array of value to the attribute.

  • segmentation: Array of coordinate which represents the vector object.

    • The minimal unit of segmentation is a coordinate, which is float.

    • if the segmentation type is polygon, the value will be [x1, y1, x2, y2, ..., xn, yn].

    • if the segmentation type is boundingBox, the value will be [x1, y1, x2, y2, x3, y3, x4, y4].

    • if the segmentation type is path, the value will be [x1, y1, x2, y2, ..., xn, yn].

    • if the segmentation type is point, the value will be [x1, y1].

    • The coordinates can be either clockwise or counterclockwise as long as it follows the order.

    • For example, given by the 4x4 pixel images below with annotation, the array will be: