Function Repository Resource:

ImageSuperResolution

Source Notebook

Use neural networks to magnify images

Contributed by: Aster Ctor

ResourceFunction["ImageSuperResolution"][image]

Resize the image by a factor of 2.

ResourceFunction["ImageSuperResolution"][image,zoom]

Resize the image by a factor of zoom in each dimension.

Details and Options

The Method option provides the following choices:
"VDSR""Very Deep Net for Super-Resolution"
"ESRGAN""Enhanced Super-Resolution GAN Trained on DIV2K, Flickr2K and OST Data"
Some PerformanceGoal option settings are:
Automaticautomatically balance performance based on input size
"Performance"the effect is prioritized, and the speed of some algorithms may be very slow
"Speed"speed is prioritized (useful when there is no GPU availability)
Output size can vary slightly from that requested. One can use "SizeCheck"True to force output size to be exactly equal to the specified zoom multiple.

Examples

Basic Examples (3) 

Get an image resized to 128×128:

In[1]:=
gob = ImageResize[
  ResourceData["Sample Image: Girl on a Blue Background"], 128]
Out[1]=

Zoom in to four times the size:

In[2]:=
ResourceFunction["ImageSuperResolution"][gob]
Out[2]=

Compare to the original picture:

In[3]:=
ImageResize[gob, 256]
Out[3]=

Properties and Relations (3) 

Get an image resized to 128×128:

In[4]:=
gob = ImageResize[
  ResourceData["Sample Image: Girl on a Blue Background"], 128]
Out[4]=

The magnification factor need not be an integer:

In[5]:=
ResourceFunction["ImageSuperResolution"][gob, 1.5, Method -> "ESRGAN"]
Out[5]=

Magnification using ImageSuperResolution is less blurry than with ImageResize:

In[6]:=
ImageResize[gob, Scaled[1.5], Resampling -> {"OMOMS", 7}]
Out[6]=

Publisher

Aster Ctor (MoeNet)

Version History

  • 1.0.0 – 13 November 2019

Related Resources

License Information