(info)
convert kitti info v1 to v2 if possible.
convert kitti info v1 to v2 if possible.
convert kitti info v1 to v2 if possible .
def convert_to_kitti_info_version2(info):
    """convert kitti info v1 to v2 if possible.
    """
    if "image" not in info or "calib" not in info or "point_cloud" not in info:
        info["image"] = {
            'image_shape': info["img_shape"],
            'image_idx': info['image_idx'],
            'image_path': info['img_path'],
        }
        info["calib"] = {
            "R0_rect": info['calib/R0_rect'],
            "Tr_velo_to_cam": info['calib/Tr_velo_to_cam'],
            "P2": info['calib/P2'],
        }
        info["point_cloud"] = {
            "velodyne_path": info['velodyne_path'],
        }
def convert_to_kitti_info_version2 ( info ) : if "image" not in info or "calib" not in info or "point_cloud" not in info : info [ "image" ] = { 'image_shape' : info [ "img_shape" ] , 'image_idx' : info [ 'image_idx' ] , 'image_path' : info [ 'img_path' ] , } info [ "calib" ] = { "R0_rect" : info [ 'calib/R0_rect' ] , "Tr_velo_to_cam" : info [ 'calib/Tr_velo_to_cam' ] , "P2" : info [ 'calib/P2' ] , } info [ "point_cloud" ] = { "velodyne_path" : info [ 'velodyne_path' ] , }