Releases: captain-pool/GSOC
Releases · captain-pool/GSOC
Compressed ESRGAN Tensorflow Hub and TFLite Model (DIV2K)
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]
Enhanced Super Resolution GAN Tensorflow Hub Model
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)