datamodules.RolfFormat.utils package
Submodules
datamodules.RolfFormat.utils.image_analytics module
- get_analytics_data(img_gt_path_list: List[Tuple[Path, Path]], inmem: bool = False, workers: int = 8) Dict[str, List] [source]
Computes mean and std of the dataset
- Parameters:
img_gt_path_list (List[Tuple[Path, Path]]) – Images and their corresponding ground truth paths to be used for computing mean and std
inmem (bool) – Whether to load the images in memory or not
workers (int) – Number of workers to use for loading and calculating mean and std
- Returns:
Dictionary containing mean and std
- Return type:
dict
- get_analytics_gt(img_gt_path_list: List[Tuple[Path, Path]]) Dict[str, Any] [source]
Computes class weights and encodings of the dataset based on the ground truth
- Parameters:
img_gt_path_list (List[Tuple[Path, Path]]) – Images and their corresponding ground truth paths to be used for computing class weights
- Returns:
Dictionary containing class weights and encodings
- Return type:
Dict[str, float]