RawMoment: Recovering the Sharp Moment via Generative RAW-to-RGB Deblurring

Sicheng Yang, Song Fei, Tian Ye, Jianan Sun, Bin Chen, Yu Wang, Lei ZhuarXiv 2026

TL;DR

Taking a photo in the dark usually forces a camera’s shutter to stay open longer, inviting motion blur and sensor noise to ruin the shot. RawMoment rescues these murky, motion-smeared photos directly from unprocessed camera sensor data (RAW) by teaching a massive, pretrained text-to-image model how to speak the physical language of camera hardware. Remarkably, despite being trained entirely on synthetic data built from everyday videos, it restores crisp, color-accurate photos from real-world cameras it has never seen before.

What Problem Does This Paper Address?

Every digital photo begins life as a RAW measurement—a noisy, green-tinted mosaic of photon counts straight off the silicon sensor. Normally, a camera’s Image Signal Processor (ISP) translates this mosaic into a pleasant RGB image. When you shoot in low light, however, long exposures introduce motion blur alongside heavy sensor noise. Fixing both simultaneously—joint RAW ISP and deblurring—is notoriously tricky because denoising, color reconstruction, and sharpening all tug against one another.

Progress here has hit two walls:

  1. Data scarcity: Capturing real, pixel-aligned pairs of blurry RAW photos and sharp RGB ground truths requires complex optical rigs, leaving existing datasets small and stuck on single camera models.
  2. Untapped visual intuition: Large text-to-image (T2I) generative models know what sharp natural textures (leaves, bicycle spokes, car edges) ought to look like. Yet, they operate in compressed RGB spaces and are completely blind to raw sensor physics.

Methods

The authors tackle both the data famine and the representation mismatch in tandem.

First, they decouple real-world motion from sensor physics. Starting with over a million real video clips, they filter aggressively for high resolution, diverse scenes, and smooth optical flow—culling 3.35 million candidate windows down to 10,000 pristine sequences. Averaging 15 consecutive frames in linear light simulates realistic long-exposure blur, while the center frame acts as the sharp target. Finally, they run these pairs backward through a calibrated sensor degradation model (attenuating light, undoing white balance, injecting ISO-dependent noise, and applying a Bayer color filter) to synthesize realistic low-light RAW inputs.

RawMoment data curation pipeline

Second, they build RawMoment on top of a frozen, pretrained Diffusion Transformer (DiT) from Qwen-Image-2.1 using a two-stage training recipe:

  • Stage 1 (RAW-to-RGB Latent Adaptation): They fine-tune a RAW encoder so its compressed outputs match the exact statistical footprint of the T2I model's native RGB encoder, bridging the domain gap before any deblurring happens.
  • Stage 2 (Generative Restoration): Keeping the main T2I backbone frozen (save for lightweight LoRA attention adapters), they guide image generation via flow matching using two new trainable branches: RAW Spatial Encoding (RSE), a CNN that preserves fine spatial grids directly from the Bayer mosaic, and Sensor Physics Modulation (SPM), an MLP that feeds camera metadata (ISO, noise profile, white balance, black/white levels) directly into the transformer as conditioning tokens.
Figure 2. Overview of RawMoment for joint RAW ISP and deblurring. The adapted encoder EΦ maps the blurred RAW input to the pretrained RGB latent space. RAW Spatial Encoding (RSE) extracts spatial structure from RAW, while Sensor Physics Modulation (SPM) encodes physical sensor parameters. These conditions guide restoration through the pretrained T2I model’s DiT blocks, which are adapted with attention LoRA. RSE, SPM, and the LoRA adapters are jointly trained with flow matching to predict the velocity field. At inference, the model starts from Gaussian noise and performs iterative Euler updates conditioned on the blurred RAW input to obtain ˆz0, which the frozen RGB decoder DRGB converts to the restored image.

Datasets

  • RawMoment Dataset & RawMoment-Bench (New): Sourced from OpenVid-1M, the 10,000 curated video pairs are rendered with three distinct sensor settings each to yield 30,000 synthetic RAW–RGB tuples for training/validation. RawMoment-Bench holds out 200 disjoint pairs across 12 balanced scene classes for testing. Unlike GoPro (RGB-only) or RealBlur (single-camera, limited scenes), this pipeline scales scene and sensor diversity simultaneously.
  • RealBlur-R: 980 real-world paired test captures from a Sony A7R3 camera, used to test zero-shot cross-camera generalization.
  • Magic8-Pro (New): 107 unpaired, real-world dynamic RAW photos shot on an HONOR Magic8 Pro smartphone under controlled subject speeds and lighting.

Key Insights and Ideas

  • Synthetic physics beats narrow reality: When competing restoration architectures were trained on RawMoment's synthetic video-derived dataset instead of real paired captures (RealBlur), every single baseline improved its perceptual quality on the unseen smartphone dataset. Varied motion and calibrated noise outweigh capturing real data on a single sensor.
  • Generative models need a physics briefing: Ablating the Sensor Physics Modulation (SPM) or Spatial Encoding (RSE) noticeably degrades image sharpness and fidelity. Giving the diffusion model explicit ISO and white-balance numbers lets it distinguish between actual scene texture and ISO-induced photon noise.
  • Alignment first, restoration second: Adapting the RAW encoder to the RGB latent space before diffusion training jumps baseline reconstruction PSNR on RealBlur from a broken 11.80 dB to 25.24 dB, giving the generative stage a rock-solid foundation.

Key Results

Trained strictly on synthetic data, RawMoment generalizes zero-shot to external cameras and leads 17 out of 21 no-reference perceptual metrics across all three benchmarks:

  • Perceptual leaps: Achieves an average relative MUSIQ (perceptual quality) gain of 33.2% over the strongest competitor on each dataset, while slashing LPIPS (perceptual error) by 37.6% on RawMoment-Bench and 18.3% on RealBlur.
  • Human preference: In a pilot study with computational photography researchers, RawMoment scored an overall Mean Opinion Score of 4.62 / 5.0, beating the runner-up (LoFormer) by 1.22 points.
  • Speed vs. Quality: While 40 Euler sampling steps take ~2.98 seconds per 512×512 crop on an NVIDIA B200 GPU, dropping to just 5 steps cuts latency to 411 ms while keeping MUSIQ (50.17) well ahead of both traditional CNNs and rival diffusion methods like LDM-ISP (31.99 at 1,885 ms).
Figure 4. Visual comparison on RawMoment-Bench, RealBlur, and Magic8-Pro. The left column shows RAW inputs with highlighted crop regions; the remaining columns show the corresponding restored crops.

Limitations and Future Work

Riding on the shoulders of a large Diffusion Transformer carries a heavy computational tax. Even at 5 sampling steps (~411 ms on a top-tier B200 GPU), RawMoment is far slower and more memory-hungry than lightweight feed-forward networks like DNF (5.3 ms), making immediate on-device smartphone deployment impractical. Future work aims to explore accelerated sampling distillation and lightweight architectures to bring generative RAW restoration to resource-constrained cameras.

Summary updated

BibTeX
@misc{yang2026rawmoment,
  author = {Sicheng Yang and Song Fei and Tian Ye and Jianan Sun and Bin Chen and Yu Wang and Lei Zhu},
  title = {{RawMoment: Recovering the Sharp Moment via Generative RAW-to-RGB Deblurring}},
  year = {2026},
  eprint = {2611.35700},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.35700},
}
Figure