-
Notifications
You must be signed in to change notification settings - Fork 150
Add VideoFrameExtractionStage to video splitting pipeline #808
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
Open
suiyoubi
wants to merge
13
commits into
aot/ray-video-clip-frame-extraction
Choose a base branch
from
aot/ray-video-video-frame-extraction
base: aot/ray-video-clip-frame-extraction
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Add VideoFrameExtractionStage to video splitting pipeline #808
suiyoubi
wants to merge
13
commits into
aot/ray-video-clip-frame-extraction
from
aot/ray-video-video-frame-extraction
+2,505
−4
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Introduced `VideoFrameExtractionStage` to enhance the video splitting pipeline with additional frame extraction capabilities. - Updated the `create_video_splitting_pipeline` function to accommodate the new stage based on user-defined splitting algorithms. - Added logic for handling the "transnetv2" splitting algorithm. Signed-off-by: Ao Tang <[email protected]>
Signed-off-by: Ao Tang <[email protected]>
…ution timing - Added command-line arguments for TransNetV2 parameters, including thresholds, minimum and maximum clip lengths, cropping size, and GPU memory allocation. - Implemented execution time tracking in the video splitting pipeline to provide performance insights. - Updated `VideoFrameExtractionStage` to conditionally import `PyNvcFrameExtractor` based on GPU availability. Signed-off-by: Ao Tang <[email protected]>
…mple Signed-off-by: Ao Tang <[email protected]>
Signed-off-by: Ao Tang <[email protected]>
…-video-frame-extraction
…nvcodec_utils.py - Added "cvcuda_cu12" to the CUDA 12 dependencies in pyproject.toml. - Modified nvcodec_utils.py to include a try-except block for importing libraries, logging a warning if PyNvVideoCodec is not installed, and setting related variables to None. Signed-off-by: Ao Tang <[email protected]>
- Moved import statements for torch and loguru to the top of the file for better organization. - Ensured consistent handling of library imports with a try-except block for cvcuda and nvcv. Signed-off-by: Ao Tang <[email protected]>
- Removed "cvcuda_cu12" from the CUDA 12 dependencies and added it to a new "video_cuda" section for better clarity and organization of dependencies. Signed-off-by: Ao Tang <[email protected]>
- Moved the pixel_format_to_cvcuda_code dictionary initialization inside the try block to ensure it is only defined if PyNvVideoCodec is available. - Added a runtime check to raise an error if PyNvVideoCodec is not installed, improving error handling for users. Signed-off-by: Ao Tang <[email protected]>
…c_utils - Introduced a new test suite, TestImportHandling, to verify correct behavior when GPU dependencies are absent. - Added tests to ensure pixel format mapping, VideoBatchDecoder initialization, and PyNvcFrameExtractor function gracefully fail when required libraries are missing. - Created TestGracefulDegradation to confirm module imports and error messages are handled appropriately without GPU dependencies. Signed-off-by: Ao Tang <[email protected]>
- Added a try-except block to check for PyNvcFrameExtractor availability, logging a warning if not found and falling back to FFmpeg for video processing. - Updated the VideoFrameExtractionStage to handle cases where the PyNvcFrameExtractor is unavailable, ensuring graceful degradation. - Added tests to verify behavior when PyNvc dependencies are missing, including logging checks for fallback mechanisms. Signed-off-by: Ao Tang <[email protected]>
…tionality - Implemented multiple test cases for VideoBatchDecoder, including dynamic sizing, unexpected tensor layout handling, and batch size variations. - Enhanced NvVideoDecoder tests to cover scenarios with actual frame processing, unexpected layouts, and partial batch handling. - Verified the complete processing pipeline and ensured correct behavior under various conditions, improving overall test coverage for video decoding utilities. Signed-off-by: Ao Tang <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Usage
# Add snippet demonstrating usage
Checklist