Introduction
In traditional photography, the choice of focus is a permanent decision made at the moment of capture. Changing the focus point post-capture typically requires specialized hardware, such as light-field cameras, or the acquisition of a focal stack. RefocusGAN, presented at ECCV 2018 by Sakurikar et al., addresses this limitation by enabling post-capture focus control from a single, standard image. This task is inherently ill-constrained, requiring the system to simultaneously perform blind deblurring to recover sharp details and estimate scene depth to apply new, physically accurate blur.
Methodology
The core innovation of RefocusGAN is its two-stage "deblur-then-reblur" pipeline. The authors argue that a single-step transition between focus states is too complex for a neural network to learn effectively. By decoupling the physical processes of radiance recovery and depth-dependent blurring, the model achieves superior results.
Stage 1: Radiance Recovery (Deblurring)
The first stage aims to produce an "all-in-focus" radiance image from the blurry input. This is achieved using a Conditional GAN (cGAN) architecture. To assist the network in identifying sharp versus blurry regions, the authors append a Focus Measure Response channel to the input. This hand-crafted feature, calculated using a Sum-of-modified-Laplacian filter, provides a critical cue for the deblurring process.
Stage 2: Target Refocusing (Re-blurring)
In the second stage, the network takes the sharp radiance image, the original input, and a refocus control parameter ($\delta$) to generate the final refocused output. The parameter $\delta$ is a one-hot vector that specifies the target focus plane. While the network does not explicitly output a depth map, it implicitly learns scene geometry by comparing the sharp radiance map to the original blurry input, allowing it to apply the correct amount of re-blurring to each pixel.
Results and Evaluation
RefocusGAN was trained primarily on a large light-field dataset of flowers, using synthetic focal stacks to provide ground truth. Quantitative evaluations demonstrate that the two-stage approach significantly outperforms end-to-end models, achieving a PSNR of 44.225 dB compared to 38.73 dB for single-stage baselines.
Qualitatively, the model produces natural-looking bokeh effects without the common artifacts or "halos" seen in simpler geometric methods. Furthermore, the model demonstrates strong generalization capabilities, successfully refocusing diverse scenes—such as birds and streetscapes—despite being trained on organic floral data.
Conclusion
RefocusGAN represents a significant step forward in single-image computational photography. By decomposing the refocusing problem into distinct deblurring and re-blurring stages and leveraging classical focus measures, the framework provides high-quality, controllable post-capture focus. Future work aims to transition from discrete focus planes to continuous control and to improve the handling of complex object occlusions.
Summary updated