From 796659b0ac69a9befeb4dad79b1ed51cd52368e0 Mon Sep 17 00:00:00 2001 From: James Betker Date: Wed, 28 Oct 2020 16:40:47 -0600 Subject: [PATCH] Add 'jpeg-normal' corruption --- codes/data/image_corruptor.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/codes/data/image_corruptor.py b/codes/data/image_corruptor.py index 072ca7b0..e88968e2 100644 --- a/codes/data/image_corruptor.py +++ b/codes/data/image_corruptor.py @@ -100,6 +100,9 @@ class ImageCorruptor: elif aug == 'jpeg-broad': lo=15 range=60 + elif aug == 'jpeg-normal': + lo=35 + range=60 # JPEG compression qf = (rand_int % range + lo) # cv2's jpeg compression is "odd". It introduces artifacts. Use PIL instead.