TL;DR
Ever wished you could shift the focal plane of a video after shooting it—sharpening a blurry background while softening the foreground—without introducing weird flickering or waiting ten minutes for a render? RefocusCraft turns post-capture video refocusing into a direct, single-step translation between optical blur states. By skipping redundant intermediate reconstructions and iterative diffusion sampling, it delivers temporally smooth, sharp-where-you-want-it video in just over two seconds.
What Problem Does This Paper Address?
Once a camera records a video, its depth of field is baked into the pixels. Changing what is in focus afterward requires juggling three distinct operations inside the very same frame: recovering lost detail (deblurring), synthesizing new lens blur (bokeh), and leaving already-correct regions untouched.
Existing tools force an uncomfortable trade-off:
- Image-based refocusing models handle single frames well, but applying them frame-by-frame to video causes distracting temporal flickering.
- Video bokeh models typically assume you are starting with a pristine, all-in-focus (AIF) video—a luxury rarely available in real-world footage.
- Two-stage "restore-then-render" video pipelines try to deblur the entire video into an AIF intermediate first, then re-apply blur. Not only is it wasteful to hallucinate sharp details on regions destined to stay blurry, any artifacts from the deblurring stage get baked right into the final render. Plus, relying on multi-step diffusion sampling makes processing video painfully slow.
Methods
Instead of stripping away all blur and starting from scratch, the authors reframe refocusing as local state transitions. Every pixel has a starting blur state and a desired ending blur state, quantified by its signed Circle of Confusion (CoC)—an optical measure where the magnitude tells you how wide the blur disk is, and the sign (+ or -) tells you whether the object sits in front of or behind the focal plane.
RefocusCraft adapts a pretrained video diffusion transformer (Wan2.2-TI2V-5B) via LoRA and ControlNet—which is standard—but rewires how it runs and how tokens attend to one another:
- One-Step Latent Mapping: Because the input video already supplies the scene's layout and motion, RefocusCraft skips noise injection and iterative denoising altogether. It maps source video latents directly to target latents in a single forward pass, conditioned on the source CoC, target CoC, and their magnitude difference.
- Transition-Compatible Self-Attention (TCSA): Two regions aiming for a "sharp" target might require totally different work—one needs heavy deblurring, while the other is already sharp and just needs preservation. TCSA uses a spatial mask so generation tokens only aggregate features with other tokens sharing both similar source and target signed CoCs.
- Defocus-Compatible Cross-Attention (DCCA): Why hallucinate textures if matching blur patterns already exist in the input? DCCA acts as a smart copy-paste filter, allowing generation queries to pull features from the source video only where the source CoC magnitude matches the desired target blur level.
- Source-Conditioned Decoding & Progressive Training: Because VAE compression tends to mush fine textures, zero-initialized skip connections pipe multi-scale features from the VAE encoder straight to the decoder. The whole system is trained progressively in three stages: single-frame deblurring first, then 5-to-13-frame unified video refocusing, and finally fine-tuning the VAE decoder while freezing the main network.
Datasets
Because capturing pixel-aligned real-world videos of the exact same dynamic scene with different lens settings is nearly impossible, the authors build a new synthetic video dataset via scene compositing and thin-lens bokeh rendering:
- Training: Foreground assets from VideoMatte240K, PhotoMatte85, DVM, and AM-2K are composited over backgrounds from BG-20K and BGMv2 under varied defocus settings.
- Synthetic Evaluation: 200 test scene groups built using YouTubeMatte foregrounds, yielding 400 aligned source-target pairs across three tasks (AIF-to-Bokeh, Bokeh-to-AIF, and Bokeh-to-Bokeh).
- Real-World Evaluation: Videos from UltraVideo and CelebV-HQ, using estimated source CoCs (via AnyBokeh) and target CoCs derived from Video Depth Anything-Large depth maps.
Key Insights and Ideas
- A sharp target isn't one uniform instruction. Knowing where you want to go (target CoC) isn't enough; knowing where you started (source CoC) dictates the physics of the transformation. TCSA prevents regions undergoing aggressive deblurring from polluting regions that simply need to stay put.
- Skip the All-In-Focus bottleneck.Deblurring is an ill-posed, error-prone problem. By transitioning directly from source blur to target blur—and using DCCA to scavenge compatible blur/detail directly from the input—RefocusCraft avoids compounding restoration artifacts.
- Diffusion backbones don't always need to diffuse. When strong structural conditioning is already present in the input video, repurposing a massive video diffusion transformer as a deterministic, single-pass feed-forward translator yields massive speedups while retaining strong visual priors.
Key Results
RefocusCraft was tested across bokeh rendering, deblurring, and full refocusing:
- Refocusing (Bokeh-to-Bokeh): Beats the second-best method (GenFocus) by a massive 4.89 dB in PSNR (33.39 vs. 28.50 dB) and slashes Fréchet Video Distance (FVD) from 32.88 down to 21.12, alongside top temporal consistency scores.
- Deblurring & Rendering: Outperforms the strongest deblurring baseline by 2.27 dB PSNR, and matches dedicated bokeh-rendering models on AIF-to-Bokeh while dropping FVD by 20%.
- Blistering Speed: Processes a 25-frame ($512 \times 512$) clip in 2.36 seconds on an A800 GPU—roughly 35× faster than two-stage video baseline RAV (81.98s) and 100×–250× faster than iterative framewise pipelines like AnyBokeh (238.90s) and GenFocus (597.65s).
- Human Preference: In a 50-person user study on real-world videos, participants preferred RefocusCraft 65.8% of the time (compared to 14.0% for runner-up RAV).
Limitations and Future Work
The authors do not include a dedicated limitations section, though a few practical dependencies are apparent from their setup: real-world inference relies on external off-the-shelf estimators (AnyBokeh for source CoC and Video Depth Anything-Large for target depth geometry), and timing benchmarks assume precomputed conditions. For future applications, the authors highlight the framework's potential for post-production focus correction and creative depth-of-field editing.
Summary updated