INNER CODE UNIT · Python
get_valid_mask
nianticlabs/simplerecon · losses.py:90
def get_valid_mask(
self,
cur_depth_b1hw,
src_depth_b1hw,
cur_invK_b44,
src_K_b44,
cur_world_T_cam_b44,
src_cam_T_world_b44,
):
depth_height, depth_width = cur_depth_b1hw.shape[2:]
cur_cam_points_b4N = self.backproject(cur_depth_b1hw, cur_invK_b44)
world_points_b4N = cur_world_T_cam_b44 @ cur_cam_points_b4N
# Compute valid mask
src_cam_points_b3N = self.project(world_points_b4N, src_K_b44, src_cam_T_world_b44)