Closed talmo closed 8 months ago
The recent modifications focus on enhancing the resilience and efficiency of frame handling in a video processing library. The first change ensures that the initial frame is always selected for processing, optimizing start-up times. The second adjustment introduces error handling for frame loading issues, improving the user experience by preventing abrupt interruptions during interactive prediction tasks. These changes collectively aim to streamline video analysis workflows.
File Path | Change Summary |
---|---|
.../nn/data/providers.py |
Modified to initialize frame processing at the first frame, enhancing efficiency. |
.../nn/inference.py |
Added exception handling for smoother interactive prediction and reduced error spam. |
🐇✨
In the code where frames do dance,
A rabbit hopped, took a glance.
With a tweak and a hop, errors we block,
Ensuring the video flows, without a shock.
So here's to smooth runs, in the code's sun,
For every frame loaded, a victory won.
🌟🐰
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Attention: Patch coverage is 8.00000%
with 23 lines
in your changes are missing coverage. Please review.
Project coverage is 73.31%. Comparing base (
60a441f
) to head (59d105f
). Report is 1 commits behind head on develop.
Files | Patch % | Lines |
---|---|---|
sleap/nn/inference.py | 4.16% | 23 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Description
This PR mitigates the longstanding seekability issue. See #1711 for context.
This PR does the simplest thing possible: handling this error by gracefully exiting inference. This should fix many use cases where the seeking error happens towards the end of the video due to inaccurate estimation of the true frame count.
Unfortunately, I don't have any small CI-friendly video files that can be used to write a test, but it's worked locally and the logic is fairly straightforward enough that it shouldn't introduce any weird behavior.
Types of changes
Does this address any currently open issues?
1711
Outside contributors checklist
Thank you for contributing to SLEAP!
:heart:
Summary by CodeRabbit