Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check the order of frames during import of a dataset in MOT format #4968

Open
xiongda777 opened this issue Sep 19, 2022 · 6 comments
Open

Check the order of frames during import of a dataset in MOT format #4968

xiongda777 opened this issue Sep 19, 2022 · 6 comments
Labels
bug Something isn't working dataset

Comments

@xiongda777
Copy link

My actions before raising this issue

Expected Behaviour

export xml file of project

Current Behaviour

Error: Request failed with status code 500. "AssertionError\n".

Possible Solution

dont know

Steps to Reproduce (for bugs)

Context

Your Environment

  • Git hash commit (git log -1):
  • Docker version docker version (e.g. Docker 17.0.05):
  • Are you using Docker Swarm or Kubernetes?
  • Operating System and version (e.g. Linux, Windows, MacOS):
  • Code example or link to GitHub repo or gist to reproduce problem:
  • Other diagnostic information / logs:
    Logs from `cvat` container

I get docker logs cvat as follow:

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 110, in export_project_annotations
return export(dst_format, project_id=project_id, server_url=server_url, save_images=False)
File "/home/django/cvat/apps/dataset_manager/views.py", line 74, in export
export_fn(db_instance.id, temp_file, dst_format,
File "/home/django/cvat/apps/dataset_manager/project.py", line 32, in export_project
project.export(f, exporter, host=server_url, save_images=save_images)
File "/home/django/cvat/apps/dataset_manager/project.py", line 130, in export
exporter(dst_file, project_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/cvat.py", line 1080, in _export_images
_export_project(dst_file, instance_data,
File "/home/django/cvat/apps/dataset_manager/formats/cvat.py", line 1057, in _export_project
dump_project_anno(f, project_data, anno_callback)
File "/home/django/cvat/apps/dataset_manager/formats/cvat.py", line 1024, in dump_project_anno
callback(dumper, project_data)
File "/home/django/cvat/apps/dataset_manager/formats/cvat.py", line 596, in dump_as_cvat_annotation
for frame_annotation in annotations.group_by_frame(include_empty=True):
File "/home/django/cvat/apps/dataset_manager/bindings.py", line 839, in group_by_frame
for shape in sorted(anno_manager.to_shapes(task.data.size),
File "/home/django/cvat/apps/dataset_manager/annotation.py", line 162, in to_shapes
return shapes + tracks.to_shapes(end_frame)
File "/home/django/cvat/apps/dataset_manager/annotation.py", line 364, in to_shapes
for shape in TrackManager.get_interpolated_shapes(track, 0, end_frame):
File "/home/django/cvat/apps/dataset_manager/annotation.py", line 725, in get_interpolated_shapes
assert shape["frame"] > curr_frame
AssertionError

I want to know AssertionError mean, and what is my problem?

@yasakova-anastasia yasakova-anastasia added the bug Something isn't working label Sep 19, 2022
@yasakova-anastasia yasakova-anastasia self-assigned this Sep 19, 2022
@nmanovic
Copy link
Contributor

@xiongda777 , which CVAT version are you using?

@bsekachev
Copy link
Member

assert shape["frame"] > curr_frame

Old problem we meet time to time, but were not able to reproduce so far ... :(

#500 #610 #1081 #2814 #3360

@CaoHoangTung
Copy link

For me, I encountered the error after importing the annotations (MOT1.1 format) with duplicated track ids in some frames. Importing was okay for the first time, but the error occurred when I tried to export the dataset.

There seems to be no validating mechanism for duplicated track ids while importing?

@zhiltsov-max
Copy link
Contributor

zhiltsov-max commented Nov 30, 2022

I was able to reproduce the problem using the following annotations in the MOT format. Right, there is no check on import for repeated frame ids in track shapes, so it is possible that some invalid tracks are in the DB. Export of such tracks fails.

mot_task_with_repeated_track_shapes.zip

@CaoHoangTung, could you please say if the duplications were for a reason or occasional? Do you see any chances for such duplications to be correct annotations?

@nmanovic nmanovic changed the title export project ,AssertionError! Check the order of frames during import of a dataset in MOT format Jan 5, 2023
@F10JM
Copy link

F10JM commented Jan 3, 2024

I have the same issue, but i didnt import in MOT format i imported in CVAT 1.1 format and when exporting i got this error:
Error: Request failed with status code 500. "AssertionError: 748 > 748. Track id: 2223761\n".

@zhiltsov-max
Copy link
Contributor

Related: #6779

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working dataset
Projects
None yet
Development

No branches or pull requests

7 participants