def boundary_iou(src, target):
    """Calculate the IOU between two boundaries.

    Args:
       src (list): Source boundary.
       target (list): Target boundary.

    Returns:
       iou (float): The iou between two boundaries.
    """
    assert valid_boundary(src, False)
    assert valid_boundary(target, False)
    src_poly = points2polygon(src)
    target_poly = points2polygon(target)

    return poly_iou(src_poly, target_poly)
Calculate the IOU between two boundaries.

Args:
src (list): Source boundary.
target (list): Target boundary.

Returns:
iou (float): The iou between two boundaries.
pytorchocr/utils/poly_nms.py