From cc4571eb8d2722f177c2bb0ff3a2edb6c3ba887a Mon Sep 17 00:00:00 2001 From: James Betker Date: Sun, 24 May 2020 12:35:41 -0600 Subject: [PATCH] Randomize blur effect --- codes/data/LQGT_dataset.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/codes/data/LQGT_dataset.py b/codes/data/LQGT_dataset.py index bc5f8063..6c8d1ba8 100644 --- a/codes/data/LQGT_dataset.py +++ b/codes/data/LQGT_dataset.py @@ -143,7 +143,8 @@ class LQGTDataset(data.Dataset): self.opt['use_rot']) if self.opt['use_blurring']: - img_LQ = cv2.GaussianBlur(img_LQ, (3, 3), 10) + blur_sig = int(random.randrange(0, 10)) + img_LQ = cv2.GaussianBlur(img_LQ, (3, 3), blur_sig) if self.opt['color']: # change color space if necessary img_LQ = util.channel_convert(C, self.opt['color'],