Skip to content

Conversation

@Qirui-jiao
Copy link
Collaborator

Add two video analysis ops, including:

  • video_object_segmenting_mapper: Performs text-guided semantic segmentation of valid objects throughout the video (using YOLOE and SAM2), with support for saving segmentation visualization results.

  • video_depth_estimation_mapper: Performs depth estimation on the video, with support for saving both visualization results and point cloud data.

@Qirui-jiao Qirui-jiao requested review from HYLcool and yxdyc October 29, 2025 15:04
@Qirui-jiao Qirui-jiao added enhancement New feature or request dj:multimodal issues/PRs about multimodal data processing dj:op issues/PRs about some specific OPs labels Oct 29, 2025
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @Qirui-jiao, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly expands the video processing capabilities of the data_juicer library by introducing two advanced mappers. The video_object_segmenting_mapper enables precise, text-guided identification and segmentation of objects across video sequences, while the video_depth_estimation_mapper provides detailed depth information for video frames, including the generation of 3D point clouds. These additions empower users to extract richer, more granular metadata from video content, facilitating more sophisticated downstream tasks in multimodal data processing.

Highlights

  • Video Object Segmenting Mapper: Introduced a new mapper (video_object_segmenting_mapper) for text-guided semantic segmentation of objects in videos, leveraging YOLOE for initial detection and SAM2 for tracking and mask generation.
  • Video Depth Estimation Mapper: Added a new mapper (video_depth_estimation_mapper) that performs depth estimation on video frames, with options to save visualization results and generate point cloud data.
  • Core Integration: Integrated these new mappers into the data_juicer framework by updating the init.py for mapper registration and constant.py for new metadata keys.
  • Model Utility Enhancements: Extended model_utils.py to support the dynamic loading and preparation of the Video-Depth-Anything model.
  • Documentation and Testing: Updated the Operators.md documentation to reflect the new mappers and included dedicated unit tests for both VideoDepthEstimationMapper and VideoObjectSegmentingMapper.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces two new video analysis operators: video_object_segmenting_mapper and video_depth_estimation_mapper. The video_object_segmenting_mapper performs text-guided semantic segmentation, while the video_depth_estimation_mapper estimates depth in videos. The changes include adding the new mapper files, updating __init__.py to include the new mappers, modifying constant.py to add meta keys for the new features, and updating model_utils.py to include the video depth estimation model. Additionally, test files for both mappers and updates to the Operators.md documentation are included.

@Qirui-jiao
Copy link
Collaborator Author

Update (November 4):

  • Fixed the issue of being unable to import SAM2 due to an outdated Transformers version.
  • Fixed the git clone issue for the Video-Depth-Anything repository.
  • Updated video_depth_estimation_mapper to support concurrent multi-process execution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dj:multimodal issues/PRs about multimodal data processing dj:op issues/PRs about some specific OPs enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants