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 track interpolation in tasks with deleted frames #9059

Merged
merged 13 commits into from
Feb 7, 2025

Conversation

zhiltsov-max
Copy link
Contributor

Motivation and context

Follow-up for #8834.

If a task or a job contains deleted frames that contain track keyframes, these keyframes should be excluded from the interpolation. However, in jobs having specific frames included (e.g. GT jobs), deleted frames should not be confused with included frames during track interpolation. Deleted frames should affect existing shapes in tracks, while included frames should only filter the resulting annotations after interpolation. This PR implements this approach.

How has this been tested?

Checklist

  • I submit my changes into the develop branch
  • I have created a changelog fragment
  • I have updated the documentation accordingly
  • I have added tests to cover my changes
  • I have linked related issues (see GitHub docs)

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.

@zhiltsov-max zhiltsov-max changed the title Fix track interpolation in tasks with deleted frames [WIP] Fix track interpolation in tasks with deleted frames Feb 5, 2025
@codecov-commenter
Copy link

codecov-commenter commented Feb 5, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (develop@1872b51). Learn more about missing BASE report.
Report is 2 commits behind head on develop.

Additional details and impacted files
@@            Coverage Diff             @@
##             develop    #9059   +/-   ##
==========================================
  Coverage           ?   73.74%           
==========================================
  Files              ?      428           
  Lines              ?    44515           
  Branches           ?     3881           
==========================================
  Hits               ?    32828           
  Misses             ?    11687           
  Partials           ?        0           
Components Coverage Δ
cvat-ui 77.45% <ø> (?)
cvat-server 70.68% <100.00%> (?)

@zhiltsov-max zhiltsov-max changed the title [WIP] Fix track interpolation in tasks with deleted frames Fix track interpolation in tasks with deleted frames Feb 6, 2025
@nmanovic nmanovic requested review from Marishka17 and removed request for nmanovic February 7, 2025 09:18
cvat/apps/dataset_manager/annotation.py Outdated Show resolved Hide resolved
cvat/apps/dataset_manager/annotation.py Outdated Show resolved Hide resolved
@@ -1307,8 +1308,9 @@ def get_frame(task_id: int, idx: int) -> ProjectData.Frame:
anno_manager.to_shapes(
task.data.size,
included_frames=task_included_frames,
deleted_frames=set(f for t_id, f in self.deleted_frames if t_id == task.id),
Copy link
Contributor

Choose a reason for hiding this comment

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

why not task_data.deleted_frames.keys()?

Copy link
Contributor Author

@zhiltsov-max zhiltsov-max Feb 7, 2025

Choose a reason for hiding this comment

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

This is the same. But there is an extra check below, which can be removed now.

cvat/apps/dataset_manager/annotation.py Outdated Show resolved Hide resolved
cvat/apps/dataset_manager/tests/test_annotation.py Outdated Show resolved Hide resolved
Copy link

sonarqubecloud bot commented Feb 7, 2025

Quality Gate Failed Quality Gate failed

Failed conditions
19.9% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

@zhiltsov-max zhiltsov-max merged commit ca440a0 into develop Feb 7, 2025
33 of 34 checks passed
@zhiltsov-max zhiltsov-max deleted the zm/fix-ellipse-comparison branch February 7, 2025 13:24
@cvat-bot cvat-bot bot mentioned this pull request Feb 10, 2025
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.

3 participants