code: def draw_bounding_boxes(img, bboxes, names, colors=None, thresh=0.5):
      """
      The transformed cordinates are further used to draw bounding boxes for the detected objects.
  
      Args:
          img (numpy.ndarray) : Input image
          bboxes (numpy.ndarray):
              Transformed bounding box coorinates from the model.
          names (list of str): Name of categories in the dataset
          colors (list of tuple of 3 ints): Colors for bunding boxes
          thresh (float): Threshold of bounding boxes.
  
      """
      if colors is None:
          rng = np.random.RandomState(1223)
          colors = rng.randint(0, 256, (len(names), 3)).astype(np.uint8)
          colors = [tuple(c.tolist()) for c in colors]
  
      im_h, im_w = img.shape[:2]
      draw = DrawBoundingBoxes(img, colors)
      for bb in bboxes:
          x, y, w, h = bb[:4]
          dw = w / 2.0
          dh = h / 2.0
          x0 = int(np.clip(x - dw, 0, im_w))
          y0 = int(np.clip(y - dh, 0, im_h))
          x1 = int(np.clip(x + dw, 0, im_w))
          y1 = int(np.clip(y + dh, 0, im_h))
          det_ind = np.where(bb[5:] > thresh)[0]
          if len(det_ind) == 0:
              continue
          prob = bb[5 + det_ind]
          label = ", ".join(
              "{}: {:.2f}%".format(names[det_ind[j]], prob[j] * 100)
              for j in range(len(det_ind))
          )
          print("[INFO] {}".format(label))
          draw.draw((x0, y0, x1, y1), det_ind[0], label)
      return draw.get()
  
file_path: nnabla/python/src/nnabla/models/object_detection/utils.py
imports: import numpy
  from nnabla.models.object_detection.draw_utils import DrawBoundingBoxes
  from nnabla.utils.image_utils import imresize
label_desc: Use image node_id 1 for calling a global function with example usage: draw_bounding_boxes(img, bboxes, names, colors, thresh) and returns: draw