deblurring is solved?

Motion deblurring framework

deblurring is solved?

Nikita AlutisEgor Chistov1 stars on GitHub

Motion deblurring is spread over dozens of datasets, codebases and ways to score results. This framework puts it in one place, so the question above can be answered.

What you getTodayWith the frameworkSection
Clean, unified method codedbisevery method in its own repository, training framework and custom layersplain PyTorch with the authors' outputs, every method in the same layout (network, encoder, blocks) and called the same way; NAFNet-64 imports in 6 ms instead of 1.6 sdbis
Compact test sets≈82 GB of archives on several hosts, each in its own layout6.9 GB for GoPro, REDS and RealBlur in one lossless format, only the frames that are scored, a CRC on every frame: on Hugging FaceData
Same harness and requirementsown dependencies and versions for every method96 methods run from one harness on pinned environmentsMethods
Unified benchmarking protocolown crops, padding, metrics and hardware in every paper268 variants × 8 test sets × 10 metrics, latency on one A100Protocol
Our versions with small patchesdbisfreleased once and never updated, though simple fixes would helpfaster and lighter, never more than 0.05 dB below the authors' PSNR: NAFNet-64 24 % faster, weights 4.1× smaller, BSSTNet 5.6× faster, weights 4.9× smaller, DSTNet+ L 5.2× faster, weights 3.5× smaller, Turtle 3.8× faster, weights 3.5× smallerdbisf
01

Data: the test sets in one format

The frames every method is scored on. GoPro, REDS and RealBlur, released under CC BY 4.0, are on Hugging Face as lossless FFV1 with a CRC on every frame: 6.9 GB instead of 28 GiB of the authors' archives (python tools/testsets.py download). The other sets state no license for copies; their cards link to the authors' release.

GoPro1,111 pairs
Blurry frames of GoPro1280×720 · input 25.64 dB · authors' release · CC BY 4.0
REDS val3,000 pairs
Blurry frames of REDS val1280×720 · input 26.27 dB · authors' release · CC BY 4.0
BSD 2ms/16ms3,000 pairs
Blurry frames of BSD 2ms/16ms640×480 · input 26.63 dB · real blur · authors' release · no license stated
DVD1,000 pairs
Blurry frames of DVD1280×720 · input 27.29 dB · authors' release · no license stated
RealBlur-J980 images
Blurry frames of RealBlur-J≈670×760 · input 27.68 dB · real blur · authors' release · CC BY 4.0
RealBlur-R980 images
Blurry frames of RealBlur-R≈680×773 · input 35.35 dB · real blur · authors' release · CC BY 4.0
GS-Blur1,000 images
Blurry frames of GS-Blur480×270 to 1920×1080 · input 23.48 dB · authors' release · no license stated
MIORe300 images
Blurry frames of MIORe1920×1080 · input 30.88 dB · authors' release · no license stated
02

Methods: one harness for all of them

Every method with released weights, image and video, runs through the same harness with the same inputs, and every released checkpoint is scored.

96methods with released weights
174released checkpoints, trained on GoPro, REDS, BSD, DVD, RealBlur or mixes
268variants: whole frame, tiles, test-time local converter, temporal schemes
03

Protocol: one way to measure

every released checkpoint, whole frame, batch 1each variant scored on its own: whole frame, tiles, TLC 8-bit outputs, every frame scoredRealBlur after the official ECC alignment 10 metrics, full-reference and no-referencelatency per output frame, 1280×720, one A100
SetSequencesFramesResolutionBlurry input PSNRInput
GoPro test111,1111280×72025.64blur
REDS val303,0001280×72026.27val_blur
BSD 2ms/16ms test203,000640×48026.63Blur/RGB
DVD test101,0001280×72027.29input
RealBlur-J test50 scenes980about 670×763–blur
RealBlur-R test50 scenes980about 670×763–blur
GS-Blur mini752 scenes1,000480×270 to 1920×1080, both orientations–input_noise
MIORe, 300 of train300 images3001920×1080–blur
04

Analysis: the full picture

Pareto front

Image method Video method Pareto front dbisf dbisf front Blurry input

Leaderboard

Results as CSV
bold best in column italic run still in progress Click a method for its score on each test sequence.

Two methods, frame by frame

Pick two methods. Every test frame of the set is one observation: how much better method A scores than method B on it, and what that frame is like (how strong its blur is, how fast it moves, how dark or textured it is).

Which frame characteristics go with the difference

One method across frames

Where a method does well and where it does not: its score on every frame of the set against a frame characteristic, and its rank among the GoPro-trained methods within each fifth of the frames along every characteristic.

Rank within each fifth of the frames

Frames

A few frames of each set, picked at the extremes of the frame characteristics. Compare any two outputs with a sliding divider, side by side, or side by side with a magnified window, and switch to their error maps.

05dbisdbisf

our versions of the methods

dbis gives the authors' outputs from plain PyTorch and a safetensors file, every method in the same layout with an encoder that loads on its own. dbisf is faster and lighter, and its mean PSNR is never more than 0.05 dB below the authors' code on any test set. What changed in each method: DBIS.md.

ModelWeightsLoadTime per 720p frameGoPro PSNR
NAFNet-64, GoPro weights
authors' code272 MB3.06 s34.9 ms33.7103
dbis271 MB0.70 s33.5 ms33.7103
dbisf66 MB0.77 s26.6 ms33.7041
BSSTNet, GoPro weights
authors' code209 MB3.50 s25.6 s35.9662
dbis175 MB1.66 s30.6 s35.9662
dbisf42 MB1.71 s4.6 s35.9425
DSTNet+ L, GoPro weights
authors' code56 MB2.78 s3.0 s35.7078
dbis56 MB0.54 s3.4 s35.7078
dbisf16 MB0.60 s584.9 ms35.6999
Turtle, GoPro weights
authors' code237 MB0.69 s760.9 ms34.5598
dbis236 MB0.74 s723.9 ms34.5598
dbisf68 MB0.83 s198.7 ms34.5316

Load: a fresh process, from CUDA ready to the network with its weights on the GPU. Time: the benchmark's latency harness on one A100, 1280×720, batch 1, the three versions of a method on the same node. NAFNet-64: fp16 with torch.compile and CUDA graphs. BSSTNet: one window per output frame as in the leaderboard (48 frames for the authors' code and dbis, 24 for dbisf), each version in its fastest mode that runs (the authors' code fp16 with torch.compile, dbis fp16 eager, dbisf fp16 with its heavy blocks compiled). DSTNet+ L: a 27-frame window for every output frame as in the leaderboard; the authors' code and dbis in float32 (the authors' CuPy kernel has no float16), dbisf in float16 with its propagation blocks compiled. Turtle: one frame per step with the history carried, as the authors' tiled inference; each version in its fastest valid mode. PSNR: all 1,111 GoPro test frames. Every number: results/dbis/NAFNet-64.json, results/dbis/BSSTNet.json, results/dbis/DSTNetPlus-L.json, results/dbis/Turtle.json.

pip install "deblurring-is-solved[bsst] @ git+https://github.com/illaitar/deblurring-is-solved"   # the package, from GitHub

python -m dbis.run dbisf-Turtle blurry.mp4 sharp.mp4   # a video, a folder of frames or an image
python -m dbis.train dbisf-NAFNet-64 --data DIR        # training: the authors' recipe, the batch fitted to the GPU's memory

import dbis
net = dbis.load("dbisf-BSSTNet")       # every model the same way; the weight file comes from Hugging Face on first use
out = net.restore(frames)              # options: tile, tile_overlap, window, batch, precision, compile, out

# the files: https://huggingface.co/Illaitar/<model>, or made from the authors' checkpoints
python -m dbis.convert NAFNet-64 NAFNet-GoPro-width64.pth          # -> weights/dbis/
python -m dbis.convert BSSTNet BSST_gopro.pth raft-things.pth      # BSST and its RAFT
python -m dbis.convert DSTNetPlus-L DSTNetPlus_L_gopro.pth

Anatomy of the networks

Where each network keeps its parameters and where its compute goes, block by block, on one 1280×720 frame. Pick the networks to compare; tap a block or a scale for its numbers.

NETWORKS
COLOUR
WIDTH
Share of the parameters at each scale

Scale: the resolution a block works at, relative to the frame the network takes in. Tap a scale to light up its blocks below.

Every block, in the order the frame goes through them
Tap a block for its name, size and cost.

A block is one unit of a network's design (NAFNet's NAF block, Concertormer's CSA block, Turtle's attention block, DSTNet+'s residual blocks, BSSTNet's alignment, sparse transformer and shift blocks); the narrow columns between blocks are the other layers (scale changes, first and last convolutions), and BSSTNet's RAFT, which it keeps fixed, is one cell.

Counted on our dbis code with PyTorch's FLOP counter on one 1280×720 frame (FLOPs = 2 × multiply-adds), the frame padded as each network pads it: python tools/anatomy.py. Video networks per frame: DSTNet+ and BSSTNet on an 8-frame clip (BSSTNet on real GoPro frames, since its sparse attention picks tokens by the blur), Turtle on its second frame, with its history. The dbisf versions have the same blocks.

06

Get started

1 · Get the code
git clone https://github.com/illaitar/deblurring-is-solved
2 · Run a model
pip install "deblurring-is-solved @ git+https://github.com/illaitar/deblurring-is-solved"
python -m dbis.run dbisf-NAFNet-64 blurry.png sharp.png
3 · Take the numbers

Every score: leaderboard.csv; per sequence and per frame: results/ in the repository.