def calc_is_correct(gt_bboxes, pred_bboxes, iou_th=0.5):
    '\n    gt_bboxes: (N, 4) np.array in xywh format\n    pred_bboxes: (N, 5) np.array in conf+xywh format\n    '
    if ((len(gt_bboxes) == 0) and (len(pred_bboxes) == 0)):
        (tps, fps, fns) = (0, 0, 0)
        return (tps, fps, fns)
    elif (len(gt_bboxes) == 0):
        (tps, fps, fns) = (0, len(pred_bboxes), 0)
        return (tps, fps, fns)
    elif (len(pred_bboxes) == 0):
        (tps, fps, fns) = (0, 0, len(gt_bboxes))
        return (tps, fps, fns)
    pred_bboxes = pred_bboxes[pred_bboxes[:, 0].argsort()[::(- 1)]]
    (tps, fps, fns) = (0, 0, 0)
    (tp, fp, fn) = calc_is_correct_at_iou_th(gt_bboxes, pred_bboxes, iou_th)
    tps += tp
    fps += fp
    fns += fn
    return (tps, fps, fns)
gt_bboxes: (N, 4) np.array in xywh format
pred_bboxes: (N, 5) np.array in conf+xywh format
def calc_is_correct(gt_bboxes, pred_bboxes, iou_th=0.5):
    '\n    gt_bboxes: (N, 4) np.array in xywh format\n    pred_bboxes: (N, 5) np.array in conf+xywh format\n    '
    if ((len(gt_bboxes) == 0) and (len(pred_bboxes) == 0)):
        (tps, fps, fns) = (0, 0, 0)
        return (tps, fps, fns)
    elif (len(gt_bboxes) == 0):
        (tps, fps, fns) = (0, len(pred_bboxes), 0)
        return (tps, fps, fns)
    elif (len(pred_bboxes) == 0):
        (tps, fps, fns) = (0, 0, len(gt_bboxes))
        return (tps, fps, fns)
    pred_bboxes = pred_bboxes[pred_bboxes[:, 0].argsort()[::(- 1)]]
    (tps, fps, fns) = (0, 0, 0)
    (tp, fp, fn) = calc_is_correct_at_iou_th(gt_bboxes, pred_bboxes, iou_th)
    tps += tp
    fps += fp
    fns += fn
    return (tps, fps, fns)