IQM_Vis.data_handlers package
Submodules
IQM_Vis.data_handlers.data_api module
generic image and metric data class constructor both use the same image for reference and transformed
- class IQM_Vis.data_handlers.data_api.cache_metric_call(metric)[source]
Bases:
object
cache metric fucntions that have been calculated already to do this we need to convert numpy arrays to a hashable object (since arrs are mutable) to achieve this we convert to a bytes array (input to __call__) then load this from buffer
- class IQM_Vis.data_handlers.data_api.dataset_holder(image_list: list, metrics: dict = {}, metric_images: dict = {}, image_loader=<function load_image>, image_pre_processing=None, image_post_processing=None, image_list_to_transform=None, human_exp_csv=None)[source]
Bases:
IQM_Vis.data_handlers.data_api_abstract.base_dataset_loader
Stores images and metrics to communicate with the UI via the IQM-Vis data API.
- Parameters
image_list (list) – list of image file paths
metrics (dict) – dictionary with keys of the metric names and values of the callable metric function
metric_images (dict) – Optional dictionary with keys of the metric image names and values of the callable metric image function (Defaults to {})
image_loader (function) – Optional function which loads an image from a file path (Defaults to IQM_Vis.utils.load_image)
image_post_processing (function) – Optional function to apply after image transformations. For example cropping an image after rotation. (Defaults to None)
image_list_to_transform (list) – list of image file paths for images to transform if they are different to the reference images. If None then will use the same image as the reference image. (Defaults to None)
IQM_Vis.data_handlers.data_api_abstract module
blueprint for data loader API
- class IQM_Vis.data_handlers.data_api_abstract.base_dataloader[source]
Bases:
abc.ABC
- property metric_images
- property metrics
- class IQM_Vis.data_handlers.data_api_abstract.base_dataset_loader[source]
Bases:
IQM_Vis.data_handlers.data_api_abstract.base_dataloader