def calc_bbox_overlap_union_iou(pred: (np.ndarray or None), teacher: np.ndarray) -> Tuple[(float, float, float)]:
    '\n    :param pred: ndarray (4, )\n    :param teacher: ndarray (4, )\n    :return: overlap, union, iou\n    '
    teacher_area = ((teacher[2] - teacher[0]) * (teacher[3] - teacher[1]))
    if (pred is None):
        return (0.0, teacher_area, 0.0)
    pred_area = ((pred[2] - pred[0]) * (pred[3] - pred[1]))
    intersection_width = np.maximum((np.minimum(pred[2], teacher[2]) - np.maximum(pred[0], teacher[0])), 0)
    intersection_height = np.maximum((np.minimum(pred[3], teacher[3]) - np.maximum(pred[1], teacher[1])), 0)
    overlap = (intersection_width * intersection_height)
    union = ((teacher_area + pred_area) - overlap)
    iou = (overlap / union)
    return (overlap, union, iou)
:param pred: ndarray (4, )
:param teacher: ndarray (4, )
:return: overlap, union, iou
def calc_bbox_overlap_union_iou(pred: (np.ndarray or None), teacher: np.ndarray) -> Tuple[(float, float, float)]:
    '\n    :param pred: ndarray (4, )\n    :param teacher: ndarray (4, )\n    :return: overlap, union, iou\n    '
    teacher_area = ((teacher[2] - teacher[0]) * (teacher[3] - teacher[1]))
    if (pred is None):
        return (0.0, teacher_area, 0.0)
    pred_area = ((pred[2] - pred[0]) * (pred[3] - pred[1]))
    intersection_width = np.maximum((np.minimum(pred[2], teacher[2]) - np.maximum(pred[0], teacher[0])), 0)
    intersection_height = np.maximum((np.minimum(pred[3], teacher[3]) - np.maximum(pred[1], teacher[1])), 0)
    overlap = (intersection_width * intersection_height)
    union = ((teacher_area + pred_area) - overlap)
    iou = (overlap / union)
    return (overlap, union, iou)