Technology Sep 05, 2026 · 3 min read

Upscaling can't recover what downscaling deleted — I measured how much

Here's an experiment you can reproduce. Take an image with fine structure — thin gridlines, text, sharp edges — shrink it to a quarter of its side length, interpolate it back up to the original size with bicubic, and compare against the original pixel by pixel. I measured two things: PSNR, and hi...

DE
DEV Community
by Lank_M
Upscaling can't recover what downscaling deleted — I measured how much

Here's an experiment you can reproduce. Take an image with fine structure — thin gridlines, text, sharp edges — shrink it to a quarter of its side length, interpolate it back up to the original size with bicubic, and compare against the original pixel by pixel.

Shrunk to 1/4 then upscaled back — the text goes soft

I measured two things: PSNR, and high-frequency energy (the mean absolute difference between neighbouring pixels — how much edge and texture survives). At 4x, PSNR was 17.4 dB and high-frequency energy dropped to 20.5% of the original. At 2x it was better, around 52%. Desktop Chromium, one image, so the numbers are only about this picture — but the trend is steady: shrink then enlarge, and most of the edges don't come back.

The reason isn't complicated. When the image was a quarter of the size, the high-frequency information carried by those thin lines and sharp letter edges simply didn't exist in the low-resolution pixels anymore. Interpolation fills the gaps between existing pixels with a mathematical formula. It can make an edge look smooth, but it cannot conjure back the line that was there. The information isn't in the image, so interpolation can't produce it.

Super-resolution takes a different route

So how does a model recover it? It doesn't interpolate — it guesses, from having seen a lot of real photographs. Models like Real-ESRGAN, SwinIR and the official Real-HAT-GAN are trained on pairs of clean and degraded images. They learn what kind of clean structure usually sits behind this blur, this noise, this compression artefact. At inference they don't smooth, they fill in the likely structure. Same enlargement, opposite mechanism: interpolation spreads existing pixels, super-resolution paints in new ones — and the part it paints is exactly the ~80% interpolation lost.

To make that concrete, here's one real run on ImgIng (imging.ai): a 350×466 faded old photo, "old-photo restoration" tier at 4x, finished locally in 9.9 seconds on WebGPU, output 1400×1864, using Real-ESRGAN x4plus. The image never left the machine — the panel labels the work "local Worker". I own the codec and model-loading side of this product, not the matting or the super-resolution model itself, so on how the model paints structure I'll stop at "it's learned".

The memory constraint, and the line you can't cross

From the loading side, one thing worth explaining is why a big image doesn't blow up memory. Pushing a several-thousand-pixel image through the model in one shot will crash the tab. So inference runs tiled inside a Worker: each tile is read with its own context window, only the reliably-predicted centre is written to the output, and the under-supported edges aren't blended back. Each tile releases its tensors as it finishes; the cached model on disk isn't the same as inference memory held open.

The five tiers aren't a quality ladder, they differ in what they reconstruct: fast for preview; fidelity for text, buildings and lines; old-photo for overall tonal recovery; dual-model for continuous skin-and-background texture; and the high-end tier running Real-HAT-GAN Sharper with large-context tiling for natural texture on desktop. Pick by what your image lost, not by "which is strongest".

And the line that matters most: what super-resolution adds is the model's guess, not detail the original held. It's good for visual enhancement — the picture looks clearer. It is not for ID photos, forensic or historical verification, or OCR ground-truth, because those need "what the original actually was", and the model gives you "what it probably was". ImgIng's own panel says it plainly: it won't repaint facial features, and a face too low-res to read can't have real information that was never there restored. Those two things get conflated everywhere else; here they can't be.

DE
Source

This article was originally published by DEV Community and written by Lank_M.

Read original article on DEV Community
Back to Discover

Reading List