docstr: Args:
      img (ndarray): an RGB image of shape (H, W, 3).
      scale (float): scale the input image
docstr_tok: ["Args",":","img","(","ndarray",")",":","an","RGB","image","of","shape","(","H",",","W",",","3",")",".","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).
          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
  from enum import Enum, unique
  import numpy
  import matplotlib
  import matplotlib.colors
  import matplotlib.figure
  import torch
  from matplotlib.backends.backend_agg import FigureCanvasAgg
  from PIL import Image
  from ..data.registry.catalog import MetadataCatalog
  from ..data.structures import BitMasks, Boxes, BoxMode, Keypoints, PolygonMasks
label_desc: Use image node_id 1 to create a new VisImage object  with example: obj = VisImage(img, scale)