(gts,
                 proposals,
                 proposal_nums=None,
                 iou_thrs=None,
                 print_summary=True)
return recalls
Calculate recalls.

    Args:
        gts(list or ndarray): a list of arrays of shape (n, 4)
        proposals(list or ndarray): a list of arrays of shape (k, 4) or (k, 5)
        proposal_nums(int or list of int or ndarray): top N proposals
        thrs(float or list or ndarray): iou thresholds

    Returns:
        ndarray: recalls of different ious and proposal nums
Calculate recalls.
Calculate recalls .
def eval_recalls(gts,
                 proposals,
                 proposal_nums=None,
                 iou_thrs=None,
                 print_summary=True):
    """Calculate recalls.

    Args:
        gts(list or ndarray): a list of arrays of shape (n, 4)
        proposals(list or ndarray): a list of arrays of shape (k, 4) or (k, 5)
        proposal_nums(int or list of int or ndarray): top N proposals
        thrs(float or list or ndarray): iou thresholds

    Returns:
        ndarray: recalls of different ious and proposal nums
    """

    img_num = len(gts)
    assert img_num == len(proposals)

    proposal_nums, iou_thrs = set_recall_param(proposal_nums, iou_thrs)

    all_ious = []
    for i in range(img_num):
        if proposals[i].ndim == 2 and proposals[i].shape[1] == 5:
            scores = proposals[i][:, 4]
            sort_idx = np.argsort(scores)[::-1]
            img_proposal = proposals[i][sort_idx, :]
        else:
            img_proposal = proposals[i]
        prop_num = min(img_proposal.shape[0], proposal_nums[-1])
        if gts[i] is None or gts[i].shape[0] == 0:
            ious = np.zeros((0, img_proposal.shape[0]), dtype=np.float32)
        else:
            ious = bbox_overlaps(gts[i], img_proposal[:prop_num, :4])
        all_ious.append(ious)
    all_ious = np.array(all_ious)
    recalls = _recalls(all_ious, proposal_nums, iou_thrs)
    if print_summary:
        print_recall_summary(recalls, proposal_nums, iou_thrs)
    return recalls
def eval_recalls ( gts , proposals , proposal_nums = None , iou_thrs = None , print_summary = True ) : img_num = len ( gts ) assert img_num == len ( proposals ) proposal_nums , iou_thrs = set_recall_param ( proposal_nums , iou_thrs ) all_ious = [ ] for i in range ( img_num ) : if proposals [ i ] . ndim == 2 and proposals [ i ] . shape [ 1 ] == 5 : scores = proposals [ i ] [ : , 4 ] sort_idx = np . argsort ( scores ) [ : : - 1 ] img_proposal = proposals [ i ] [ sort_idx , : ] else : img_proposal = proposals [ i ] prop_num = min ( img_proposal . shape [ 0 ] , proposal_nums [ - 1 ] ) if gts [ i ] is None or gts [ i ] . shape [ 0 ] == 0 : ious = np . zeros ( ( 0 , img_proposal . shape [ 0 ] ) , dtype = np . float32 ) else : ious = bbox_overlaps ( gts [ i ] , img_proposal [ : prop_num , : 4 ] ) all_ious . append ( ious ) all_ious = np . array ( all_ious ) recalls = _recalls ( all_ious , proposal_nums , iou_thrs ) if print_summary : print_recall_summary ( recalls , proposal_nums , iou_thrs ) return recalls