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

sort shapes in track before interpolating #499

Closed
wants to merge 1 commit into from

Conversation

alex9311
Copy link

My group is doing keypoint interpolation and we ran into a problem where half our tasks were failing to "Dump annotation" when the button on the cvat dashboard was used.

This was the error:

Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/rq/worker.py", line 812, in perform_job
    rv = job.perform()
  File "/usr/local/lib/python3.5/dist-packages/rq/job.py", line 588, in perform
    self._result = self._execute()
  File "/usr/local/lib/python3.5/dist-packages/rq/job.py", line 594, in _execute
    return self.func(*self.args, **self.kwargs)
  File "/home/django/cvat/apps/engine/annotation.py", line 121, in dump_task_data
    annotation.dump(file_path, scheme, host, query_params)
  File "/home/django/cvat/apps/engine/annotation.py", line 1412, in dump
    track, 0, db_task.size):
  File "/home/django/cvat/apps/engine/annotation.py", line 1118, in get_interpolated_shapes
    assert shape["frame"] > curr_frame
AssertionError

That is an assert in TrackManager.get_interpolated_shapes. The assert is in a loop where shapes of a track are being iterated through.

Somehow the shapes were arriving at that part of the code out of order. I know this was the issue because I made a 1-line change to sort track["shapes"] before the loop and our dumps started succeeding.

I'm sorry I dont have a repro. I suspect specific user activity causes the shapes to be stored out of order and they are not sorted upon retrieval? In any case, this code change is innocuous enough and should save future users some headache

@nmanovic
Copy link
Contributor

@alex9311 , thanks for the contribution. But I can accept your bug report and cannot accept the fix. It is a hack to resolve the issue. I believe there two bugs. One in client which sends the unordered data and one in our server which accepts such data. Thus need to fix it instead of the workaround. I will close the PR. We will look at the problem ASAP and fix it.

Submitted issue #500 . I believe we introduced the issue together with interpolation of keypoints. Need to check that and fix.

@nmanovic nmanovic closed this Jun 17, 2019
@alex9311
Copy link
Author

@nmanovic thanks for the response and submitting the issue. This hack is working to keep us going for now but I'll look for an official fix eventually :). Enjoy CVPR!

@bsekachev
Copy link
Member

bsekachev commented Jun 19, 2019

@alex9311
Hello, do tasks which can't be dumped have several segments?

@alex9311
Copy link
Author

alex9311 commented Aug 7, 2019

@alex9311
Hello, do tasks which can't be dumped have several segments?

The tasks that were failing to be dumped had several jobs. Each job had a different segment of the task's video

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants