Skip to content

Enhanced Super Resolution GAN Tensorflow Hub Model

Compare
Choose a tag to compare
@captain-pool captain-pool released this 24 Jul 16:56
· 268 commits to master since this release
aab32a4

ESRGAN for Tensorflow Hub

Enhanced Super Resolution GAN for image super resolution.
Produce x4 Super Resolution Image from images of Height, Width >=64.

import tensorflow_hub as hub
import tensorflow as tf
model = hub.load("https://github.com/captain-pool/GSOC/releases/download/1.0.0/esrgan.tar.gz")
super_resolution = model(LOW_RESOLUTION_IMAGE_OF_SHAPE=[BATCH, HEIGHT, WIDTH, 3])

NOTE

  • The image must be a float32 image, converted using tf.cast(image, tf.float32).
  • To display the image, don't forget to convert back to uint8 using
    tf.cast(tf.clip_by_value(image, 0, 255), tf.uint8)