未验证 提交 1442aef3 编写于 作者: A Anastasia Yasakova 提交者: GitHub

Fix export annotations to COCO keypoints (#5794)

Fixed #5600,  #5257
Co-authored-by: NRoman Donchenko <roman@cvat.ai>
上级 3217f0ef
......@@ -76,6 +76,7 @@ Tracks can be exported/imported to/from Datumaro and Sly Pointcloud formats (<ht
- SiamMask and TransT serverless functions (<https://github.com/opencv/cvat/pull/5658>)
- Сreating a project or task with the same labels (<https://github.com/opencv/cvat/pull/5700>)
- \[Server API\] Ability to rename label to an existing name (<https://github.com/opencv/cvat/pull/5662>)
- Parsing skeleton sublabels containing spaces results in an error in dataset export (<https://github.com/opencv/cvat/pull/5794>)
- Missing CVAT_BASE_URL in docker-compose.yml (<https://github.com/opencv/cvat/pull/5792>)
### Security
......
......@@ -4,18 +4,18 @@
#
# SPDX-License-Identifier: MIT
from functools import reduce
import os.path as osp
import re
import sys
import numpy as np
from collections import namedtuple
from functools import reduce
from pathlib import Path
from types import SimpleNamespace
from typing import (Any, Callable, DefaultDict, Dict, List, Literal, Mapping,
NamedTuple, OrderedDict, Set, Tuple, Union)
import datumaro as dm
import defusedxml.ElementTree as ET
import numpy as np
import rq
from attr import attrib, attrs
from datumaro.components.media import PointCloud
......@@ -28,7 +28,7 @@ from cvat.apps.engine.models import Image as Img
from cvat.apps.engine.models import Label, LabelType, Project, ShapeType, Task
from .annotation import AnnotationIR, AnnotationManager, TrackManager
from .formats.transformations import EllipsesToMasks, CVATRleToCOCORle
from .formats.transformations import CVATRleToCOCORle, EllipsesToMasks
CVAT_INTERNAL_ATTRIBUTES = {'occluded', 'outside', 'keyframe', 'track_id', 'rotation'}
......@@ -1221,10 +1221,13 @@ class CVATDataExtractorMixin:
label_categories.attributes.add(attr['name'])
if label['type'] == str(LabelType.SKELETON):
labels_from = list(map(int, re.findall(r'data-node-from="(\d+)"', label['svg'])))
labels_to = list(map(int, re.findall(r'data-node-to="(\d+)"', label['svg'])))
sublabels = re.findall(r'data-label-name="(\w+)"', label['svg'])
joints = zip(labels_from, labels_to)
joints = []
sublabels = []
for el in ET.fromstring('<root>' + label.get('svg', '') + '</root>'):
if el.tag == 'line':
joints.append([int(el.attrib['data-node-from']), int(el.attrib['data-node-to'])])
elif el.tag == 'circle':
sublabels.append(el.attrib['data-label-name'])
point_categories.add(label_id, sublabels, joints)
......
......@@ -369,7 +369,7 @@ class TestPatchJobAnnotations:
users = find_users(role=role, org=org)
jobs = jobs_by_org[org]
filtered_jobs = filter_jobs_with_shapes(jobs)
username, jid = find_job_staff_user(filtered_jobs, users, job_staff, [18])
username, jid = find_job_staff_user(filtered_jobs, users, job_staff, [18, 22])
data = request_data(jid)
self._check_respone(username, jid, expect_success, data, org=org)
......@@ -393,7 +393,7 @@ class TestPatchJobAnnotations:
users = find_users(privilege=privilege, exclude_org=org)
jobs = jobs_by_org[org]
filtered_jobs = filter_jobs_with_shapes(jobs)
username, jid = find_job_staff_user(filtered_jobs, users, False, [18])
username, jid = find_job_staff_user(filtered_jobs, users, False, [18, 22])
data = request_data(jid)
self._check_respone(username, jid, expect_success, data, org=org)
......
......@@ -650,6 +650,14 @@ class TestImportExportDatasetProject:
assert task1_rotation == task2_rotation
def test_can_export_dataset_with_skeleton_labels_with_spaces(self):
# https://github.com/opencv/cvat/issues/5257
# https://github.com/opencv/cvat/issues/5600
username = "admin1"
project_id = 11
self._test_export_project(username, project_id, "COCO Keypoints 1.0")
@pytest.mark.usefixtures("restore_db_per_function")
class TestPatchProjectLabel:
......
......@@ -424,7 +424,7 @@ class TestPatchTaskAnnotations:
):
users = find_users(role=role, org=org)
tasks = tasks_by_org[org]
username, tid = find_task_staff_user(tasks, users, task_staff, [12, 14])
username, tid = find_task_staff_user(tasks, users, task_staff, [12, 14, 18])
data = request_data(tid)
with make_api_client(username) as api_client:
......@@ -971,7 +971,7 @@ class TestPatchTaskLabel:
)
def test_can_delete_label(self, tasks, labels, admin_user):
task = [t for t in tasks if t["labels"]["count"] > 0][0]
task = [t for t in tasks if t["project_id"] is None and t["labels"]["count"] > 0][0]
label = deepcopy([l for l in labels if l.get("task_id") == task["id"]][0])
label_payload = {"id": label["id"], "deleted": True}
......@@ -1003,7 +1003,7 @@ class TestPatchTaskLabel:
assert DeepDiff(resulting_labels, task_labels, ignore_order=True) == {}
def test_can_rename_label(self, tasks, labels, admin_user):
task = [t for t in tasks if t["labels"]["count"] > 0][0]
task = [t for t in tasks if t["project_id"] is None and t["labels"]["count"] > 0][0]
task_labels = deepcopy([l for l in labels if l.get("task_id") == task["id"]])
task_labels[0].update({"name": "new name"})
......@@ -1025,7 +1025,7 @@ class TestPatchTaskLabel:
assert "All label names must be unique" in response.text
def test_cannot_add_foreign_label(self, tasks, labels, admin_user):
task = list(tasks)[0]
task = [t for t in tasks if t["project_id"] is None][0]
new_label = deepcopy(
[
l
......@@ -1040,7 +1040,7 @@ class TestPatchTaskLabel:
assert f"Not found label with id #{new_label['id']} to change" in response.text
def test_admin_can_add_label(self, tasks, admin_user):
task = list(tasks)[0]
task = [t for t in tasks if t["project_id"] is None][0]
new_label = {"name": "new name"}
response = patch_method(admin_user, f'/tasks/{task["id"]}', {"labels": [new_label]})
......@@ -1063,7 +1063,7 @@ class TestPatchTaskLabel:
for user, task in product(users, tasks)
if not is_task_staff(user["id"], task["id"])
and task["organization"]
and is_org_member(user["id"], task["organization"])
and is_org_member(user["id"], task["organization"] and task["project_id"] is None)
)
new_label = {"name": "new name"}
......
......@@ -825,6 +825,97 @@
],
"tracks": [],
"version": 0
},
"22": {
"shapes": [
{
"attributes": [],
"elements": [
{
"attributes": [],
"frame": 0,
"group": 0,
"id": 52,
"label_id": 49,
"occluded": false,
"outside": false,
"points": [
326.2062528608664,
107.42983682983868
],
"rotation": 0.0,
"source": "manual",
"type": "points",
"z_order": 0
},
{
"attributes": [],
"frame": 0,
"group": 0,
"id": 50,
"label_id": 47,
"occluded": false,
"outside": false,
"points": [
136.46993006993034,
138.72697241590762
],
"rotation": 0.0,
"source": "manual",
"type": "points",
"z_order": 0
},
{
"attributes": [],
"frame": 0,
"group": 0,
"id": 51,
"label_id": 48,
"occluded": false,
"outside": false,
"points": [
192.9001336620433,
421.9659673659692
],
"rotation": 0.0,
"source": "manual",
"type": "points",
"z_order": 0
},
{
"attributes": [],
"frame": 0,
"group": 0,
"id": 53,
"label_id": 50,
"occluded": false,
"outside": false,
"points": [
412.07832167832197,
337.46374412038085
],
"rotation": 0.0,
"source": "manual",
"type": "points",
"z_order": 0
}
],
"frame": 0,
"group": 0,
"id": 49,
"label_id": 46,
"occluded": false,
"outside": false,
"points": [],
"rotation": 0.0,
"source": "manual",
"type": "skeleton",
"z_order": 0
}
],
"tags": [],
"tracks": [],
"version": 0
}
},
"task": {
......@@ -1634,6 +1725,97 @@
],
"tracks": [],
"version": 0
},
"18": {
"shapes": [
{
"attributes": [],
"elements": [
{
"attributes": [],
"frame": 0,
"group": 0,
"id": 52,
"label_id": 49,
"occluded": false,
"outside": false,
"points": [
326.2062528608664,
107.42983682983868
],
"rotation": 0.0,
"source": "manual",
"type": "points",
"z_order": 0
},
{
"attributes": [],
"frame": 0,
"group": 0,
"id": 50,
"label_id": 47,
"occluded": false,
"outside": false,
"points": [
136.46993006993034,
138.72697241590762
],
"rotation": 0.0,
"source": "manual",
"type": "points",
"z_order": 0
},
{
"attributes": [],
"frame": 0,
"group": 0,
"id": 51,
"label_id": 48,
"occluded": false,
"outside": false,
"points": [
192.9001336620433,
421.9659673659692
],
"rotation": 0.0,
"source": "manual",
"type": "points",
"z_order": 0
},
{
"attributes": [],
"frame": 0,
"group": 0,
"id": 53,
"label_id": 50,
"occluded": false,
"outside": false,
"points": [
412.07832167832197,
337.46374412038085
],
"rotation": 0.0,
"source": "manual",
"type": "points",
"z_order": 0
}
],
"frame": 0,
"group": 0,
"id": 49,
"label_id": 46,
"occluded": false,
"outside": false,
"points": [],
"rotation": 0.0,
"source": "manual",
"type": "skeleton",
"z_order": 0
}
],
"tags": [],
"tracks": [],
"version": 0
}
}
}
\ No newline at end of file
......@@ -36,7 +36,7 @@
"pk": 1,
"fields": {
"password": "pbkdf2_sha256$260000$DevmxlmLwciP1P6sZs2Qag$U9DFtjTWx96Sk95qY6UXVcvpdQEP2LcoFBftk5D2RKY=",
"last_login": "2022-12-05T07:46:24.795Z",
"last_login": "2023-03-01T15:34:27.878Z",
"is_superuser": true,
"username": "admin1",
"first_name": "Admin",
......@@ -535,6 +535,14 @@
"expire_date": "2022-03-10T20:44:57.190Z"
}
},
{
"model": "sessions.session",
"pk": "hyu4u2ybvftmposiq86y4fo6ghvwrvaf",
"fields": {
"session_data": ".eJxVjLEOwjAMRP8lM4qaOjI1IzvfEDmxSwoolZp2Qvw7qdQBxrv37t4m8LbmsFVdwiTmYpw5_XaR01PLDuTB5T7bNJd1maLdFXvQam-z6Ot6uH8HmWtuaz8QU484IqMAATgl9UgRvQp3vsGIQN51NAAKwdlpwj6OitISmc8Xw5g3Ow:1pXOTL:02xWS64tG_ABlbp8msu52jMSMNbgsXq9-SpQLR8bURc",
"expire_date": "2023-03-15T15:34:27.895Z"
}
},
{
"model": "sessions.session",
"pk": "ic4rcr36vkoymwaw6p322bjqlryvq2jd",
......@@ -1216,6 +1224,25 @@
"deleted_frames": "[]"
}
},
{
"model": "engine.data",
"pk": 17,
"fields": {
"chunk_size": 72,
"size": 2,
"image_quality": 70,
"start_frame": 0,
"stop_frame": 1,
"frame_filter": "",
"compressed_chunk_type": "imageset",
"original_chunk_type": "imageset",
"storage_method": "cache",
"storage": "local",
"cloud_storage": null,
"sorting_method": "lexicographical",
"deleted_frames": "[]"
}
},
{
"model": "engine.video",
"pk": 1,
......@@ -2314,6 +2341,28 @@
"height": 483
}
},
{
"model": "engine.image",
"pk": 451,
"fields": {
"data": 17,
"path": "12.png",
"frame": 0,
"width": 607,
"height": 668
}
},
{
"model": "engine.image",
"pk": 452,
"fields": {
"data": 17,
"path": "13.png",
"frame": 1,
"width": 483,
"height": 483
}
},
{
"model": "engine.project",
"pk": 1,
......@@ -2488,6 +2537,24 @@
"target_storage": 20
}
},
{
"model": "engine.project",
"pk": 11,
"fields": {
"name": "project7",
"owner": [
"admin1"
],
"assignee": null,
"bug_tracker": "",
"created_date": "2023-03-01T15:36:11.840Z",
"updated_date": "2023-03-01T15:36:37.812Z",
"status": "annotation",
"organization": 2,
"source_storage": 21,
"target_storage": 22
}
},
{
"model": "engine.task",
"pk": 2,
......@@ -2804,6 +2871,31 @@
"target_storage": null
}
},
{
"model": "engine.task",
"pk": 18,
"fields": {
"project": 11,
"name": "task in project7",
"mode": "annotation",
"owner": [
"admin1"
],
"assignee": null,
"bug_tracker": "",
"created_date": "2023-03-01T15:36:26.668Z",
"updated_date": "2023-03-01T15:36:37.897Z",
"overlap": 0,
"segment_size": 2,
"status": "annotation",
"data": 17,
"dimension": "2d",
"subset": "",
"organization": 2,
"source_storage": 23,
"target_storage": 24
}
},
{
"model": "engine.clientfile",
"pk": 131,
......@@ -3564,6 +3656,22 @@
"file": "/home/django/data/data/14/raw/test_video_1.mp4"
}
},
{
"model": "engine.clientfile",
"pk": 443,
"fields": {
"data": 17,
"file": "/home/django/data/data/17/raw/12.png"
}
},
{
"model": "engine.clientfile",
"pk": 444,
"fields": {
"data": 17,
"file": "/home/django/data/data/17/raw/13.png"
}
},
{
"model": "engine.relatedfile",
"pk": 1,
......@@ -3699,6 +3807,15 @@
"stop_frame": 4
}
},
{
"model": "engine.segment",
"pk": 22,
"fields": {
"task": 18,
"start_frame": 0,
"stop_frame": 1
}
},
{
"model": "engine.job",
"pk": 2,
......@@ -3877,6 +3994,18 @@
"state": "new"
}
},
{
"model": "engine.job",
"pk": 22,
"fields": {
"segment": 22,
"assignee": null,
"updated_date": "2023-03-01T15:36:38.114Z",
"status": "annotation",
"stage": "annotation",
"state": "in progress"
}
},
{
"model": "engine.label",
"pk": 3,
......@@ -4333,6 +4462,66 @@
"parent": 40
}
},
{
"model": "engine.label",
"pk": 46,
"fields": {
"task": null,
"project": 11,
"name": "skeleton 1",
"color": "#6fbee4",
"type": "skeleton",
"parent": null
}
},
{
"model": "engine.label",
"pk": 47,
"fields": {
"task": null,
"project": 11,
"name": "label 1",
"color": "#af2382",
"type": "points",
"parent": 46
}
},
{
"model": "engine.label",
"pk": 48,
"fields": {
"task": null,
"project": 11,
"name": "label with multiple spaces in the name",
"color": "#6b57d7",
"type": "points",
"parent": 46
}
},
{
"model": "engine.label",
"pk": 49,
"fields": {
"task": null,
"project": 11,
"name": "label 3",
"color": "#082245",
"type": "points",
"parent": 46
}
},
{
"model": "engine.label",
"pk": 50,
"fields": {
"task": null,
"project": 11,
"name": "4",
"color": "#4a649f",
"type": "points",
"parent": 46
}
},
{
"model": "engine.skeleton",
"pk": 1,
......@@ -4357,6 +4546,14 @@
"svg": "<line x1=\"33.80753707885742\" y1=\"62.16216278076172\" x2=\"57.11834716796875\" y2=\"47.635135650634766\" stroke=\"black\" data-type=\"edge\" data-node-from=\"4\" stroke-width=\"0.5\" data-node-to=\"3\"></line><line x1=\"23.334564208984375\" y1=\"48.47972869873047\" x2=\"33.80753707885742\" y2=\"62.16216278076172\" stroke=\"black\" data-type=\"edge\" data-node-from=\"5\" stroke-width=\"0.5\" data-node-to=\"4\"></line><line x1=\"24.34807777404785\" y1=\"25.675676345825195\" x2=\"51.54402542114258\" y2=\"27.533782958984375\" 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=\"24.34807777404785\" cy=\"25.675676345825195\" stroke-width=\"0.1\" data-type=\"element node\" data-element-id=\"1\" data-node-id=\"1\" data-label-id=\"41\"></circle><circle r=\"1.5\" stroke=\"black\" fill=\"#b3b3b3\" cx=\"51.54402542114258\" cy=\"27.533782958984375\" stroke-width=\"0.1\" data-type=\"element node\" data-element-id=\"2\" data-node-id=\"2\" data-label-id=\"42\"></circle><circle r=\"1.5\" stroke=\"black\" fill=\"#b3b3b3\" cx=\"57.11834716796875\" cy=\"47.635135650634766\" stroke-width=\"0.1\" data-type=\"element node\" data-element-id=\"3\" data-node-id=\"3\" data-label-id=\"43\"></circle><circle r=\"1.5\" stroke=\"black\" fill=\"#b3b3b3\" cx=\"33.80753707885742\" cy=\"62.16216278076172\" stroke-width=\"0.1\" data-type=\"element node\" data-element-id=\"4\" data-node-id=\"4\" data-label-id=\"44\"></circle><circle r=\"1.5\" stroke=\"black\" fill=\"#b3b3b3\" cx=\"23.334564208984375\" cy=\"48.47972869873047\" stroke-width=\"0.1\" data-type=\"element node\" data-element-id=\"5\" data-node-id=\"5\" data-label-id=\"45\"></circle>"
}
},
{
"model": "engine.skeleton",
"pk": 4,
"fields": {
"root": 46,
"svg": "<line x1=\"55.60200500488281\" y1=\"21.477842330932617\" x2=\"28.344482421875\" y2=\"55.089881896972656\" stroke=\"black\" data-type=\"edge\" data-node-from=\"3\" stroke-width=\"0.5\" data-node-to=\"2\"></line><line x1=\"73.16053771972656\" y1=\"46.059783935546875\" x2=\"55.60200500488281\" y2=\"21.477842330932617\" stroke=\"black\" data-type=\"edge\" data-node-from=\"4\" stroke-width=\"0.5\" data-node-to=\"3\"></line><line x1=\"16.806020736694336\" y1=\"24.822324752807617\" x2=\"73.16053771972656\" y2=\"46.059783935546875\" stroke=\"black\" data-type=\"edge\" data-node-from=\"1\" stroke-width=\"0.5\" data-node-to=\"4\"></line><circle r=\"1.5\" stroke=\"black\" fill=\"#b3b3b3\" cx=\"16.806020736694336\" cy=\"24.822324752807617\" stroke-width=\"0.1\" data-type=\"element node\" data-element-id=\"1\" data-node-id=\"1\" data-label-id=\"47\"></circle><circle r=\"1.5\" stroke=\"black\" fill=\"#b3b3b3\" cx=\"28.344482421875\" cy=\"55.089881896972656\" stroke-width=\"0.1\" data-type=\"element node\" data-element-id=\"2\" data-node-id=\"2\" data-label-id=\"48\"></circle><circle r=\"1.5\" stroke=\"black\" fill=\"#b3b3b3\" cx=\"55.60200500488281\" cy=\"21.477842330932617\" stroke-width=\"0.1\" data-type=\"element node\" data-element-id=\"3\" data-node-id=\"3\" data-label-id=\"49\"></circle><circle r=\"1.5\" stroke=\"black\" fill=\"#b3b3b3\" cx=\"73.16053771972656\" cy=\"46.059783935546875\" stroke-width=\"0.1\" data-type=\"element node\" data-element-id=\"4\" data-node-id=\"4\" data-label-id=\"50\"></circle>"
}
},
{
"model": "engine.attributespec",
"pk": 1,
......@@ -4875,6 +5072,96 @@
"parent": null
}
},
{
"model": "engine.labeledshape",
"pk": 49,
"fields": {
"job": 22,
"label": 46,
"frame": 0,
"group": 0,
"source": "manual",
"type": "skeleton",
"occluded": false,
"outside": false,
"z_order": 0,
"points": "[]",
"rotation": 0.0,
"parent": null
}
},
{
"model": "engine.labeledshape",
"pk": 50,
"fields": {
"job": 22,
"label": 47,
"frame": 0,
"group": 0,
"source": "manual",
"type": "points",
"occluded": false,
"outside": false,
"z_order": 0,
"points": "[136.46993006993034, 138.72697241590762]",
"rotation": 0.0,
"parent": 49
}
},
{
"model": "engine.labeledshape",
"pk": 51,
"fields": {
"job": 22,
"label": 48,
"frame": 0,
"group": 0,
"source": "manual",
"type": "points",
"occluded": false,
"outside": false,
"z_order": 0,
"points": "[192.9001336620433, 421.9659673659692]",
"rotation": 0.0,
"parent": 49
}
},
{
"model": "engine.labeledshape",
"pk": 52,
"fields": {
"job": 22,
"label": 49,
"frame": 0,
"group": 0,
"source": "manual",
"type": "points",
"occluded": false,
"outside": false,
"z_order": 0,
"points": "[326.2062528608664, 107.42983682983868]",
"rotation": 0.0,
"parent": 49
}
},
{
"model": "engine.labeledshape",
"pk": 53,
"fields": {
"job": 22,
"label": 50,
"frame": 0,
"group": 0,
"source": "manual",
"type": "points",
"occluded": false,
"outside": false,
"z_order": 0,
"points": "[412.07832167832197, 337.46374412038085]",
"rotation": 0.0,
"parent": 49
}
},
{
"model": "engine.labeledshapeattributeval",
"pk": 1,
......@@ -5707,6 +5994,38 @@
"cloud_storage_id": null
}
},
{
"model": "engine.storage",
"pk": 21,
"fields": {
"location": "local",
"cloud_storage_id": null
}
},
{
"model": "engine.storage",
"pk": 22,
"fields": {
"location": "local",
"cloud_storage_id": null
}
},
{
"model": "engine.storage",
"pk": 23,
"fields": {
"location": "local",
"cloud_storage_id": null
}
},
{
"model": "engine.storage",
"pk": 24,
"fields": {
"location": "local",
"cloud_storage_id": null
}
},
{
"model": "webhooks.webhook",
"pk": 1,
......
{
"count": 14,
"count": 15,
"next": null,
"previous": null,
"results": [
{
"assignee": null,
"bug_tracker": "",
"data_chunk_size": 72,
"data_compressed_chunk_type": "imageset",
"dimension": "2d",
"id": 22,
"issues": {
"count": 0,
"url": "http://localhost:8080/api/issues?job_id=22"
},
"labels": {
"count": 1,
"url": "http://localhost:8080/api/labels?job_id=22"
},
"mode": "annotation",
"project_id": 11,
"stage": "annotation",
"start_frame": 0,
"state": "in progress",
"status": "annotation",
"stop_frame": 1,
"task_id": 18,
"updated_date": "2023-03-01T15:36:38.114000Z",
"url": "http://localhost:8080/api/jobs/22"
},
{
"assignee": null,
"bug_tracker": null,
......
{
"count": 26,
"count": 27,
"next": null,
"previous": null,
"results": [
......@@ -449,6 +449,51 @@
"svg": "<line x1=\"33.80753707885742\" y1=\"62.16216278076172\" x2=\"57.11834716796875\" y2=\"47.635135650634766\" stroke=\"black\" data-type=\"edge\" data-node-from=\"4\" stroke-width=\"0.5\" data-node-to=\"3\"></line><line x1=\"23.334564208984375\" y1=\"48.47972869873047\" x2=\"33.80753707885742\" y2=\"62.16216278076172\" stroke=\"black\" data-type=\"edge\" data-node-from=\"5\" stroke-width=\"0.5\" data-node-to=\"4\"></line><line x1=\"24.34807777404785\" y1=\"25.675676345825195\" x2=\"51.54402542114258\" y2=\"27.533782958984375\" 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=\"24.34807777404785\" cy=\"25.675676345825195\" stroke-width=\"0.1\" data-type=\"element node\" data-element-id=\"1\" data-node-id=\"1\" data-label-id=\"41\"></circle><circle r=\"1.5\" stroke=\"black\" fill=\"#b3b3b3\" cx=\"51.54402542114258\" cy=\"27.533782958984375\" stroke-width=\"0.1\" data-type=\"element node\" data-element-id=\"2\" data-node-id=\"2\" data-label-id=\"42\"></circle><circle r=\"1.5\" stroke=\"black\" fill=\"#b3b3b3\" cx=\"57.11834716796875\" cy=\"47.635135650634766\" stroke-width=\"0.1\" data-type=\"element node\" data-element-id=\"3\" data-node-id=\"3\" data-label-id=\"43\"></circle><circle r=\"1.5\" stroke=\"black\" fill=\"#b3b3b3\" cx=\"33.80753707885742\" cy=\"62.16216278076172\" stroke-width=\"0.1\" data-type=\"element node\" data-element-id=\"4\" data-node-id=\"4\" data-label-id=\"44\"></circle><circle r=\"1.5\" stroke=\"black\" fill=\"#b3b3b3\" cx=\"23.334564208984375\" cy=\"48.47972869873047\" stroke-width=\"0.1\" data-type=\"element node\" data-element-id=\"5\" data-node-id=\"5\" data-label-id=\"45\"></circle>",
"task_id": 17,
"type": "skeleton"
},
{
"attributes": [],
"color": "#6fbee4",
"has_parent": false,
"id": 46,
"name": "skeleton 1",
"parent_id": null,
"project_id": 11,
"sublabels": [
{
"attributes": [],
"color": "#af2382",
"has_parent": true,
"id": 47,
"name": "label 1",
"type": "points"
},
{
"attributes": [],
"color": "#6b57d7",
"has_parent": true,
"id": 48,
"name": "label with multiple spaces in the name",
"type": "points"
},
{
"attributes": [],
"color": "#082245",
"has_parent": true,
"id": 49,
"name": "label 3",
"type": "points"
},
{
"attributes": [],
"color": "#4a649f",
"has_parent": true,
"id": 50,
"name": "4",
"type": "points"
}
],
"svg": "<line x1=\"55.60200500488281\" y1=\"21.477842330932617\" x2=\"28.344482421875\" y2=\"55.089881896972656\" stroke=\"black\" data-type=\"edge\" data-node-from=\"3\" stroke-width=\"0.5\" data-node-to=\"2\"></line><line x1=\"73.16053771972656\" y1=\"46.059783935546875\" x2=\"55.60200500488281\" y2=\"21.477842330932617\" stroke=\"black\" data-type=\"edge\" data-node-from=\"4\" stroke-width=\"0.5\" data-node-to=\"3\"></line><line x1=\"16.806020736694336\" y1=\"24.822324752807617\" x2=\"73.16053771972656\" y2=\"46.059783935546875\" stroke=\"black\" data-type=\"edge\" data-node-from=\"1\" stroke-width=\"0.5\" data-node-to=\"4\"></line><circle r=\"1.5\" stroke=\"black\" fill=\"#b3b3b3\" cx=\"16.806020736694336\" cy=\"24.822324752807617\" stroke-width=\"0.1\" data-type=\"element node\" data-element-id=\"1\" data-node-id=\"1\" data-label-id=\"47\"></circle><circle r=\"1.5\" stroke=\"black\" fill=\"#b3b3b3\" cx=\"28.344482421875\" cy=\"55.089881896972656\" stroke-width=\"0.1\" data-type=\"element node\" data-element-id=\"2\" data-node-id=\"2\" data-label-id=\"48\"></circle><circle r=\"1.5\" stroke=\"black\" fill=\"#b3b3b3\" cx=\"55.60200500488281\" cy=\"21.477842330932617\" stroke-width=\"0.1\" data-type=\"element node\" data-element-id=\"3\" data-node-id=\"3\" data-label-id=\"49\"></circle><circle r=\"1.5\" stroke=\"black\" fill=\"#b3b3b3\" cx=\"73.16053771972656\" cy=\"46.059783935546875\" stroke-width=\"0.1\" data-type=\"element node\" data-element-id=\"4\" data-node-id=\"4\" data-label-id=\"50\"></circle>",
"type": "skeleton"
}
]
}
\ No newline at end of file
{
"count": 9,
"count": 10,
"next": null,
"previous": null,
"results": [
{
"assignee": null,
"bug_tracker": "",
"created_date": "2023-03-01T15:36:11.840000Z",
"dimension": "2d",
"id": 11,
"labels": {
"count": 1,
"url": "http://localhost:8080/api/labels?project_id=11"
},
"name": "project7",
"organization": 2,
"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": 21,
"location": "local"
},
"status": "annotation",
"target_storage": {
"cloud_storage_id": null,
"id": 22,
"location": "local"
},
"task_subsets": [],
"tasks": {
"count": 1,
"url": "http://localhost:8080/api/tasks?project_id=11"
},
"updated_date": "2023-03-01T15:36:37.812000Z",
"url": "http://localhost:8080/api/projects/11"
},
{
"assignee": {
"first_name": "Worker",
......
{
"count": 12,
"count": 13,
"next": null,
"previous": null,
"results": [
{
"assignee": null,
"bug_tracker": "",
"created_date": "2023-03-01T15:36:26.668000Z",
"data": 17,
"data_chunk_size": 72,
"data_compressed_chunk_type": "imageset",
"data_original_chunk_type": "imageset",
"dimension": "2d",
"id": 18,
"image_quality": 70,
"jobs": {
"completed": 0,
"count": 1,
"url": "http://localhost:8080/api/jobs?task_id=18"
},
"labels": {
"count": 1,
"url": "http://localhost:8080/api/labels?task_id=18"
},
"mode": "annotation",
"name": "task in project7",
"organization": 2,
"overlap": 0,
"owner": {
"first_name": "Admin",
"id": 1,
"last_name": "First",
"url": "http://localhost:8080/api/users/1",
"username": "admin1"
},
"project_id": 11,
"segment_size": 2,
"size": 2,
"source_storage": {
"cloud_storage_id": null,
"id": 23,
"location": "local"
},
"status": "annotation",
"subset": "",
"target_storage": {
"cloud_storage_id": null,
"id": 24,
"location": "local"
},
"updated_date": "2023-03-01T15:36:37.897000Z",
"url": "http://localhost:8080/api/tasks/18"
},
{
"assignee": {
"first_name": "User",
......
......@@ -310,7 +310,7 @@
"is_active": true,
"is_staff": true,
"is_superuser": true,
"last_login": "2022-12-05T07:46:24.795000Z",
"last_login": "2023-03-01T15:34:27.878000Z",
"last_name": "First",
"url": "http://localhost:8080/api/users/1",
"username": "admin1"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册