data_juicer.ops.mapper.video_camera_calibration_deepcalib_mapper module#

class data_juicer.ops.mapper.video_camera_calibration_deepcalib_mapper.VideoCameraCalibrationDeepcalibMapper(*args, **kwargs)[源代码]#

基类:Mapper

Compute the camera intrinsics and field of view (FOV) for a static camera using DeepCalib.

__init__(model_path: str = 'weights_10_0.02.h5', frame_field: str = 'video_frames', tag_field_name: str = 'camera_calibration_deepcalib_tags', frame_batch_size: int = 8, *args, **kwargs)[源代码]#

Initialization method.

参数:
  • model_path -- The path to the DeepCalib Regression model.

  • frame_field -- The field name where the video frames are stored.

  • tag_field_name -- The field name to store the tags. It's "camera_calibration_deepcalib_tags" in default.

  • frame_batch_size -- Number of frames to batch together for GPU inference. Larger values improve throughput but require more VRAM. Default: 8.

  • args -- extra args

  • kwargs -- extra args

process_single(sample=None, rank=None)[源代码]#

For sample level, sample --> sample

参数:

sample -- sample to process

返回:

processed sample