def get_thresholds(scores, num_gt, num_sample_pts=41):
    """Get thresholds from a set of scores, up to num sample points

    Parameters
    ----------
    score: np.ndarray
        Numpy array of scores for predictions

    num_gt: int
        Number of ground truths

    num_sample_pts: int, default: 41
        Max number of thresholds on PR curve

    Returns
    -------
    threshold: np.ndarray
        Array of length 41, containing recall thresholds
    """
    scores.sort()
    scores = scores[::-1]
    current_recall = 0
    thresholds = []
    for i, score in enumerate(scores):
        l_recall = (i + 1) / num_gt
        if i < (len(scores) - 1):
            r_recall = (i + 2) / num_gt
        else:
            r_recall = l_recall
        if (((r_recall - current_recall) < (current_recall - l_recall)) and (i < (len(scores) - 1))):
            continue
        thresholds.append(score)
        current_recall += 1 / (num_sample_pts - 1.0)
    return thresholds
Get thresholds from a set of scores, up to num sample points

    Parameters
    ----------
    score: np.ndarray
        Numpy array of scores for predictions

    num_gt: int
        Number of ground truths

    num_sample_pts: int, default: 41
        Max number of thresholds on PR curve

    Returns
    -------
    threshold: np.ndarray
        Array of length 41, containing recall thresholds
    
tridet/evaluators/kitti_3d_evaluator.py