Base type - Video
There are two fields in the job build for a video-based project:
video_data
: It contains URLs of all the frames in a job.maker_response
: It contains all the annotations made on the job.
Job Build Structure
{
"video_data": {
"frames": [
{
"src": "https://sample-url-frame-01.png",
"frame_id": "frame-01"
},
{
"src": "https://sample-url-frame-02.png",
"frame_id": "frame-02"
}
]
},
"maker_response": {....}
}
The video_data
has a frames
field that contains an array of frame
objects. A frame
object has two fields:
src
: URL of the image in the frameframe_id
: A unique ID for the frame. One job cannot have two identicalframe_id
Note: In GT create, frames will appear in the same order as they are in the frames array.
Maker Response Structure
> example maker_response structure
"maker_response": {
"video2d": {
"data": {
"annotations": [
{
"_id": "24a46dde-7e65-4cfb-b31e-fd6fe905fcfa",
"type": "rectangle",
"label": "bicycle",
"frames": {
"frame-01": {
"_id": "1302b2d7-db3c-4d02-828d-ff33d8678cce",
"type": "rectangle",
"label": "bicycle",
"attributes": {
"visibility": {
"state": "editable",
"value": "3"
}
},
"coordinates": [
{
"x": 0.373617,
"y": 0.556455
},
{
"x": 0.383116,
"y": 0.556455
},
{
"x": 0.383116,
"y": 0.60279
},
{
"x": 0.373617,
"y": 0.60279
}
]
},
"frame-02": {
"_id": "b34fb2d7-db3c-4d02-828d-ff33d8678cce",
"type": "rectangle",
"label": "bicycle",
"attributes": {
"visibility": {
"state": "editable",
"value": "3"
}
},
"coordinates": [
{
"x": 0.373617,
"y": 0.556455
},
{
"x": 0.383116,
"y": 0.556455
},
{
"x": 0.383116,
"y": 0.60279
},
{
"x": 0.373617,
"y": 0.60279
}
]
}
}
},
{
"_id": "371aa366-422b-4491-8ef1-8334df973bab",
"label": "Side lane",
"type": "line",
"frames": {
"frame-01": {
"_id": "48398c49-cd92-4090-bc23-d4f8d10687e5",
"type": "line",
"label": "Side lane",
"attributes": {
"Color": {
"state": "editable",
"value": "White"
},
"Direction": {
"state": "editable",
"value": "Vertical"
}
},
"points": {
"p1": {"x": 0.193483, "y": 0.827799},
"p2": {"x": 0.420914, "y": 0.519008},
"p3": {"x": 0.4674, "y": 0.4566}
},
"edges": {
"e1": ["p1", "p2"],
"e2": ["p2", "p3"]
}
}
}
},
{
"_id": "8fe03d8a-e64d-447b-a844-c274b3648a28",
"type": "polygon",
"label": "bus",
"frames": {
"frame-01": {
"_id": "273e4b1e-bf05-426b-82e3-d92b55ae6b7a",
"type": "polygon",
"edges": {
"e1": ["p1", "p2"],
"e2": ["p2", "p3"],
"e3": ["p3", "p4"],
"e4": ["p4", "p5"],
"e5": ["p5", "p6"],
"e6": ["p6", "p7"],
"e7": ["p7", "p1"]
},
"label": "bus",
"points": {
"p1": {"x": 0.144515, "y": 0.492196},
"p2": {"x": 0.261425, "y": 0.35079},
"p3": {"x": 0.33867, "y": 0.414256},
"p4": {"x": 0.353284, "y": 0.560115},
"p5": {"x": 0.243332, "y": 0.667005},
"p6": {"x": 0.193924, "y": 0.667005},
"p7": {"x": 0.165392, "y": 0.572363}
},
"attributes": {
"is_visible": {
"state": "editable",
"value": "Yes"
}
}
}
}
}
]
}
}
}
}
The maker_response
has a video2d
field to define the type of video. Thevideo2d
has a data
field. The data
has an annotations
field, it is an array of annotations present in the job.
Annotations Structure
An object in theannotations
array defines an object across the sequential data. An annotation
object has the following fields:
a) _id
: A unique tracking ID for an instance of an object across the sequential data.
b) label
: Class (label) selected for the annotation.
c) type
: Annotation type for the object.
d)frames
: It contains the annotation data for each frame the object is present. It contains key-value pairs with the frame id
as key and annotation
details for that frame as the value. The data structure for each annotation type is defined as:
> example rectangle annotation
{
"_id": "72c888f6-b365-4f27-ad57-d7841da2de0c",
"label": "Car",
"coordinates": [
{
"x": 0.12,
"y": 0.12
},
{
"x": 0.24,
"y": 0.12
},
{
"x": 0.24,
"y": 0.24
},
{
"x": 0.12,
"y": 0.24
}
],
"attributes": {
"occlusion": {
"value": "100%"
},
"visibility": {
"value": "partially_visible"
}
},
"state": "editable"
}
Each annotation has the following values:
id
: Unique ID for the annotation in a frame.label
: Class (label) selected for the annotation.coordinates
: List of (x,y) coordinates for the rectangle in the order: [Top left, top right, bottom right, bottom left]

attributes
: It contains the name of the attribute and the value selected.state
: It defines the state of the annotation in GT create, it has two possible values:editable
: The annotator will be able to make any changes to the annotation.non_editable
: The annotator will be unable to make any changes to the annotation.
Last updated
Was this helpful?