DAMNDEVICE-AGNOSTIC SUPER-RESOLUTION

Deployment & method notes

Deploy

There is no database, Python service, PHP endpoint, Node server, API key, CDN dependency, build step, or image-upload endpoint. The server only delivers static files. The browser downloads approximately 30 MB of weights on the first reconstruction, then runs the model and Gaussian smoothing on the visitor's computer in a Web Worker using TensorFlow.js and WebAssembly. The in-memory model is reused until the page is closed, reloaded, or a run is cancelled. Standard browser/server caching may avoid downloading unchanged assets again.

Opening example

The page opens with the 50 × 50 Andromeda star cluster input and its two precomputed 400 × 400 reconstructions, including Gaussian sigma = 4. This small bundled example is loaded without downloading the model or running inference. It uses the original intensity array and validated Python notebook outputs, not the quantized 8-bit PNG. The page clearly labels it as precomputed.

Click Improve image to recompute the example on the visitor's device, select a personal image to replace it, or use Show example to restore it. The example's downloads are grayscale PNG images at the full 400 × 400 resolution, without a color palette. Inferno is used only for display on the page. A pending example load cannot overwrite a subsequently selected image.

The Inferno lookup table is sampled from Matplotlib. It affects the canvas display only; normalization, model input, internal reconstruction values, and PNG exports are unchanged. Color image uploads are still converted to grayscale intensities before inference.

Input and display

The page reports progress and supports cancellation by terminating the worker. A model reconstruction is a learned estimate, not ground truth; the output sampling factor is not itself an optical-resolution claim.

Model implementation

model/model.json describes the original ResNet architecture's weights; model/weights.bin stores unquantized little-endian float32 tensors. The original .keras file is not interpreted by JavaScript. assets/inference-worker.js implements the same four residual stages with 3 blocks each, kernel sizes 5/7/9/11, batch normalization in inference mode, leaky ReLU slope 0.1, three bilinear 2× upsampling steps with half-pixel centers, and a global spatial softmax.

TensorFlow.js 4.22.0 uses WebAssembly here to avoid GPU texture-size limits with these large convolution kernels. No GPU, browser extension, special server headers, or visitor-side installation is required. Use a current browser with WebAssembly, Web Workers, and createImageBitmap support. Actual performance varies by device. Weight length is checked on download; SHA-256 is also checked when the browser provides Web Crypto (HTTPS or localhost).

Large convolution operations and residual blocks are evaluated in tiles of up to 256 × 256 output pixels, with overlapping input margins covering their full receptive fields. Only the central output of each tile is retained; tiles are not blended or normalized independently. Bilinear upsampling, input normalization, and the final spatial softmax remain global. This reduces temporary WebAssembly memory without cropping or resizing the visitor's image. Unneeded intermediate tensors are released promptly. WebAssembly has its own memory limits, so an allocation can fail even when the computer still has ample free RAM; the 200 × 200 input limit does not guarantee that every device can complete the calculation.

The original model comes from Zenodo record 18912038, reached through DOI 10.5281/zenodo.14641651. Its SHA-256 and the exported weights' SHA-256 are in the manifest. Source, licensing, and reproduction instructions are in Source & licenses.

Privacy and scope

File selection and decoding are local. Pixel data are sent only to a worker within the same browser, never to a server. There are no analytics, third-party fonts, cookies, telemetry, image persistence, or outbound inference calls. The server still sees ordinary static-file requests such as the model download. Following the paper/GitHub links opens their respective external sites.

Optional WebMCP tools are feature-detected through document.modelContext. They report state or start inference on the already selected image using the same UI actions; they cannot read local files or select a file for the visitor. Browsers without this proposed API use the regular UI. Native WebMCP integration is not required for inference and is not part of the standard-browser verification.