Pixel JSON

The explanation will be based on the following example:

The fields in bold in the description sections are mandatory.

Class

{
"id": 66158,
"project_id": 12271,
"name": "Car",
"color": "#91b998",
"count": 1,
"createdAt": "2020-10-20T10:05:10.000Z",
"updatedAt": "2020-10-20T10:08:53.000Z",
"attribute_groups": [
{
"id": 23886,
"class_id": 66158,
"name": "Type",
"is_multiselect": 0,
"createdAt": "2020-10-20T10:05:13.000Z",
"updatedAt": "2020-10-20T10:05:13.000Z",
"attributes": [
{
"id": 97494,
"group_id": 23886,
"project_id": 12271,
"name": "Taxi",
"count": 1,
"createdAt": "2020-10-20T10:05:15.000Z",
"updatedAt": "2020-10-20T10:08:53.000Z"
}
]
}
]
}

Description:

  • “id” : int - Class ID

  • “project_id” : id - Project ID

  • “name” : str - Class Name

  • “color” : str - Class color (example: “#000000”, black)

  • “count” : - The number of instances.

  • “createdAt” : - The time the class was created.

  • “updatedAt” : - The last time a user updated the class.

  • “attribute_groups” : list_of_dicts - List of all the attributes

    • “id” : int, - Group ID

    • “class_id” : int, - Class ID (must be the same as “id” : int)

    • “name” : str - Attribute Name

    • “is_multiselect” : int - It’s either 0 or 1. It’s 1 if you can select multiple attributes, and it’s 0 if you can choose only one attribute.

    • “createdAt” : - The time the attribute group was created.

    • “updatedAt” : - The last time a user updated the attribute group.

    • attribute: list_of_dicts - List of attribute values

      • “id” : int - Attribute value ID

      • “group_id” : int - Group ID (must be the same as “id” : int)

      • “project_id” : - Project ID

      • “name” : str - Attribute value

      • “count” : - The number of attributes.

      • “createdAt” : - The time the attribute was created.

      • “updatedAt” : - The last time a user updated the attribute.

Comment

{
"type": "comment",
"x": 714.2060546875,
"y": 300.02423095703125,
"comments": [
{
"text": "Fix this",
"id": "name@email.com"
}
],
"resolved": false
}

Description:

  • “type” : “comment” - This dictionary is a comment.

  • “x” : int - X position of the comment on the image.

  • “y” : int - Y position of the comment on the image.

  • “comments” : list_of_dicts - List of comments.

    • “text” : str - The text of the comment.

    • “id” : str - The email of the user who wrote the comment.

  • “resolved”: - If it’s “false” then the comment isn’t resolved. If it’s “true” then the comment is resolved.

Instance

{
"classId": 66158,
"probability": 100,
"visible": true,
"attributes": [
{
"id": 97494,
"groupId": 23886,
"name": "Taxi",
"groupName": "Type"
}
],
"parts": [
{
"color": "#00000f"
}
],
"error": null,
"createdAt": "2020-10-20T10:04:36.016Z",
"createdBy": {
"email": "name@email.com",
"role": "Admin"
},
"creationType": "Manual",
"updatedAt": "2020-10-20T10:08:42.167Z",
"updatedBy": {
"email": "name@email.com",
"role": "Admin"
},
"className": "Car"
}

Description:

  • “classId” : int - Class ID (one of the class IDs in“classes.json”)

  • “probability” : float - Instance prediction. If the annotator created the instance, then the probability value is 100.

  • “visible” : true - If it’s true, you’ll be able to see the annotations on the canvas.

  • “attributes” : list_of_dicts - List of attributes for this instance.

    • “id” : int - Attribute ID (must be in “classes.json”)

    • “groupId” : int - Group ID (must be in “classes.json”)

    • “name”: str - Attribute name

    • “groupName”: str - Group name

  • "parts": - the colors of the instance's segment in the mask PNG file.

    • "color": - HEX color code of the parts

  • “error” : - If the instance is approved, then it’s “false.” If it’s disapproved, then it’s “true”. If you approve or disapprove an instance then undo the action, then it’s “null.” If the instance is neither approved nor disapproved, then “error” won’t appear in JSON.

  • "createdAt": - The time the instance was created.

  • "createdBy": - The user who created the instance.

    • "email": - The email of the user who created the instance.

    • "role": - The role of the user who created the instance.

  • "creationType": - The method that was used to create the instance. If it's "Manual," then the user created the instance in the editor. If it's "Prediction," then the instance was created using Smart prediction. If it's "Pre-annotation," then the instance was uploaded as a pre-annotation. If it's "SDK," then the instance was uploaded via SDK.

  • "updatedAt": - The time the instance was updated.

  • "updatedBy": - The user who updated the instance.

    • "email": - The email of the user who updated the instance.

    • "role": - The role of the user who updated the instance.

  • “className” : - Class name (one of the class names in “classes.json”)

When you download the annotation data of a pixel project, you will find JSON files and PNG images in your download folder. You can find the HEX color codes of the instance segments in the PNG images in the JSON files.

The image below illustrates the PNG mask of two instances, one of which has multiple segments. You can find the HEX color code of the car in this JSON block.

Meta data

{
"type": "meta",
"name": "imageAttributes",
"width": 1920,
"height": 1280,
"status": "Completed",
"pinned": false
}
  • "type": "meta" - The dictionary is meta data.

  • "name": - Meta data name.

  • "width": - The image’s width.

  • "height": - The image’s height.

  • "status": - The image status. It can be: Not Started, In Progress, Quality Check, Returned, Skipped, or Completed.

  • "pinned": - If it’s true, then the image is pinned. If it’s false, then the image isn’t pinned.