DeltaSR: Spiking Video Upscaling with Online Alertness Tuning
Causal Γ4 video super-resolution whose compute follows scene activity. One run-time alertness setting (Ο) trades quality for compute with no retraining.
DeltaSR upscales each frame as it arrives (180Γ320 β 720Γ1280). It carries features and the previous output from frame to frame, so unchanged background reuses its last result. Every convolution input is an integer charge neuron that only sends an update when its value changes by more than a learned per-channel threshold, and 4Γ4 tile gating skips regions that did not change. DeltaSR-C also uses motion vectors and other signals already present in an H.264 decoder.
- Code, training pipeline and benchmarks: https://github.com/TarunTomar122/deltasr
- Paper (PDF): https://github.com/TarunTomar122/deltasr/blob/main/docs/paper/main.pdf
A bear crosses a driveway at night. Left: the 320Γ180 input. Right: DeltaSR's 1280Γ720 output with charge spikes overlaid. Event compute stays near 5 G per frame on the empty scene and rises only while the bear moves through.
- One-page summary: https://taruntomar122.github.io/deltasr/
Files
| File | Model | Use |
|---|---|---|
deltasr-130k.pt |
DeltaSR (1.8 M params, 8-bit weights, 10-bit activations) | Clean video, SPyNet optical flow |
deltasr-c-140k.pt |
DeltaSR-C (codec-aware fine-tune) | H.264 streams with decoder motion vectors; also runs on clean video with still refresh |
Quick start
git clone https://github.com/TarunTomar122/deltasr && cd deltasr
python3 -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
# frozen SPyNet flow comes from the BasicVSR++ REDS4 checkpoint (see the repo README); set LV_SPYNET to it
# clean video (input must be 320x180; add --make-lr to downscale a larger video)
python scripts/upscale_video.py in.mp4 out.mp4 --tau 2
# compressed H.264 stream (DeltaSR-C with decoder motion vectors and codec priors)
python scripts/upscale_video.py in.mp4 out.mp4 --tau 2 --codec
The repository already includes both checkpoints in release/; the files here are identical. --tau 1 gives maximum quality; --tau 4 or --tau 6 gives lower event compute.
Quality vs compute
Compressed H.264 (CRF 23) fixed-camera video, DeltaSR-C against CDA-VSR and other live models:
Clean video, DeltaSR across alertness settings:
Compute follows the scene: about 5 G multiply-adds per frame on an empty doorbell scene, rising only while a bear walks through.
1. Model overview
- Models: DeltaSR (base clean upscaler) and DeltaSR-C (codec-aware fine-tuned upscaler for clean and H.264 streams).
- Task: Causal (online) Γ4 video super-resolution (180Γ320 β 720Γ1280). Each output frame is produced before the next input frame is read; no future frames are used.
- Size and precision: 1.8 M parameters; quantisation-aware 8-bit weights and 10-bit activations from the first training step.
- Dynamic compute: Per-channel learned charge neurons plus 4Γ4 input tile gating controlled by a single run-time threshold Ο β [1, 8] without retraining.
2. Intended use
Primary use cases
- Real-time Γ4 upscaling of fixed-camera video (video calls, desktop webcams, doorbells, security cameras) where most of the scene is static.
- Event-driven or neuromorphic hardware targets where only activated neurons (spikes) incur multiply-add work, and standard GPU inference requiring deterministic real-time latency.
- H.264-compressed streams (DeltaSR-C) when decoder motion vectors, residual magnitude, block validity, and I-frame flags are available from the decoder.
Out-of-scope uses
- Offline / non-causal restoration where full-clip bidirectional context is permitted and latency is not constrained.
- High-motion handheld compressed video at tight bitrates where dense compressed-domain models (such as CDA-VSR) achieve higher PSNR.
- Blur-downsampled (BD) inputs without retraining (models are trained for MATLAB bicubic Γ4 downsampling and H.264 CRF 23).
- Safety-critical identification or forensic enhancement (super-resolution reconstructs plausible high-frequency detail and cannot recover ground-truth identity information that is absent from the low-resolution input).
3. Inputs and outputs
DeltaSR
- Input: Stream of RGB low-resolution frames (180Γ320, 8-bit / normalised [0, 1]), plus run-time alertness Ο (default Ο=2).
- Internal state: Recurrent feature bank (frames t-1, t-2, t-4), previous displayed output, previous low-resolution frame, stored per-frame flows, and per-layer charge neuron states.
- Output: Stream of RGB Γ4 high-resolution frames (720Γ1280).
DeltaSR-C
- Additional per-frame inputs (H.264 mode): Exported from a patched FFmpeg 7.1.3 decoder:
- List-0 quarter-pel motion vectors (replaces SPyNet on P-frames).
- Residual magnitude (|residual| / 255).
- Inter/skip block validity map.
- Binary I-frame flag (restarts recurrent memory on I-frames).
- Clean fallback: When codec inputs are omitted, DeltaSR-C runs with SPyNet optical flow and still refresh, matching or exceeding DeltaSR on clean fixed-camera scenes.
4. Training data and licences
| Dataset | Role | Clips / Split | Licence |
|---|---|---|---|
| REDS (NTIRE 2019) | DeltaSR training (100%); DeltaSR-C fine-tuning (50% mix) | Public REDS training set (clips 240, 245, 250, 255 held out as REDS dev; REDS4 sealed for test) | Public research dataset (REDS terms) |
| Microsoft VCD | DeltaSR-C fine-tuning (50% mix) | 31 talking-head clips after review; all people and rooms in the 6 webcam test clips held out | CDLA-Permissive-2.0 |
Training summary
- DeltaSR: Trained from scratch on REDS with 15-frame windows of 64Γ64 low-res crops, batch 8, 20% repeated-frame windows, Charbonnier loss on every frame. Adam lr 4Γ10β»β΄ for 100k steps + cosine cool-down to 130k steps (+0.10 dB), EMA weights. Spiking phase (learned thresholds + small work penalty) over the last 30k steps. Trained on a single 1/7 H200 slice (MIG
1g.18gb): about 17 h dense + 12.5 h spiking. - Codec-aware fine-tune (DeltaSR-C): Initialised from DeltaSR EMA at 130k; 50% REDS + 50% Microsoft VCD; half of draws re-encoded with H.264 CRF 23 (single reference, no B-frames, GOP 30) with decoder priors; 100-frame windows, batch 2, 64Γ64 crops. Adapters trained alone for 500 updates, then all weights at constant lr 5Γ10β»β΅ with reconstruction loss only for 10k updates (130k β 140k) on a single 1/7 H200 slice, about 14 h.
- Total training compute: about 43 slice-hours on one 18 GB H200 slice (roughly 6 full-H200 hours) for both released checkpoints, excluding development experiments and evaluation.
5. Evaluation
All primary scores are full-frame BT.601 luma PSNR (Y-PSNR), no border crop, averaged over 100-frame clips. Degradation: 720p HR downsampled Γ4 with MATLAB bicubic to 180Γ320; compressed track re-encoded with x264 CRF 23 (single reference, no B-frames, GOP 30).
Evaluation datasets and licences
- Calls (6 clips): Xiph video-conferencing clips (public domain).
- Webcams (6 clips): Microsoft VCD held-out people/rooms (CDLA-Permissive-2.0).
- Doorbells (5 clips): Wikimedia Commons doorbell/home-camera clips (public domain).
- REDS dev (4 clips): REDS training clips 240, 245, 250, 255 (busy-motion control).
webcams-vcd2(50 clips): 50 distinct speakers from Microsoft VCD2 (CDLA-Permissive-2.0), selected by fixed hash order with camera-motion screening and blind overlap review.cctv-meva(40 clips): 40 MEVA ground-camera clips across 23 cameras and 4 sites (CC BY 4.0).
Headline metrics (Y-PSNR / event G per frame)
| Track | Scene (clips) | Ours (DeltaSR-C, Ο=2) | Strongest rival |
|---|---|---|---|
| H.264 CRF 23 | Calls (6) | 31.89 dB @ 18.5 G | CDA-VSR: 31.62 dB @ 78.7 G |
| H.264 CRF 23 | Webcams (6) | 38.34 dB @ 25.9 G | CDA-VSR: 37.77 dB @ 78.7 G |
| H.264 CRF 23 | Doorbells (5) | 37.29 dB @ 17.3 G | CDA-VSR: 36.70 dB @ 78.7 G |
| H.264 CRF 23 | cctv-meva (40) |
27.62 dB @ 8.4 G | CDA-VSR: 27.40 dB @ 78.7 G |
| H.264 CRF 23 | webcams-vcd2 (50) |
36.56 dB @ 24.2 G | CDA-VSR: 36.15 dB @ 78.7 G |
| Clean Γ4 | Calls (6) | 34.13 dB @ 25.6 G | EDSR-baseline: 34.10 dB @ 114.2 G |
| Clean Γ4 | Webcams (6) | 42.41 dB @ 32.1 G | FRVSR: 42.02 dB @ 63.6 G |
| Clean Γ4 | Doorbells (5) | 40.37 dB @ 19.9 G | EDSR-baseline: 40.87 dB @ 114.2 G |
| Clean Γ4 | REDS dev (4) | 31.39 dB @ 78.1 G | DeltaSR: 31.48 dB @ 79.0 G; FRVSR: 29.88 dB @ 63.6 G |
| Clean Γ4 | cctv-meva (40) |
28.15 dB @ 14.4 G | DeltaSR: 28.18 dB @ 14.5 G; Mobile RRN: 27.91 dB @ 27.3 G |
| Clean Γ4 | webcams-vcd2 (50) |
39.90 dB @ 49.2 G | Mobile RRN: 39.79 dB @ 27.3 G |
(Compressed DeltaSR-C uses 140k weights on calls/webcams/doorbells and 135k on cctv-meva/webcams-vcd2, with decoder motion vectors and still refresh off. Clean DeltaSR-C uses still refresh on.)
- Paired bootstrap (20,000 resamples, 95% CI, vs. CDA-VSR):
- Calls / doorbells / webcams (at 135k): +0.19 [+0.14, +0.24] dB, +0.55 [+0.28, +0.87] dB, +0.47 [+0.15, +0.78] dB.
cctv-meva(camera-clustered, tile-gated row): +0.22 [+0.15, +0.31] dB (wins 39/40 clips).webcams-vcd2: +0.42 [+0.32, +0.52] dB (wins 49/50 clips).
- Clean REDS4 (strict fp32, RGB PSNR): DeltaSR scores 30.311 dB dense / 30.296 dB spiking (~73% of dense work).
- Compressed REDS4 (CDA-VSR protocol, RGB PSNR): CDA-VSR 26.545 dB (paper reports 26.70 dB) vs. DeltaSR-C (132.5k)` 26.10 dB at 71.1 G per frame (Ο=2) or 77.7 G per frame (charge-only).
6. Compute and latency numbers
- Event compute definition: Multiply-adds triggered by spikes plus the full dense cost of every non-spiking component (SPyNet flow where used, codec adapters, interpolation, heads). Cold starts, I-frame restarts, and still refreshes are counted at full dense cost. Video decoding is excluded for all models. The counter matches BasicVSR++'s published count within 4%.
- Dense GPU cost: ~112 G per frame on conventional dense GPU hardware.
- Measured GPU latency: Spiking DeltaSR on one RTX 2080 Ti (fused FP16 kernel + CUDA graphs) runs at 21.5β23.2 ms mean and 23β26 ms worst per frame (43β46 fps). For reference, CDA-VSR reports 10.8 ms on an RTX 3090.
- Spike demo (
scripts/spike_demo.py): ~5 G per frame on an empty doorbell scene, rising to ~13β70 G per frame only while a bear walks through (counts agree with the benchmark ledger within 0.05%).
7. Limitations
- Clean high-motion webcams: On clean
webcams-vcd2(constant gesturing), Mobile RRN (39.79 dB @ 27.3 G per frame) beats DeltaSR-C (39.90 dB @ 49.2 G per frame) in quality per unit compute. - Ultra-low budgets on very still scenes: On clean
cctv-meva, Mobile RRN with frame reuse reaches 27.91 dB at 3.3 G per frame, cheaper than DeltaSR's 28.18 dB at 14.5 G per frame. - Busy compressed video: On compressed REDS4 under CDA-VSR's protocol, CDA-VSR leads by 0.45 dB RGB-PSNR (26.55 vs. 26.10 dB) at similar compute.
- Clean REDS4 ceiling: DeltaSR (30.31 dB) does not match TS-Mamba's 30.73 dB at ~112 G per frame.
- Single codec profile and small original sets: Fine-tuning and most compressed evaluations use one H.264 setting (CRF 23, GOP 30, no B-frames). Calls (6) and doorbells (5) are small sets, though MEVA (40) and VCD2 (50) corroborate the compressed results.
- No neuromorphic/FPGA energy measurement: Event counts are measured multiply-add counts, not physical energy on neuromorphic silicon or FPGA.
Citation
@misc{tomar2026deltasr,
title = {DeltaSR: Spiking Video Upscaling with Online Alertness Tuning},
author = {Tomar, Tarun},
year = {2026},
url = {https://github.com/TarunTomar122/deltasr}
}
Licence
MIT. Source datasets and third-party media keep their own terms (REDS terms, CDLA-Permissive-2.0 for Microsoft VCD, CC BY 4.0 for MEVA, public domain for the Xiph and Wikimedia clips).



