class_docstr: Visualizer that draws data about detection on images.
  
  It contains methods like `draw_{text,box}`
  that draw primitive objects to images, as well as high-level wrappers like
  `draw_{instance_predictions}` that draw composite data in some pre-defined style.
  
  Note that the exact visualization style for the high-level wrappers are subject to change.
  Style such as color, opacity, label contents, visibility of labels, or even the visibility
  of objects themselves (e.g. when the object is too small) may change according
  to different heuristics, as long as the results still look visually reasonable.
  
  To obtain a consistent style, you can implement custom drawing functions with the
  abovementioned primitive methods instead.  This class does not intend to satisfy
  everyone's preference on drawing styles.
  
  This visualizer focuses on high rendering quality rather than performance. It is not
  designed to be used for real-time applications.
class_docstr_tok: ["Visualizer","that","draws","data","about","detection","on","images",".","It","contains","methods","like","`","draw_","{","text",",","box","}","`","that","draw","primitive","objects","to","images",",","as","well","as","high-level","wrappers","like","`","draw_","{","instance_predictions","}","`","that","draw","composite","data","in","some","pre-defined","style",".","Note","that","the","exact","visualization","style","for","the","high-level","wrappers","are","subject","to","change",".","Style","such","as","color",",","opacity",",","label","contents",",","visibility","of","labels",",","or","even","the","visibility","of","objects","themselves","(","e.g",".","when","the","object","is","too","small",")","may","change","according","to","different","heuristics",",","as","long","as","the","results","still","look","visually","reasonable",".","To","obtain","a","consistent","style",",","you","can","implement","custom","drawing","functions","with","the","abovementioned","primitive","methods","instead",".","This","class","does","not","intend","to","satisfy","everyone","'s","preference","on","drawing","styles",".","This","visualizer","focuses","on","high","rendering","quality","rather","than","performance",".","It","is","not","designed","to","be","used","for","real-time","applications","."]
docstr: Parameters
  ----------
  box_coord (tuple): a tuple containing x0, y0, x1, y1 coordinates, where x0 and y0
      are the coordinates of the image's top left corner. x1 and y1 are the
      coordinates of the image's bottom right corner.
  alpha (float): blending efficient. Smaller values lead to more transparent masks.
  edge_color: color of the outline of the box. Refer to `matplotlib.colors`
      for full list of formats that are accepted.
  line_style (string): the string to use to create the outline of the boxes.
  
  Returns
  -------
  output (VisImage): image object with box drawn.
code: def draw_box(
      self, box_coord, alpha=0.5, edge_color="g", line_style="-"
  ):
      """
      Parameters
      ----------
      box_coord (tuple): a tuple containing x0, y0, x1, y1 coordinates, where x0 and y0
          are the coordinates of the image's top left corner. x1 and y1 are the
          coordinates of the image's bottom right corner.
      alpha (float): blending efficient. Smaller values lead to more transparent masks.
      edge_color: color of the outline of the box. Refer to `matplotlib.colors`
          for full list of formats that are accepted.
      line_style (string): the string to use to create the outline of the boxes.
  
      Returns
      -------
      output (VisImage): image object with box drawn.
      """
      x0, y0, x1, y1 = box_coord
      width = x1 - x0
      height = y1 - y0
  
      linewidth = max(self._default_font_size / 4, 1)
  
      self.output.ax.add_patch(
          mpl.patches.Rectangle(
              (x0, y0),
              width,
              height,
              fill=False,
              edgecolor=edge_color,
              linewidth=linewidth * self.output.scale,
              alpha=alpha,
              linestyle=line_style,
          )
      )
      return self.output
  
imports: import collections
  import colorsys
  import logging
  import re
  from enum import Enum, unique
  from typing import List
  import matplotlib
  import matplotlib.colors
  import matplotlib.figure
  import matplotlib.pyplot
  import numpy
  import pandas
  from matplotlib.backends.backend_agg import FigureCanvasAgg
  from PIL import Image
  from .colormap import random_color
  from .misc import merge_spans
label_desc: Use image node_id 6 for calling the ObjectDetectionVisualizer obj's underlying member method code with example usage: obj.draw_box(box_coord, alpha, edge_color, line_style) and returns: self