From 25b007a0f58e033708cfef5a23370dafacac8d35 Mon Sep 17 00:00:00 2001 From: James Betker Date: Wed, 28 Oct 2020 17:37:39 -0600 Subject: [PATCH] Increase jpeg corruption & add error --- codes/data/image_corruptor.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/codes/data/image_corruptor.py b/codes/data/image_corruptor.py index e88968e2..03fcda78 100644 --- a/codes/data/image_corruptor.py +++ b/codes/data/image_corruptor.py @@ -101,8 +101,10 @@ class ImageCorruptor: lo=15 range=60 elif aug == 'jpeg-normal': - lo=35 - range=60 + lo=55 + range=35 + else: + raise NotImplementedError("specified jpeg corruption doesn't exist") # JPEG compression qf = (rand_int % range + lo) # cv2's jpeg compression is "odd". It introduces artifacts. Use PIL instead.