Wolfram Neural Net Repository
Immediate Computable Access to Neural Net Models
Increase the resolution of an image
Released in 2016, this net uses an architecture inspired by VGG in order to create super-resolution images. It takes an interpolated low-resolution image and refines the details to create a sharp upsampling.
Number of layers: 40 | Parameter count: 665,921 | Trained size: 3 MB |
This model achieves a peak signal-to-noise ratio of 30.76 on the Urban 100 dataset with a scale factor of 2.
Get the pre-trained net:
In[1]:= | ![]() |
Out[1]= | ![]() |
Write an evaluation function to handle net resizing and color conversion:
In[2]:= | ![]() |
Get an image:
In[3]:= | ![]() |
Downscale the image by a factor of 3:
In[4]:= | ![]() |
In[5]:= | ![]() |
Out[5]= | ![]() |
Upscale the downscaled image using the net:
In[6]:= | ![]() |
Out[6]= | ![]() |
Compare the details with a naively upscaled version:
In[7]:= | ![]() |
Out[7]= | ![]() |
Evaluate the peak signal-to-noise ratio:
In[8]:= | ![]() |
Out[8]= | ![]() |
Inspect the number of parameters of all arrays in the net:
In[9]:= | ![]() |
Out[9]= | ![]() |
Obtain the total number of parameters:
In[10]:= | ![]() |
Out[10]= | ![]() |
Obtain the layer type counts:
In[11]:= | ![]() |
Out[11]= | ![]() |
Display the summary graphic:
In[12]:= | ![]() |
Out[12]= | ![]() |
Export the net into a format that can be opened in MXNet:
In[13]:= | ![]() |
Out[13]= | ![]() |
Export also creates a net.params file containing parameters:
In[14]:= | ![]() |
Out[14]= | ![]() |
Get the size of the parameter file:
In[15]:= | ![]() |
Out[15]= | ![]() |
The size is similar to the byte count of the resource object:
In[16]:= | ![]() |
Out[16]= | ![]() |
Represent the MXNet net as a graph:
In[17]:= | ![]() |
Out[17]= | ![]() |
Wolfram Language 11.3 (March 2018) or above