diff --git a/tools/infer/utility.py b/tools/infer/utility.py index 3fa62c775c53a9bb48c19d66f79430859d42d3f3..613e42ef76f1acb2bd7223bdc8c77274cc842aab 100755 --- a/tools/infer/utility.py +++ b/tools/infer/utility.py @@ -625,6 +625,7 @@ def get_rotate_crop_image(img, points): points[:, 0] = points[:, 0] - left points[:, 1] = points[:, 1] - top ''' + assert len(points) == 4, "shape of points must be 4*2" img_crop_width = int( max( np.linalg.norm(points[0] - points[1]),