cvat
cvat copied to clipboard
Skeleton annotation task: can't export dataset
My actions before raising this issue
- [X] Read/searched the docs
- [X] Searched past issues
Without skeletal annotation (or only bbox), I can't succesfully export the data.
Once I annotated the task, upon export as 'COCO Keypoints 1.1' I have the following error:

Expected Behaviour
The annotation and images are exported.
Current Behaviour
Can't export dataset with skeletal anntotation
Steps to Reproduce (for bugs)
- Upload data to create a task
- Annotate a skeletal track
- Export the dataset
Your Environment
- Git hash commit (
git log -1): 46b88c11ab2bbb4989365899196bf4157ee94b90 - Docker version
docker version(e.g. Docker 17.0.05): 20.10.21 - Are you using Docker Swarm or Kubernetes? No
- Operating System and version (e.g. Linux, Windows, MacOS): Ubuntu 22.04
- Other diagnostic information / logs: The way I defined the annotations in the project:
[
{
"name": "person",
"id": 22,
"color": "#c06060",
"type": "any",
"attributes": []
},
{
"name": "pose",
"id": 66,
"color": "#1446c2",
"type": "skeleton",
"sublabels": [
{
"name": "head",
"attributes": [],
"type": "points",
"color": "#d12345",
"id": 67
},
{
"name": "l_shoulder",
"attributes": [],
"type": "points",
"color": "#350dea",
"id": 68
},
{
"name": "l_elbow",
"attributes": [],
"type": "points",
"color": "#479ffe",
"id": 69
},
{
"name": "l_hand",
"attributes": [],
"type": "points",
"color": "#4a649f",
"id": 70
},
{
"name": "r_shoulder",
"attributes": [],
"type": "points",
"color": "#478144",
"id": 71
},
{
"name": "r_elbow",
"attributes": [],
"type": "points",
"color": "#57236b",
"id": 72
},
{
"name": "r_hand",
"attributes": [],
"type": "points",
"color": "#1cdda5",
"id": 73
}
],
"svg": "<line x1="68.81401824951172" y1="26.254180908203125" x2="46.40599060058594" y2="12.374582290649414" stroke="black" data-type="edge" data-node-from="5" stroke-width="0.5" data-node-to="1"></line><line x1="77.8441162109375" y1="43.4782600402832" x2="66.138427734375" y2="65.0501708984375" stroke="black" data-type="edge" data-node-from="6" stroke-width="0.5" data-node-to="7"></line><line x1="68.81401824951172" y1="26.254180908203125" x2="77.8441162109375" y2="43.4782600402832" stroke="black" data-type="edge" data-node-from="5" stroke-width="0.5" data-node-to="6"></line><line x1="23.997961044311523" y1="28.595317840576172" x2="68.81401824951172" y2="26.254180908203125" stroke="black" data-type="edge" data-node-from="2" stroke-width="0.5" data-node-to="5"></line><line x1="23.997961044311523" y1="28.595317840576172" x2="46.40599060058594" y2="12.374582290649414" stroke="black" data-type="edge" data-node-from="2" stroke-width="0.5" data-node-to="1"></line><line x1="12.292276382446289" y1="47.15719223022461" x2="24.666858673095703" y2="65.88628387451172" stroke="black" data-type="edge" data-node-from="3" stroke-width="0.5" data-node-to="4"></line><line x1="23.997961044311523" y1="28.595317840576172" x2="12.292276382446289" y2="47.15719223022461" stroke="black" data-type="edge" data-node-from="2" stroke-width="0.5" data-node-to="3"></line><circle r="1.5" stroke="black" fill="#b3b3b3" cx="46.40599060058594" cy="12.374582290649414" stroke-width="0.1" data-type="element node" data-element-id="1" data-node-id="1" data-label-id="67"></circle><circle r="1.5" stroke="black" fill="#b3b3b3" cx="23.997961044311523" cy="28.595317840576172" stroke-width="0.1" data-type="element node" data-element-id="2" data-node-id="2" data-label-id="68"></circle><circle r="1.5" stroke="black" fill="#b3b3b3" cx="12.292276382446289" cy="47.15719223022461" stroke-width="0.1" data-type="element node" data-element-id="3" data-node-id="3" data-label-id="69"></circle><circle r="1.5" stroke="black" fill="#b3b3b3" cx="24.666858673095703" cy="65.88628387451172" stroke-width="0.1" data-type="element node" data-element-id="4" data-node-id="4" data-label-id="70"></circle><circle r="1.5" stroke="black" fill="#b3b3b3" cx="68.81401824951172" cy="26.254180908203125" stroke-width="0.1" data-type="element node" data-element-id="5" data-node-id="5" data-label-id="71"></circle><circle r="1.5" stroke="black" fill="#b3b3b3" cx="77.8441162109375" cy="43.4782600402832" stroke-width="0.1" data-type="element node" data-element-id="6" data-node-id="6" data-label-id="72"></circle><circle r="1.5" stroke="black" fill="#b3b3b3" cx="66.138427734375" cy="65.0501708984375" stroke-width="0.1" data-type="element node" data-element-id="7" data-node-id="7" data-label-id="73"></circle>",
"attributes": [
{
"id": 3,
"name": "track_id",
"input_type": "select",
"mutable": false,
"values": [
"1",
"2",
"3",
"4",
"5",
"6",
"7",
"8",
"9",
"10"
],
"default_value": "1"
}
]
}
]

@ConsciousML
Please, provide docker logs cvat_server
Hi @bsekachev,
Here it is:
2022-11-08 13:54:04,112 DEBG 'runserver' stderr output:
[Tue Nov 08 13:54:04.112792 2022] [wsgi:error] [pid 68:tid 140604987524864] [remote 192.168.224.4:50008] [2022-11-08 13:54:04,112] INFO cvat.server.task_285: get repository request
2022-11-08 13:54:04,113 DEBG 'runserver' stderr output:
[Tue Nov 08 13:54:04.113083 2022] [wsgi:error] [pid 68:tid 140604987524864] [remote 192.168.224.4:50008] INFO:cvat.server.task_285:get repository request
2022-11-08 13:54:04,145 DEBG 'runserver' stderr output:
[Tue Nov 08 13:54:04.145671 2022] [wsgi:error] [pid 68:tid 140604970739456] [remote 192.168.224.4:50006] INFO:cvat.client.task_285:{"job_id":240,"task_id":285,"client_id":477228,"name":"Load job","time":"2022-11-08T13:53:59.327000Z","payload":{"duration":881,"frame count":71,"track count":8,"object count":479,"box count":1,"polygon count":0,"polyline count":0,"points count":7,"cuboids count":0,"tag count":0},"is_active":true,"username":"admin"}
2022-11-08 13:54:04,146 DEBG 'runserver' stderr output:
[Tue Nov 08 13:54:04.146084 2022] [wsgi:error] [pid 68:tid 140604970739456] [remote 192.168.224.4:50006] INFO:cvat.client.task_285:{"job_id":240,"task_id":285,"client_id":477228,"name":"Fit image","time":"2022-11-08T13:54:00.241000Z","payload":{},"is_active":true,"username":"admin"}
2022-11-08 13:54:04,146 DEBG 'runserver' stderr output:
[Tue Nov 08 13:54:04.146600 2022] [wsgi:error] [pid 68:tid 140604970739456] [remote 192.168.224.4:50006] INFO:cvat.client:{"client_id":477228,"name":"Send user activity","time":"2022-11-08T13:54:04.067000Z","payload":{"working_time":3507},"is_active":true,"username":"admin"}
2022-11-08 13:54:25,736 DEBG 'runserver' stderr output:
[Tue Nov 08 13:54:25.736578 2022] [wsgi:error] [pid 68:tid 140604987524864] [remote 192.168.224.4:50102] [2022-11-08 13:54:25,736] ERROR django.request: Internal Server Error: /api/tasks/285/dataset
2022-11-08 13:54:25,737 DEBG 'runserver' stderr output:
[Tue Nov 08 13:54:25.736681 2022] [wsgi:error] [pid 68:tid 140604987524864] [remote 192.168.224.4:50102] ERROR:django.request:Internal Server Error: /api/tasks/285/dataset
@ConsciousML
Hm, what about docker logs cvat_worker_default?
@bsekachev
2022-11-08 13:54:24,611 DEBG 'rqworker_default_1' stderr output:
DEBUG:rq.worker:Handling failed execution of job /api/task/285/annotations/COCO Keypoints 1.0
2022-11-08 13:54:24,612 DEBG 'rqworker_default_1' stderr output:
ERROR:rq.worker:Traceback (most recent call last):
File "/opt/venv/lib/python3.8/site-packages/datumaro/plugins/coco_format/converter.py", line 765, in apply
task_conv.save_annotations(item)
File "/opt/venv/lib/python3.8/site-packages/datumaro/plugins/coco_format/converter.py", line 388, in save_annotations
elem.update(self.convert_points_object(skeleton))
File "/opt/venv/lib/python3.8/site-packages/datumaro/plugins/coco_format/converter.py", line 418, in convert_points_object
elements[self._point_label_to_position[element.label]] = element
IndexError: list assignment index out of range
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/opt/venv/lib/python3.8/site-packages/rq/worker.py", line 936, in perform_job
rv = job.perform()
File "/opt/venv/lib/python3.8/site-packages/rq/job.py", line 684, in perform
self._result = self._execute()
File "/opt/venv/lib/python3.8/site-packages/rq/job.py", line 690, in _execute
return self.func(*self.args, **self.kwargs)
File "/home/django/cvat/apps/dataset_manager/views.py", line 114, in export_task_as_dataset
return export(dst_format, task_id=task_id, server_url=server_url, save_images=True)
File "/home/django/cvat/apps/dataset_manager/views.py", line 81, in export
export_fn(db_instance.id, temp_file, dst_format,
File "/home/django/cvat/apps/dataset_manager/task.py", line 766, in export_task
task.export(f, exporter, host=server_url, save_images=save_images)
File "/home/django/cvat/apps/dataset_manager/task.py", line 648, in export
exporter(dst_file, task_data, **options)
File "/home/django/cvat/apps/dataset_manager/formats/registry.py", line 37, in __call__
f_or_cls(*args, **kwargs)
File "/home/django/cvat/apps/dataset_manager/formats/coco.py", line 46, in _export
dataset.export(temp_dir, 'coco_person_keypoints', save_images=save_images,
File "/opt/venv/lib/python3.8/site-packages/datumaro/util/scope.py", line 158, in wrapped_func
ret_val = func(*args, **kwargs)
File "/opt/venv/lib/python3.8/site-packages/datumaro/components/dataset.py", line 1111, in export
raise e.__cause__
datumaro.components.errors.AnnotationExportError: Failed to export item ('frame_000021', 'default')
Traceback (most recent call last):
File "/opt/venv/lib/python3.8/site-packages/datumaro/plugins/coco_format/converter.py", line 765, in apply
task_conv.save_annotations(item)
File "/opt/venv/lib/python3.8/site-packages/datumaro/plugins/coco_format/converter.py", line 388, in save_annotations
elem.update(self.convert_points_object(skeleton))
File "/opt/venv/lib/python3.8/site-packages/datumaro/plugins/coco_format/converter.py", line 418, in convert_points_object
elements[self._point_label_to_position[element.label]] = element
IndexError: list assignment index out of range
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/opt/venv/lib/python3.8/site-packages/rq/worker.py", line 936, in perform_job
rv = job.perform()
File "/opt/venv/lib/python3.8/site-packages/rq/job.py", line 684, in perform
self._result = self._execute()
File "/opt/venv/lib/python3.8/site-packages/rq/job.py", line 690, in _execute
return self.func(*self.args, **self.kwargs)
File "/home/django/cvat/apps/dataset_manager/views.py", line 114, in export_task_as_dataset
return export(dst_format, task_id=task_id, server_url=server_url, save_images=True)
File "/home/django/cvat/apps/dataset_manager/views.py", line 81, in export
export_fn(db_instance.id, temp_file, dst_format,
File "/home/django/cvat/apps/dataset_manager/task.py", line 766, in export_task
task.export(f, exporter, host=server_url, save_images=save_images)
File "/home/django/cvat/apps/dataset_manager/task.py", line 648, in export
exporter(dst_file, task_data, **options)
File "/home/django/cvat/apps/dataset_manager/formats/registry.py", line 37, in __call__
f_or_cls(*args, **kwargs)
File "/home/django/cvat/apps/dataset_manager/formats/coco.py", line 46, in _export
dataset.export(temp_dir, 'coco_person_keypoints', save_images=save_images,
File "/opt/venv/lib/python3.8/site-packages/datumaro/util/scope.py", line 158, in wrapped_func
ret_val = func(*args, **kwargs)
File "/opt/venv/lib/python3.8/site-packages/datumaro/components/dataset.py", line 1111, in export
raise e.__cause__
datumaro.components.errors.AnnotationExportError: Failed to export item ('frame_000021', 'default')
@yasakova-anastasia , could you check this problem?
@zhiltsov-max I have no issue when I export with the format 'CVAT for videos 1.1' with the 'Save Images Option'.
Whereas the issue happens with the 'COCO Keypoints 1.1' format.
Hi @bsekachev @zhiltsov-max,
Sorry to disturb. Would it be possible to have someone on this issue ?
It is a major problem for our team as we want to start delegating a skeleton annotation project with external annotators. We are stuck since we can't export the annotations.
Any workaround ? I could try to help, problem is I've never contributed in the CVAT code base.
I couldn't reproduce this.
@ConsciousML Would it be possible to create a small task that exhibits this problem, back it up, and attach the backup here?
I am also not able to export the annotation file for keypoint annotation from CVAT,
The issue that I am getting is.

Please help me solve this issue.
Hi, @AnandGajaria
Could you please provide more information?
- What format do you export annotations to?
- Please, provide git hash commit (
git log -1) anddocker logs cvat_worker_default
Thank you so much for the reply, @yasakova-anastasia
I am trying to export in COCO keypoint 1.0 Format.
The process that I am following is.
- Create a Task.
- Create a Skeleton using an image.
- Then use that skeleton on an Image I want to annotate. -Adjust the annotation. -Save and Export it. -So while Exporting I am getting the issue.
Thank you so much for the help.
@AnandGajaria, I think this problem has already been fixed. Could you tell me what version of CVAT you are using?
I am also not able to export the annotation file for keypoint annotation from CVAT,
The issue that I am getting is.
Please help me solve this issue.
I got same error. I am using dev version.
Is there any updated..?
@DoHoNi , @AnandGajaria , could you please backup your task and share with us the archive?
I get the same error using the web application and exporting skeleton annotation to COCO keypoints. In addition, when exporting using YOLO 1.1 I get empty .txt files. Do you know if there is a work around to these problems?
I am having the same problem while exporting the data for Skeleton Keypoints