From f2588c06dbbd659e031d3405a1c70f3e80cc71a1 Mon Sep 17 00:00:00 2001 From: Miao Zheng <76149310+MeowZheng@users.noreply.github.com> Date: Tue, 10 Jan 2023 22:29:59 +0800 Subject: [PATCH] [Fix] np.int is deprecated (#270) --- mmflow/datasets/utils/image.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mmflow/datasets/utils/image.py b/mmflow/datasets/utils/image.py index f8e4ac1f..e4eeafbd 100644 --- a/mmflow/datasets/utils/image.py +++ b/mmflow/datasets/utils/image.py @@ -25,7 +25,7 @@ def adjust_hue(img, hue_factor): else: assert hue_factor >= -0.5 and hue_factor <= 0.5 img = mmcv.bgr2hsv(img) - img[:, :, 0] = (img[:, :, 0].astype(np.int) + int(hue_factor * 180.) + + img[:, :, 0] = (img[:, :, 0].astype(np.int_) + int(hue_factor * 180.) + 180) % 180 img = mmcv.hsv2bgr(img) return img