brails.processors.foundation_classifier.utils.Datasets module

Class object that prepares data for the foundation elevation classifier.

class brails.processors.foundation_classifier.utils.Datasets.Foundation_Type_Binary(image_folder, transform=None, mask_buildings=False, load_masks=False)

Bases: Dataset

class brails.processors.foundation_classifier.utils.Datasets.Foundation_Type_Testset(image_folder, transform=None, mask_buildings=False, load_masks=False)

Bases: Dataset

A custom dataset class for loading images and optional masks .

This class handles the loading of images from a given directory or a list of image paths. It can also load associated segmentation masks for buildings if specified. The dataset supports transformations applied to the images and provides the option to mask non-building areas.

transform

Optional transform to be applied to each image. Default is None.

Type:

callable, optional

mask_buildings

Whether to mask out non-building areas in the image. Default is False.

Type:

bool, optional

load_masks

Whether to load pre-existing masks for the images. Default is False.

Type:

bool, optional

img_paths

List of image paths.

Type:

list

mask_paths

List of mask paths.

Type:

list

filenames

List of filenames paths.

Type:

list