delta.data.estimate_seg2D_classweights¶
- delta.data.estimate_seg2D_classweights(mask_path, sample_size=None, rng=None)[source]¶
Estimate the weights to assign each class in the weight maps.
- Parameters:
- mask_pathstr
Path to folder containing segmentations.
- sample_sizeint, optional
Determines the size of the training set that will be used to calculate class weights. The default is None.
- rngnpr.Generator, optional
Pseudo-random number generator used to subsample the dataset if needed.
- Returns:
- class1float
weight of class 1.
- class2float
weight of class 2.