From 88a8be12977d78c5a68ee398a9698d463d951bad Mon Sep 17 00:00:00 2001 From: WenmuZhou Date: Wed, 30 Jun 2021 10:50:13 +0800 Subject: [PATCH] add assert --- tools/infer/utility.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/infer/utility.py b/tools/infer/utility.py index 3fa62c77..613e42ef 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]), -- GitLab