无需重建全焦图像,直接实现任意焦点间的虚化编辑。
AnyBokeh: Physics-Guided Any-to-Any Bokeh Editing with Optical Fingerprint Transfer

- 用符号圆扩散图和视差图建模源图像模糊状态
- 通过光学指纹迁移实现跨焦点/光圈的精准虚化控制
- 支持真实世界照片的灵活虚化编辑,适合摄影后期与视觉创作
景深控制是摄影中的基础工具,但单张图像的后捕获虚化编辑仍具挑战。理想的编辑器应能处理任意对焦与光圈设置下的图像。现有方法通常假设输入为全焦图像,或先恢复全焦图再生成新虚化,此类流程会丢弃源图像中的有用模糊线索,并将重建伪影引入最终结果。本文提出AnyBokeh,一种物理引导的任意到任意虚化编辑框架。不将源模糊视为需消除的退化,而是通过符号圆扩散图与视差图估计源模糊状态。基于符号圆扩散与视差差之间的线性关系,模型估计源图像特有的光学指纹,并将其迁移到目标对焦与光圈设置。以源与目标圆扩散图为条件的生成编辑器执行相对模糊合成,实现空间自适应去模糊、模糊保留与散焦渲染。为支持物理监督学习,我们构建了一个高保真合成数据集,包含精确深度、对焦距离与完整EXIF元数据。在真实世界基准测试中,AnyBokeh在任意到任意虚化编辑、全焦到虚化渲染及散焦去模糊任务上均实现忠实且可控的编辑效果,避免了全焦重建与测试时的虚化级校准,显著优于现有方法。代码与数据集将开源。
原文摘要 · Abstract (English)
Depth-of-field control is a fundamental tool in photography, yet post-capture bokeh editing from a single image remains challenging. A practical editor should handle images captured under arbitrary focus and aperture settings. Existing methods typically assume an all-in-focus input, or first recover an all-in-focus image before rendering new bokeh. Such pipelines can discard useful blur cues from the source image and propagate reconstruction artifacts into the final edit. We introduce AnyBokeh, a physics-guided framework for any-to-any bokeh editing. Instead of treating source blur merely as a degradation to be removed, AnyBokeh estimates the source blur state with a signed circle-of-confusion map and a disparity map. By modeling the linear relation between signed circle of confusion and disparity difference, AnyBokeh estimates a source-specific optical fingerprint and transfers the source optical characteristics to the desired focus and aperture setting. A generative editor conditioned on both source and target circle-of-confusion maps then performs relative blur synthesis, enabling spatially adaptive deblurring, preservation, and defocus rendering. To support physically supervised learning, we further construct a high-fidelity synthetic dataset with accurate depth, focus distance, and full EXIF metadata. Experiments on real-world benchmarks show that AnyBokeh achieves faithful and controllable editing across any-to-any bokeh editing, all-in-focus-to-bokeh rendering, and defocus deblurring, while avoiding all-in-focus reconstruction and test-time bokeh-level calibration commonly required by existing approaches. The code and dataset will be available at https://github.com/itsmag11/AnyBokeh.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。