-
Notifications
You must be signed in to change notification settings - Fork 11
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
Add Labels.extract
, Labels.trim
and Video.save
#140
Conversation
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the 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? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #140 +/- ##
==========================================
+ Coverage 96.15% 96.21% +0.05%
==========================================
Files 17 17
Lines 2265 2327 +62
==========================================
+ Hits 2178 2239 +61
- Misses 87 88 +1 ☔ View full report in Codecov by Sentry. |
LabeledFrame.frame_idx
: Now always converted toint
type.Video.close()
: Now caches backend metadata toVideo.backend_metadata
to persist metadata on close.copy.deepcopy()
now works onVideo
objects even if backend is open.Video.save(save_path: str | Path, frame_inds: list[int] | np.ndarray | None = None, video_kwargs: dict[str, Any] | None = None)
: Method to save a video file to an MP4 usingVideoWriter
with an optional subset of frames.Labels.extract(inds: list[int] | list[tuple[Video, int]] | np.ndarray, copy: bool = True)
: Add method to extract a subset of frames from the labels, optionally making a copy, and return a newLabels
object.Labels.trim(save_path: str | Path, frame_inds: list[int] | np.ndarray, video: Video | int | None = None, video_kwargs: dict[str, Any] | None = None)
: Add method to extract a subset of the labels, write a video clip with the extracted friends, and adjust frame indices to match the clip.