docstr: Args:
      img (ndarray): an RGB image of shape (H, W, 3) in range [0, 255].
      scale (float): scale the input image
docstr_tok: ["Args",":","img","(","ndarray",")",":","an","RGB","image","of","shape","(","H",",","W",",","3",")","in","range","[","0",",","255","]",".","scale","(","float",")",":","scale","the","input","image"]
code: def __init__(self, img, scale=1.0):
      """
      Args:
          img (ndarray): an RGB image of shape (H, W, 3) in range [0, 255].
          scale (float): scale the input image
      """
      self.img = img
      self.scale = scale
      self.width, self.height = img.shape[1], img.shape[0]
      self._setup_figure(img)
  
imports: import colorsys
  import logging
  import math
  import numpy
  from enum import Enum, unique
  import cv2
  import matplotlib
  import matplotlib.colors
  import matplotlib.figure
  import pycocotools.mask
  import torch
  from matplotlib.backends.backend_agg import FigureCanvasAgg
  from PIL import Image
  from detectron2.data import MetadataCatalog
  from detectron2.structures import BitMasks, Boxes, BoxMode, Keypoints, PolygonMasks, RotatedBoxes
  from detectron2.utils.file_io import PathManager
  from .colormap import random_color
label_desc: Use image node_id 1 to create a new VisImage object  with example: obj = VisImage(img, scale)