TL;DR
Super-resolution takes a small, low-detail image and produces a larger image with finer detail. Simple resizing can make the picture bigger, but it cannot add detail that was never recorded, so the result looks soft. A learned network predicts the missing detail from patterns it saw in many training images.
Builds on: Bilinear Interpolation, Convolutional Neural Network, Transposed Convolution, Mean Squared Error · Leads to: Generative Adversarial Network
Where it's used
Games. Modern graphics cards can render a game at a lower internal resolution and then use a neural network to reconstruct a sharper frame at the display's resolution, which saves rendering time. NVIDIA's DLSS is a well-known product built this way.
Old photos and film. Archives hold scans that are small or soft. Restoration tools upscale them with learned models so that a print or a screen shows more usable detail than a plain enlargement would.
Satellite and aerial imagery. Sensors often record a scene at a coarse ground resolution. Learned upscaling is used to make such images easier for people to read, though the output is an estimate, not a new measurement.
How it works
We follow one tiny case: a single row of two pixels, brightness 0 (black) and 100 (bright), turned into four pixels. The true, sharp version of that row is 0, 0, 100, 100, with the edge in the middle. We only see the two low-resolution pixels, so the question is how to get from 0, 100 to something close to 0, 0, 100, 100.
- Start with the low-resolution input. The image has two pixels: 0 and 100. We want four pixels. There is no sharp edge recorded in the input, only a jump between two values.
- Enlarge with a fixed rule. Bilinear interpolation fills the two new positions by averaging neighbours. The output is 0, 50, 100, 100. Check: the middle value 50 is halfway between 0 and 100, as the rule says. The size is right, but the edge is now a soft ramp.
- Let a network look at the neighbourhood. A Convolution layer slides a small window, its Receptive Field, across the enlarged row. A window that sees a rising step (a 0 next to a 100) gives a strong response. The network has learned that a step like this usually means a sharp edge in the real scene.
- Correct the enlarged image. The network outputs a correction for each pixel. Adding the correction to the bilinear result moves the middle value from 50 towards the side it belongs to: the correction is 0, -50, 0, 0, so the output is 0, 0, 100, 100. Check: the four values now match the true row.
- Measure the error. Compare the output with the true row using mean squared error. For bilinear output the error is 625 (see the math below). For the corrected output it is 0. Training adjusts the network so that this error becomes small across many image pairs.
The plot shows the two rows from steps 2 and 4. The bilinear row climbs gradually from position 0 to position 2. The true row is flat at 0 up to position 1 and flat at 100 from position 2, so its edge is the steep segment between those two positions. The learned correction moves the value at position 1 down from 50 to 0, which restores that edge.
- true high-resolution row
- bilinear enlargement
The whole pipeline has the same shape for any image:
flowchart LR A[Low-resolution image] --> B[Enlarge with bilinear or a learned upsampler] B --> C[Convolutional layers read the neighbourhood] C --> D[Add the predicted correction] D --> E[High-resolution estimate] E --> F[Compare with the true image using MSE] F -. error sends gradients back .-> C
A common variant replaces the bilinear step with a learned upsampler. Some networks use a Transposed Convolution that grows the grid. Others use pixel shuffle (also called sub-pixel convolution): the network produces several channels per low-resolution location, and those channels are rearranged into a block of high-resolution pixels. Pixel shuffle needs no overlapping kernels, so it avoids some of the uneven patterns a transposed convolution can leave behind.
The math
Step 1 in symbols: the problem and the training pairs
Let be a low-resolution image and the high-resolution image it came from, with scale factor (for example ). The network with weights tries to produce
Training pairs are made by taking high-resolution photographs and degrading them: blur them, then shrink them to . The network never sees the original detail, only the degraded version and the true answer.
Step 2 in symbols: bilinear enlargement
In one dimension, the value at a fractional position between two neighbours and is
At the midpoint this is . For and it gives , which matches step 2.
Step 3 in symbols: reading the neighbourhood
A convolution with weights on a row gives
With this is the difference between a pixel and its right neighbour. The enlarged row gives : a large positive response wherever the brightness rises. A trained network learns many such windows, and their responses feed the correction.
Step 4 in symbols: the residual form
Most super-resolution networks predict the correction rather than the whole image, the same residual idea used in deep networks:
Here is the bilinear enlargement and is the learned residual. The network only has to learn what bilinear interpolation gets wrong, which is easier than learning the whole image from scratch. In the example, .
Step 5 in symbols: the loss
Over pixels, mean squared error is
For the bilinear row, the differences from are , so the squared errors sum to and the mean is . For the corrected row the error is . Training uses gradient descent (see Gradient Descent and Backpropagation) to lower over millions of pairs.
A common quality measure is peak signal-to-noise ratio, , where is the largest possible pixel value (255 for 8-bit images). For the bilinear row this gives about dB.
Worked examples
Low-resolution input: . Target: the true row .
- Bilinear enlargement: the midpoint between 40 and 80 is 60, so the output is .
- Compare position by position: .
- Square each difference: . The sum is 400.
- Mean over four pixels: . This is the MSE of plain bilinear enlargement for this row.
- Interpretation: one pixel is wrong by 20 brightness levels, and that single miss dominates the loss. A correction of would bring the MSE to 0.
Take a colour image of pixels with 3 channels, and a scale factor .
- Input values: .
- Output size: pixels, so values.
- Ratio of output to input: .
- Each input value is copied to at most one output location; the other 15 out of every 16 output values have to be predicted.
- Cost of one layer: a convolution from 64 to 64 channels has weights, and a network with several such layers runs this per output position, so the computation is large.
- Interpretation: the larger the scale factor, the less of the output comes from the input. This is why results are visibly more inventive than results.
A video frame is and the display is . The scale factor is in each direction.
- Input pixels: .
- Output pixels: .
- Ratio: , which is with .
- Each input pixel corresponds to one output position directly, and the other three output positions for it must be predicted.
- At 60 frames per second, the output needs pixel values per second. The upscaler has only part of a 16.7 millisecond frame budget, so it must be fast as well as accurate.
- Interpretation: most 4K pixels in an upscaled video are estimates. This is acceptable for smooth regions and is where errors show up, such as on fine text.
Try it: a frame is upscaled to . How many output pixels are predicted for every input pixel that is copied? Answer: the output has pixels and the input has , a ratio of 4, so 3 out of every 4 output pixels are predicted.
Common mistakes and tradeoffs
It is tempting to think a super-resolved image recovers the true detail. In fact the network predicts the most likely detail given its training data, because the true detail was lost when the image was made small. This is why a model trained on one kind of camera or blur can invent wrong shapes on another. A licence plate or a line of small text is the clearest case where the output can look sharp and be wrong.
It is tempting to think that a bigger network gives sharper pictures. In fact, training with mean squared error rewards the average of all plausible answers, which is smooth. Two different sharp edges that could both explain a blurry input average to a soft edge, and MSE prefers that average. Sharpness needs a different loss. Adversarial training, used in GAN-based super-resolution, adds a critic that rejects smooth-looking output, at the cost of some pixel accuracy.
It is tempting to think that transposed convolution is the inverse of downsampling. In fact it is only a learned way to grow a grid. When the kernel size is not divisible by the stride, some output positions receive more contributions than others and the result shows a regular checkerboard pattern. Pixel shuffle, or a resize followed by an ordinary convolution, avoids this pattern.
When to use a learned upscaler: when detail matters, the input is close to the training distribution, and you can afford the compute. When not to: when the output must match a measured truth, such as diagnostic or forensic images, where invented detail is a hazard. Plain bilinear or bicubic resizing is cheap, deterministic and adds no invented detail, so it is the right choice when accuracy matters more than appearance.
| Approach | Adds detail? | Cost | Risk |
|---|---|---|---|
| Bilinear or bicubic | No, only smooth | Very low | Soft edges |
| Learned, MSE-trained | Some, averaged | Moderate | Blur, but few invented features |
| Learned, adversarial | Yes, sharp | Higher | Plausible but wrong detail |
History
Before learning, image enlargement relied on fixed interpolation filters such as bicubic and Lanczos. They were fast and predictable but could not restore detail, so resized images looked soft. Researchers had long known that patches of natural images are repetitive, and they used this to build dictionaries of example patches in the 2000s.
In 2014, Dong and colleagues published SRCNN, a small convolutional network trained end to end to map a bicubically enlarged image to a sharper one. It beat the earlier methods on standard benchmarks and showed that a plain convolutional network could learn super-resolution from pairs of images.
In 2016, Shi and colleagues introduced the efficient sub-pixel convolution layer (pixel shuffle). Working at low resolution for most of the network and rearranging channels at the end made real-time video upscaling practical.
Also in 2016, Ledig and colleagues proposed SRGAN, which added an adversarial loss and a perceptual loss to get sharper textures. It was presented at CVPR in 2017. It showed that the choice of loss, not only the architecture, decides how a super-resolved image looks, and it set up the trade-off between pixel accuracy and realism that the field still works with.
Recap
- Enlarging with a fixed rule adds size but no information, so edges stay soft.
- A convolutional network reads the enlarged image and predicts a correction, which turns the soft edge into a sharper one.
- The correction is learned with mean squared error, which measures the pixel gap to the true high-resolution image.
- The scale factor sets how much of the output must be predicted, and MSE prefers averaged, smooth answers.
- Adversarial training trades some pixel accuracy for sharper, more realistic detail.
Read next: Generative Adversarial Network for the adversarial losses, then U-Net and Image Segmentation for the encoder-decoder designs that use the same upsampling ideas.
Check yourself
QuestionWhy can bilinear enlargement never produce a sharp edge that was not in the input?Show answer
Bilinear interpolation only blends values that are already present. Every new value is a weighted average of two neighbours, so a jump between two pixels can only become a ramp. Recovering a sharp edge needs information about the scene that the fixed rule does not have, which is why a learned correction is used.
QuestionA low-resolution row is and the true high-resolution row is . Bilinear enlargement gives . What is its mean squared error?Show answer
The differences are . Squared: . Sum: 1600. Mean over four pixels: .
QuestionWhy does a network trained with mean squared error tend to produce soft images, even when the training images are sharp?Show answer
Several sharp images can produce the same blurry input, so the network cannot know which sharp edge is right. MSE penalises the squared distance to the true value, so the lowest-error answer is the average over the possibilities, which is a smooth edge. The loss rewards the average, not the sharpest guess.
QuestionA phone app upscales a photo of a street sign by 4 times in each direction, and the sign's letters become clearer. Why should you not rely on the letters for a legal or safety decision?Show answer
At most output pixels are predicted, not measured, so the letters are the network's best guess given its training data. A guess can look sharp and still have the wrong letter. The original photo is the measured evidence; the upscaled version is an estimate.
Sources
- Dong, Loy, He, Tang (2014). Learning a Deep Convolutional Network for Image Super-Resolution: https://arxiv.org/abs/1501.00092
- Shi et al. (2016). Real-Time Single Image and Video Super-Resolution Using an Efficient Sub-Pixel Convolutional Neural Network: https://arxiv.org/abs/1609.05158
- Ledig et al. (2016). Photo-Realistic Single Image Super-Resolution Using a Generative Adversarial Network: https://arxiv.org/abs/1609.04802