Compact EDSR Image Super-Resolution 4Γ
An independently implemented PyTorch reconstruction model trained locally on an RTX 3060 12 GB. This is a learned 4Γ upscaler with 522,243 parameters. Both scale experiments completed 60 epochs; this export is the validation-selected checkpoint from epoch 57. Trained weights are in safetensors format.
Architecture and training
EDSR-style network: 8 residual blocks, 48 feature channels, residual scaling 0.1, RGB mean shift and pixel shuffle; no batch normalization, GAN or perceptual loss. Adam, L1 reconstruction loss, initial learning rate 0.0002, cosine schedule, mixed precision, gradient clipping 1.0, seed 42. LR patch size 32, batch size 8. Separate checkpoints are trained for each scale. Validation selects weights using Y-PSNR; held-out test results are not used for selection. The complete resolved configuration and checkpoint/manifest hashes are in config.json.
Training data and provenance
30,749 unique HR training scenes: 750 DIV2K images (0001β0750) and 29,999 LSDIR images acquired from Kaggle parampandya0310/hr-image-denoising-lsdir version 1. One exact duplicate was excluded. The Kaggle mirror's metadata does not override the original dataset terms. Provided LR copies do not count as additional photos. Training LR images use Pillow bicubic synthetic degradation; no RealSR training. DIV2K 0751β0800 provides internal validation; 0801β0900 is the local held-out test. The 250-image Kaggle LSDIR held-out subset is split into 125 validation and 125 test scenes. Exact and full/mirror perceptual groups are isolated across splits; arbitrary crops or repeated scenes cannot be ruled out exhaustively.
Measured evaluation
All values below come from saved evaluation runs of this exported checkpoint. The DIV2K test here is the publicly available official validation HR set, not the unavailable challenge hidden-test HR. Kaggle LSDIR held-out provenance is not independently authenticated; it is not an official hidden-test benchmark.
| Condition | Images | Y-PSNR dB | Y-SSIM | Bicubic dB | Bicubic SSIM |
|---|---|---|---|---|---|
| evaluation-test | 100 | 29.9749 | 0.826909 | 28.2277 | 0.777488 |
| benchmark-div2k-official | 100 | 29.9745 | 0.826908 | 28.2276 | 0.777490 |
| benchmark-lsdir-heldout | 125 | 25.7472 | 0.748362 | 24.4406 | 0.680648 |
Protocol: clamp/quantize to 8-bit RGB, BT.601 limited-range Y, shave 4 pixels, valid 11Γ11 Gaussian SSIM (sigma 1.5), per-image arithmetic means. Conditions use different LR sources and should not be pooled. evaluation.json contains full per-image metrics, matching checkpoint hashes, RTX 3060 latency and peak-memory records. Those timings are GPU measurements, not CPU hosting promises. LPIPS was not evaluated. No additional architecture-comparison result is claimed.
Inference
Download the repository, install requirements.txt, and extract source.zip into the same folder. From that folder:
from pathlib import Path
from PIL import Image
from superres.inference import Upscaler
model = Upscaler(Path('.').resolve(), device='auto')
with Image.open('input.png') as image:
output = model.upscale(image, tile_size=128)
output.save('output.png')
CPU and CUDA inference are supported. Install the appropriate PyTorch build for your machine. Tiled inference uses a convolution halo and assembles output on CPU; outputs above 16 megapixels are rejected to limit host memory use. No remote API or Transformers AutoModel integration is implied. source.zip includes original model, inference, training, acquisition/preparation and evaluation code plus configs. Training datasets and optimizer checkpoints are not included.
Intended use, limits and rights
Academic image-restoration research and educational evaluation. Learned details are estimates and can be wrong, especially in text, faces, plates, noise and JPEG artifacts. Bicubic training does not establish performance on real camera degradation. Do not use reconstructed details as forensic, medical or identity evidence.
Read the weight research-use notice before use. Source code is MIT; a permissive license for trained weights is not asserted. The dataset notices do not explicitly establish redistribution rights for trained weights. Source images and sample reconstructions from those images are not included in this release.
References
- Agustsson and Timofte, NTIRE 2017 Challenge on Single Image Super-Resolution: Dataset and Study, CVPR Workshops 2017. DIV2K.
- Li et al., LSDIR: A Large Scale Dataset for Image Restoration, CVPR Workshops 2023. LSDIR.
- Lim et al., Enhanced Deep Residual Networks for Single Image Super-Resolution, CVPR Workshops 2017. This repository uses an original compact EDSR-style implementation, not authors' pretrained weights.
- Downloads last month
- 6