DeployableImage-to-Image Translation or Transformation
Get this modelTry the API
By IBM Developer Staff | Updated March 29, 2019 - Published March 25, 2019
Artificial intelligenceDeep learningVisionImage-to-Image Translation or Transformation
This model is able to upscale a pixelated image by a factor of 4, while generating photo-realistic details. The backbone of this neural network is a Generative Adversarial Network (GAN) trained on 600,000 images of the OpenImages V4 dataset.
The GAN is based on SRGAN-tensorflow GitHub repository and this research article.
The performance of this implementation was evaluated on three datasets: Set5, Set14, and BSD100.
The PSNR (peak signal to noise ratio) and SSIM (structural similarity index) metrics were evaluated, although the paper discusses
the MOS (mean opinion score) as the most favorable metric. In essence, the SRGAN implementation trades a better PSNR or SSIM score for a result more appealing to the human eye. This leads to a collection of output images with more crisp and realistic details.
NOTE: The SRGAN in the paper was trained on 350k ImageNet samples, whereas this SRGAN was trained on 600k OpenImages V4 pictures.
This model can be deployed using the following mechanisms:
docker run -it -p 5000:5000 codait/max-image-resolution-enhancer
kubectl apply -f https://raw.githubusercontent.com/IBM/MAX-Image-Resolution-Enhancer/master/max-image-resolution-enhancer.yaml
You can test or use this model using cURL
Use the model/predict endpoint to load a test image (you can use one of the test images from the assets/test_examples/low_resolution folder) in order to get a high resolution output image returned.
Once deployed, you can test the model from the command line. For example:
curl -F "image=@assets/test_examples/low_resolution/woman.png" -XPOST http://localhost:5000/model/predict > woman_high_res.png
The above command will send the low resolution woman.png file to the model, and save the high resolution output image to the woman_high_res.png file in the root directory.
The ideal input image is a PNG file with a resolution between 100×100 and 500×500, preferably without any post-capture processing and flashy colors. The model is able to generate details from a pixelated image (low DPI), but is not able to correct a ‘blurred’ image.
Left: input image (106×159). Right: output image (424×636)
Get the Code »
June 14, 2019
Artificial intelligenceData science+
May 10, 2019
Back to top