Skip to content

tensorvisualizer

tensorvisualizer

Module for tensorvisualizer

Classes

ColorInfo dataclass

ColorInfo used for visualization

TensorVisualizer

TensorVisualizer(key, colormap)

Bases: TensorMetric

TensorMetric used for visualization e.g. SemSeg

Source code in niceml/mlcomponents/resultanalyzers/tensors/tensorvisualizer.py
def __init__(self, key: str, colormap: List[dict]):
    super().__init__(key)
    color_list: List[ColorInfo] = [ColorInfo(**x) for x in colormap]
    c_info: ColorInfo
    self.colormap = {c_info.index: c_info.color for c_info in color_list}
    self.thresholds = {c_info.index: c_info.threshold for c_info in color_list}
    self.img_count = 0
    self.store_folder: str = ""