Export JSON annotations
labels = project.export_labels(download=True)
# Optionally, provide a date range as an optional parameter
# This will export only labels created between the supplied dates
# Date range can be formatted as "YYYY-MM-DD" or "YYYY-MM-DD hh:mm:ss"
labels = project.export_labels(download=True, start="2022-09-28", end="2022-10-04")
Annotation export formats
Polyline
{ // This is from the frame data of the DICOM file for one of the axes
"frameNumber": 185,
"classifications": [],
"objects": [
{
"featureId": "cl2y5hjr200073g6cidkf0pqj",
"schemaId": "ckzohkul206420z974x2q4a9h",
"title": "Tool 2",
"value": "tool_2",
"color": "#FF34FF",
"keyframe": true,
"line": [
{
"x": 95.237,
"y": 117.232
},
{
"x": 223.735,
"y": 196
},
{
"x": 262.608,
"y": 124.785
}
],
"classifications": []
}
],
"relationships": []
}
Mask
{ // This is from the frame data of the DICOM file for one of the axes
"frameNumber": 172,
"classifications": [],
"objects": [
{
"featureId": "cl2y5hdq200053g6cklrdauj7",
"schemaId": "ckzohkul206400z976bjrguy3",
"title": "Tool 1",
"value": "tool_1",
"color": "#1CE6FF",
"keyframe": true,
"instanceURI": "https://api.labelbox.com/masks/feature/cl2y5hdq200053g6cklrdauj7/172",
"classifications": []
}
],
"relationships": []
}
Sample Label payload
[
{
"ID":"cl2y5gyv5pl2s07749ceb5mr2",
"DataRow ID":"ckzohk4gy07d60ztx8orb8nbi",
"Labeled Data":"https://storage.googleapis.com/bentz-test/dicom-assets/cat-scan1.dcm",
"Label":{
"objects":[
],
"classifications":[
],
"relationships":[
],
"groups":[
{
"name":"axial", //should be 'axial', 'sagittal', or 'coronal'
"objects":[
],
"classifications":[
],
"relationships":[
],
"frames":"https://api.labelbox.com/v1/frames/cl2y5gyv5pl2s07749ceb5mr2?group=axial"
}
]
},
"Created By":"[email protected]",
"Project Name":"DICOM",
"Created At":"2022-05-09T03:14:41.000Z",
"Updated At":"2022-05-09T03:14:42.740Z",
"Seconds to Label":1,
"External ID":"2",
"Agreement":-1,
"Benchmark Agreement":-1,
"Benchmark ID":null,
"Dataset Name":"cat-scan.json",
"Reviews": [],
"View Label":"https://editor.labelbox.com?project=cl2sl1qnnbfrl0767bv649iud&label=cl2y5gyv5pl2s07749ceb5mr2",
"Has Open Issues":0,
"Skipped": false,
"DataRow Workflow Info": {
"taskName": "Done",
"Workflow History": [
{
"actorId": "cl3lobugu14pw0796fau0dgad",
"action": "APPROVE",
"createdAt": "2022-09-29T15:46:23.269Z",
"previousTaskId": "0ae49522-97f0-4a07-96c6-bd4d50963acd",
"previousTaskName": "Initial review task"
},
{
"actorId": "cl3lobugu14pw0796fau0dgad",
"action": "REWORK",
"createdAt": "2022-09-29T14:23:59.735Z",
"previousTaskId": "4a0d7f40-0c3f-0cc8-adc4-fd818684facd",
"previousTaskName": "Rework (all rejected)",
"nextTaskId": "0ae49522-97f0-4a07-96c6-bd4d50963acd",
"nextTaskName": "Initial review task"
},
{
"actorId": "cl1qe5naj3g460z6e0owr6mwj",
"action": "REJECT",
"createdAt": "2022-09-29T13:39:01.077Z",
"previousTaskId": "0ae49522-97f0-4a07-96c6-bd4d50963acd",
"previousTaskName": "Initial review task",
"nextTaskId": "4a0d7f40-0c3f-0cc8-adc4-fd818684facd",
"nextTaskName": "Rework (all rejected)"
},
{
"actorId": "cl3ucfsj22j8l073xaitnh1xe",
"action": "MOVE",
"createdAt": "2022-09-28T18:06:16.881Z",
"previousTaskId": "ea78e526-e429-002e-8b80-b72c4b591152",
"previousTaskName": "Initial labeling task",
"nextTaskId": "0ae49522-97f0-4a07-96c6-bd4d50963acd",
"nextTaskName": "Initial review task"
},
{
"actorId": "cl3ucfsj22j8l073xaitnh1xe",
"action": "MOVE",
"createdAt": "2022-09-28T18:06:16.859Z",
"nextTaskId": "ea78e526-e429-002e-8b80-b72c4b591152",
"nextTaskName": "Initial labeling task"
}
]
}
}
// Access per-frame annotation for each axis via Label.frames URL (see above)
{
"frameNumber": 172,
"classifications": [],
"objects": [
{
"featureId": "cl2y5hdq200053g6cklrdauj7",
"schemaId": "ckzohkul206400z976bjrguy3",
"title": "Tool 1",
"value": "tool_1",
"color": "#1CE6FF",
"keyframe": true,
"instanceURI": "https://api.labelbox.com/masks/feature/cl2y5hdq200053g6cklrdauj7/172",
"classifications": []
}
],
"relationships": []
}
{
"frameNumber": 185,
"classifications": [],
"objects": [
{
"featureId": "cl2y5hjr200073g6cidkf0pqj",
"schemaId": "ckzohkul206420z974x2q4a9h",
"title": "Tool 2",
"value": "tool_2",
"color": "#FF34FF",
"keyframe": true,
"line": [
{
"x": 95.237,
"y": 117.232
},
{
"x": 223.735,
"y": 196
},
{
"x": 262.608,
"y": 124.785
}
],
"classifications": []
}
],
"relationships": []
}