KITTIDataset

class packnet_sfm.datasets.kitti_dataset.KITTIDataset(root_dir, file_list, train=True, data_transform=None, depth_type=None, with_pose=False, back_context=0, forward_context=0, strides=1)[source]

Bases: torch.utils.data.dataset.Dataset

KITTI dataset class.

Parameters
  • root_dir (str) – Path to the dataset

  • file_list (str) – Split file, with paths to the images to be used

  • train (bool) – True if the dataset will be used for training

  • data_transform (Function) – Transformations applied to the sample

  • depth_type (str) – Which depth type to load

  • with_pose (bool) – True if returning ground-truth pose

  • back_context (int) – Number of backward frames to consider as context

  • forward_context (int) – Number of forward frames to consider as context

  • strides (tuple) – List of context strides

packnet_sfm.datasets.kitti_dataset.read_npz_depth(file, depth_type)[source]

Reads a .npz depth map given a certain depth_type.

packnet_sfm.datasets.kitti_dataset.read_png_depth(file)[source]

Reads a .png depth map.