def METHOD_NAME(self, score_map: np.ndarray,
                    poly_pts: np.ndarray) -> float:
    """Compute the average score over the area of the bounding box of the
    polygon.
    Args:
        score_map (np.ndarray): The score map.
        poly_pts (np.ndarray): The polygon points.
    Returns:
        float: The average score.
    """
    h, w = score_map.shape[:2]
    poly_pts = poly_pts.copy()
    xmin = np.clip(
        np.floor(poly_pts[:, 0].min()).astype(np.int32), 0, w - 1)
    xmax = np.clip(
        np.ceil(poly_pts[:, 0].max()).astype(np.int32), 0, w - 1)
    ymin = np.clip(
        np.floor(poly_pts[:, 1].min()).astype(np.int32), 0, h - 1)
    ymax = np.clip(
        np.ceil(poly_pts[:, 1].max()).astype(np.int32), 0, h - 1)
    mask = np.zeros((ymax - ymin + 1, xmax - xmin + 1), dtype=np.uint8)
    poly_pts[:, 0] = poly_pts[:, 0] - xmin
    poly_pts[:, 1] = poly_pts[:, 1] - ymin
    cv2.fillPoly(mask, poly_pts.reshape(1, -1, 2).astype(np.int32), 1)
    return cv2.mean(score_map[ymin:ymax + 1, xmin:xmax + 1], mask)[0]