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

Fix 2827 #2890

Merged
merged 3 commits into from
Mar 3, 2021
Merged

Fix 2827 #2890

merged 3 commits into from
Mar 3, 2021

Conversation

zhiltsov-max
Copy link
Contributor

@zhiltsov-max zhiltsov-max commented Mar 1, 2021

Motivation and context

Fixes #2827

  • Added skipping of frames outside of the task boundaries in TaskData.group_by_frames

How has this been tested?

Unit tests

Checklist

License

  • I submit my code changes under the same MIT License that covers the project.
    Feel free to contact the maintainers if that's a concern.
  • I have updated the license header for each file (see an example below)
# Copyright (C) 2021 Intel Corporation
#
# SPDX-License-Identifier: MIT

@coveralls
Copy link

Coverage Status

Coverage increased (+0.1%) to 71.735% when pulling 0f6f8a6 on zm/fix-2827 into cc2b8ad on develop.

@@ -746,6 +746,10 @@ def interpolate(shape0, shape1):
curr_frame = shape["frame"]
prev_shape = shape

# keep at least 1 shape
if end_frame <= curr_frame:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we put the condition before iteration code (a bit changed):

if shape["frame"] >= end_frame:
    break

We probably do not need additional check in cvat/apps/dataset_manager/bindings.py. Right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if interpolation is the only source of this problem, so I'd better keep the check in bindings.py anyway. I wouldn't remove this check in the interpolation function above, because the code using this function definitely expects at least 1 frame in a track, so putting it before loop would break this convention.

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.

[Bug] The 'ValueError: Unknown internal frame' error at dump annotations.
3 participants