code: def vis_detections(im, class_name, dets, thresh=0.3):
      """Visual debugging of detections."""
      import matplotlib.pyplot as plt
  
      im = im[:, :, (2, 1, 0)]
      for i in range(np.minimum(10, dets.shape[0])):
          bbox = dets[i, :4]
          score = dets[i, -1]
          if score > thresh:
              plt.cla()
              plt.imshow(im)
              plt.gca().add_patch(
                  plt.Rectangle(
                      (bbox[0], bbox[1]),
                      bbox[2] - bbox[0],
                      bbox[3] - bbox[1],
                      fill=False,
                      edgecolor="g",
                      linewidth=3,
                  )
              )
              plt.title("{}  {:.3f}".format(class_name, score))
              plt.show()
  
file_path: CNTK/Examples/Image/Detection/FastRCNN/BrainScript/fastRCNN/test.py
imports: from __future__ import print_function
  import os, sys, cv2, numpy, pickle, heapq
  from .nms import nms
  from .utils.cython_nms import nms
  from .timer import Timer
  from cntk_helpers import im_detect, apply_nms
  from builtins import range
label_desc: Use image node_id 7 for calling a global function with example usage: vis_detections(im, class_name, dets, thresh) without return types