class_docstr: Callback that visualizes the results of a model.
  
  To save the images to the filesystem, add the 'local' keyword to the `project.log_images_to` parameter in the
  config.yaml file.
class_docstr_tok: ["Callback","that","visualizes","the","results","of","a","model",".","To","save","the","images","to","the","filesystem",",","add","the","'local","'","keyword","to","the","`","project.log_images_to","`","parameter","in","the","config.yaml","file","."]
docstr: Visualizer callback.
docstr_tok: ["Visualizer","callback","."]
code: def __init__(
      self,
      task: TaskType,
      mode: VisualizationMode,
      image_save_path: str,
      inputs_are_normalized: bool = True,
      show_images: bool = False,
      log_images: bool = True,
      save_images: bool = True,
  ) -> None:
      """Visualizer callback."""
      if mode not in ("full", "simple"):
          raise ValueError(
              f"Unknown visualization mode: {mode}. Please choose one of ['full', 'simple']"
          )
      self.mode = mode
      if task not in (
          TaskType.CLASSIFICATION,
          TaskType.DETECTION,
          TaskType.SEGMENTATION,
      ):
          raise ValueError(
              f"Unknown task type: {mode}. Please choose one of ['classification', 'detection', 'segmentation']"
          )
      self.task = task
      self.inputs_are_normalized = inputs_are_normalized
      self.show_images = show_images
      self.log_images = log_images
      self.save_images = save_images
      self.image_save_path = Path(image_save_path)
  
      self.visualizer = Visualizer(mode, task)
  
file_path: anomalib/src/anomalib/utils/callbacks/visualizer/visualizer_base.py
imports: from __future__ import annotations
  from pathlib import Path
  from typing import cast
  import numpy
  import pytorch_lightning
  from pytorch_lightning import Callback
  from anomalib.data import TaskType
  from anomalib.models.components import AnomalyModule
  from anomalib.post_processing import VisualizationMode, Visualizer
  from anomalib.utils.loggers import AnomalibWandbLogger
  from anomalib.utils.loggers.base import ImageLoggerBase
label_desc: Use image node_id 1 to create a new BaseVisualizerCallback object from inherited base classes: Callback with example: obj = BaseVisualizerCallback(task, mode, image_save_path, inputs_are_normalized, show_images, log_images, save_images)