Efficient Depth- and Spatially-Varying Image Simulation for Defocus Deblur

Xinge Yang, Chuong Nguyen, Wenbin Wang, Kaizhang Kang, Wolfgang Heidrich, Xiaoxing LiarXiv 2025

TL;DR

Fixed-focus cameras in smart glasses suffer from severe defocus blur at close distances due to their large apertures and shallow depth of field. This paper introduces an ultra-efficient dataset synthesis pipeline that models both depth-dependent defocus and spatially-varying optical aberrations. By training a simple restoration network on this high-fidelity synthetic data, the authors achieve remarkable real-world deblurring on 12-megapixel images without requiring expensive real-world data collection or fine-tuning.

What Problem Does This Paper Address?

Smart glasses and wearable edge devices frequently utilize large-aperture, fixed-focus lenses to maximize light capture while maintaining a compact form factor. However, this design results in a very shallow depth of field (DoF). Objects captured at close range (e.g., under 20 cm) appear highly blurry, severely hindering downstream tasks like reading text or scanning objects.

Motivation and real-world results

Existing deep learning models fail to fix this because every camera lens possesses unique optical aberrations and defocus behaviors, creating a massive domain gap. While synthesizing training data seems like a logical solution, physically accurate simulation of both depth-dependent and spatially-varying blur is computationally prohibitive, requiring expensive per-pixel convolutions that stall large-scale dataset generation.

Methods

The authors bypass the computational bottleneck of per-pixel convolutions with a clever, highly optimized simulation pipeline:

  1. Image Unprocessing: Standard RGB images are converted back into the RAW domain to accurately simulate sensor noise and lens physics before any non-linear Image Signal Processing (ISP) occurs.
  2. Image-Space Interpolation: Instead of performing a unique convolution for every single pixel's depth and spatial position, the pipeline convolves the image with a discrete set of base Point Spread Functions (PSFs) at predefined depths. It then linearly interpolates these blurred images in the image space, drastically reducing computational complexity.
  3. Global Auxiliary Channels: The authors observe that within the small image patches used during training, local spatial variance is negligible. They ignore local variance during patch generation but inject global spatial and noise awareness by appending two auxiliary channels to the network input: a normalized radial position map ("Field") and a camera ISO noise level channel.
  4. Lightweight Architecture: They train a standard NAFNet on these low-resolution synthetic patches, which successfully generalizes to full-resolution 12MP real-world images during inference.
Figure 2. Training and inference pipeline of the proposed approach. Left: Images are unprocessed from RGB space to RAW space to simulate defocus blur, optical aberrations, sensor quantization, and noise. A pseudo depth map is predicted using the pretrained DepthAny- thingV2 [49] model, then randomly scaled and utilized in the depth-varying defocus and spatially-vary aberration simulation. Noise signal at a random ISO level is added to the blurry RAW image. The image data, ISO channel, and radial field map are then packaged as net- work inputs. Top Right: During the inference stage on real-world images, the ISO value is read from photograph metadata, and the field map is computed on full-resolution images. Bottom Right: Instead of relying on complicated network architectures, a simple network (NAFNet [7]) is adopted for image reconstruction.

Datasets

  • Adobe5k: Used as the source for high-quality clean RGB images to generate the synthetic training data.
  • DepthAnythingV2: Utilized to generate pseudo-depth maps for the Adobe5k images, which are then randomly scaled using linear, quadratic, and exponential functions to simulate absolute depths.
  • EBB! Dataset: 2,000 images from this dataset were used to construct a photorealistic synthetic validation benchmark featuring full pixel-varying PSF convolution.
  • Real-World Evaluation: Tested on 12-megapixel images captured directly from Meta Ray-Ban smart glasses.

Key Insights and Ideas

  • Image-Space vs. PSF-Space Interpolation: Moving the interpolation step from the PSF space to the image space transforms a complex per-pixel convolution problem into standard matrix operations. This allows the pipeline to leverage modern hardware acceleration.
  • Simplifying Local Variance: Networks process images in small patches where lens aberration changes minimally. By ignoring local patch variance but providing global coordinates via auxiliary channels, the network learns patch-specific deblurring without the simulation overhead.
  • Implicit Defocus Detection: Even though no explicit depth maps are provided to the network during inference, training on depth-varying data allows the network to implicitly learn how to distinguish sharp background regions from blurry foreground objects.

Key Results

  • Massive Efficiency Gains: The proposed approach is ~80x faster than full optical simulation (16.3 ms vs 1306.9 ms per batch) and consumes ~9.6x less peak GPU memory (1.1 GB vs 10.6 GB), enabling efficient on-the-fly data generation during training.
  • Quantitative Superiority: On the synthetic validation benchmark, the method achieved a PSNR of 30.03 dB, significantly outperforming classical methods like PolyBlur (26.18 dB) and open-source models like LaDKNet (25.90 dB).
  • Downstream Application Boost: Real-world testing demonstrated dramatic improvements in short-distance Optical Character Recognition (OCR) accuracy and 3D digital asset generation using Gaussian Splatting.

Limitations and Future Work

  • Lens Data Dependency: The pipeline relies on having accurate internal lens data (modeled via ZEMAX) to compute the base PSFs. For proprietary or off-the-shelf lenses where this data is unavailable, a complex physical calibration process would be required.
  • Depth Estimation Artifacts: The quality of the synthetic dataset depends on the pseudo-depth maps generated by DepthAnythingV2. The authors do not deeply explore how errors or structural inaccuracies in these depth maps propagate to the final deblurring performance.

Summary updated

BibTeX
@misc{yang2025efficient,
  author = {Xinge Yang and Chuong Nguyen and Wenbin Wang and Kaizhang Kang and Wolfgang Heidrich and Xiaoxing Li},
  title = {{Efficient Depth- and Spatially-Varying Image Simulation for Defocus Deblur}},
  year = {2025},
  eprint = {2507.00372},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2507.00372},
}
Figure