The visual aesthetics of photographs are deeply influenced by lens characteristics such as aperture shape, optical vignetting and optical diffraction, which together define a camera's unique optical style. Existing lens effect rendering methods primarily focus on accurately simulating the blur transition from small to large apertures but overlook the stylistic aspects of lens effects. As a result, they fail to produce diverse bokeh effects under large apertures or capture distinctive photographic phenomena such as starbursts that emerge under small apertures. In this work, we introduce LensStyle, a unified framework for controllable stylized lens effect rendering that explicitly models lens aesthetics through joint continuous-discrete control. Our model incorporates a Dual-Path Controller that disentangles continuous optical parameter modulation (e.g., focus distance and blur strength) from discrete lens-style conditioning (e.g., circular, polygonal, donut, cat-eye, and starburst effects), enabling fine-grained, interpretable, and physically grounded lens manipulation within a single unified framework. To support model training, we curate a comprehensive MultiLens dataset containing multi-lens image pairs synthesized under real optical constraints. Extensive experiments demonstrate that LensStyle achieves superior realism, controllability, and aesthetic quality compared with existing lens effect rendering approaches and diffusion-based image editing models, advancing computational photography toward multiple-lens-style simulation.
Figures & tables
Figure 1: Controllable multi-style lens effect rendering with LensStyle. Our framework enables unified control over three complementary dimensions of lens aesthetics within a single model. Top-left: continuous focus distance control, where the focal plane smoothly shifts from near to far. Top-right: continuous blur strength control, adjusting the magnitude of defocus under fixed focus. Bottom: discrete lens style control, synthesizing diverse aperture-induced effects including circular, hexagonal, donut, cat-eye bokeh, and diffraction-driven starburst patterns. These results demonstrate that LensStyle jointly models continuous optical parameters and discrete lens geometries in a physically grounded and interpretable manner.
Figure 2: Overview of LensStyle. The input image is first encoded into latent by a VAE encoder and then processed by a flow matching network for lens effect rendering. A Dual Path Controller conditions the generative backbone through two complementary branches. The Continuous Optical Parameter Modulation branch encodes user-specified optical parameters ( e.g . , focus distance and blur strength) into embeddings that generate adaptive scaling and shifting factors, which modulate intermediate image features for precise continuous control. In parallel, the Discrete Lens Style Cross-Attention branch encodes the selected lens style into text embeddings and injects style-specific information into the network via cross-attention. The denoised latent is finally decoded by the VAE decoder to produce the stylized output image.
Figure 3: MultiLens Dataset Overview
Table 1: Quantitative comparison across polygonal, donut, cat-eye, and starburst styles on MultiLens dataset. Higher PSNR/SSIM and lower LPIPS are better. LensStyle constantly outperforms diffusion-based image editing methods.
Figure 4: Qualitative Comparison against bokeh rendering methods for standard circle bokeh. All baselines take a depth map predicted by Depth Anything V2 [ 48 ] as input. As a result, when depth map is inaccurate, the focused region of output can be blurred by mistake (green box area). Moreover, ours produces more aesthetically pleasing circle bokeh (blue box area).
Figure 5: Qualitative Comparison against diffusion-based image editing methods. UltraEdit and SuperEdit lack lens style awareness, resulting in outputs that do not match the specified lens style. After fine-tuning on our MultiLens dataset, these models begin to capture certain lens style characteristics. However, thanks to the proposed Dual Path Controller with its disentangled continuous-discrete conditioning mechanism, our method achieves the most consistent and visually superior results.
Figure 6: User study visual comparisons under focus distance 0.70 and blur intensity 0.80 with hexagonal aperture style. Our method produces hexagonal bokeh patterns that are geometrically consistent and physically plausible, whereas SuperEdit* [ 17 ] generates hexagons with overly sharp corner transitions.
Variant
Flow
COPM
DLSC
PSNR ↑
SSIM ↑
LPIPS ↓
w/o Flow (Direct Regression)
✓
✓
21.87
0.6822
0.2433
w/o OPM
✓
✓
22.14
0.7034
0.2126
w/o SCA
✓
✓
22.06
0.6951
0.2195
Full Model
✓
✓
✓
23.38
0.7389
0.1718
Table 4: Ablation study on the MultiLens dataset. We evaluate the contribution of each core component in LensStyle.
Computational imaging combines optical and sensor design with algorithms to recover or infer scene information from indirect, compressed, or noisy measurements.
Defocus blur degrades fine image structures and limits visual perception, which can adversely affect downstream vision tasks. Although recent deep learning deblurring methods have achieved strong performance, their effectiveness depends on training data and often degrades across cameras and lenses due to limited optical diversity and realism in existing datasets. In this paper, we propose a pipeline for synthesizing realistic defocus deblurring datasets for diverse compound lenses. It integrates efficient wave-optics PSF computation via Debye CZT propagation, depth-aware defocus rendering with occlusion handling, and blur synthesis in the radiometrically linear space with camera ISP simulation. This unified pipeline enables the scalable generation of photorealistic defocus datasets with diverse lens characteristics. Using our pipeline, we generate CLDefocus, a large-scale synthetic dataset containing lens-diverse defocus image pairs. We further analyze the limitations of real-captured defocus datasets and show that such imperfections can bias full-reference evaluation. Extensive experiments demonstrate that models trained on CLDefocus achieve improved cross-device generalization compared to models trained on existing real and synthetic datasets.
Humans can infer material characteristics of objects from their visual appearance, and this ability extends to artistic depictions, where similar perceptual strategies guide the interpretation of paintings or drawings. Among the factors that define material appearance, gloss, along with color, is widely regarded as one of the most important, and recent studies indicate that humans can perceive gloss independently of the artistic style used to depict an object. To investigate how gloss and artistic style are represented in learned models, we train an unsupervised generative model on a newly curated dataset of painterly objects designed to systematically vary such factors. Our analysis reveals a hierarchical latent space in which gloss is disentangled from other appearance factors, allowing for a detailed study of how gloss is represented and varies across artistic styles. Building on this representation, we introduce a lightweight adapter that connects our style- and gloss-aware latent space to a latent-diffusion model, enabling the synthesis of non-photorealistic images with fine-grained control of these factors. We compare our approach with previous models and observe improved disentanglement and controllability of the learned factors.
Santiago Jimenez-Navarro, Belen Masia, Ana Serrano
Existing mobile devices are constrained by compact optical designs, such as small apertures, which make it difficult to produce natural, optically realistic bokeh effects. Although recent learning-based methods have shown promising results, they still struggle with photos captured under high digital zoom levels, which often suffer from reduced resolution and loss of fine details. A naive solution is to enhance image quality before applying bokeh rendering, yet this two-stage pipeline reduces efficiency and introduces unnecessary error accumulation. To overcome these limitations, we propose MagicBokeh, a unified diffusion-based framework designed for high-quality and efficient bokeh rendering. Through an alternative training strategy and a focus-aware masked attention mechanism, our method jointly optimizes bokeh rendering and super-resolution, substantially improving both controllability and visual fidelity. Furthermore, we introduce degradation-aware depth module to enable more accurate depth estimation from low-quality inputs. Experimental results demonstrate that MagicBokeh efficiently produces photorealistic bokeh effects, particularly on real-world low-resolution images, paving the way for future advancements in bokeh rendering. Our code and models are available at https://github.com/vivoCameraResearch/MagicBokeh.
Linxiao Shi, Siming Zheng, Zerong Wang +5
Shenzhen Institutes of Advanced Technology, Chinese Academy of Sciences · vivo BlueImage Lab, vivo Mobile Communication Co., Ltd. · Shenzhen University of Advanced Technology