SRGAN
SRGAN copied to clipboard
jpeg image quality enhancement
I'm going to enhance the quality of images compressed with JPEG format, what is the best way for loading my data? you take high-quality images and resize them to low quality with code:
def _map_fn_train(img):
hr_patch = tf.image.random_crop(img, [384, 384, 3])
hr_patch = hr_patch / (255. / 2.)
hr_patch = hr_patch - 1.
hr_patch = tf.image.random_flip_left_right(hr_patch)
lr_patch = tf.image.resize(hr_patch, size=[96, 96])
return lr_patch, hr_patch