From 8c9865468eae44feeb67f7cc601f8d6b2c5362fc Mon Sep 17 00:00:00 2001 From: Zahra Golpayegani Date: Sun, 18 Sep 2022 19:33:00 -0400 Subject: [PATCH] update transforms.py (#1287) changed `random.randint` to `random.uniform` in `RandomGamma` to solve issue #1286 in Albumentations Co-authored-by: Vladimir Iglovikov --- albumentations/augmentations/transforms.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/albumentations/augmentations/transforms.py b/albumentations/augmentations/transforms.py index 513f42c14..fd9b039c7 100644 --- a/albumentations/augmentations/transforms.py +++ b/albumentations/augmentations/transforms.py @@ -1389,7 +1389,7 @@ def apply(self, img, gamma=1, **params): return F.gamma_transform(img, gamma=gamma) def get_params(self): - return {"gamma": random.randint(self.gamma_limit[0], self.gamma_limit[1]) / 100.0} + return {"gamma": random.uniform(self.gamma_limit[0], self.gamma_limit[1]) / 100.0} def get_transform_init_args_names(self): return ("gamma_limit", "eps")