Fix missing source tag in project annotations (#5408)

main
Maria Khrustaleva 3 years ago committed by GitHub
parent 785edcb272
commit f405c4acac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -86,6 +86,7 @@ non-ascii paths while adding files from "Connected file share" (issue #4428)
- Fixed FBRS serverless function runtime error on images with alpha channel (<https://github.com/opencv/cvat/pull/5384>) - Fixed FBRS serverless function runtime error on images with alpha channel (<https://github.com/opencv/cvat/pull/5384>)
- Attaching manifest with custom name (<https://github.com/opencv/cvat/pull/5377>) - Attaching manifest with custom name (<https://github.com/opencv/cvat/pull/5377>)
- Uploading non-zip annotaion files (<https://github.com/opencv/cvat/pull/5386>) - Uploading non-zip annotaion files (<https://github.com/opencv/cvat/pull/5386>)
- Missing source tag in project annotations (<https://github.com/opencv/cvat/pull/5408>)
### Security ### Security
- TDB - TDB

@ -723,6 +723,9 @@ class TaskData(CommonData):
("height", str(db_task.data.video.height)) ("height", str(db_task.data.video.height))
]) ])
# Add source to dumped file
meta["source"] = str(osp.basename(db_task.data.video.path))
return meta return meta
def _init_meta(self): def _init_meta(self):
@ -731,11 +734,6 @@ class TaskData(CommonData):
("dumped", str(timezone.localtime(timezone.now()))) ("dumped", str(timezone.localtime(timezone.now())))
]) ])
if hasattr(self._db_task.data, "video"):
# Add source to dumped file
self._meta["source"] = str(
osp.basename(self._db_task.data.video.path))
def __len__(self): def __len__(self):
return self._db_data.size return self._db_data.size

@ -4,8 +4,11 @@
# SPDX-License-Identifier: MIT # SPDX-License-Identifier: MIT
import io import io
import xml.etree.ElementTree as ET
import zipfile
from copy import deepcopy from copy import deepcopy
from http import HTTPStatus from http import HTTPStatus
from io import BytesIO
from itertools import groupby, product from itertools import groupby, product
from time import sleep from time import sleep
@ -351,6 +354,22 @@ class TestPostProjects:
self._test_create_project_201(user["username"], spec, org_id=user["org"]) self._test_create_project_201(user["username"], spec, org_id=user["org"])
def _check_cvat_for_video_project_annotations_meta(content, values_to_be_checked):
document = ET.fromstring(content)
instance = list(document.find("meta"))[0]
assert instance.tag == "project"
assert instance.find("id").text == values_to_be_checked["pid"]
assert len(list(document.iter("task"))) == len(values_to_be_checked["tasks"])
tasks = document.iter("task")
for task_checking in values_to_be_checked["tasks"]:
task_meta = next(tasks)
assert task_meta.find("id").text == str(task_checking["id"])
assert task_meta.find("name").text == task_checking["name"]
assert task_meta.find("size").text == str(task_checking["size"])
assert task_meta.find("mode").text == task_checking["mode"]
assert task_meta.find("source").text
@pytest.mark.usefixtures("restore_db_per_function") @pytest.mark.usefixtures("restore_db_per_function")
class TestImportExportDatasetProject: class TestImportExportDatasetProject:
def _test_export_project(self, username, pid, format_name): def _test_export_project(self, username, pid, format_name):
@ -359,6 +378,12 @@ class TestImportExportDatasetProject:
api_client.projects_api.retrieve_dataset_endpoint, id=pid, format=format_name api_client.projects_api.retrieve_dataset_endpoint, id=pid, format=format_name
) )
def _export_annotations(self, username, pid, format_name):
with make_api_client(username) as api_client:
return export_dataset(
api_client.projects_api.retrieve_annotations_endpoint, id=pid, format=format_name
)
def _test_import_project(self, username, project_id, format_name, data): def _test_import_project(self, username, project_id, format_name, data):
with make_api_client(username) as api_client: with make_api_client(username) as api_client:
(_, response) = api_client.projects_api.create_dataset( (_, response) = api_client.projects_api.create_dataset(
@ -477,6 +502,50 @@ class TestImportExportDatasetProject:
self._test_import_project(username, project_id, format_name, import_data) self._test_import_project(username, project_id, format_name, import_data)
@pytest.mark.parametrize("username, pid", [("admin1", 8)])
@pytest.mark.parametrize(
"anno_format, anno_file_name, check_func",
[
(
"CVAT for video 1.1",
"annotations.xml",
_check_cvat_for_video_project_annotations_meta,
),
],
)
def test_exported_project_dataset_structure(
self,
username,
pid,
anno_format,
anno_file_name,
check_func,
tasks,
projects,
annotations,
):
project = projects[pid]
values_to_be_checked = {
"pid": str(pid),
"name": project["name"],
"tasks": [
{
"id": tid,
"name": (task := tasks[tid])["name"],
"size": str(task["size"]),
"mode": task["mode"],
}
for tid in project["tasks"]
],
}
response = self._export_annotations(username, pid, anno_format)
assert response.data
with zipfile.ZipFile(BytesIO(response.data)) as zip_file:
content = zip_file.read(anno_file_name)
check_func(content, values_to_be_checked)
@pytest.mark.usefixtures("restore_db_per_function") @pytest.mark.usefixtures("restore_db_per_function")
class TestPatchProjectLabel: class TestPatchProjectLabel:

@ -714,6 +714,53 @@
} }
], ],
"version": 0 "version": 0
},
"19": {
"shapes": [
{
"attributes": [],
"elements": [],
"frame": 0,
"group": 0,
"id": 44,
"label_id": 29,
"occluded": false,
"outside": false,
"points": [
479.97322623828586,
408.0053547523421,
942.6238286479238,
513.3868808567604
],
"rotation": 0.0,
"source": "manual",
"type": "rectangle",
"z_order": 0
},
{
"attributes": [],
"elements": [],
"frame": 0,
"group": 0,
"id": 43,
"label_id": 30,
"occluded": false,
"outside": false,
"points": [
120.81927710843593,
213.52074966532928,
258.7576974564945,
643.614457831327
],
"rotation": 0.0,
"source": "manual",
"type": "rectangle",
"z_order": 0
}
],
"tags": [],
"tracks": [],
"version": 0
} }
}, },
"task": { "task": {
@ -1418,6 +1465,53 @@
} }
], ],
"version": 0 "version": 0
},
"15": {
"shapes": [
{
"attributes": [],
"elements": [],
"frame": 0,
"group": 0,
"id": 44,
"label_id": 29,
"occluded": false,
"outside": false,
"points": [
479.97322623828586,
408.0053547523421,
942.6238286479238,
513.3868808567604
],
"rotation": 0.0,
"source": "manual",
"type": "rectangle",
"z_order": 0
},
{
"attributes": [],
"elements": [],
"frame": 0,
"group": 0,
"id": 43,
"label_id": 30,
"occluded": false,
"outside": false,
"points": [
120.81927710843593,
213.52074966532928,
258.7576974564945,
643.614457831327
],
"rotation": 0.0,
"source": "manual",
"type": "rectangle",
"z_order": 0
}
],
"tags": [],
"tracks": [],
"version": 0
} }
} }
} }

@ -36,7 +36,7 @@
"pk": 1, "pk": 1,
"fields": { "fields": {
"password": "pbkdf2_sha256$260000$DevmxlmLwciP1P6sZs2Qag$U9DFtjTWx96Sk95qY6UXVcvpdQEP2LcoFBftk5D2RKY=", "password": "pbkdf2_sha256$260000$DevmxlmLwciP1P6sZs2Qag$U9DFtjTWx96Sk95qY6UXVcvpdQEP2LcoFBftk5D2RKY=",
"last_login": "2022-11-03T13:56:42.744Z", "last_login": "2022-12-01T12:52:15.631Z",
"is_superuser": true, "is_superuser": true,
"username": "admin1", "username": "admin1",
"first_name": "Admin", "first_name": "Admin",
@ -1146,6 +1146,25 @@
"deleted_frames": "[]" "deleted_frames": "[]"
} }
}, },
{
"model": "engine.data",
"pk": 14,
"fields": {
"chunk_size": 72,
"size": 25,
"image_quality": 70,
"start_frame": 0,
"stop_frame": 24,
"frame_filter": "",
"compressed_chunk_type": "imageset",
"original_chunk_type": "video",
"storage_method": "cache",
"storage": "local",
"cloud_storage": null,
"sorting_method": "lexicographical",
"deleted_frames": "[]"
}
},
{ {
"model": "engine.video", "model": "engine.video",
"pk": 1, "pk": 1,
@ -1156,6 +1175,16 @@
"height": 720 "height": 720
} }
}, },
{
"model": "engine.video",
"pk": 2,
"fields": {
"data": 14,
"path": "test_video_1.mp4",
"width": 1280,
"height": 720
}
},
{ {
"model": "engine.image", "model": "engine.image",
"pk": 131, "pk": 131,
@ -2315,6 +2344,24 @@
"target_storage": 12 "target_storage": 12
} }
}, },
{
"model": "engine.project",
"pk": 8,
"fields": {
"name": "project with video data",
"owner": [
"admin1"
],
"assignee": null,
"bug_tracker": "",
"created_date": "2022-12-01T12:52:42.454Z",
"updated_date": "2022-12-01T12:53:34.917Z",
"status": "annotation",
"organization": null,
"source_storage": 13,
"target_storage": 14
}
},
{ {
"model": "engine.task", "model": "engine.task",
"pk": 2, "pk": 2,
@ -2577,6 +2624,31 @@
"target_storage": 8 "target_storage": 8
} }
}, },
{
"model": "engine.task",
"pk": 15,
"fields": {
"project": 8,
"name": "task with video data",
"mode": "interpolation",
"owner": [
"admin1"
],
"assignee": null,
"bug_tracker": "",
"created_date": "2022-12-01T12:53:10.425Z",
"updated_date": "2022-12-01T12:53:35.028Z",
"overlap": 5,
"segment_size": 25,
"status": "annotation",
"data": 14,
"dimension": "2d",
"subset": "",
"organization": null,
"source_storage": 15,
"target_storage": 16
}
},
{ {
"model": "engine.clientfile", "model": "engine.clientfile",
"pk": 131, "pk": 131,
@ -3329,6 +3401,14 @@
"file": "/home/django/data/data/13/raw/2.png" "file": "/home/django/data/data/13/raw/2.png"
} }
}, },
{
"model": "engine.clientfile",
"pk": 442,
"fields": {
"data": 14,
"file": "/home/django/data/data/14/raw/test_video_1.mp4"
}
},
{ {
"model": "engine.relatedfile", "model": "engine.relatedfile",
"pk": 1, "pk": 1,
@ -3446,6 +3526,15 @@
"stop_frame": 7 "stop_frame": 7
} }
}, },
{
"model": "engine.segment",
"pk": 19,
"fields": {
"task": 15,
"start_frame": 0,
"stop_frame": 24
}
},
{ {
"model": "engine.job", "model": "engine.job",
"pk": 2, "pk": 2,
@ -3600,6 +3689,18 @@
"state": "in progress" "state": "in progress"
} }
}, },
{
"model": "engine.job",
"pk": 19,
"fields": {
"segment": 19,
"assignee": null,
"updated_date": "2022-12-01T12:53:35.354Z",
"status": "annotation",
"stage": "annotation",
"state": "in progress"
}
},
{ {
"model": "engine.label", "model": "engine.label",
"pk": 3, "pk": 3,
@ -3912,6 +4013,30 @@
"parent": null "parent": null
} }
}, },
{
"model": "engine.label",
"pk": 29,
"fields": {
"task": null,
"project": 8,
"name": "car",
"color": "#2080c0",
"type": "any",
"parent": null
}
},
{
"model": "engine.label",
"pk": 30,
"fields": {
"task": null,
"project": 8,
"name": "person",
"color": "#c06060",
"type": "any",
"parent": null
}
},
{ {
"model": "engine.skeleton", "model": "engine.skeleton",
"pk": 1, "pk": 1,
@ -4800,6 +4925,72 @@
"job": 14 "job": 14
} }
}, },
{
"model": "engine.jobcommit",
"pk": 77,
"fields": {
"scope": "create",
"owner": [
"admin1"
],
"timestamp": "2022-12-01T12:53:11.352Z",
"data": {
"stage": "annotation",
"state": "new",
"assignee": null
},
"job": 19
}
},
{
"model": "engine.jobcommit",
"pk": 78,
"fields": {
"scope": "create",
"owner": [
"admin1"
],
"timestamp": "2022-12-01T12:53:35.036Z",
"data": {
"stage": "annotation",
"state": "new",
"assignee": null
},
"job": 19
}
},
{
"model": "engine.jobcommit",
"pk": 79,
"fields": {
"scope": "create",
"owner": [
"admin1"
],
"timestamp": "2022-12-01T12:53:35.360Z",
"data": {
"stage": "annotation",
"state": "in progress",
"assignee": null
},
"job": 19
}
},
{
"model": "engine.jobcommit",
"pk": 80,
"fields": {
"scope": "update",
"owner": [
"admin1"
],
"timestamp": "2022-12-01T12:53:35.363Z",
"data": {
"state": "in progress"
},
"job": 19
}
},
{ {
"model": "engine.labeledimage", "model": "engine.labeledimage",
"pk": 1, "pk": 1,
@ -5164,6 +5355,42 @@
"parent": null "parent": null
} }
}, },
{
"model": "engine.labeledshape",
"pk": 43,
"fields": {
"job": 19,
"label": 30,
"frame": 0,
"group": 0,
"source": "manual",
"type": "rectangle",
"occluded": false,
"outside": false,
"z_order": 0,
"points": "[120.81927710843593, 213.52074966532928, 258.7576974564945, 643.614457831327]",
"rotation": 0.0,
"parent": null
}
},
{
"model": "engine.labeledshape",
"pk": 44,
"fields": {
"job": 19,
"label": 29,
"frame": 0,
"group": 0,
"source": "manual",
"type": "rectangle",
"occluded": false,
"outside": false,
"z_order": 0,
"points": "[479.97322623828586, 408.0053547523421, 942.6238286479238, 513.3868808567604]",
"rotation": 0.0,
"parent": null
}
},
{ {
"model": "engine.labeledshapeattributeval", "model": "engine.labeledshapeattributeval",
"pk": 1, "pk": 1,
@ -5930,6 +6157,38 @@
"cloud_storage_id": null "cloud_storage_id": null
} }
}, },
{
"model": "engine.storage",
"pk": 13,
"fields": {
"location": "local",
"cloud_storage_id": null
}
},
{
"model": "engine.storage",
"pk": 14,
"fields": {
"location": "local",
"cloud_storage_id": null
}
},
{
"model": "engine.storage",
"pk": 15,
"fields": {
"location": "local",
"cloud_storage_id": null
}
},
{
"model": "engine.storage",
"pk": 16,
"fields": {
"location": "local",
"cloud_storage_id": null
}
},
{ {
"model": "webhooks.webhook", "model": "webhooks.webhook",
"pk": 1, "pk": 1,

@ -1,8 +1,46 @@
{ {
"count": 12, "count": 13,
"next": null, "next": null,
"previous": null, "previous": null,
"results": [ "results": [
{
"assignee": null,
"bug_tracker": "",
"data_chunk_size": 72,
"data_compressed_chunk_type": "imageset",
"dimension": "2d",
"id": 19,
"labels": [
{
"attributes": [],
"color": "#2080c0",
"has_parent": false,
"id": 29,
"name": "car",
"sublabels": [],
"type": "any"
},
{
"attributes": [],
"color": "#c06060",
"has_parent": false,
"id": 30,
"name": "person",
"sublabels": [],
"type": "any"
}
],
"mode": "interpolation",
"project_id": 8,
"stage": "annotation",
"start_frame": 0,
"state": "in progress",
"status": "annotation",
"stop_frame": 24,
"task_id": 15,
"updated_date": "2022-12-01T12:53:35.354431Z",
"url": "http://localhost:8080/api/jobs/19"
},
{ {
"assignee": null, "assignee": null,
"bug_tracker": "", "bug_tracker": "",
@ -13,49 +51,63 @@
"labels": [ "labels": [
{ {
"attributes": [], "attributes": [],
"color": "#4a649f", "color": "#5c5eba",
"has_parent": false,
"id": 18,
"name": "s1",
"sublabels": [
{
"attributes": [],
"color": "#d12345",
"has_parent": true, "has_parent": true,
"id": 26, "id": 19,
"name": "4", "name": "1",
"sublabels": [],
"type": "points" "type": "points"
}, },
{ {
"attributes": [ "attributes": [],
"color": "#350dea",
"has_parent": true,
"id": 20,
"name": "2",
"type": "points"
},
{ {
"default_value": "val1", "attributes": [],
"id": 3, "color": "#479ffe",
"input_type": "select", "has_parent": true,
"mutable": false, "id": 21,
"name": "attr", "name": "3",
"values": [ "type": "points"
"val1",
"val2"
]
} }
], ],
"color": "#59a8fe", "svg": "<line x1=\"36.37385177612305\" y1=\"50.334449768066406\" x2=\"70.15311431884766\" y2=\"21.237457275390625\" stroke=\"black\" data-type=\"edge\" data-node-from=\"2\" stroke-width=\"0.5\" data-node-to=\"3\"></line><line x1=\"29.517663955688477\" y1=\"15.050167083740234\" x2=\"36.37385177612305\" y2=\"50.334449768066406\" stroke=\"black\" data-type=\"edge\" data-node-from=\"1\" stroke-width=\"0.5\" data-node-to=\"2\"></line><circle r=\"1.5\" stroke=\"black\" fill=\"#b3b3b3\" cx=\"29.517663955688477\" cy=\"15.050167083740234\" stroke-width=\"0.1\" data-type=\"element node\" data-element-id=\"1\" data-node-id=\"1\" data-label-id=\"19\"></circle><circle r=\"1.5\" stroke=\"black\" fill=\"#b3b3b3\" cx=\"36.37385177612305\" cy=\"50.334449768066406\" stroke-width=\"0.1\" data-type=\"element node\" data-element-id=\"2\" data-node-id=\"2\" data-label-id=\"20\"></circle><circle r=\"1.5\" stroke=\"black\" fill=\"#b3b3b3\" cx=\"70.15311431884766\" cy=\"21.237457275390625\" stroke-width=\"0.1\" data-type=\"element node\" data-element-id=\"3\" data-node-id=\"3\" data-label-id=\"21\"></circle>",
"type": "skeleton"
},
{
"attributes": [],
"color": "#d12345",
"has_parent": true, "has_parent": true,
"id": 25, "id": 19,
"name": "3", "name": "1",
"sublabels": [], "sublabels": [],
"type": "points" "type": "points"
}, },
{ {
"attributes": [], "attributes": [],
"color": "#4925ec", "color": "#350dea",
"has_parent": true, "has_parent": true,
"id": 24, "id": 20,
"name": "2", "name": "2",
"sublabels": [], "sublabels": [],
"type": "points" "type": "points"
}, },
{ {
"attributes": [], "attributes": [],
"color": "#d53957", "color": "#479ffe",
"has_parent": true, "has_parent": true,
"id": 23, "id": 21,
"name": "1", "name": "3",
"sublabels": [], "sublabels": [],
"type": "points" "type": "points"
}, },
@ -80,10 +132,18 @@
"sublabels": [ "sublabels": [
{ {
"attributes": [], "attributes": [],
"color": "#4a649f", "color": "#d53957",
"has_parent": true, "has_parent": true,
"id": 26, "id": 23,
"name": "4", "name": "1",
"type": "points"
},
{
"attributes": [],
"color": "#4925ec",
"has_parent": true,
"id": 24,
"name": "2",
"type": "points" "type": "points"
}, },
{ {
@ -108,18 +168,10 @@
}, },
{ {
"attributes": [], "attributes": [],
"color": "#4925ec", "color": "#4a649f",
"has_parent": true,
"id": 24,
"name": "2",
"type": "points"
},
{
"attributes": [],
"color": "#d53957",
"has_parent": true, "has_parent": true,
"id": 23, "id": 26,
"name": "1", "name": "4",
"type": "points" "type": "points"
} }
], ],
@ -128,67 +180,53 @@
}, },
{ {
"attributes": [], "attributes": [],
"color": "#479ffe", "color": "#d53957",
"has_parent": true, "has_parent": true,
"id": 21, "id": 23,
"name": "3", "name": "1",
"sublabels": [], "sublabels": [],
"type": "points" "type": "points"
}, },
{ {
"attributes": [], "attributes": [],
"color": "#350dea", "color": "#4925ec",
"has_parent": true, "has_parent": true,
"id": 20, "id": 24,
"name": "2", "name": "2",
"sublabels": [], "sublabels": [],
"type": "points" "type": "points"
}, },
{ {
"attributes": [], "attributes": [
"color": "#d12345",
"has_parent": true,
"id": 19,
"name": "1",
"sublabels": [],
"type": "points"
},
{
"attributes": [],
"color": "#5c5eba",
"has_parent": false,
"id": 18,
"name": "s1",
"sublabels": [
{ {
"attributes": [], "default_value": "val1",
"color": "#479ffe", "id": 3,
"input_type": "select",
"mutable": false,
"name": "attr",
"values": [
"val1",
"val2"
]
}
],
"color": "#59a8fe",
"has_parent": true, "has_parent": true,
"id": 21, "id": 25,
"name": "3", "name": "3",
"sublabels": [],
"type": "points" "type": "points"
}, },
{ {
"attributes": [], "attributes": [],
"color": "#350dea", "color": "#4a649f",
"has_parent": true,
"id": 20,
"name": "2",
"type": "points"
},
{
"attributes": [],
"color": "#d12345",
"has_parent": true, "has_parent": true,
"id": 19, "id": 26,
"name": "1", "name": "4",
"sublabels": [],
"type": "points" "type": "points"
} }
], ],
"svg": "<line x1=\"36.37385177612305\" y1=\"50.334449768066406\" x2=\"70.15311431884766\" y2=\"21.237457275390625\" stroke=\"black\" data-type=\"edge\" data-node-from=\"2\" stroke-width=\"0.5\" data-node-to=\"3\"></line><line x1=\"29.517663955688477\" y1=\"15.050167083740234\" x2=\"36.37385177612305\" y2=\"50.334449768066406\" stroke=\"black\" data-type=\"edge\" data-node-from=\"1\" stroke-width=\"0.5\" data-node-to=\"2\"></line><circle r=\"1.5\" stroke=\"black\" fill=\"#b3b3b3\" cx=\"29.517663955688477\" cy=\"15.050167083740234\" stroke-width=\"0.1\" data-type=\"element node\" data-element-id=\"1\" data-node-id=\"1\" data-label-id=\"19\"></circle><circle r=\"1.5\" stroke=\"black\" fill=\"#b3b3b3\" cx=\"36.37385177612305\" cy=\"50.334449768066406\" stroke-width=\"0.1\" data-type=\"element node\" data-element-id=\"2\" data-node-id=\"2\" data-label-id=\"20\"></circle><circle r=\"1.5\" stroke=\"black\" fill=\"#b3b3b3\" cx=\"70.15311431884766\" cy=\"21.237457275390625\" stroke-width=\"0.1\" data-type=\"element node\" data-element-id=\"3\" data-node-id=\"3\" data-label-id=\"21\"></circle>",
"type": "skeleton"
}
],
"mode": "annotation", "mode": "annotation",
"project_id": 5, "project_id": 5,
"stage": "annotation", "stage": "annotation",
@ -210,19 +248,19 @@
"labels": [ "labels": [
{ {
"attributes": [], "attributes": [],
"color": "#406040", "color": "#6080c0",
"has_parent": false, "has_parent": false,
"id": 17, "id": 16,
"name": "dog", "name": "cat",
"sublabels": [], "sublabels": [],
"type": "any" "type": "any"
}, },
{ {
"attributes": [], "attributes": [],
"color": "#6080c0", "color": "#406040",
"has_parent": false, "has_parent": false,
"id": 16, "id": 17,
"name": "cat", "name": "dog",
"sublabels": [], "sublabels": [],
"type": "any" "type": "any"
} }
@ -254,19 +292,19 @@
"labels": [ "labels": [
{ {
"attributes": [], "attributes": [],
"color": "#406040", "color": "#6080c0",
"has_parent": false, "has_parent": false,
"id": 8, "id": 7,
"name": "dog", "name": "cat",
"sublabels": [], "sublabels": [],
"type": "any" "type": "any"
}, },
{ {
"attributes": [], "attributes": [],
"color": "#6080c0", "color": "#406040",
"has_parent": false, "has_parent": false,
"id": 7, "id": 8,
"name": "cat", "name": "dog",
"sublabels": [], "sublabels": [],
"type": "any" "type": "any"
} }
@ -290,15 +328,6 @@
"dimension": "2d", "dimension": "2d",
"id": 14, "id": 14,
"labels": [ "labels": [
{
"attributes": [],
"color": "#c06060",
"has_parent": false,
"id": 6,
"name": "person",
"sublabels": [],
"type": "any"
},
{ {
"attributes": [ "attributes": [
{ {
@ -320,6 +349,15 @@
"name": "car", "name": "car",
"sublabels": [], "sublabels": [],
"type": "any" "type": "any"
},
{
"attributes": [],
"color": "#c06060",
"has_parent": false,
"id": 6,
"name": "person",
"sublabels": [],
"type": "any"
} }
], ],
"mode": "annotation", "mode": "annotation",
@ -341,15 +379,6 @@
"dimension": "2d", "dimension": "2d",
"id": 13, "id": 13,
"labels": [ "labels": [
{
"attributes": [],
"color": "#c06060",
"has_parent": false,
"id": 6,
"name": "person",
"sublabels": [],
"type": "any"
},
{ {
"attributes": [ "attributes": [
{ {
@ -371,6 +400,15 @@
"name": "car", "name": "car",
"sublabels": [], "sublabels": [],
"type": "any" "type": "any"
},
{
"attributes": [],
"color": "#c06060",
"has_parent": false,
"id": 6,
"name": "person",
"sublabels": [],
"type": "any"
} }
], ],
"mode": "annotation", "mode": "annotation",
@ -392,15 +430,6 @@
"dimension": "2d", "dimension": "2d",
"id": 12, "id": 12,
"labels": [ "labels": [
{
"attributes": [],
"color": "#c06060",
"has_parent": false,
"id": 6,
"name": "person",
"sublabels": [],
"type": "any"
},
{ {
"attributes": [ "attributes": [
{ {
@ -422,6 +451,15 @@
"name": "car", "name": "car",
"sublabels": [], "sublabels": [],
"type": "any" "type": "any"
},
{
"attributes": [],
"color": "#c06060",
"has_parent": false,
"id": 6,
"name": "person",
"sublabels": [],
"type": "any"
} }
], ],
"mode": "annotation", "mode": "annotation",
@ -449,15 +487,6 @@
"dimension": "2d", "dimension": "2d",
"id": 11, "id": 11,
"labels": [ "labels": [
{
"attributes": [],
"color": "#c06060",
"has_parent": false,
"id": 6,
"name": "person",
"sublabels": [],
"type": "any"
},
{ {
"attributes": [ "attributes": [
{ {
@ -479,6 +508,15 @@
"name": "car", "name": "car",
"sublabels": [], "sublabels": [],
"type": "any" "type": "any"
},
{
"attributes": [],
"color": "#c06060",
"has_parent": false,
"id": 6,
"name": "person",
"sublabels": [],
"type": "any"
} }
], ],
"mode": "annotation", "mode": "annotation",

@ -1,8 +1,61 @@
{ {
"count": 7, "count": 8,
"next": null, "next": null,
"previous": null, "previous": null,
"results": [ "results": [
{
"assignee": null,
"bug_tracker": "",
"created_date": "2022-12-01T12:52:42.454308Z",
"dimension": "2d",
"id": 8,
"labels": [
{
"attributes": [],
"color": "#2080c0",
"has_parent": false,
"id": 29,
"name": "car",
"sublabels": [],
"type": "any"
},
{
"attributes": [],
"color": "#c06060",
"has_parent": false,
"id": 30,
"name": "person",
"sublabels": [],
"type": "any"
}
],
"name": "project with video data",
"organization": null,
"owner": {
"first_name": "Admin",
"id": 1,
"last_name": "First",
"url": "http://localhost:8080/api/users/1",
"username": "admin1"
},
"source_storage": {
"cloud_storage_id": null,
"id": 13,
"location": "local"
},
"status": "annotation",
"target_storage": {
"cloud_storage_id": null,
"id": 14,
"location": "local"
},
"task_subsets": [],
"tasks": [
15
],
"updated_date": "2022-12-01T12:53:34.917451Z",
"url": "http://localhost:8080/api/projects/8"
},
{ {
"assignee": { "assignee": {
"first_name": "Worker", "first_name": "Worker",
@ -115,10 +168,10 @@
"sublabels": [ "sublabels": [
{ {
"attributes": [], "attributes": [],
"color": "#479ffe", "color": "#d12345",
"has_parent": true, "has_parent": true,
"id": 21, "id": 19,
"name": "3", "name": "1",
"type": "points" "type": "points"
}, },
{ {
@ -131,10 +184,10 @@
}, },
{ {
"attributes": [], "attributes": [],
"color": "#d12345", "color": "#479ffe",
"has_parent": true, "has_parent": true,
"id": 19, "id": 21,
"name": "1", "name": "3",
"type": "points" "type": "points"
} }
], ],
@ -189,10 +242,18 @@
"sublabels": [ "sublabels": [
{ {
"attributes": [], "attributes": [],
"color": "#4a649f", "color": "#d53957",
"has_parent": true, "has_parent": true,
"id": 26, "id": 23,
"name": "4", "name": "1",
"type": "points"
},
{
"attributes": [],
"color": "#4925ec",
"has_parent": true,
"id": 24,
"name": "2",
"type": "points" "type": "points"
}, },
{ {
@ -217,18 +278,10 @@
}, },
{ {
"attributes": [], "attributes": [],
"color": "#4925ec", "color": "#4a649f",
"has_parent": true,
"id": 24,
"name": "2",
"type": "points"
},
{
"attributes": [],
"color": "#d53957",
"has_parent": true, "has_parent": true,
"id": 23, "id": 26,
"name": "1", "name": "4",
"type": "points" "type": "points"
} }
], ],

@ -1,8 +1,84 @@
{ {
"count": 10, "count": 11,
"next": null, "next": null,
"previous": null, "previous": null,
"results": [ "results": [
{
"assignee": null,
"bug_tracker": "",
"created_date": "2022-12-01T12:53:10.425141Z",
"data": 14,
"data_chunk_size": 72,
"data_compressed_chunk_type": "imageset",
"data_original_chunk_type": "video",
"dimension": "2d",
"id": 15,
"image_quality": 70,
"labels": [
{
"attributes": [],
"color": "#2080c0",
"has_parent": false,
"id": 29,
"name": "car",
"sublabels": [],
"type": "any"
},
{
"attributes": [],
"color": "#c06060",
"has_parent": false,
"id": 30,
"name": "person",
"sublabels": [],
"type": "any"
}
],
"mode": "interpolation",
"name": "task with video data",
"organization": null,
"overlap": 5,
"owner": {
"first_name": "Admin",
"id": 1,
"last_name": "First",
"url": "http://localhost:8080/api/users/1",
"username": "admin1"
},
"project_id": 8,
"segment_size": 25,
"segments": [
{
"jobs": [
{
"assignee": null,
"id": 19,
"stage": "annotation",
"state": "in progress",
"status": "annotation",
"url": "http://localhost:8080/api/jobs/19"
}
],
"start_frame": 0,
"stop_frame": 24
}
],
"size": 25,
"source_storage": {
"cloud_storage_id": null,
"id": 15,
"location": "local"
},
"status": "annotation",
"subset": "",
"target_storage": {
"cloud_storage_id": null,
"id": 16,
"location": "local"
},
"updated_date": "2022-12-01T12:53:35.028385Z",
"url": "http://localhost:8080/api/tasks/15"
},
{ {
"assignee": null, "assignee": null,
"bug_tracker": "", "bug_tracker": "",
@ -17,49 +93,63 @@
"labels": [ "labels": [
{ {
"attributes": [], "attributes": [],
"color": "#4a649f", "color": "#5c5eba",
"has_parent": false,
"id": 18,
"name": "s1",
"sublabels": [
{
"attributes": [],
"color": "#d12345",
"has_parent": true, "has_parent": true,
"id": 26, "id": 19,
"name": "4", "name": "1",
"sublabels": [],
"type": "points" "type": "points"
}, },
{ {
"attributes": [ "attributes": [],
"color": "#350dea",
"has_parent": true,
"id": 20,
"name": "2",
"type": "points"
},
{ {
"default_value": "val1", "attributes": [],
"id": 3, "color": "#479ffe",
"input_type": "select", "has_parent": true,
"mutable": false, "id": 21,
"name": "attr", "name": "3",
"values": [ "type": "points"
"val1",
"val2"
]
} }
], ],
"color": "#59a8fe", "svg": "<line x1=\"36.37385177612305\" y1=\"50.334449768066406\" x2=\"70.15311431884766\" y2=\"21.237457275390625\" stroke=\"black\" data-type=\"edge\" data-node-from=\"2\" stroke-width=\"0.5\" data-node-to=\"3\"></line><line x1=\"29.517663955688477\" y1=\"15.050167083740234\" x2=\"36.37385177612305\" y2=\"50.334449768066406\" stroke=\"black\" data-type=\"edge\" data-node-from=\"1\" stroke-width=\"0.5\" data-node-to=\"2\"></line><circle r=\"1.5\" stroke=\"black\" fill=\"#b3b3b3\" cx=\"29.517663955688477\" cy=\"15.050167083740234\" stroke-width=\"0.1\" data-type=\"element node\" data-element-id=\"1\" data-node-id=\"1\" data-label-id=\"19\"></circle><circle r=\"1.5\" stroke=\"black\" fill=\"#b3b3b3\" cx=\"36.37385177612305\" cy=\"50.334449768066406\" stroke-width=\"0.1\" data-type=\"element node\" data-element-id=\"2\" data-node-id=\"2\" data-label-id=\"20\"></circle><circle r=\"1.5\" stroke=\"black\" fill=\"#b3b3b3\" cx=\"70.15311431884766\" cy=\"21.237457275390625\" stroke-width=\"0.1\" data-type=\"element node\" data-element-id=\"3\" data-node-id=\"3\" data-label-id=\"21\"></circle>",
"type": "skeleton"
},
{
"attributes": [],
"color": "#d12345",
"has_parent": true, "has_parent": true,
"id": 25, "id": 19,
"name": "3", "name": "1",
"sublabels": [], "sublabels": [],
"type": "points" "type": "points"
}, },
{ {
"attributes": [], "attributes": [],
"color": "#4925ec", "color": "#350dea",
"has_parent": true, "has_parent": true,
"id": 24, "id": 20,
"name": "2", "name": "2",
"sublabels": [], "sublabels": [],
"type": "points" "type": "points"
}, },
{ {
"attributes": [], "attributes": [],
"color": "#d53957", "color": "#479ffe",
"has_parent": true, "has_parent": true,
"id": 23, "id": 21,
"name": "1", "name": "3",
"sublabels": [], "sublabels": [],
"type": "points" "type": "points"
}, },
@ -84,10 +174,18 @@
"sublabels": [ "sublabels": [
{ {
"attributes": [], "attributes": [],
"color": "#4a649f", "color": "#d53957",
"has_parent": true, "has_parent": true,
"id": 26, "id": 23,
"name": "4", "name": "1",
"type": "points"
},
{
"attributes": [],
"color": "#4925ec",
"has_parent": true,
"id": 24,
"name": "2",
"type": "points" "type": "points"
}, },
{ {
@ -112,18 +210,10 @@
}, },
{ {
"attributes": [], "attributes": [],
"color": "#4925ec", "color": "#4a649f",
"has_parent": true,
"id": 24,
"name": "2",
"type": "points"
},
{
"attributes": [],
"color": "#d53957",
"has_parent": true, "has_parent": true,
"id": 23, "id": 26,
"name": "1", "name": "4",
"type": "points" "type": "points"
} }
], ],
@ -132,67 +222,53 @@
}, },
{ {
"attributes": [], "attributes": [],
"color": "#479ffe", "color": "#d53957",
"has_parent": true, "has_parent": true,
"id": 21, "id": 23,
"name": "3", "name": "1",
"sublabels": [], "sublabels": [],
"type": "points" "type": "points"
}, },
{ {
"attributes": [], "attributes": [],
"color": "#350dea", "color": "#4925ec",
"has_parent": true, "has_parent": true,
"id": 20, "id": 24,
"name": "2", "name": "2",
"sublabels": [], "sublabels": [],
"type": "points" "type": "points"
}, },
{ {
"attributes": [], "attributes": [
"color": "#d12345",
"has_parent": true,
"id": 19,
"name": "1",
"sublabels": [],
"type": "points"
},
{
"attributes": [],
"color": "#5c5eba",
"has_parent": false,
"id": 18,
"name": "s1",
"sublabels": [
{ {
"attributes": [], "default_value": "val1",
"color": "#479ffe", "id": 3,
"input_type": "select",
"mutable": false,
"name": "attr",
"values": [
"val1",
"val2"
]
}
],
"color": "#59a8fe",
"has_parent": true, "has_parent": true,
"id": 21, "id": 25,
"name": "3", "name": "3",
"sublabels": [],
"type": "points" "type": "points"
}, },
{ {
"attributes": [], "attributes": [],
"color": "#350dea", "color": "#4a649f",
"has_parent": true,
"id": 20,
"name": "2",
"type": "points"
},
{
"attributes": [],
"color": "#d12345",
"has_parent": true, "has_parent": true,
"id": 19, "id": 26,
"name": "1", "name": "4",
"sublabels": [],
"type": "points" "type": "points"
} }
], ],
"svg": "<line x1=\"36.37385177612305\" y1=\"50.334449768066406\" x2=\"70.15311431884766\" y2=\"21.237457275390625\" stroke=\"black\" data-type=\"edge\" data-node-from=\"2\" stroke-width=\"0.5\" data-node-to=\"3\"></line><line x1=\"29.517663955688477\" y1=\"15.050167083740234\" x2=\"36.37385177612305\" y2=\"50.334449768066406\" stroke=\"black\" data-type=\"edge\" data-node-from=\"1\" stroke-width=\"0.5\" data-node-to=\"2\"></line><circle r=\"1.5\" stroke=\"black\" fill=\"#b3b3b3\" cx=\"29.517663955688477\" cy=\"15.050167083740234\" stroke-width=\"0.1\" data-type=\"element node\" data-element-id=\"1\" data-node-id=\"1\" data-label-id=\"19\"></circle><circle r=\"1.5\" stroke=\"black\" fill=\"#b3b3b3\" cx=\"36.37385177612305\" cy=\"50.334449768066406\" stroke-width=\"0.1\" data-type=\"element node\" data-element-id=\"2\" data-node-id=\"2\" data-label-id=\"20\"></circle><circle r=\"1.5\" stroke=\"black\" fill=\"#b3b3b3\" cx=\"70.15311431884766\" cy=\"21.237457275390625\" stroke-width=\"0.1\" data-type=\"element node\" data-element-id=\"3\" data-node-id=\"3\" data-label-id=\"21\"></circle>",
"type": "skeleton"
}
],
"mode": "annotation", "mode": "annotation",
"name": "task1 in project5", "name": "task1 in project5",
"organization": 2, "organization": 2,
@ -252,19 +328,19 @@
"labels": [ "labels": [
{ {
"attributes": [], "attributes": [],
"color": "#406040", "color": "#6080c0",
"has_parent": false, "has_parent": false,
"id": 17, "id": 16,
"name": "dog", "name": "cat",
"sublabels": [], "sublabels": [],
"type": "any" "type": "any"
}, },
{ {
"attributes": [], "attributes": [],
"color": "#6080c0", "color": "#406040",
"has_parent": false, "has_parent": false,
"id": 16, "id": 17,
"name": "cat", "name": "dog",
"sublabels": [], "sublabels": [],
"type": "any" "type": "any"
} }
@ -364,19 +440,19 @@
"labels": [ "labels": [
{ {
"attributes": [], "attributes": [],
"color": "#406040", "color": "#6080c0",
"has_parent": false, "has_parent": false,
"id": 8, "id": 7,
"name": "dog", "name": "cat",
"sublabels": [], "sublabels": [],
"type": "any" "type": "any"
}, },
{ {
"attributes": [], "attributes": [],
"color": "#6080c0", "color": "#406040",
"has_parent": false, "has_parent": false,
"id": 7, "id": 8,
"name": "cat", "name": "dog",
"sublabels": [], "sublabels": [],
"type": "any" "type": "any"
} }
@ -450,15 +526,6 @@
"id": 9, "id": 9,
"image_quality": 70, "image_quality": 70,
"labels": [ "labels": [
{
"attributes": [],
"color": "#c06060",
"has_parent": false,
"id": 6,
"name": "person",
"sublabels": [],
"type": "any"
},
{ {
"attributes": [ "attributes": [
{ {
@ -480,6 +547,15 @@
"name": "car", "name": "car",
"sublabels": [], "sublabels": [],
"type": "any" "type": "any"
},
{
"attributes": [],
"color": "#c06060",
"has_parent": false,
"id": 6,
"name": "person",
"sublabels": [],
"type": "any"
} }
], ],
"mode": "annotation", "mode": "annotation",

@ -310,7 +310,7 @@
"is_active": true, "is_active": true,
"is_staff": true, "is_staff": true,
"is_superuser": true, "is_superuser": true,
"last_login": "2022-11-03T13:56:42.744000Z", "last_login": "2022-12-01T12:52:15.631928Z",
"last_name": "First", "last_name": "First",
"url": "http://localhost:8080/api/users/1", "url": "http://localhost:8080/api/users/1",
"username": "admin1" "username": "admin1"

Loading…
Cancel
Save