Shortcuts

mmocr.utils.is_poly_inside_rect

mmocr.utils.is_poly_inside_rect(poly, rect)[source]

Check if the polygon is inside the target region. :param poly: Polygon in shape (N, ). :type poly: ArrayLike :param rect: Target region [x1, y1, x2, y2]. :type rect: ndarray

Returns

Whether the polygon is inside the cropping region.

Return type

bool

Parameters