imagevisualizer
imagevisualizer ¶
Module for ImageVisualizer
Classes¶
ImageContainer
dataclass
¶
Collection of one or more images, the corresponding prediction and ground truth
InstanceLabel
s and the underlying data of the InstanceLabel
s.
Functions¶
get_image_paths ¶
Returns image path(s) as list
Returns:
-
List[str]
–List of image paths
scale_instance_labels ¶
Scales the images prediction and ground truth instance labels with a given
scale_factor
and returns a new scaled instance of ImageContainer
Parameters:
-
scale_factor
(float
) –Factor to scale the prediction and ground truth labels by
Returns:
-
ImageContainer
–Scaled ImageContainer
Source code in niceml/dashboard/visualizers/imagevisualizer.py
ImageVisualizer ¶
Bases: ABC
Visualizer for images of ImageContainer
s
Source code in niceml/dashboard/visualizers/imagevisualizer.py
Functions¶
get_images_with_labels
abstractmethod
¶
Returns images of 'image_data_container' with drawn prediction and ground truth labels
visualize_images ¶
Visualizes images from 'image_data_containers' with prediction and ground truth labels in streamlit container
Parameters:
-
image_data_containers
(List[ImageContainer]
) –ImageContainer storing information about the images and labels to visualize
Source code in niceml/dashboard/visualizers/imagevisualizer.py
Functions¶
check_instance_label_type ¶
Check if each label in label_list
is an instance of target_type
Parameters:
-
label_list
(List[InstanceLabel]
) –List of labels for which the type is to be checked
-
target_type
(Type[InstanceLabel]
) –Type to be checked
Returns:
-
bool
–True if each label of
label_list
is an instance oftarget_type
, -
bool
–otherwise False.