dataeval.utils.data.datasets.VOCSegmentation

class dataeval.utils.data.datasets.VOCSegmentation(root, download=False, image_set='train', year='2012', size=-1, classes=None, unit_interval=False, dtype=None, channels='channels_first', crop=None, normalize=None, slice_back=False, verbose=False)

Pascal VOC Segmentation Dataset.

Parameters:
root : str or pathlib.Path

Root directory of dataset where the vocdataset folder exists.

download : bool, default False

If True, downloads the dataset from the internet and puts it in root directory. Class checks to see if data is already downloaded to ensure it does not create a duplicate download.

image_set : "train", "val", "test", or "base", default "train"

If “test”, then dataset year must be “2007”. If “base”, then the combined dataset of “train” and “val” is returned.

year : "2007", "2008", "2009", "2010", "2011" or "2012", default "2012"

The dataset year.

size : int, default -1

Limit the dataset size, must be a value greater than 0.

classes : "aeroplane", "bicycle", "bird", "boat", "bottle", "bus", "car", "cat", "chair", "cow", "diningtable", "dog", "horse", "motorbike", "person", "pottedplant", "sheep", "sofa", "train", "tvmonitor", int, list, or None, default None

Option to select specific classes from dataset. Classes are 0-9, any other number is ignored.

unit_interval : bool, default False

Shift the data values to the unit interval [0-1].

dtype : type | None, default None

If None, data is loaded as np.uint8. Otherwise specify the desired NumPy dtype.

channels : "channels_first" or "channels_last", default channels_first

Location of channel axis if desired, default is downloaded image which contains channels last

normalize : tuple[mean, std] or None, default None

Normalize images acorrding to provided mean and standard deviation

slice_back : bool, default False

If True and size has a value greater than 0, then grabs selection starting at the last image.

verbose : bool, default False

If True, outputs print statements.

crop : int | None

index2label

Dictionary which translates from class integers to the associated class strings.

Type:

dict

label2index

Dictionary which translates from class strings to the associated class integers.

Type:

dict

dataset_dir

Location of the folder containing the data. Different from root if downloading data.

Type:

Path

metadata

Dictionary containing Dataset metadata, such as id which returns the dataset class name.

Type:

dict

class_set

The chosen set of labels to use. This is a binary dataset so there is only 0 (“MILCO”) and 1 (“NOMBO”).

Type:

set

num_classes

The number of classes in class_set.

Type:

int

info()

Pretty prints dataset name and information.

Return type:

str