code: def image_eval(pred, gt, ignore, iou_thresh, mpp):
      """single image evaluation
      pred: Nx5
      gt: Nx4
      ignore:
      """
  
      _pred = pred.copy()
      _gt = gt.copy()
      pred_recall = np.zeros(_pred.shape[0])
      recall_list = np.zeros(_gt.shape[0])
      proposal_list = np.ones(_pred.shape[0])
  
      _pred[:, 2] = _pred[:, 2] + _pred[:, 0]
      _pred[:, 3] = _pred[:, 3] + _pred[:, 1]
      _gt[:, 2] = _gt[:, 2] + _gt[:, 0]
      _gt[:, 3] = _gt[:, 3] + _gt[:, 1]
  
      gt_overlap_list = mpp.starmap(
          bbox_overlap,
          zip(
              [_gt] * _pred.shape[0],
              [_pred[h] for h in range(_pred.shape[0])],
          ),
      )
  
      # use_cuda = True
      # if use_cuda:
      #    _pred = torch.cuda.FloatTensor(_pred[:,:4])
      #    _gt = torch.cuda.FloatTensor(_gt)
      # else:
      #    _pred = torch.FloatTensor(_pred[:,:4])
      #    _gt = torch.FloatTensor(_gt)
  
      # overlaps = jaccard(_pred, _gt).cpu().numpy()
      # overlaps = compute_iou((_pred[:, :4]), (_gt))
  
      # overlaps = bbox_overlaps(_pred, _gt)
  
      # if use_cuda:
      #    overlaps = overlaps.cpu().numpy()
      # else:
      #    overlaps = overlaps.numpy()
  
      for h in range(_pred.shape[0]):
          # gt_overlap = overlaps[h]
          # gt_overlap = bbox_overlap(_gt, _pred[h])
          gt_overlap = gt_overlap_list[h]
          # if use_cuda:
          #    gt_overlap = gt_overlap.cpu().numpy()
          # else:
          #    gt_overlap = gt_overlap.numpy()
  
          # max_overlap, max_idx = gt_overlap.max(), gt_overlap.argmax()
          # gt_overlap = compute_iou(_gt, _pred[h, :4])
          # exit()
          # exit()
          # print ('overlap', gt_overlap)
          max_overlap, max_idx = gt_overlap.max(), gt_overlap.argmax()
  
          if max_overlap >= iou_thresh:
              if ignore[max_idx] == 0:
                  recall_list[max_idx] = -1
                  proposal_list[h] = -1
              elif recall_list[max_idx] == 0:
                  recall_list[max_idx] = 1
  
          r_keep_index = np.where(recall_list == 1)[0]
          pred_recall[h] = len(r_keep_index)
  
      return pred_recall, proposal_list
  
imports: from __future__ import absolute_import
  import os
  import tqdm
  import pickle
  import datetime
  import argparse
  import numpy
  from scipy.io import loadmat
label_desc: Use image node_id 11 for calling a global function with example usage: image_eval(pred, gt, ignore, iou_thresh, mpp) and returns: pred_recall,  proposal_list