Shafi99/iPhoneBlur
Viewer • Updated • 7.4k • 21
Checkpoints from the paper iPhoneBlur: A Difficulty-Stratified Benchmark for Consumer Device Motion Deblurring. Each baseline was fine-tuned on the iPhoneBlur dataset (7,400 blur-sharp pairs built from iPhone 17 Pro high-frame-rate video).
| File | What it is |
|---|---|
nafnet_final_weights.pth |
NAFNet (width 64), fine-tuned on iPhoneBlur |
hinet_final_weights.pth, mimo_final_weights.pth, restormer_final_weights.pth, instructir_final_weights.pth |
The other baselines from the paper |
onnx/restore_fp16w.onnx |
NAFNet exported to ONNX for CPU and web use. Weights stored in float16, computation in float32 (136 MB) |
https://huggingface.co/spaces/Shafi99/iPhoneBlur-Restore
Upload a blurry phone photo and drag the line to compare. It restores at the photo's own resolution and hands back a PNG, so nothing is re-compressed after the model runs. Free, no sign-up, runs on shared GPU.
import numpy as np, onnxruntime as ort
from PIL import Image
sess = ort.InferenceSession("restore_fp16w.onnx", providers=["CPUExecutionProvider"])
x = np.asarray(Image.open("blurry.jpg").convert("RGB").resize((512, 512)), np.float32) / 255
y = sess.run(None, {"input": np.ascontiguousarray(x.transpose(2, 0, 1)[None])})[0][0].transpose(1, 2, 0)
Image.fromarray((y.clip(0, 1) * 255 + .5).astype(np.uint8)).save("restored.png")
Input is RGB in [0, 1], shape (1, 3, H, W). Height and width are dynamic; use multiples of 16. For large photos, process 512 px tiles with overlap and blend them, because NAFNet's channel attention averages over the whole input.
@article{shafi2026iphoneblur,
title = {iPhoneBlur: A Difficulty-Stratified Benchmark for Consumer Device Motion Deblurring},
author = {Shafi, A. A. and Alam, Kazi Saeed},
journal = {arXiv preprint arXiv:2605.05990},
year = {2026}
}