cvat-ai / cvat

Annotate better with CVAT, the industry-leading data engine for machine learning. Used and trusted by teams at any scale, for data of any scale.
https://cvat.ai
MIT License
11.9k stars 2.9k forks source link

Skeleton annotation task: can't export dataset #5257

Closed ConsciousML closed 1 year ago

ConsciousML commented 1 year ago

My actions before raising this issue

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: image

Expected Behaviour

The annotation and images are exported.

Current Behaviour

Can't export dataset with skeletal anntotation

Steps to Reproduce (for bugs)

  1. Upload data to create a task
  2. Annotate a skeletal track
  3. Export the dataset

Your Environment

image

bsekachev commented 1 year ago

@ConsciousML

Please, provide docker logs cvat_server

ConsciousML commented 1 year ago

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
bsekachev commented 1 year ago

@ConsciousML

Hm, what about docker logs cvat_worker_default?

ConsciousML commented 1 year ago

@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')
zhiltsov-max commented 1 year ago

@yasakova-anastasia , could you check this problem?

ConsciousML commented 1 year ago

@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.

ConsciousML commented 1 year ago

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.

SpecLad commented 1 year ago

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?

AnandGajaria commented 1 year ago

I am also not able to export the annotation file for keypoint annotation from CVAT,

The issue that I am getting is.

photo_2022-11-25_16-05-18

Please help me solve this issue.

yasakova-anastasia commented 1 year ago

Hi, @AnandGajaria

Could you please provide more information?

  1. What format do you export annotations to?
  2. Please, provide git hash commit (git log -1) and docker logs cvat_worker_default
AnandGajaria commented 1 year ago

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.

Thank you so much for the help.

yasakova-anastasia commented 1 year ago

@AnandGajaria, I think this problem has already been fixed. Could you tell me what version of CVAT you are using?

DoHoNi commented 1 year ago

I am also not able to export the annotation file for keypoint annotation from CVAT,

The issue that I am getting is.

photo_2022-11-25_16-05-18

Please help me solve this issue.

I got same error. I am using dev version.

Is there any updated..?

nmanovic commented 1 year ago

@DoHoNi , @AnandGajaria , could you please backup your task and share with us the archive?

mikalbre commented 1 year ago

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?

sultanakhtar commented 1 year ago

I am having the same problem while exporting the data for Skeleton Keypoints