Closed talmo closed 11 months ago
The update in the codebase involves a modification to the way maximum frame size is calculated in a video processing context. This change specifically addresses the handling of empty frames to ensure the calculation is robust. There were no changes to function signatures or other global elements, indicating a targeted fix without altering the API or system-wide data structures.
File(s) | Summary |
---|---|
sleap/io/video.py |
Modified the calculation of max_frame_size to better handle empty frames. |
🐇🎉 To frames once empty, a fix we bestow, In the code where the video streams flow. No signature changed, no structure dismayed, Just a rabbit's touch to the frames displayed. 🎬🌟
All modified and coverable lines are covered by tests :white_check_mark:
Comparison is base (
cb82d36
) 73.37% compared to head (de5556f
) 73.38%.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Description
In #1559, we switched up the format to use zero-padded, constant length byte strings for embedded PNG encoded images for .pkg.slp files.
Right now this throws an error when we export from labels that have videos without any labeled frames, as is common when generating splits or when there are only predictions in a given video (but not user labels).
This PR fixes that by checking for zero length videos during export.
Types of changes
Does this address any currently open issues?
[list open issues here]
Outside contributors checklist
Thank you for contributing to SLEAP!
:heart:
Summary by CodeRabbit