RefocusCraft: Unified Video Refocusing
via CoC-Guided State Transitions

Jialiang Feng1Shengxin Liu1Yong Du2Shengfeng He3Yangyang Xu1,†Jun Yu1
1 Harbin Institute of Technology, Shenzhen2 Ocean University of China3 Singapore Management University

† Corresponding author: Yangyang Xu

One framework for video refocusing, defocus deblurring, and bokeh synthesis.

Direct Video Refocusing

Change the focus directly, without first reconstructing an all-in-focus video.

Source RefocusCraft
01 / 25
Source RefocusCraft
01 / 25
Source RefocusCraft
01 / 25

Abstract

Post-capture video refocusing enables flexible control over focus and depth of field. However, image-based methods struggle to maintain temporal consistency when applied frame by frame, while two-stage video pipelines can introduce redundant restoration and propagate errors through an all-in-focus intermediate. We propose RefocusCraft, a unified one-step framework for efficient and temporally coherent video refocusing. Our key idea is to model refocusing as local transitions between source and target defocus states, jointly supporting detail recovery, blur synthesis, and appearance preservation within the same video. Guided by signed source and target circle-of-confusion (CoC) maps, our framework adapts a pretrained video diffusion model to directly generate the refocused video without explicit all-in-focus reconstruction. To align feature interactions with these transitions, we introduce two complementary attention mechanisms. Transition-compatible self-attention aggregates generation features with similar source and target defocus states, while defocus-compatible cross-attention selectively reuses source features to support the desired defocus transitions. Source-conditioned decoding further incorporates fine-grained input features to preserve textures and object boundaries. Experiments on our synthetic and real-world datasets demonstrate strong visual fidelity and temporal coherence across bokeh rendering, defocus deblurring, and refocusing.

Method

Overview of RefocusCraft. Click the figure to enlarge.

Real-world Video Refocusing

Yellow crosses mark target focus points. Videos in each row play in sync. Click any video to enlarge.

Source
AnyBokeh
GenFocus
DiffCamera
RAV
RefocusCraft
01 / 25
Source
AnyBokeh
GenFocus
DiffCamera
RAV
RefocusCraft
01 / 25
Source
AnyBokeh
GenFocus
DiffCamera
RAV
RefocusCraft
01 / 25
Source
AnyBokeh
GenFocus
DiffCamera
RAV
RefocusCraft
01 / 25
Source
AnyBokeh
GenFocus
DiffCamera
RAV
RefocusCraft
01 / 25
Source
AnyBokeh
GenFocus
DiffCamera
RAV
RefocusCraft
01 / 25

Fine Details and Content Preservation

Compare lettering and fine patterns in matched, synchronized close-ups.

Source · crop location
Source reference frame with the compared region outlined

Source reference frame. The outlined region is enlarged on the right.

Book-cover lettering

Source
AnyBokeh
GenFocus
DiffCamera
RAV
RefocusCraft
01 / 25 Slow · 5 fps

Matched close-up of the printed lettering on the middle book cover. Click a crop to enlarge.

Temporal Consistency

Inspect facial appearance and background changes over the same 25-frame clip.

Source · crop location
Source reference frame with the compared region outlined

Source reference frame. Cyan box: face crop. Orange line: background scanline.

Facial appearance over time

Source
AnyBokeh
GenFocus
DiffCamera
RAV
RefocusCraft
01 / 25 Slow · 5 fps
Background temporal slicesTime: top to bottom
Source: background scanline across 25 frames AnyBokeh: background scanline across 25 frames GenFocus: background scanline across 25 frames DiffCamera: background scanline across 25 frames RAV: background scanline across 25 frames RefocusCraft: background scanline across 25 frames

The same fixed facial region across all 25 frames. Click a crop to enlarge.

Focus and Blur Strength Control

Change the focus plane and blur strength independently on the same video.

Focus plane
Source reference
Source reference frame for focus and blur-strength control
RefocusCraft Near focus · Medium blur

Yellow boxes mark the selected focus point. Slow playback.

Focus Transitions

Yellow boxes mark the current target focus. Generated videos are shown in slow motion.

Forest cutting board
Dining table
Choir

Inference Efficiency

NVIDIA A800 · 25 frames · 512 × 512 · Precomputed conditions

RefocusCraft2.36 sper 25-frame clip
Mean processing time Lower is better
RefocusCraft2.36 s
RAV81.98 s
AnyBokeh238.90 s
DiffCamera364.78 s
GenFocus597.65 s
Enlarged RefocusCraft method overview