From 3bf169e5460d3df696e6750b1887648e4b96e93e Mon Sep 17 00:00:00 2001 From: Yiheng Wang Date: Thu, 7 Sep 2023 16:40:42 +0800 Subject: [PATCH] fix flake8 issue Signed-off-by: Yiheng Wang --- models/spleen_deepedit_annotation/scripts/transforms.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/models/spleen_deepedit_annotation/scripts/transforms.py b/models/spleen_deepedit_annotation/scripts/transforms.py index 3372f75b..3e85f5ac 100644 --- a/models/spleen_deepedit_annotation/scripts/transforms.py +++ b/models/spleen_deepedit_annotation/scripts/transforms.py @@ -17,8 +17,8 @@ def transform_points(self, point, affine): """transform point to the coordinates of the transformed image point: numpy array [bs, N, 3] """ - bs, N = point.shape[:2] - point = np.concatenate((point, np.ones((bs, N, 1))), axis=-1) + bs, n = point.shape[:2] + point = np.concatenate((point, np.ones((bs, n, 1))), axis=-1) point = rearrange(point, "b n d -> d (b n)") point = affine @ point point = rearrange(point, "d (b n)-> b n d", b=bs)[:, :, :3]