Papers
Topics
Authors
Recent
Search
2000 character limit reached

DualFocus: Unsupervised DP Deblurring

Updated 12 July 2026
  • DualFocus is an unsupervised method that jointly estimates a defocus map and recovers an all-in-focus image from a single dual-pixel capture using an explicit optical model.
  • It uses a one-time, device-specific calibration to capture spatially varying, non-parametric PSFs, accounting for real-world lens aberrations and vignetting.
  • The joint optimization framework integrates bias-correction and robust regularizers, achieving superior reconstruction quality compared to prior DP deblurring methods.

Searching arXiv for the primary paper and closely related dual-pixel defocus deblurring work. DualFocus is an unsupervised computational photography method for jointly estimating a defocus map and recovering an all-in-focus image from a single dual-pixel (DP) capture. It is built around an explicit optical model of DP sensing, device-specific calibration of spatially varying point-spread functions (PSFs), and a joint optimization over latent sharp appearance and per-pixel defocus. Within the DP deblurring literature, its distinguishing feature is that it treats defocus-map estimation and blur removal as a single coupled inverse problem rather than as two independently trained tasks (Xin et al., 2021).

1. Position within dual-pixel imaging

Dual-pixel sensors split each photosite into two sub-pixels that observe complementary halves of the aperture. As a result, a single exposure contains two sub-aperture views whose relative displacement encodes defocus disparity. This sensing model was introduced for autofocus, but later work used DP data for depth estimation, reflection removal, and defocus deblurring (Abuolaim et al., 2021).

DualFocus belongs to the defocus-deblurring branch of this line of work, but it differs materially from several neighboring approaches. The Multi-task DP Network (MDP) uses a single blurry combined image and jointly predicts the left and right DP views together with the all-in-focus image in a multi-task U-Net-style architecture (Abuolaim et al., 2021). MCCNet instead assumes access to the left and right DP views and inserts explicit multi-scale row-wise cross-correlation modules so that horizontal disparity cues guide deblurring (Swami, 16 Feb 2025). ATTSF also consumes the two DP sub-images directly, but relies on dual-attention encoders and triple-local/global-local bottleneck modules (Vo, 2021). By contrast, DualFocus is optimization-based, uses a one-time calibration on the target device, and is entirely unsupervised after calibration (Xin et al., 2021).

This placement is significant because the method addresses two longstanding difficulties simultaneously: the ill-posedness of single-image defocus removal and the scarcity of labeled defocus maps or paired all-in-focus ground truth. The DP observation model provides additional geometric structure, and DualFocus exploits that structure through calibrated rendering and regularized inference rather than through purely feed-forward supervised regression (Xin et al., 2021).

2. Optical model and calibrated PSFs

The method starts from a DP image-formation model in which the latent all-in-focus radiance I:ΩRI^*:\Omega\to\mathbb R and the signed defocus map d(x,y)d(x,y) jointly generate the observed left and right DP images:

Il(x,y)=(Ikl(d(x,y)))(x,y),Ir(x,y)=(Ikr(d(x,y)))(x,y).I_l(x,y) = (I^* * k_l(d(x,y)))(x,y), \qquad I_r(x,y) = (I^* * k_r(d(x,y)))(x,y).

Here klk_l and krk_r are the left- and right-half-aperture PSFs, and the sign of dd indicates whether a point lies in front of or behind the focal plane. Equivalently, the two PSFs can be written as kv(d)=k(svd)k_v(d)=k(s_v d) with sl=+1s_l=+1 and sr=1s_r=-1 (Xin et al., 2021).

A central design decision is that DualFocus does not impose a strong parametric PSF model such as a Gaussian. Instead, it performs a one-time calibration on the target device. A dense grid of small bright disks is displayed on a monitor at fixed focus distance, both DP images are captured, and an 8×68\times6 spatially varying grid of non-parametric PSFs is estimated at a reference blur size d(x,y)d(x,y)0 using the method of Mannan and Langer. PSFs at other blur sizes are then obtained by spatial rescaling:

d(x,y)d(x,y)1

with the same construction for d(x,y)d(x,y)2. Left/right vignetting is corrected by dividing by per-channel white-sheet responses d(x,y)d(x,y)3 and d(x,y)d(x,y)4 (Xin et al., 2021).

This calibration strategy is consequential because real DP optics deviate from ideal half-disk PSFs. The calibrated, spatially varying, non-parametric kernels absorb real-lens aberrations and vignetting, so the forward model used during optimization more closely matches the device than an idealized thin-lens approximation would (Xin et al., 2021).

3. Joint estimation of sharp image and defocus map

DualFocus formulates deblurring and defocus-map estimation as a single optimization problem. A naive least-squares data term,

d(x,y)d(x,y)5

is explicitly rejected as insufficient for three reasons stated in the method description: it is biased toward artificially small kernels in the presence of noise, the inverse problem is underconstrained, and spatial regularity must be enforced (Xin et al., 2021).

To address the small-kernel bias, the method derives an analytic bias-correction term d(x,y)d(x,y)6 that approximates the tendency of the d(x,y)d(x,y)7 objective under Gaussian noise of variance d(x,y)d(x,y)8 to prefer small d(x,y)d(x,y)9. The resulting data term uses a robust Charbonnier penalty:

Il(x,y)=(Ikl(d(x,y)))(x,y),Ir(x,y)=(Ikr(d(x,y)))(x,y).I_l(x,y) = (I^* * k_l(d(x,y)))(x,y), \qquad I_r(x,y) = (I^* * k_r(d(x,y)))(x,y).0

Here Il(x,y)=(Ikl(d(x,y)))(x,y),Ir(x,y)=(Ikr(d(x,y)))(x,y).I_l(x,y) = (I^* * k_l(d(x,y)))(x,y), \qquad I_r(x,y) = (I^* * k_r(d(x,y)))(x,y).1 is the DP view rendered from the current estimate, and Il(x,y)=(Ikl(d(x,y)))(x,y),Ir(x,y)=(Ikr(d(x,y)))(x,y).I_l(x,y) = (I^* * k_l(d(x,y)))(x,y), \qquad I_r(x,y) = (I^* * k_r(d(x,y)))(x,y).2 is assembled from per-layer bias corrections weighted by defocus transmittance (Xin et al., 2021).

The method then introduces a multiplane image (MPI) representation with Il(x,y)=(Ikl(d(x,y)))(x,y),Ir(x,y)=(Ikr(d(x,y)))(x,y).I_l(x,y) = (I^* * k_l(d(x,y)))(x,y), \qquad I_r(x,y) = (I^* * k_r(d(x,y)))(x,y).3 fronto-parallel planes at defocus levels Il(x,y)=(Ikl(d(x,y)))(x,y),Ir(x,y)=(Ikr(d(x,y)))(x,y).I_l(x,y) = (I^* * k_l(d(x,y)))(x,y), \qquad I_r(x,y) = (I^* * k_r(d(x,y)))(x,y).4. Each plane consists of an in-focus image Il(x,y)=(Ikl(d(x,y)))(x,y),Ir(x,y)=(Ikr(d(x,y)))(x,y).I_l(x,y) = (I^* * k_l(d(x,y)))(x,y), \qquad I_r(x,y) = (I^* * k_r(d(x,y)))(x,y).5 and opacity Il(x,y)=(Ikl(d(x,y)))(x,y),Ir(x,y)=(Ikr(d(x,y)))(x,y).I_l(x,y) = (I^* * k_l(d(x,y)))(x,y), \qquad I_r(x,y) = (I^* * k_r(d(x,y)))(x,y).6. The all-in-focus estimate is

Il(x,y)=(Ikl(d(x,y)))(x,y),Ir(x,y)=(Ikr(d(x,y)))(x,y).I_l(x,y) = (I^* * k_l(d(x,y)))(x,y), \qquad I_r(x,y) = (I^* * k_r(d(x,y)))(x,y).7

Each DP view is rendered by convolving Il(x,y)=(Ikl(d(x,y)))(x,y),Ir(x,y)=(Ikr(d(x,y)))(x,y).I_l(x,y) = (I^* * k_l(d(x,y)))(x,y), \qquad I_r(x,y) = (I^* * k_r(d(x,y)))(x,y).8 with the corresponding half-aperture PSF Il(x,y)=(Ikl(d(x,y)))(x,y),Ir(x,y)=(Ikr(d(x,y)))(x,y).I_l(x,y) = (I^* * k_l(d(x,y)))(x,y), \qquad I_r(x,y) = (I^* * k_r(d(x,y)))(x,y).9, modulating by the defocused transmittance klk_l0, and summing over planes (Xin et al., 2021).

The full objective is

klk_l1

The auxiliary term klk_l2 encourages each layer’s blurred content to match the observations when weighted by transmittance. klk_l3 imposes edge-aware total variation on klk_l4 and on each klk_l5. klk_l6 regularizes klk_l7 and the defocused transmittance. klk_l8 is a per-pixel Renyi collision-entropy penalty that pushes each pixel toward a single dominant depth plane (Xin et al., 2021).

The significance of this construction is methodological rather than merely architectural. The DP views are not treated as auxiliary channels for a learned predictor; they appear directly in a calibrated rendering objective. The defocus map and the deblurred image are therefore mutually constrained by the same physical model, and the regularizers are designed to produce spatially smooth yet edge-aligned depth and appearance (Xin et al., 2021).

4. Unsupervised inference and numerical solver

Because the loss depends only on the observed DP images and the pre-calibrated PSFs, the method requires no labeled defocus maps and no paired sharp targets. After calibration, any DP image can be processed in an entirely unsupervised manner (Xin et al., 2021).

The implementation is in JAX and optimizes the MPI parameters klk_l9 with Adam. The reported settings are krk_r0 planes, a front-plane kernel of approximately krk_r1, a back-plane kernel of approximately krk_r2, and planes uniformly spaced in diopters. Optimization runs for krk_r3 iterations with a learning rate decayed from krk_r4 to krk_r5, uses one Titan RTX GPU, and requires approximately two hours per image (Xin et al., 2021).

Two additional preprocessing details are part of the method specification. First, the input DP images are denoised with a burst-denoiser to reduce Poisson-Gaussian noise before optimization. Second, input intensities are normalized so that their mean is approximately krk_r6 (Xin et al., 2021).

These details indicate that DualFocus is not a real-time deployment method in its original form. It is a calibrated inverse solver whose emphasis is physical fidelity and unsupervised recoverability rather than throughput. A plausible implication is that its main value lies in high-quality reconstruction and accurate defocus estimation on devices where a one-time calibration is feasible.

5. Empirical results

The reported evaluation uses a newly captured Pixel 4 dataset containing 17 indoor and outdoor scenes, with ground truth obtained from a 36-slice focus stack. On this dataset, DualFocus achieves all-in-focus reconstruction quality of 26.69 dB PSNR and 0.804 SSIM. The same benchmark reports Wiener deconvolution at 25.81 dB PSNR and 0.704 SSIM, and DPDNet at 25.59 dB PSNR and 0.777 SSIM (Xin et al., 2021).

Method All-in-focus quality
Wiener deconvolution 25.81 dB PSNR, 0.704 SSIM
DPDNet 25.59 dB PSNR, 0.777 SSIM
DualFocus 26.69 dB PSNR, 0.804 SSIM

For defocus-map estimation, DualFocus reports krk_r7, krk_r8, and krk_r9. The comparison given for Garg et al. [ICCV’19] is 0.079, 0.102, and 0.208 respectively (Xin et al., 2021).

The qualitative characterization in the method summary is equally specific. DualFocus is reported to recover sharper textures with fewer ringing artifacts and to produce depth maps that remain accurate in textureless regions. Ablation studies identify the bias-correction term and each regularizer as necessary components. The paper’s summary concludes that the method improves upon prior work for both defocus-map estimation and blur removal despite being entirely unsupervised (Xin et al., 2021).

These results matter because they show that a calibrated unsupervised formulation can compete directly with supervised DP deblurring methods on both image restoration and defocus inference. In the paper’s framing, the gain comes from solving the two tasks jointly rather than from treating either as an isolated regression problem.

6. Relation to adjacent methods and reuse of the name

Within computational photography, DualFocus sits alongside several distinct DP-based or dual-camera methods. MDP pretrains on unpaired DP imagery, jointly synthesizes left and right DP views from a single blurry image, and reports 25.35 dB PSNR, with synthesized DP views at approximately 39 dB PSNR on ground-truth DP data (Abuolaim et al., 2021). MCCNet operates directly on the two DP views, computes explicit multi-scale cross-correlation, and reports 25.85 dB PSNR, 0.802 SSIM, and 0.037 MAE on DPDD with 5.52 M parameters (Swami, 16 Feb 2025). ATTSF uses dual-attention encoders and reports 25.98 dB PSNR, 0.8115 SSIM, and 0.0377 MAE on the NTIRE 2021 challenge benchmark (Vo, 2021). DCdd0 is adjacent in application but not in sensing model: it fuses a primary wide camera and an ultra-wide camera to enable defocus control, refocus, and bokeh synthesis rather than single-DP unsupervised inference (Alzayer et al., 2023).

The name “DualFocus” is also used in unrelated later work. It names a macro/micro perspective mechanism for multi-modal LLMs (Cao et al., 2024), a text-based person re-identification framework built around positive and negative descriptors (Deng et al., 2024), and a depth-from-focus method with spatio-focal dual variational constraints (Woo et al., 26 Sep 2025). This establishes that “DualFocus” is a polysemous research label rather than a uniquely identifying term across arXiv.

In the narrower context of dual-pixel defocus recovery, however, the term refers specifically to the unsupervised method described above: a calibrated, physics-based, MPI-regularized optimization framework for jointly estimating defocus and restoring all-in-focus imagery from a single DP capture (Xin et al., 2021).

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to DualFocus.