opr.pipelines package

Module for pipelines.

opr.pipelines.depth_estimation

class opr.pipelines.depth_estimation.DepthEstimationPipeline(model: Module, model_type: str = 'AdelaiDepth', align_type: str = 'average', mode: str = 'indoor', model_weights_path: str | PathLike | None = None, device: str | int | device = 'cuda')[source]

Bases: object

get_depth_with_lidar(image: ndarray, point_cloud: ndarray) ndarray[source]

Obtain depth estimation from the provided image and point cloud data. :param image: np.ndarray - monocular image :param point_cloud: np.ndarray - sparse lidar point cloud

Returns:

np.ndarray - reconstructed depth map with the same height and width as the input image zs: np.ndarray - z values of the lidar point cloud projected on the iamge errors: np.ndarray - absolute errors of depth reconstruction for the points of the projected lidar point cloud rel_errors: np.ndarray - relative errors of depth reconstruction for the points of the projected lidar point cloud

Return type:

depth

set_camera_matrix(camera_matrix: Dict[str, float])[source]

Set the camera intrinsic matrix for calculations.

set_lidar_to_camera_transform(transform)[source]

Set lidar to camera transform