Dataset

class dataloader.dataset.CustomDataset(data_dir, transform=None)

Bases: object

A custom dataset class for loading and processing image data.

data_dir

The directory path where the image data is stored.

Type:

str

transform

A function/transform that takes in an image and returns a transformed version.

Type:

callable

image_paths

A list of paths to the image files in the dataset.

Type:

list

class dataloader.dataset.DataLoader(dataset, batch_size=1, shuffle=True)

Bases: object

A class for loading data in batches from a dataset.

dataset

The dataset to load.

Type:

list

batch_size

The size of each batch. Defaults to 1.

Type:

int, optional

shuffle

Whether to shuffle the dataset before each epoch. Defaults to True.

Type:

bool, optional

indices

A list of indices used to shuffle the dataset.

Type:

list