Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Implementation:Datajuicer Data juicer VideoCameraCalibrationStaticMogeMapper

From Leeroopedia
Knowledge Sources
Domains Data_Processing, Mapping
Last Updated 2026-02-14 16:00 GMT

Overview

Concrete tool for static camera calibration using MoGe-2 provided by Data-Juicer.

Description

VideoCameraCalibrationStaticMogeMapper is a mapper operator that computes camera intrinsics and field of view (FOV) for a static camera from video frames using the MoGe-2 model, providing more accurate calibration than DeepCalib. It extracts frames uniformly from videos, processes them through the MoGe-2 model running on CUDA, and outputs camera intrinsic parameters along with optional point maps (in metric scale), depth maps, and binary validity masks, stored in the sample metadata with optional JSON file output.

Usage

Use when you need high-accuracy camera calibration from video data with additional 3D geometry outputs for downstream spatial reasoning and reconstruction tasks.

Code Reference

Source Location

  • Repository: Datajuicer_Data_juicer
  • File: data_juicer/ops/mapper/video_camera_calibration_static_moge_mapper.py

Signature

@OPERATORS.register_module("video_camera_calibration_static_moge_mapper")
class VideoCameraCalibrationStaticMogeMapper(Mapper):
    def __init__(self, model_path: str = "Ruicheng/moge-2-vitl", frame_num: PositiveInt = 3, duration: float = 0, tag_field_name: str = MetaKeys.static_camera_calibration_moge_tags, frame_dir: str = DATA_JUICER_ASSETS_CACHE, if_output_info: bool = True, output_info_dir: str = DATA_JUICER_ASSETS_CACHE, if_output_points_info: bool = True, if_output_depth_info: bool = True, if_output_mask_info: bool = True, *args, **kwargs):

Import

from data_juicer.ops.mapper.video_camera_calibration_static_moge_mapper import VideoCameraCalibrationStaticMogeMapper

I/O Contract

Inputs

Name Type Required Description
model_path str No Path to the MoGe-2 model (default: "Ruicheng/moge-2-vitl")
frame_num PositiveInt No Number of frames to extract uniformly (default: 3)
duration float No Duration of each segment in seconds; 0 for entire video (default: 0)
tag_field_name str No Field name to store tags (default: "static_camera_calibration_moge_tags")
frame_dir str No Output directory for extracted frames
if_output_info bool No Whether to save camera parameters to JSON (default: True)
output_info_dir str No Output directory for saving camera parameters JSON
if_output_points_info bool No Whether to output point maps in OpenCV camera coordinate system (default: True)
if_output_depth_info bool No Whether to output depth maps (default: True)
if_output_mask_info bool No Whether to output binary mask for valid pixels (default: True)

Outputs

Name Type Description
samples Dict Transformed samples with camera intrinsics, FOV, point maps, depth maps, and mask metadata

Usage Examples

process:
  - video_camera_calibration_static_moge_mapper:
      model_path: "Ruicheng/moge-2-vitl"
      frame_num: 5
      if_output_points_info: true
      if_output_depth_info: true

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment