datamodules.IndexedFormats.utils package
Submodules
datamodules.IndexedFormats.utils.image_analytics module
- get_analytics(input_path: Path, data_folder_name: str, gt_folder_name: str, train_folder_name: str, get_img_gt_path_list_func: callable, inmem: bool = False, workers: int = 8) Tuple[Dict[str, Any], Dict[str, Any]][source]
- Get the analytics for the dataset. If the analytics file is not present, it will be computed and saved. - Parameters:
- workers (int) – Number of workers to calculate the mean and std 
- inmem (bool) – Load the images in memory or load them separately 
- input_path (Path) – Path to the root of the dataset 
- data_folder_name (str) – Name of the folder containing the data 
- gt_folder_name (str) – Name of the folder containing the ground truth 
- train_folder_name (str) – Name of the folder containing the training data 
- get_img_gt_path_list_func (Callable[[Path, str, str], List[Tuple[Path, Path]]]) – Function to get the list of image and ground truth paths 
 
- Returns:
- Tuple of analytics for the data and ground truth 
- Return type:
- Tuple[Dict[str, Any], Dict[str, Any]] 
 
datamodules.IndexedFormats.utils.output_tools module
- save_output_page_image(image_name, output_image, output_folder: Path, class_encoding: List[Tuple[int]])[source]
- Helper function to save the output during testing in the DIVAHisDB format - Parameters:
- image_name (str) – name of the image that is saved 
- output_image (np.ndarray) – output image at full size 
- output_folder (Path) – path to the output folder for the test data 
- class_encoding (List[Tuple[int]]) – list with the class encodings