Datasets
VOC
paz.datasets.voc.VOC(path=None, split='train', class_names='all', name='VOC2007', with_difficult_samples=True, evaluate=False)
Dataset loader for the falling things dataset (FAT).
Arguments
- data_path: Data path to VOC2007 annotations
- split: String determining the data split to load.
e.g.
train
,val
ortest
- class_names:
all
or list. If list it should contain as elements strings indicating each class name. - name: String or list indicating with dataset or datasets to load.
e.g.
VOC2007
or[''VOC2007'', VOC2012]
. - with_difficult_samples: Boolean. If
True
flagged difficult boxes will be added to the returned data. - evaluate: Boolean. If
True
returned data will be loaded without normalization for a direct evaluation.
Return
- data: List of dictionaries with keys corresponding to the image paths
and values numpy arrays of shape [num_objects, 4 + 1]
where the + 1
contains the class_arg
and num_objects
refers
to the amount of boxes in the image.
FAT
paz.datasets.fat.FAT(path, split='train', class_names='all')
Dataset loader for the falling things dataset (FAT).
Arguments
- path: String indicating full path to dataset e.g. /home/user/fat/
- split: String determining the data split to load.
e.g.
train
,val
ortest
- class_names:
all
or list. If list it should contain as elements strings indicating each class name.
References
FER
paz.datasets.fer.FER(path, split='train', class_names='all', image_size=(48, 48))
Class for loading FER2013 emotion classification dataset. Arguments
- path: String. Full path to fer2013.csv file.
- split: String. Valid option contain 'train', 'val' or 'test'.
- class_names: String or list: If 'all' then it loads all default class names.
- image_size: List of length two. Indicates the shape in which the image will be resized.
References
-FER2013 Dataset and Challenge
FERPlus
paz.datasets.ferplus.FERPlus(path, split='train', class_names='all', image_size=(48, 48))
Class for loading FER2013 emotion classification dataset. with FERPlus labels. Arguments
- path: String. Path to directory that has inside the files:
fer2013.csv
andfer2013new.csv
- split: String. Valid option contain 'train', 'val' or 'test'.
- class_names: String or list: If 'all' then it loads all default class names.
- image_size: List of length two. Indicates the shape in which the image will be resized.
References
OpenImages
paz.datasets.open_images.OpenImages(path, split='train', class_names='all')
Dataset loader for the OpenImagesV4 dataset.
Arguments
- path: String indicating full path to dataset e.g. /home/user/open_images/
- split: String determining the data split to load.
e.g.
train
,val
ortest
- class_names:
all
or list. If list it should contain as elements the strings of the class names.
CityScapes
paz.datasets.cityscapes.CityScapes(image_path, label_path, split, class_names='all')
CityScapes data manager for loading the paths of the RGB and segmentation masks.
Arguments
- image_path: String. Path to RGB images e.g. '/home/user/leftImg8bit/'
- label_path: String. Path to label masks e.g. '/home/user/gtFine/'
- split: String. Valid option contain 'train', 'val' or 'test'.
- class_names: String or list: If 'all' then it loads all default class names.
References
-The Cityscapes Dataset for Semantic Urban Scene Understanding
Shapes
paz.datasets.shapes.Shapes(num_samples, image_size, split='train', class_names='all', iou_thresh=0.3, max_num_shapes=3)
Loader for shapes synthetic dataset.
Arguments
- num_samples: Int indicating number of samples to load.
- image_size: (height, width) of input image to load.
- split: String determining the data split to load.
e.g.
train
,val
ortest
- class_names: List of strings or
all
. - iou_thresh: Float intersection over union.
- max_num_shapes: Int. maximum number of shapes in the image.
Returns
List of dictionaries with keys image
, mask
, box_data
containing
Omniglot
paz.datasets.omniglot.Omniglot(split, shape, flat=True)
Loads omniglot dataset for in between and within alphabet sampling.
Arguments
- split: String. Either
train
ortest
. Indicates which split to load. - shape: List of two integers indicating resize shape
(H, W)
. - flat: Boolean. If
True
the returned data dictionary is organized using each possible character as a class, with each key being a number having as value an image array. IfFalse
the returned data dictionary is organized using as keys the language names and as value another dictionary with keys being the character number, and as value the image array. This is to perform either sampling between alpahabet (flat=True
) or to perform sampling within alphabet (flat=False
). Usually, neural few-shot learning algorithms have been tested using in between alphabet sampling, but the original authors tested using the more challenging within alphabet sampling.
Returns
dictionary with class names as keys and image numpy arrays as values.