brails.processors.FoundationClassifier.utils.Datasets module
- class brails.processors.FoundationClassifier.utils.Datasets.Foundation_Type_Binary(image_folder, transform=None, mask_buildings=False, load_masks=False)
Bases:
Dataset
- class brails.processors.FoundationClassifier.utils.Datasets.Foundation_Type_Testset(image_folder, transform=None, mask_buildings=False, load_masks=False)
Bases:
Dataset
- load_masks
- if not os.path.isdir(image_folder):
- if os.path.isfile(image_folder):
# The following format is to be consistent with os.walk output file_list = [[os.path.split(image_folder)[0],’None’,[os.path.split(image_folder)[1]]]]
- elif isinstance(image_folder, list): #a list of images
file_list = image_folder
- else:
print(‘Error: Image folder or file {} not found.’.format(image_folder)) exit()