Video Annotation JSON Format
  • 15 May 2023
  • Dark
    Light
  • PDF

Video Annotation JSON Format

  • Dark
    Light
  • PDF

Article Summary

Each entity in our system has a JSON code that represents its data within our system.

See Export selected/queried items about downloading the JSON file of an item’s annotations.

This JSON code includes the entity's data related to our software and its metadata.

JSON

JSON is a minimal text-based data exchange format that is used primarily to transmit data between a server and web application. To understand more about JSON go here.

Video Annotation JSON Format

The Video Annotation JSON file records KeyFrames and automated frames, not reflected frames.

In other words, an annotation in a specific frame that has not changed since the previous frame is not recorded in the JSON file. If the annotation is not the same as in the previous frame (e.g., due to change in position, label, attribute, etc.), the annotation is recorded in the JSON file.

Read more about different types of frames at Understanding KeyFrames, Interpolation, and Tracking.

We recommend reading frame through the SDK, as it allows you to read annotations at any frame/point in time, even in reflected frames (which are not recorded in the JSON).

{
	"annotations": [{
			"id": "61defa66f97cd724ae313223",
			"datasetId": "61cc4acc23a8811d0f7156ed",
			"type": "segment",
			"label": "other",
			"attributes": [],
			"metadata": {
				"system": {
					"status": null,
					"startTime": 0,
					"endTime": 20.16597810641545,
					"frame": 0,
					"endFrame": 1208,
					"snapshots_": [],
					"parentId": null,
					"clientId": "f9956780-669e-47ce-b419-14f2c451eb52",
					"automated": false,
					"objectId": "7",
					"isOpen": false,
					"isOnlyLocal": false,
					"attributes": {},
					"clientParentId": null,
					"system": false,
					"description": null,
					"itemLinks": [],
					"openAnnotationVersion": "1.29.1-rc.17",
					"recipeId": "61cc4acd39c43ad2a2e91871",
					"taskId": "61dd72f81ec64565bff5e76e",
					"assignmentId": "61dd72f81ec6450279f5e76f"
				},
				"user": {}
			},
			"creator": "oren.a@dataloop.ai",
			"createdAt": "2022-01-12T15:57:26.273Z",
			"updatedBy": "oren.a@dataloop.ai",
			"updatedAt": "2022-01-12T15:57:26.273Z",
			"itemId": "61d243b849adbf02f82f175c",
			"url": "https://gate.dataloop.ai/api/v1/annotations/61defa66f97cd724ae313223",
			"item": "https://gate.dataloop.ai/api/v1/items/61d243b849adbf02f82f175c",
			"dataset": "https://gate.dataloop.ai/api/v1/datasets/61cc4acc23a8811d0f7156ed",
			"hash": "e7db9bf3a2bfb85783a2157e74f4e96958b388dc",
			"source": "ui",
			"coordinates": [
				[{
						"x": 627.1218837675686,
						"y": 267.56536577788177
					},
					{
						"x": 712.8007649854833,
						"y": 260.4408438018746
					},
					{
						"x": 705.6608582173237,
						"y": 335.2483245499494
					},
					{
						"x": 748.5002988262811,
						"y": 402.9312833220172
					},
					{
						"x": 684.2411379128451,
						"y": 356.62189047797085
					},
					{
						"x": 641.4016973038878,
						"y": 331.68606356194584
					}
				]
			]
		},
		{
			"id": "61defa66f97cd76432313222",
			"datasetId": "61cc4acc23a8811d0f7156ed",
			"type": "box",
			"label": "car",
			"attributes": [],
			"metadata": {
				"system": {
					"status": null,
					"startTime": 0,
					"endTime": 20.16597810641545,
					"frame": 0,
					"endFrame": 1208,
					"snapshots_": [{
							"fixed": false,
							"type": "LINEAR",
							"frame": 1,
							"objectVisible": true,
							"data": [{
									"x": 731.3224227264534,
									"y": 641.6732513851854,
									"z": 0
								},
								{
									"x": 1067.109895329193,
									"y": 912.5734534399799,
									"z": 0
								}
							],
							"label": "car",
							"attributes": [],
							"namedAttributes": {}
						},
						{
							"fixed": false,
							"type": "LINEAR",
							"frame": 2,
							"objectVisible": true,
							"data": [{
									"x": 731.9948454529067,
									"y": 641.7465027703707,
									"z": 0
								},
								{
									"x": 1067.9897906583863,
									"y": 912.8169068799598,
									"z": 0
								}
							],
							"label": "car",
							"attributes": [],
							"namedAttributes": {}
						},
						{
							"fixed": false,
							"type": "LINEAR",
							"frame": 3,
							"objectVisible": true,
							"data": [{
									"x": 732.6672681793601,
									"y": 641.8197541555561,
									"z": 0
								},
								{
									"x": 1068.8696859875793,
									"y": 913.0603603199397,
									"z": 0
								}
							],
							"label": "car",
							"attributes": [],
							"namedAttributes": {}
						}
					],
					"parentId": null,
					"clientId": "e26ea6b0-13a3-4c26-af92-271181152ea5",
					"automated": false,
					"objectId": "6",
					"isOpen": false,
					"isOnlyLocal": false,
					"attributes": {},
					"clientParentId": null,
					"system": false,
					"description": null,
					"itemLinks": [],
					"openAnnotationVersion": "1.29.1-rc.17",
					"recipeId": "61cc4acd39c43ad2a2e91871",
					"taskId": "61dd72f81ec64565bff5e76e",
					"assignmentId": "61dd72f81ec6450279f5e76f"
				},
				"user": {}
			},
			"creator": "oren.a@dataloop.ai",
			"createdAt": "2022-01-12T15:57:26.272Z",
			"updatedBy": "oren.a@dataloop.ai",
			"updatedAt": "2022-01-12T15:57:26.272Z",
			"itemId": "61d243b849adbf02f82f175c",
			"url": "https://gate.dataloop.ai/api/v1/annotations/61defa66f97cd76432313222",
			"item": "https://gate.dataloop.ai/api/v1/items/61d243b849adbf02f82f175c",
			"dataset": "https://gate.dataloop.ai/api/v1/datasets/61cc4acc23a8811d0f7156ed",
			"hash": "ddd5c8062c282ad02172e83ca582309a1326c6bb",
			"source": "ui",
			"coordinates": [{
					"x": 730.65,
					"y": 641.6,
					"z": 0
				},
				{
					"x": 1066.23,
					"y": 912.33,
					"z": 0
				}
			]
		}
	]
}
Key NameDefinitionParent Key
idAnnotation idannotations
datasetIdDataset idannotations
typeAnnotation typeannotations
labelAnnotation labelannotations
typeAnnotation typeannotations
attributesAnnotation attributesannotations
metadataInformation about the annotationannotations
systemAnnotation system informationmetadata
statusAnnotation status (e.g., null/issue/review)system
startTimeStart time of the annotation in the videosystem
endTimeEnd time of the annotation in the videosystem
frameframe when the annotation appears in the videosystem
endFramelast frame the annotation appears in the videosystem
snapshots_Snapshot information relevant to video annotationsystem
fixedShows if the frame a fixed framesnapshots_
typeSnapshot typesnapshots_
frameSnapshot frame numbersnapshots_
objectVisibleStatus of annotation, true = visible and false = hiddensnapshots_
dataCoordination of the annotation in each snapshotsnapshots_
labelSnapshot labelsnapshots_
attributesSnapshots attributessnapshots_
parentIdId of parent annotationsystem
clientIdWhen an annotation is created in the UI it has no "server id" since it is not saved; therefore, the UI uses the clientId. The attribute contains the first clientId automated if the annotation was created by an automation.system
automatedTrue = Annotation was created by automation processsystem
objectIdA sequential mark for annotations; can be set using the annotation controller (the menu that appears when you hover over an annotation)system
isOnlyLocalA field used in the UI to determine if the annotation is ready to be saved or not (False – ready to be saved)system
attributesinformation aboute the annotation attributessystem
clientParentIdAnnotation parent id if a parent annotation was set (can be set in the annotation controller on hover)system
systemShows if the annotation is a system annotationsystem
descriptionAnnotation descriptionsystem
openAnnotationVersionplatform versionsystem
recipeIdId of the recipesystem
taskIdId of the tasksystem
assignmentIdId of the assignmentsystem
userMetadata that can be added by user via SDK, do so using this tutorial.metadata
creatoruser who created the annotationannotations
createdAtdate and time when annotation was createdannotations
updatedByuser who updated the annotationannotations
updatedAtdate and time when annotation was last updatedannotations
itemIdId of the itemannotations
urlAPI URL of the annotationannotations
itemAPI URL of the itemannotations
datasetAPI URL of the datasetannotations
hashUsed to map the annotation’s data to a string of arbitrary sizeannotations
sourceWhere the annotation was created: UI/SDKannotations
coordinatesAnnotation position coordinatessystem