Super Resolution 128
A lightweight neural network that upscales 128×128 RGB images to 256×256. Built with pure NumPy: 2,460 parameters, a residual CNN, and 2× pixel shuffle. No deep learning frameworks or image libraries required. Python 3.10+.
Both comparisons use the best weights from 100 training epochs. Originals are displayed at 2× size. Held-out validation PSNR: 26.75 dB, compared with 25.05 dB for nearest-neighbor upscaling.
Install and upscale using the included weights:
python -m pip install -r requirements.txt
python upscale.py super_res_samples/128x128/4c5da1ff81ec7207.png outputs/upscaled.png
Saves the 256×256 output and a labeled outputs/upscaled-comparison.png.
Inputs must be non-interlaced, 8-bit PNGs; convert WebP images to PNG first.
The included super_res_samples/ dataset contains 199 image pairs, with
matching filenames in 128x128/ and 256x256/. Train a new model:
python train.py --data super_res_samples --out checkpoints/new-run --epochs 100
Training uses random aligned crops, Adam, and a fixed 90/10 train/validation
split. Each run saves best.npz, resumable last.npz, metrics, and previews.
To continue the new run to 200 total epochs:
python train.py --out checkpoints/new-run --resume checkpoints/new-run/last.npz --epochs 200
Run the numerical and checkpoint checks with python test_model.py.
This small model is an experiment; fine details may remain soft.
MIT License · Copyright (c) 2026 SabrePrometheus

