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
- PNG, JPEG, WebP, and single-frame TIFF are supported.
- Use scientific crops up to 200 × 200 pixels, up to 20 MB. Larger inputs are explicitly rejected, never silently resized. The dimension limit is an application safeguard, not a fixed model architecture limit: memory and computation grow with image area, with 64-channel intermediate images and an 8× output grid. A 200 × 200 input produces a 1600 × 1600 output. The separate file-size limit is a generous upload bound, not the expected size of a small grayscale image. Even within the limit, available browser memory and device speed matter; start with a 50 × 50 crop.
- Grayscale TIFF intensity values retain their numerical precision when read (including uint16 and float32). Three-channel RGB TIFFs are accepted; other TIFF photometric/channel layouts and image stacks are rejected.
- Color inputs use weighted grayscale
0.2126 R + 0.7152 G + 0.0722 Bto combine RGB channels into the single intensity channel required by the model. These weights approximate perceived brightness; they are not a scientific calibration of color-channel intensities. Grayscale inputs with equal RGB channels retain their intensity. PNG/JPEG/WebP decoding uses the browser's 8-bit canvas representation, so use TIFF for quantitative high-bit-depth data. Transparent browser-decoded inputs are composited on black. Grayscale WhiteIsZero TIFFs are inverted to intensity semantics. - HDF5 is not an image-upload format on this page. Export the desired camera-image dataset to TIFF before selecting it.
- The website automatically prepares the model input using the original DAMN
Normalize_dataimplementation: subtract the minimum intensity, divide by the remaining intensity sum, then multiply bywidth × height / 2500. No manual normalization is needed. In formula form:model_input = (image - min(image)) / sum(image - min(image)) × (width × height / 2500). This preserves the mean input intensity of1/2500used for 50 × 50 training images. The input sum is 1 for 50 × 50, 4 for 100 × 100, and 0.25 for 25 × 25; rectangular images use their actual pixel count. This is global scaling, not separate normalization of each local 50 × 50 patch. The actual float32 input sum is checked againstwidth × height / 2500with relative tolerance1e-6. Constant and nonfinite images are rejected. The model's output probability array still sums to 1 and is multiplied by the original background-subtracted intensity sum to restore the total signal before smoothing and PNG export. - The original input appears above two side-by-side outputs. All three image frames have the same display dimensions on desktop and mobile. Aspect ratio is preserved without stretching.
- Every panel uses the Inferno color map with its own linear intensity range. PNG downloads use the reconstruction intensities directly, with or without Gaussian smoothing, in grayscale without a color palette.
- Gaussian smoothing uses sigma = 4 output pixels, with a radius of 16 pixels and reflective boundaries, matching SciPy's default truncation. This equals 0.5 input pixels for the 8× grid; one input pixel would require sigma = 8.
- Both SR images are downloadable as standard grayscale PNGs at the full output resolution, without a color palette. Each export linearly scales its reconstruction intensities so zero remains 0 and its maximum becomes 255, then rounds to 8-bit grayscale values (equal red, green, and blue channels). No gamma adjustment or Inferno mapping is applied to the exported values. PNG therefore preserves the reconstruction pattern subject to integer quantization, not the exact float32 values or their absolute intensity scale.
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.