Dataset information


source

MedDataset

 MedDataset (path=None, postfix:str='', img_list:list=None,
             reorder:bool=False, dtype:(<class'fastMONAI.vision_core.MedIm
             age'>,<class'fastMONAI.vision_core.MedMask'>)=<class
             'fastMONAI.vision_core.MedImage'>, max_workers:int=1)

A class to extract and present information about the dataset.


source

get_class_weights

 get_class_weights (labels:(<built-infunctionarray>,<class'list'>),
                    class_weight:str='balanced')

*Calculates and returns the class weights.

Args: labels: An array or list of class labels for each instance in the dataset. class_weight: Defaults to ‘balanced’.

Returns: A tensor of class weights.*