Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def load_data(root_path, sequence_name, frame_id):
# index paths
file_name = 'frame_%04d' % (frame_id)
image_file = os.path.join(root_path, 'clean', sequence_name,
file_name + '.png')
depth_file = os.path.join(root_path, 'depth', sequence_name,
file_name + '.dpt')
camera_file = os.path.join(root_path, 'camdata_left', sequence_name,
file_name + '.cam')
# load the actual data
image_tensor = load_image(image_file)
depth = load_depth(depth_file)
# load camera data and create pinhole
height, width = image_tensor.shape[-2:]
intrinsics, extrinsics = load_camera_data(camera_file)
camera = tgm.utils.create_pinhole(intrinsics, extrinsics, height, width)
return image_tensor, depth, camera