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

Video analysis on cropped videos: bug fixes for extract_outlier_frames and create_video_with_all_detections #2538

Merged
merged 2 commits into from
Mar 19, 2024

Conversation

n-poulsen
Copy link
Collaborator

When running video analysis with cropping, the predicted poses are stored in the cropped image space. To get the coordinates of the pose in the space of the full video, the data stored in the _metadata.pickle can be used.

The extract_outlier_frames and create_video_with_all_detections did not take these offsets into account, meaning the video with all detections had its keypoints shifted, as did the machine labels.

This PR fixes both of these issues.

As create_video_with_all_detections has a croppingargument, the behavior is set such that:

  1. If cropping is given as an argument, that value is used (overriding the value stored in the metadata)
  2. If cropping is not given then metadata["data"]["cropping"] and metadata["data"]["cropping_parameters"] are used

@n-poulsen n-poulsen self-assigned this Mar 13, 2024
Copy link
Member

@MMathisLab MMathisLab left a comment

Choose a reason for hiding this comment

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

Lgtm!

@MMathisLab MMathisLab merged commit 96b71fc into main Mar 19, 2024
6 of 8 checks passed
@MMathisLab MMathisLab deleted the niels/video_cropping_bugs branch June 5, 2024 09:25
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