icon Generative Refocusing
Flexible Defocus Control from a Single Image

1National Yang Ming Chiao Tung University 2University of Maryland, College Park

Given a single input image, our method enables flexible refocusing and aperture adjustment.
The heatmap overlay visualizes the synthesized defocus map.

Historical Images

Input
Ours
◀▶
Input
Ours
Input
Ours
◀▶
Input
Ours

In-the-wild Images

Input
Ours
◀▶
Input
Ours
Input
Ours
◀▶
Input
Ours

Interactive Refocusing

Input Image
Input Image
Generative refocusing demo
Click on a subject to refocus
Small Large

Comparison with Gemini 3 (Nano Banana Pro)

Input
Input
Nano Banana Pro
Nano Banana Pro
Ours
Ours

Method

Our method decomposes single-image refocusing into two stages: (a) Defocus Deblurring and (b) Shallow Depth-of-Field Synthesis. Given a blurry input image Iin, we optionally apply a pre-deblurring to obtain a conservative estimate Isyn, then feed both Iin and Isyn into DeblurNet to recover a high-quality all-in-focus image Iaif. In the second stage, BokehNet takes the all-in-focus image Iaif, the defocus map Ddef, and optionally a specific aperture shape as inputs to synthesize the refocused output.
Method Pipeline

Visual Comparison

Case:
Method:
Method
Ours
◀▶
Method
Ours
Case:
Method:
Method
Ours
◀▶
Method
Ours
Case:
Method:
Method
Ours
◀▶
Method
Ours

Visual Comparison for BokehNet Training Ablation

Training solely on synthetic data tends to result in an incorrect depth scale, leading to excessive bokeh strength and noticeable artifacts along object boundaries.
Case:
Synthetic pair
With real pairs
◀▶
Synthetic pair
+ Real unpair

Failure Cases

For severely blurred inputs, the model may hallucinate incorrect details (e.g., reconstructing "Jewelry shop" as "Temnlry shop").
Input Image
Input image
GT
Ours
◀▶
GT
Ours

Related Links

There has been great works on refocusing or bokeh that were done concurrently by other researchers, feel free to check them out!