class_docstr: Class that handles the logic of composing the visualizations.
  
  Args:
      mode (VisualizationMode): visualization mode, either "full" or "simple"
      task (TaskType): task type "segmentation", "detection" or "classification"
docstr: Generate a simple visualization for an image.
  
  The simple visualization mode only shows the model's predictions in a single image.
  
  Args:
      image_result (ImageResult): GT and Prediction data for a single image.
  
  Returns:
      An image showing the simple visualization for the input image.
docstr_tok: ["Generate","a","simple","visualization","for","an","image",".","The","simple","visualization","mode","only","shows","the","model","'s","predictions","in","a","single","image",".","Args",":","image_result","(","ImageResult",")",":","GT","and","Prediction","data","for","a","single","image",".","Returns",":","An","image","showing","the","simple","visualization","for","the","input","image","."]
code: def _visualize_simple(self, image_result: ImageResult) -> np.ndarray:
      """Generate a simple visualization for an image.
  
      The simple visualization mode only shows the model's predictions in a single image.
  
      Args:
          image_result (ImageResult): GT and Prediction data for a single image.
  
      Returns:
          An image showing the simple visualization for the input image.
      """
      if self.task == TaskType.DETECTION:
          # return image with bounding boxes augmented
          image_with_boxes = draw_boxes(
              image=np.copy(image_result.image),
              boxes=image_result.anomalous_boxes,
              color=(0, 0, 255),
          )
          if image_result.gt_boxes is not None:
              image_with_boxes = draw_boxes(
                  image=image_with_boxes,
                  boxes=image_result.gt_boxes,
                  color=(255, 0, 0),
              )
          return image_with_boxes
      if self.task == TaskType.SEGMENTATION:
          visualization = mark_boundaries(
              image_result.heat_map,
              image_result.pred_mask,
              color=(1, 0, 0),
              mode="thick",
          )
          return (visualization * 255).astype(np.uint8)
      if self.task == TaskType.CLASSIFICATION:
          if image_result.pred_label:
              image_classified = add_anomalous_label(
                  image_result.image, image_result.pred_score
              )
          else:
              image_classified = add_normal_label(
                  image_result.image, 1 - image_result.pred_score
              )
          return image_classified
      raise ValueError(f"Unknown task type: {self.task}")
  
imports: from __future__ import annotations
  from dataclasses import dataclass, field
  from enum import Enum
  from pathlib import Path
  from typing import Iterator
  import cv2
  import matplotlib.figure
  import matplotlib.pyplot
  import numpy
  from skimage.segmentation import mark_boundaries
  from anomalib.data import TaskType
  from anomalib.data.utils import read_image
  from anomalib.post_processing.post_process import add_anomalous_label, add_normal_label, draw_boxes, superimpose_anomaly_map
label_desc: Use image node_id 5 for calling the Visualizer obj's underlying member method code with example usage: obj._visualize_simple(image_result) and returns: image_with_boxes, unknown, image_classified