Dataset

Base Dataset

class ezflow.data.dataset.base_dataset.BaseDataset(init_seed=False, is_prediction=False, append_valid_mask=False, crop=False, crop_size=(256, 256), crop_type='center', augment=True, aug_params={'color_aug_params': {'aug_prob': 0.2}, 'eraser_aug_params': {'aug_prob': 0.5}, 'spatial_aug_params': {'aug_prob': 0.8}}, sparse_transform=False)[source]

Base dataset for reading synthetic optical flow data.

Parameters
  • init_seed (bool, default : False) – If True, sets random seed to the worker

  • is_prediction (bool, default : False) – If True, If True, only image data are loaded for prediction otherwise both images and flow data are loaded

  • append_valid_mask (bool, default : False) – If True, appends the valid flow mask to the original flow mask at dim=0

  • crop (bool, default : True) – Whether to perform cropping

  • crop_size (tuple of int) – The size of the image crop

  • crop_type (str, default : ‘center’) – The type of croppping to be performed, one of “center”, “random”

  • augment (bool, default : False) – If True, applies data augmentation

  • aug_params (dict) – The parameters for data augmentation

Flying Chairs

class ezflow.data.dataset.flying_chairs.FlyingChairs(root_dir, split='training', is_prediction=False, init_seed=False, append_valid_mask=False, crop=False, crop_size=(256, 256), crop_type='center', augment=True, aug_params={'color_aug_params': {'aug_prob': 0.2}, 'eraser_aug_params': {'aug_prob': 0.5}, 'spatial_aug_params': {'aug_prob': 0.8}})[source]

Dataset Class for preparing the Flying Chair Synthetic dataset for training and validation.

Parameters
  • root_dir (str) – path of the root directory for the flying chairs dataset

  • split (str, default : "training") – specify the training or validation split

  • is_prediction (bool, default : False) – If True, only image data are loaded for prediction otherwise both images and flow data are loaded

  • init_seed (bool, default : False) – If True, sets random seed to worker

  • append_valid_mask (bool, default : False) – If True, appends the valid flow mask to the original flow mask at dim=0

  • crop (bool, default : True) – Whether to perform cropping

  • crop_size (tuple of int) – The size of the image crop

  • crop_type (str, default : ‘center’) – The type of croppping to be performed, one of “center”, “random”

  • augment (bool, default : True) – If True, applies data augmentation

  • aug_params (dict, optional) – The parameters for data augmentation

Flying Things 3D

class ezflow.data.dataset.flying_things3d.FlyingThings3D(root_dir, split='training', dstype='frames_cleanpass', is_prediction=False, init_seed=False, append_valid_mask=False, crop=False, crop_size=(256, 256), crop_type='center', augment=True, aug_params={'color_aug_params': {'aug_prob': 0.2}, 'eraser_aug_params': {'aug_prob': 0.5}, 'spatial_aug_params': {'aug_prob': 0.8}})[source]

Dataset Class for preparing the Flying Things 3D Synthetic dataset for training and validation.

Parameters
  • root_dir (str) – path of the root directory for the flying things 3D dataset

  • split (str, default : "training") – specify the training or validation split

  • dstype (str, default : "frames_cleanpass") – specify dataset type

  • is_prediction (bool, default : False) – If True, only image data are loaded for prediction otherwise both images and flow data are loaded

  • init_seed (bool, default : False) – If True, sets random seed to worker

  • append_valid_mask (bool, default : False) –

  • crop (bool, default : True) – Whether to perform cropping

  • crop_size (tuple of int) – The size of the image crop

  • crop_type (str, default : ‘center’) – The type of croppping to be performed, one of “center”, “random” If True, appends the valid flow mask to the original flow mask at dim=0

  • augment (bool, default : True) – If True, applies data augmentation

  • aug_params (dict, optional) – The parameters for data augmentation

class ezflow.data.dataset.flying_things3d.FlyingThings3DSubset(root_dir, split='training', is_prediction=False, init_seed=False, append_valid_mask=False, augment=True, aug_params={'color_aug_params': {'aug_prob': 0.2}, 'crop_size': (224, 224), 'eraser_aug_params': {'aug_prob': 0.5}, 'spatial_aug_params': {'aug_prob': 0.8}})[source]

Dataset Class for preparing the Flying Things 3D Subset Synthetic dataset for training and validation.

Parameters
  • root_dir (str) – path of the root directory for the flying things 3D dataset

  • split (str, default : "training") – specify the training or validation split

  • is_prediction (bool, default : False) – If True, only image data are loaded for prediction otherwise both images and flow data are loaded

  • init_seed (bool, default : False) – If True, sets random seed to worker

  • append_valid_mask (bool, default : False) – If True, appends the valid flow mask to the original flow mask at dim=0

  • augment (bool, default : True) – If True, applies data augmentation

  • aug_param (dict, optional) – The parameters for data augmentation

HD1K

class ezflow.data.dataset.hd1k.HD1K(root_dir, is_prediction=False, init_seed=False, append_valid_mask=False, crop=False, crop_size=(256, 256), crop_type='center', augment=True, aug_params={'color_aug_params': {'aug_prob': 0.2}, 'eraser_aug_params': {'aug_prob': 0.5}, 'spatial_aug_params': {'aug_prob': 0.8}})[source]

Dataset Class for preparing the HD1K dataset for training and validation.

Parameters
  • root_dir (str) – path of the root directory for the HD1K dataset

  • is_prediction (bool, default : False) – If True, only image data are loaded for prediction otherwise both images and flow data are loaded

  • init_seed (bool, default : False) – If True, sets random seed to worker

  • append_valid_mask (bool, default : False) – If True, appends the valid flow mask to the original flow mask at dim=0

  • crop (bool, default : True) – Whether to perform cropping

  • crop_size (tuple of int) – The size of the image crop

  • crop_type (str, default : ‘center’) – The type of croppping to be performed, one of “center”, “random”

  • augment (bool, default : True) – If True, applies data augmentation

  • aug_params (dict, optional) – The parameters for data augmentation

KITTI

class ezflow.data.dataset.kitti.Kitti(root_dir, split='training', is_prediction=False, init_seed=False, append_valid_mask=False, crop=False, crop_size=(256, 256), crop_type='center', augment=True, aug_params={'color_aug_params': {'aug_prob': 0.2}, 'eraser_aug_params': {'aug_prob': 0.5}, 'spatial_aug_params': {'aug_prob': 0.8}})[source]

Dataset Class for preparing the Kitti dataset for training and validation.

Parameters
  • root_dir (str) – path of the root directory for the HD1K dataset

  • split (str, default : "training") – specify the training or validation split

  • is_prediction (bool, default : False) – If True, only image data are loaded for prediction otherwise both images and flow data are loaded

  • init_seed (bool, default : False) – If True, sets random seed to worker

  • append_valid_mask (bool, default : False) – If True, appends the valid flow mask to the original flow mask at dim=0

  • crop (bool, default : True) – Whether to perform cropping

  • crop_size (tuple of int) – The size of the image crop

  • crop_type (str, default : ‘center’) – The type of croppping to be performed, one of “center”, “random”

  • augment (bool, default : True) – If True, applies data augmentation

  • aug_params (dict, optional) – The parameters for data augmentation

MPI Sintel

class ezflow.data.dataset.mpi_sintel.MPISintel(root_dir, split='training', dstype='clean', is_prediction=False, init_seed=False, append_valid_mask=False, crop=False, crop_size=(256, 256), crop_type='center', augment=True, aug_params={'color_aug_params': {'aug_prob': 0.2}, 'eraser_aug_params': {'aug_prob': 0.5}, 'spatial_aug_params': {'aug_prob': 0.8}})[source]

Dataset Class for preparing the MPI Sintel Synthetic dataset for training and validation.

Parameters
  • root_dir (str) – path of the root directory for the MPI Sintel datasets

  • split (str, default : "training") – specify the training or validation split

  • dstype (str, default : "frames_cleanpass") – specify dataset type

  • is_prediction (bool, default : False) – If True, only image data are loaded for prediction otherwise both images and flow data are loaded

  • init_seed (bool, default : False) – If True, sets random seed to worker

  • append_valid_mask (bool, default : False) – If True, appends the valid flow mask to the original flow mask at dim=0

  • crop (bool, default : True) – Whether to perform cropping

  • crop_size (tuple of int) – The size of the image crop

  • crop_type (str, default : ‘center’) – The type of croppping to be performed, one of “center”, “random”

  • augment (bool, default : True) – If True, applies data augmentation

  • aug_params (dict, optional) – The parameters for data augmentation