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={'advanced_spatial_aug_params': {'enabled': False}, 'color_aug_params': {'enabled': False}, 'eraser_aug_params': {'enabled': False}, 'flip_aug_params': {'enabled': False}, 'noise_aug_params': {'enabled': False}, 'spatial_aug_params': {'enabled': False}}, sparse_transform=False, norm_params={'use': False}, flow_offset_params={'dilations': [[1], [1, 2, 3, 5, 9, 16]], 'feat_strides': [2, 8], 'offset_bias': [0, 0], 'search_radius': 4, 'use': 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

  • norm_params (dict, optional) – The parameters for normalization

  • flow_offset_params (dict, optional) – The parameters for adding bilinear interpolated weights surrounding each ground truth flow values.

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={'advanced_spatial_aug_params': {'enabled': False}, 'color_aug_params': {'enabled': False}, 'eraser_aug_params': {'enabled': False}, 'flip_aug_params': {'enabled': False}, 'noise_aug_params': {'enabled': False}, 'spatial_aug_params': {'enabled': False}}, norm_params={'use': False}, flow_offset_params={'use': False})[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

  • norm_params (dict, optional) – The parameters for normalization

  • flow_offset_params (dict, optional) – The parameters for adding bilinear interpolated weights surrounding each ground truth flow values.

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={'advanced_spatial_aug_params': {'enabled': False}, 'color_aug_params': {'enabled': False}, 'eraser_aug_params': {'enabled': False}, 'flip_aug_params': {'enabled': False}, 'noise_aug_params': {'enabled': False}, 'spatial_aug_params': {'enabled': False}}, norm_params={'use': False}, flow_offset_params={'use': False})[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

  • norm_params (dict, optional) – The parameters for normalization

  • flow_offset_params (dict, optional) – The parameters for adding bilinear interpolated weights surrounding each ground truth flow values.

class ezflow.data.dataset.flying_things3d.FlyingThings3DClean(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={'advanced_spatial_aug_params': {'enabled': False}, 'color_aug_params': {'enabled': False}, 'eraser_aug_params': {'enabled': False}, 'flip_aug_params': {'enabled': False}, 'noise_aug_params': {'enabled': False}, 'spatial_aug_params': {'enabled': False}}, norm_params={'use': False}, flow_offset_params={'use': False})[source]
class ezflow.data.dataset.flying_things3d.FlyingThings3DFinal(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={'advanced_spatial_aug_params': {'enabled': False}, 'color_aug_params': {'enabled': False}, 'eraser_aug_params': {'enabled': False}, 'flip_aug_params': {'enabled': False}, 'noise_aug_params': {'enabled': False}, 'spatial_aug_params': {'enabled': False}}, norm_params={'use': False}, flow_offset_params={'use': False})[source]
class ezflow.data.dataset.flying_things3d.FlyingThings3DSubset(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={'advanced_spatial_aug_params': {'enabled': False}, 'color_aug_params': {'enabled': False}, 'eraser_aug_params': {'enabled': False}, 'flip_aug_params': {'enabled': False}, 'noise_aug_params': {'enabled': False}, 'spatial_aug_params': {'enabled': False}}, norm_params={'use': False}, flow_offset_params={'use': False})[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

  • norm_params (dict, optional) – The parameters for normalization

  • flow_offset_params (dict, optional) – The parameters for adding bilinear interpolated weights surrounding each ground truth flow values.

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={'advanced_spatial_aug_params': {'enabled': False}, 'color_aug_params': {'enabled': False}, 'eraser_aug_params': {'enabled': False}, 'flip_aug_params': {'enabled': False}, 'noise_aug_params': {'enabled': False}, 'spatial_aug_params': {'enabled': False}}, norm_params={'use': False}, flow_offset_params={'use': False})[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

  • norm_params (dict, optional) – The parameters for normalization

  • flow_offset_params (dict, optional) – The parameters for adding bilinear interpolated weights surrounding each ground truth flow values.

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={'advanced_spatial_aug_params': {'enabled': False}, 'color_aug_params': {'enabled': False}, 'eraser_aug_params': {'enabled': False}, 'flip_aug_params': {'enabled': False}, 'noise_aug_params': {'enabled': False}, 'spatial_aug_params': {'enabled': False}}, norm_params={'use': False}, flow_offset_params={'use': False})[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

  • norm_params (dict, optional) – The parameters for normalization

  • flow_offset_params (dict, optional) – The parameters for adding bilinear interpolated weights surrounding each ground truth flow values.

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={'advanced_spatial_aug_params': {'enabled': False}, 'color_aug_params': {'enabled': False}, 'eraser_aug_params': {'enabled': False}, 'flip_aug_params': {'enabled': False}, 'noise_aug_params': {'enabled': False}, 'spatial_aug_params': {'enabled': False}}, norm_params={'use': False}, flow_offset_params={'use': False})[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 : "clean") – 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

  • norm_params (dict, optional) – The parameters for normalization

  • flow_offset_params (dict, optional) – The parameters for adding bilinear interpolated weights surrounding each ground truth flow values.

class ezflow.data.dataset.mpi_sintel.MPISintelClean(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={'advanced_spatial_aug_params': {'enabled': False}, 'color_aug_params': {'enabled': False}, 'eraser_aug_params': {'enabled': False}, 'flip_aug_params': {'enabled': False}, 'noise_aug_params': {'enabled': False}, 'spatial_aug_params': {'enabled': False}}, norm_params={'use': False}, flow_offset_params={'use': False})[source]
class ezflow.data.dataset.mpi_sintel.MPISintelFinal(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={'advanced_spatial_aug_params': {'enabled': False}, 'color_aug_params': {'enabled': False}, 'eraser_aug_params': {'enabled': False}, 'flip_aug_params': {'enabled': False}, 'noise_aug_params': {'enabled': False}, 'spatial_aug_params': {'enabled': False}}, norm_params={'use': False}, flow_offset_params={'use': False})[source]