utilities.transform_utils.image_stats module#

get_distribution_seg(path, files: list[str], num_classes: int = 7)[source]#

Returns the distribution of classes in the segmentation dataset

Arguments#

str path:

path to the folder containing the segmentation masks

list[str] files:

list of files in the folder

Keyword Arguments#

int, optional num_classes:

number of classes in the dataset, defaults to 7

Returns#

tupple(dict, dict):

a tuple containing the distribution of classes and the number of files containing each class