The authors of the SRCNN describe their network, pointing out the equivalence of their method to the sparse-coding method, which is a widely used learning method for image SR. This is an important and educational aspect of their work, because it shows how example-based learning methods can be adapted and generalized to CNN models.
The SRCNN consists of the following operations:
1.**Preprocessing**: Up-scales LR image to desired HR size.
2.**Feature extraction**: Extracts a set of feature maps from the up-scaled LR image.
3.**Non-linear mapping**: Maps the feature maps representing LR to HR patches.
4.**Reconstruction**: Produces the HR image from HR patches.
Operations 2–4 above can be cast as a convolutional layer in a CNN that accepts as input the preprocessed images from step 1 above, and outputs the HR image
This is a complete Pytorch implementation of [Christian Ledig et al: "Photo-Realistic Single Image Super-Resolution Using a Generative Adversarial Network"](https://arxiv.org/abs/1609.04802),
reproducing their results.
This paper's main result is that through using an adversarial and a content loss, a convolutional neural network is able to produce sharp, almost photo-realistic upsamplings of images.
The implementation tries to be as faithful as possible to the original paper.
See [implementation details](#method-and-implementation-details) for a closer look.
## Method and Implementation Details
Architecture diagram of the super-resolution and discriminator networks by Ledig et al: