SRGAN icon indicating copy to clipboard operation
SRGAN copied to clipboard

jpeg image quality enhancement

Open Erfun76 opened this issue 4 years ago • 0 comments

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

Erfun76 avatar Apr 27 '20 07:04 Erfun76