Datasests — Pytorch-Sconce master documentation

# Datasests

## CsvImageFolder

class `sconce.datasets.` `CsvImageFolder`(root, csv_path, filename_key='image_name', labels_key='tags', csv_delimiter=',', labels_delimiter=' ', loader=<function default_loader>, extensions=['.jpg', '.jpeg', '.png', '.ppm', '.bmp', '.pgm', '.tif'], transform=None, target_transform=None)

  A Dataset that reads images from a folder and labels from a csv file.

  Parameters: | root (string) – directory where the images can be found. csv_path (string) – the path to the csv file containing image filenames and labels. filename_key (string, optional) – the column header of the csv for the column that contains image filenames (without extensions). labels_key (string, optional) – the column header of the csv for the column that contains labels for each image. csv_delimiter (string, optional) – the character(s) used to separate fields in the csv file. loader (callable, optional) – a function to load a sample given its path. extensions (list[string], optinoal) – a list of allowed extensions. E.g, `['.jpg', '.tif']` transform (callable, optional) – A function/transform that takes in a sample and returns a transformed version. E.g, `transforms.RandomCrop` for images. target_transform (callable, optional) – A function/transform that takes in the target and transforms it.