[{"data":1,"prerenderedAt":27},["ShallowReactive",2],{"blog-body-how-does-image-upscaling-work-en":3},{"content":4,"toc":5},"\u003Cp>Enlarging an image cannot add information that was not captured. Every method of upscaling is a way of guessing the pixels that were never recorded, and the only meaningful difference between the available methods is what they guess from. Once you see that clearly, the choice between them stops being a matter of quality and becomes a matter of risk.\u003C\u002Fp>\n\n\u003Cp>There are two families of guessing, they fail in opposite directions, and picking the wrong one for the job produces the more obvious kind of damage.\u003C\u002Fp>\n\n\u003Ch2 id=\"the-limit-nobody-can-engineer-around\">The limit nobody can engineer around\u003C\u002Fh2>\n\n\u003Cp>A 400-pixel-wide photograph contains 400 samples of the original scene. Enlarging it to 1600 pixels means producing 1200 columns of new pixels, and there is no data describing what those columns should contain. Whatever fills them comes from somewhere else.\u003C\u002Fp>\n\n\u003Cp>Classical methods pull that information from neighbouring pixels. Machine-learning methods pull it from patterns learned from millions of other images. Neither recovers what the camera did not record. If the detail is genuinely gone, both will produce a smooth, plausible, definitively wrong result — the difference is only in how confident it looks.\u003C\u002Fp>\n\n\u003Cp>This is why upscaling a face at 8x produces something uncanny rather than something sharp. The algorithm is not revealing detail; it is inventing it, and human beings are extremely good at noticing invented faces.\u003C\u002Fp>\n\n\u003Ch2 id=\"how-interpolation-guesses\">How interpolation guesses\u003C\u002Fh2>\n\n\u003Cp>The classical family is old, well understood, and remarkably good within its limits. All three common variants do the same thing: for each new pixel, look at the surrounding known pixels and compute a weighted average.\u003C\u002Fp>\n\n\u003Cul>\n  \u003Cli>\u003Cstrong>Nearest neighbour.\u003C\u002Fstrong> Copies the closest existing pixel. Produces hard blocks. Mostly used deliberately, for pixel art, where the goal is to preserve the blocks.\u003C\u002Fli>\n  \u003Cli>\u003Cstrong>Bilinear.\u003C\u002Fstrong> Averages the four nearest pixels. Smooth and fast, and visibly soft — it destroys edges.\u003C\u002Fli>\n  \u003Cli>\u003Cstrong>Bicubic and Lanczos.\u003C\u002Fstrong> Average a wider neighbourhood with a shaped weighting curve. Sharper edges, some ringing artefacts, and the standard choice for photographs.\u003C\u002Fli>\n\u003C\u002Ful>\n\n\u003Cp>Interpolation is honest. It never claims to have found detail it does not have, and it degrades gracefully: a blurry enlargement is at least a predictable blur.\u003C\u002Fp>\n\n\u003Ch2 id=\"where-interpolation-holds-up-well\">Where interpolation holds up well\u003C\u002Fh2>\n\n\u003Cp>Enlarging from a genuinely clean source, at a modest factor, is a task interpolation handles better than its reputation suggests.\u003C\u002Fp>\n\n\u003Cul>\n  \u003Cli>\u003Cstrong>Doubling a sharp original.\u003C\u002Fstrong> At 2x from a well-exposed, properly focused file, bicubic is often indistinguishable from a machine-learning result at normal viewing size.\u003C\u002Fli>\n  \u003Cli>\u003Cstrong>Images made mostly of smooth areas.\u003C\u002Fstrong> Skies, studio backgrounds, flat product surfaces and soft shadows. There is little detail to invent, so little can be got wrong.\u003C\u002Fli>\n  \u003Cli>\u003Cstrong>Anything destined for print at low resolution.\u003C\u002Fstrong> Paper hides softness that a screen at 100 percent zoom exaggerates.\u003C\u002Fli>\n  \u003Cli>\u003Cstrong>Line art and charts, when you use the right method.\u003C\u002Fstrong> Nearest neighbour on a diagram with hard edges and flat fills will beat a photograph-oriented method.\u003C\u002Fli>\n\u003C\u002Ful>\n\n\u003Ch2 id=\"what-machine-learning-does-differently\">What machine learning does differently\u003C\u002Fh2>\n\n\u003Cp>A trained upscaler has seen enormous numbers of image pairs — the same subject at low and high resolution — and has learned the statistical relationship between them. Faced with a small, blurry patch, it asks what such a patch usually turns into, and produces that.\u003C\u002Fp>\n\n\u003Cp>For some subjects this is close to magic. Textured natural material — foliage, brick, fabric, hair, skin pores — has enough statistical regularity that the model's learned priors are usually right. A 3x enlargement of a textured wall can look convincingly like a real photograph of that wall.\u003C\u002Fp>\n\n\u003Cp>For other subjects it is worse than useless, because a confident wrong answer is harder to spot than an honest blur.\u003C\u002Fp>\n\n\u003Ch2 id=\"where-ai-upscaling-fabricates\">Where AI upscaling fabricates\u003C\u002Fh2>\n\n\u003Cp>Four categories where the model does not reconstruct the truth and instead produces something that never existed.\u003C\u002Fp>\n\n\u003Cul>\n  \u003Cli>\u003Cstrong>Faces.\u003C\u002Fstrong> The most studied case. Small faces get enlarged into features that are not the person's features. Fine for a thumbnail, actively harmful in anything used as evidence or identification.\u003C\u002Fli>\n  \u003Cli>\u003Cstrong>Text and numbers.\u003C\u002Fstrong> A blurred invoice total, a serial number, a date. The model will produce a crisp digit — plausibly a different digit from the one in the photograph.\u003C\u002Fli>\n  \u003Cli>\u003Cstrong>Logos, trademarks and signage.\u003C\u002Fstrong> The model has learned what those marks generally look like and will draw its memory of them rather than yours.\u003C\u002Fli>\n  \u003Cli>\u003Cstrong>Faces in group photographs.\u003C\u002Fstrong> Individual faces small enough to be ambiguous get \"cleaned up\" into consistent-looking strangers.\u003C\u002Fli>\n\u003C\u002Ful>\n\n\u003Cp>The pattern is straightforward: the method is safe where the content is statistically generic, and unsafe where the content is specific. A wall is generic. A receipt is specific.\u003C\u002Fp>\n\n\u003Ch2 id=\"the-decision-rule\">The decision rule\u003C\u002Fh2>\n\n\u003Cp>Ask what the viewer needs to be able to do with the enlarged image, and whether a fabricated detail would cause harm.\u003C\u002Fp>\n\n\u003Cul>\n  \u003Cli>\u003Cstrong>Looking better at a glance\u003C\u002Fstrong> — a hero image, a thumbnail grid, a wallpaper — use the trained upscaler. The failure mode is invisible at viewing size.\u003C\u002Fli>\n  \u003Cli>\u003Cstrong>Doubling a clean source\u003C\u002Fstrong> — use interpolation. It is faster, it is predictable, and at 2x there is usually nothing to gain from a model.\u003C\u002Fli>\n  \u003Cli>\u003Cstrong>Anything read, measured or used as evidence\u003C\u002Fstrong> — do not. Neither method is acceptable for a number, a name or an identification. Get a better original instead.\u003C\u002Fli>\n  \u003Cli>\u003Cstrong>Pixel art, icons, diagrams\u003C\u002Fstrong> — nearest neighbour, sometimes followed by manual tidying. A model will smooth away exactly the sharp edges you need.\u003C\u002Fli>\n\u003C\u002Ful>\n\n\u003Ch2 id=\"what-actually-helps-instead\">What actually helps instead\u003C\u002Fh2>\n\n\u003Cp>When the honest answer is \"this file is not big enough\", upscaling is a workaround, and the underlying fix is usually available with a little more effort.\u003C\u002Fp>\n\n\u003Cul>\n  \u003Cli>\u003Cstrong>Find the original file.\u003C\u002Fstrong> The most common cause of a low-resolution image is a compressed copy circulating online. The original is frequently larger and often recoverable from a sent email or a cloud backup.\u003C\u002Fli>\n  \u003Cli>\u003Cstrong>Re-export from the source.\u003C\u002Fstrong> A screenshot that became a JPEG can usually be re-taken as a PNG, or exported directly from the original document or application.\u003C\u002Fli>\n  \u003Cli>\u003Cstrong>Re-photograph it.\u003C\u002Fstrong> For documents and objects, a new photograph at full resolution beats any enlargement of the old one.\u003C\u002Fli>\n  \u003Cli>\u003Cstrong>Match the output size to the job.\u003C\u002Fstrong> A web page almost never needs an image wider than 1600 pixels, and a 400-pixel file enlarged to 1600 will look worse on that page than the same file displayed at its natural size.\u003C\u002Fli>\n\u003C\u002Ful>\n\n\u003Cp>The \u003Ca href=\"\u002Ftools\u002Fimage-upscaler\">image upscaler\u003C\u002Fa> runs locally in the browser, which means the file never leaves your device — worth knowing if you are working with anything confidential, where sending it to an unknown service would be a worse decision than the resolution problem you were trying to solve. If the real problem turns out to be size rather than dimensions, \u003Ca href=\"\u002Ftools\u002Fimage-compressor\">compressing the image\u003C\u002Fa> is the correct tool: it is the opposite operation, and confusing the two is a common reason people end up with a larger file than they started with.\u003C\u002Fp>",[6,9,12,15,18,21,24],{"id":7,"text":8},"the-limit-nobody-can-engineer-around","The limit nobody can engineer around",{"id":10,"text":11},"how-interpolation-guesses","How interpolation guesses",{"id":13,"text":14},"where-interpolation-holds-up-well","Where interpolation holds up well",{"id":16,"text":17},"what-machine-learning-does-differently","What machine learning does differently",{"id":19,"text":20},"where-ai-upscaling-fabricates","Where AI upscaling fabricates",{"id":22,"text":23},"the-decision-rule","The decision rule",{"id":25,"text":26},"what-actually-helps-instead","What actually helps instead",1791511468799]