Abstract
This paper introduces Deep Phase Coded Image Prior (DPCIP), a zero-shot framework for recovering high-quality depth maps and all-in-focus images from a single phase-coded capture. By integrating the architectural priors of deep neural networks with a differentiable model of camera physics, DPCIP bypasses the need for large-scale training datasets. The method demonstrates superior performance over state-of-the-art supervised models, particularly in generalizing to real-world scenarios where synthetic training data often fails.
Introduction
In the field of computational imaging, researchers often utilize "phase masks"—specialized optical elements placed within a lens—to encode depth information directly into the defocus blur of a captured image. This technique enables passive depth estimation and Extended Depth of Field (EDOF). However, "decoding" this encoded information to recover a sharp image and an accurate depth map is a complex inverse problem.
Historically, the standard solution has been supervised learning. This involves training deep neural networks on massive datasets of paired blurred images and ground-truth depth maps. Unfortunately, high-quality depth datasets are difficult to capture in the real world and expensive to simulate with high fidelity. This leads to a significant "domain gap," where models trained on synthetic data perform poorly on real-world captures. DPCIP addresses this challenge by proposing a self-supervised, zero-shot approach that requires no training data.
Methodology
The core innovation of DPCIP is the fusion of the Deep Image Prior (DIP) with a Differentiable Camera Model (DCM). This allows the system to use the laws of physics as a supervisor rather than relying on labeled data.
1. Optical Encoding
The system utilizes a custom two-ring phase mask. This mask is designed to create distinct defocus patterns across the Red, Green, and Blue channels. By ensuring that at least one color channel remains relatively sharp at any given depth, the mask provides the necessary cues for the subsequent restoration process.
2. The Implicit Generator
Following the philosophy of Deep Image Prior, DPCIP employs a U-Net-style generator. Instead of being pre-trained, the network is initialized with random noise for every new image capture. The generator is tasked with producing two distinct outputs: a sharp RGB image and a pixel-level depth map.
3. Differentiable Forward Modeling
The sharp image and depth map produced by the generator are passed into a Differentiable Camera Model (DCM). The DCM is a mathematical simulation of the specific camera setup, including the phase mask and Point Spread Function (PSF) kernels. It "re-blurs" the generated sharp image based on the generated depth map to create a simulated version of the coded capture.
4. Optimization Loop
The framework operates through an iterative optimization loop. A loss function compares the simulated blurred image to the actual captured image. Because the DCM is fully differentiable, gradients can flow back from the physics model into the generator. Over several hundred iterations, the generator learns to produce a sharp image and a depth map that, when combined via the physical model, perfectly match the observed data.
Experimental Results
The authors validated DPCIP using both the TAUAgent synthetic dataset (created in Blender) and physical real-world captures using a custom-built camera.
Quantitative Performance
- Depth Accuracy: In the "WuManchu" test scene, DPCIP achieved a depth Root Mean Square Error (RMSE) of 0.0003m. In contrast, a supervised monocular baseline achieved 0.1639m, representing a two-order-of-magnitude improvement in accuracy.
- Image Restoration: For EDOF tasks, DPCIP improved the Peak Signal-to-Noise Ratio (PSNR) by approximately 5dB over existing supervised baselines.
- Comparison to Blind Deconvolution: When compared against "Neural-Deblurring" (a standard DIP-based method), DPCIP achieved a PSNR of 26.38 dB versus 19.6 dB. This confirms that incorporating a depth-aware physics model is significantly more effective than generic deblurring methods.
Qualitative and Real-World Robustness
Qualitative evaluations on real-world captures demonstrated that DPCIP produces sharper images with fewer artifacts and more consistent depth maps than prior supervised works. This suggests that the method is highly robust to the nuances of physical hardware that synthetic datasets often fail to capture.
Discussion and Insights
The success of DPCIP highlights several key insights in computational imaging:
- Physics as Supervision: Precise models of forward physical processes can replace the need for human-labeled data. The requirement for physical consistency acts as a powerful constraint during optimization.
- Joint Optimization: By solving for depth and image restoration simultaneously, the two tasks regularize each other. An incorrect depth estimate would lead to an incorrect blur, which the optimization loop would then correct.
- Architectural Bias: The U-Net architecture possesses an inherent inductive bias toward natural-looking images and smooth gradients, preventing the network from simply outputting noise to match the blur.
Limitations and Future Work
Despite its performance, DPCIP faces a significant hurdle: computational cost. Because it requires a fresh optimization process for every image, it takes approximately 15 minutes per capture on an RTX-2090Ti. This currently limits its use in real-time applications.
Future research may focus on using the high-quality outputs of DPCIP as "pseudo-ground truth" to train faster, supervised feed-forward networks. This would combine the zero-shot accuracy of DPCIP with the inference speed required for consumer applications.
Summary updated