image thumbnail

SRGAN-MSE Matlab port

version 1.0.0.1 (5.04 MB) by manoreken
SRGAN-MSE Single Image Super Resolution Matlab port. Inputs pristine image and performs 2x upsampling using a deep learning.

62 Downloads

Updated Sun, 27 Jun 2021 03:24:44 +0000

View License

SRGAN-MSE Single Image Super Resolution Matlab port.
■ Prerequisites ■
  • Matlab 2021a
  • Image Processing toolbox
  • Statistics and Machine Learning toolbox
  • Deep Learning Toolbox
  • Parallel Computing Toolbox
■ How to Test ■
  • Run SRGAN_Test.m that calls SRGAN_2xSuperResolution.m
  • Trained net is loaded on the line 5 of SRGAN_2xSuperResolution.m
■ How to Perform SRGAN Super-Resolution to your image file ■
Input image MyPicture.jpg should be pristine (not blurred) image. SRGAN neural net will upscale the image by 2x.
img = imread("MyPicture.jpg"); % 1024x768 input image
imgSR = SRGAN_2xSuperResolution(img);
imwrite(imgSR, "MyPicture_2x_SRGAN_MSE.png"); % 2048x1536 image is outputted
■ How to Train the network using Flickr2K dataset ■
Download Flickr2K dataset and place it on Flickr2K/Flickr2K_HR for train data of 2650 images
Run CreateTrainingSetAll_Flickr2K.m to create Flickr2K_RGB_MatlabF folder that contains converted mat files.
Run SRGAN_Train_Flickr2K.m to train and create trained file.
use your trained file on SRGAN_2xSuperResolution.m
■ Difference from original SRGAN ■
1. Mean squared error regression.
2. train input size is 112x112 (not 48x48)
3. Only 2x super resolution is implemented.
4. VGG19 loss is not implemented yet. therefore it is SRGAN-MSE
■ Changelog ■
Version 20210627 1.0.0
・Initial release.
■ References ■
Ledig, C., Theis, L., Husz ́ar, F., Caballero, J., Cunningham, A., Acosta, A., Aitken,A., Tejani, A., Totz, J., Wang, Z., et al.: Photo-realistic single image super-resolution using a generative adversarial network. In: CVPR (2017)
https://arxiv.org/pdf/1609.04802.pdf
Single Image Super-Resolution Using Deep Learning
(VDSR is implemented using Matlab Deep Learning Toolbox)
https://www.mathworks.com/help/images/single-image-super-resolution-using-deep-learning.html
Matlab PReLU layer
https://www.mathworks.com/help/deeplearning/ug/define-custom-deep-learning-layer.html

Cite As

manoreken (2022). SRGAN-MSE Matlab port (https://www.mathworks.com/matlabcentral/fileexchange/94885-srgan-mse-matlab-port), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2021a
Compatible with R2021a
Platform Compatibility
Windows macOS Linux
Tags Add Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!