While working on an image-publishing project, I came across Neural Enhance. What interested me was what happens when I enlarge a small photograph. Where does the extra detail in the larger image come from?
I used Alex J. Champandard’s Neural Enhance as a reference for how an early learned upscaler approached that problem. It was built with Theano and Lasagne.
Learned image upscaling
Super-resolution attempts to produce a higher-resolution image from a lower-resolution input. The retained implementation includes convolutional networks and perceptual and adversarial objectives.
One implementation detail I can trace in the upstream script is how it renders an image in pieces. Its defaults specify 80-pixel tiles with 24 pixels of padding around each tile. Processing overlapping regions gives the network neighbouring pixels to work with at tile edges, where treating every crop as an isolated image could leave a visible seam.
The intended use of the output matters. A visually convincing enlargement and an accurate evidentiary image have different requirements.
The upstream script dates to 2016. I have its source and requirements, but no before-and-after image from a run of my own.