code: def filter_results(regressed_rois, cls_probs, cfg):
      """
      Filters the provided results by performing NMS (non maximum suppression)
      :param regressed_rois: the predicted bounding boxes
      :param cls_probs: class probabilities per bounding box
      :param cfg: the configuration
      :return:
          bboxes - the filtered list of bounding boxes
          labels - the single class label per bounding box
          scores - the probability for the assigned class label per bounding box
      """
  
      labels = cls_probs.argmax(axis=1)
      scores = cls_probs.max(axis=1)
      nmsKeepIndices = apply_nms_to_single_image_results(
          regressed_rois,
          labels,
          scores,
          use_gpu_nms=cfg.USE_GPU_NMS,
          device_id=cfg.GPU_ID,
          nms_threshold=cfg.RESULTS_NMS_THRESHOLD,
          conf_threshold=cfg.RESULTS_NMS_CONF_THRESHOLD,
      )
  
      filtered_bboxes = regressed_rois[nmsKeepIndices]
      filtered_labels = labels[nmsKeepIndices]
      filtered_scores = scores[nmsKeepIndices]
  
      return filtered_bboxes, filtered_labels, filtered_scores
  
file_path: CNTK/Examples/Image/Detection/utils/od_utils.py
imports: import easydict
  from utils.nms_wrapper import apply_nms_to_single_image_results
label_desc: Use image node_id 4 for calling a global function with example usage: filter_results(regressed_rois, cls_probs, cfg) and returns: filtered_bboxes,  filtered_labels,  filtered_scores