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

Test for interpolation issues after deleting keyframes #9031

Open
wants to merge 20 commits into
base: develop
Choose a base branch
from

Conversation

archibald1418
Copy link
Contributor

Regression test for 2 bugs that were fixed in #8951 and #8952
The fix dealt with incorrect frame interpolation when deleting keyframes
Also, opening the task afterwards could crash with application error

How has this been tested?

This consists of two test cases reflecting two different bugs + before() and beforeEach() hooks which unifies conditions before both cases.

Preparation

Before all tests:
  • Login
  • Create a zip archive with a dataset consisting of 5 frames
  • Create task from archive using UI
    (NB: headless.. commands only work with mounted_file_share which being regularly cleared in Helm CI)
  • Open task job and save jobID into a variable
  • Send headless request to cvat-core's JobsApI to create a rectangle track with 3 keyframes: 0, 2 and 4. After this, the rectangle moves clockwise along the image's perimeter (topLeft -> topCenter -> topRight -> centerRight -> bottomRight)

Before each test

  • Restore all frames using headless PATCH request to send deleted_frames: [] to /data/meta. This recovers frame deletions that were done under test. Wait for response
  • Reload the page to hydrate annotations that were added previously. Wait for GET to /data/meta which will load the created rectangle track onto the #cvat_canvas_background.
  • Save the job
  • Go to first frame to start the test

Case 1

This checks that the job can be opened without any crashes or error notification messages after deleting keyframes and saving the job. Interpolation is terminated and the tracked rectangle should not exist in the DOM

  • Flick through all frames and click 'Delete' on frames 0, 2, 4 (keyframes)
  • Save, reload the job. Error should not appear.
  • Object should not exist. Error notifications should not exist

Case 2

  • Go to frame 2
  • Delete frame 2. Confirm that frame 3 is open and that previous frame is frame 1
  • Remember shape positions on frames 1 and 3 (=interpolated positions)
  • Save the job, reload the job
  • Validate that the shapes are on the same positions as before the reload

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.

@archibald1418 archibald1418 changed the title Ov/test interpolation impossible Test for regression to interpolation issues after deleting keyframes Jan 30, 2025
@archibald1418 archibald1418 changed the title Test for regression to interpolation issues after deleting keyframes Test for interpolation issues after deleting keyframes Jan 30, 2025
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 73.44%. Comparing base (7484e4d) to head (5d3b18a).

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #9031   +/-   ##
========================================
  Coverage    73.43%   73.44%           
========================================
  Files          418      418           
  Lines        44299    44299           
  Branches      3870     3870           
========================================
+ Hits         32533    32535    +2     
+ Misses       11766    11764    -2     
Components Coverage Δ
cvat-ui 77.43% <ø> (+<0.01%) ⬆️
cvat-server 70.12% <ø> (ø)

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.

2 participants