Image (Legacy) Project
To import annotations to a Image (Legacy) Project, you need to import:
- A JSON file of the annotations
- Annotation masks (PNG files)
Annotations JSON format
The JSON of annotations in a Image (Legacy) Project contains four main parts: metadata
, comments
, tags
, and instances
.
{
"metadata": {},
"comments": [],
"tags": [],
"instances": []
}
The fields that are marked in bold in the descriptions are mandatory.
Metadata
{
"lastAction": {
"email": "[email protected]",
"timestamp": 1610614861660
},
"width": 1920,
"height": 1280,
"name": "image1.jpg",
"projectId": 8806,
"qaEmail": [email protected],
"annotatorEmail": [email protected],
"status": "InProgress",
"pinned": false,
"projectId": 1345
}
Description:
- “lastAction”: The user who last edited the image. Edits include changing the class of an instance, adding or deleting attributes, adding point labels, approving or disapproving instances, and moving or scaling instances.
- “email”: string - The email address of the last user who added or edited an instance.
- “timestamp”: integer - The date and time when the last instance edit was made.
- "width": integer - The image’s width.
- "height": integer - The image’s height.
- "name": string - The name of the image.
- "projectId": integer - The project ID.
- "qaEmail": string - The QA’s email address.
- "annotatorEmail": string - The annotator's email address.
- "status": string - The image status. It can be:
NotStarted
,InProgress
,QualityCheck
,Returned
,Skipped
, orCompleted
. - "pinned": boolean - If it’s
true
, then the image is pinned. If it’sfalse
, then the image isn’t pinned. - "projectId": integer - The project's ID.
Mandatory fields
- The object
name
is mandatory.- If the object
lastAction
exists, then thetimestamp
are mandatory.
Comments
[
{
"correspondence": [
{
"text": "Fix this",
"email": "[email protected]"}
],
"x": 987.98,
"y": 722.87,
"resolved": false,
"createdAt": "2021-01-14T07:34:00.695Z",
"createdBy": {
"email": "[email protected]",
"role": "Admin"
},
"creationType": "Manual",
"updatedAt": "2021-01-14T07:34:04.783Z",
"updatedBy": {
"email": "[email protected]",
"role": "Admin"
}
}]
Description:
- "correspondence": array of objects - List of messages in the comment.
- "text": string - The comment.
- "email": string - The email address of the user who wrote the comment.
- “x”: number - X position of the comment on the image.
- “y”: number - Y position of the comment on the image.
- “resolved”: boolean - If it’s
true
, then the comment is resolved. If it’sfalse
, then the comment isn't resolved. - “createdAt”: string - The date and time when the comment was created.
- “createdBy”: The user who created the comment.
- “email”: string - The email of the user who created the comment.
- “role”: string - The role of the user who created the comment.
- “creationType”: string - If it’s
Manual
, then the comment was created manually. If it’sPreannotation
, then the comment was imported with Python SDK. - “updatedAt”: string - The time the comment was updated.
- “updatedBy”: The user who last updated the comment.
- “email”: string - The email address of the user who last updated the comment.
- “role”: string - The role of the user who last updated the comment.
Mandatory fields
- The array
correspondence
and its objects are mandatory.- If the array
comment
exists, it can be either empty or it can contain objects with the following fields:correspondence
,x
, andy
.- If the objects
createdBy
andupdatedBy
exist, thenrole
are mandatory.
Tags
[
"Road",
"Car"
]
Description:
- “Road”: string - The tag name.
Instances
[{
"classId": 5005974,
"className": "Car",
"probability": 100,
"visible": true,
"attributes": [
{
"id": 275033,
"groupId": 66874,
"name":"Taxi",
"groupName":"Type"
}
],
"parts": [
{
"color": "#00013b"
}
],
"error": null,
"locked": false,
"createdAt": "2021-01-14T07:33:51.370Z",
"createdBy": {
"email": "[email protected]",
"role": "Annotator"
},
"creationType": "Manual",
"updatedAt": "2021-01-14T10:21:08.010Z",
"updatedBy": {
"email": "[email protected]",
"role": "QA"
}
}]
Description:
- “classId”: integer - Class ID (A class ID from the “classes.json” belonging to the instance’s corresponding class, or -1 if the instance is not classified).
- "className": string - Class name (one of the class names in “classes.json”).
- “probability”: integer - If the instance was created manually, then the probability value is 100.
- “visible”: boolean - If it’s true, you’ll be able to see the annotations on the canvas.
- “attributes”: array of objects - List of attributes for this instance.
- “id”: integer - Attribute ID (must be in “classes.json”)
- “groupId”: integer - Group ID (must be in “classes.json”)
- "name": string - Attribute name
- "groupName": string - Group name
- "parts": array of objects - The colors of the instance's segment in the mask PNG file.
- "color": string - HEX color code of the instance
- “error”: boolean - If the instance is approved, then it’s
false
. If it’s disapproved, then it’strue
. If you approve or disapprove an instance then undo the action, then it’s null. If the instance is neither approved nor disapproved, thenerror
won’t appear in JSON. - “locked”: boolean - If it’s
true
, you won't be able to move the instance. If it’sfalse
, you'll be able to move the instance. - "createdAt": string - The time the instance was created.
- "createdBy": objects - The user who created the instance.
- "email": string - The email address of the user who created the instance.
- "role": string - The role of the user who created the instance.
- "creationType": string - The method that was used to create the instance. If it's
manual
, then the user created the instance in the editor. If it'spre-annotation
, then the instance was uploaded with Python SDK. - "updatedAt": string - The time the instance was updated.
- "updatedBy": objects - The user who updated the instance.
- "email": string - The email address of the user who updated the instance.
- "role": string - The role of the user who updated the instance.
Mandatory fields
- If the objects
createdBy
andupdatedBy
exist, thenrole
are mandatory.- If the array
attributes
exists, it can be either empty or it can contain objects with the following fields:name
andgroupName
.- If the array
parts
exists, it can be either empty or it can contain objects with the following fields:color
.
Annotation masks
An annotation mask is a PNG file that contains one instance or multiple instances. The instances will be colored while the areas that aren't annotated will have all four channels (R,G,B,A) set to zero.
Updated 4 months ago