Compressed ESRGAN for TensorFlow Hub
Compressed Enhanced Super Resolution GAN for image super resolution.
import tensorflow_hub as hub
import tensorflow as tf
model = hub.load("https://github.com/captain-pool/GSOC/releases/download/"
"2.0.0/compressed_esrgan.tar.gz")
super_resolution = model.call(LOW_RESOLUTION_IMAGE_OF_SHAPE=[BATCH, 180, 320, 3])
Results
Latency: 0.4 Seconds per image
Mean PSNR: 25.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)
The Optimized TFLite file is also attached.
Input Shape: [1, 180, 320, 3]
Output Shape: [1, 720, 1280, 3]