parameters: (pred, gt, iou_thresh)
return_statement: return pred_recall, proposal_list
docstring: single image evaluation
      pred: Nx5
      gt: Nx4
      ignore:
docstring_summary: single image evaluation
      pred: Nx5
      gt: Nx4
      ignore:
docstring_tokens: single image evaluation pred : Nx5 gt : Nx4 ignore :
function: def image_eval(pred, gt, iou_thresh):
      """ 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]
  
      overlaps = bbox_overlaps(_pred[:, :4], _gt)
  
      for h in range(_pred.shape[0]):
  
          gt_overlap = overlaps[h]
          max_overlap, max_idx = gt_overlap.max(), gt_overlap.argmax()
          if max_overlap >= iou_thresh:
              if 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
function_tokens: def image_eval ( pred , gt , iou_thresh ) : _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 ] overlaps = bbox_overlaps ( _pred [ : , : 4 ] , _gt ) for h in range ( _pred . shape [ 0 ] ) : gt_overlap = overlaps [ h ] max_overlap , max_idx = gt_overlap . max ( ) , gt_overlap . argmax ( ) if max_overlap >= iou_thresh : if 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