Skip to content

Conversation

@Qirui-jiao
Copy link
Collaborator

Add three ops, including:

  • video_camera_calibration_static_deepcalib_mapper: Compute the camera intrinsics and field of view (FOV) for a static camera using DeepCalib.
  • video_camera_calibration_static_moge_mapper: Compute the camera intrinsics and field of view (FOV) for a static camera using Moge-2.
  • video_undistort_mapper: Undistort raw videos with corresponding camera intrinsics and distortion coefficients.

@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 enhances video processing capabilities by introducing three new operators. These additions enable users to perform static camera calibration using both DeepCalib and the more accurate Moge-2 models, and to correct video distortions. The new functionalities streamline the preparation of video data for various computer vision tasks by providing tools for precise camera parameter estimation and image correction.

Highlights

  • DeepCalib Mapper: Introduced a new operator, video_camera_calibration_static_deepcalib_mapper, to compute camera intrinsics and field of view (FOV) for static cameras using the DeepCalib model.
  • Moge-2 Mapper: Added another operator, video_camera_calibration_static_moge_mapper, for static camera calibration, utilizing the Moge-2 model, which is noted for higher accuracy than DeepCalib.
  • Video Undistortion Mapper: Implemented a new operator, video_undistort_mapper, to undistort raw videos based on provided camera intrinsics and distortion coefficients.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

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.

@Qirui-jiao Qirui-jiao added dj:op issues/PRs about some specific OPs enhancement New feature or request labels Dec 26, 2025
@Qirui-jiao Qirui-jiao added the dj:multimodal issues/PRs about multimodal data processing label Dec 26, 2025
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 three new mappers for video processing: VideoCameraCalibrationStaticDeepcalibMapper, VideoCameraCalibrationStaticMogeMapper, and VideoUndistortMapper. The changes also include the necessary model loading utilities and constant definitions.

My review focuses on correctness, maintainability, and consistency. I've found a critical issue in the device handling logic for the new DeepCalib model loader that could cause a crash. I've also identified a high-severity issue in VideoUndistortMapper regarding inconsistent data access patterns that would prevent it from working in a pipeline with the new calibration mappers. Other comments include suggestions to improve logging and remove magic numbers.

Overall, the new features are a great addition, but the identified issues should be addressed to ensure robustness and interoperability of the new components.

@Qirui-jiao
Copy link
Collaborator Author

Updates on Jan 12:

  1. Fixed excessive GPU memory allocation issue in TensorFlow.
  2. Resolved numpy version conflict in the video_undistort_mapper op.

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