Depth-of-field control is essential in photography, but getting the perfect focus often takes several tries or special equipment. Single-image refocusing is still difficult. It involves recovering sharp content and creating realistic bokeh. Current methods have significant drawbacks. They need all-in-focus inputs, depend on synthetic data from simulators, and have limited control over aperture. We introduce Generative Refocusing, a two-step process that uses DeblurNet to recover all-in-focus images from various inputs and BokehNet for creating controllable bokeh. Our main innovation is semi-supervised training. This method combines synthetic paired data with unpaired real bokeh images, using EXIF metadata to capture real optical characteristics beyond what simulators can provide. Our experiments show we achieve top performance in defocus deblurring, bokeh synthesis, and refocusing benchmarks. Additionally, our Generative Refocusing allows text-guided adjustments and custom aperture shapes.
翻译:景深控制在摄影中至关重要,但获得完美焦点通常需要多次尝试或特殊设备。单图像重聚焦仍然具有挑战性,其涉及恢复清晰内容并生成逼真的散景效果。现有方法存在显著缺陷:需要全焦输入、依赖于模拟器生成的合成数据,且对光圈的控制能力有限。我们提出生成式重聚焦,这是一个包含两个步骤的流程:首先使用DeblurNet从各类输入中恢复全焦图像,再通过BokehNet生成可控散景。我们的核心创新在于半监督训练方法,该方法将合成配对数据与未配对的真实散景图像相结合,并利用EXIF元数据捕捉超越模拟器能力的真实光学特性。实验结果表明,我们的方法在散焦去模糊、散景合成和重聚焦基准测试中均达到最优性能。此外,所提出的生成式重聚焦技术支持文本引导的调整和自定义光圈形状。