Abstract
Digital In-line Holography (DIH) faces a significant challenge in the "twin-image" problem, typically requiring precise knowledge of the object-to-sensor distance ($z$) for accurate reconstruction. This paper presents a novel reverse-attention loss mechanism for untrained, physics-driven deep learning models that enables high-quality reconstruction without prior knowledge of the exact distance. By employing a weighted sum of losses across multiple candidate distances, the model autonomously identifies the optimal distance during a single reconstruction pass. Experimental results demonstrate that this method achieves performance comparable to reconstructions with perfectly known distances while offering a five-fold speed improvement over traditional autofocusing techniques.
Introduction
In Digital In-line Holography (DIH), a 2D interference pattern, or hologram, is captured and used to reconstruct a 3D image of microscopic objects. A primary obstacle in this process is the twin-image problem, where out-of-focus artifacts obscure the reconstructed image. While untrained deep learning models—which do not require large labeled datasets—have shown promise in artifact removal, their effectiveness is highly sensitive to the object distance ($z$). Even minor deviations in $z$ can lead to failed reconstructions.
Traditionally, this "autofocusing" problem is solved through brute-force methods: reconstructing images at numerous candidate distances and selecting the sharpest result based on specific focus metrics. This approach is computationally intensive and slow. Supervised learning models can predict distance but require extensive annotated datasets, which are often unavailable in specialized microscopy. This paper addresses the need for an efficient, data-free method to handle distance uncertainty in DIH.
Methods
The proposed strategy integrates a reverse-attention loss into an untrained, physics-driven CNN model (based on the DeepDIH architecture). Unlike standard approaches that require a single precise distance, this method utilizes a set of candidate distances {$z_1, z_2, ..., z_n$}.
Reverse-Attention Loss
The core innovation is the reverse-attention loss ($\mathcal{L}_{ra}$). The model calculates a loss for every candidate distance simultaneously. Instead of treating these losses equally, it assigns a learnable weight to each distance based on the inverse of its loss. Distances that yield lower errors—indicating they are closer to the true object distance—receive higher weights.
To ensure stability during optimization, the authors employ gradient detaching, treating the weights as constants during the back-propagation step. This prevents the weights from exploding and ensures smooth convergence.
One-Time Reconstruction
By incorporating the distance search into the image reconstruction loop, the method performs a single optimization process. This allows the model to converge on both the correct distance and a clear, artifact-free image simultaneously, bypassing the need for generating and evaluating large image stacks.
Experimental Setup and Results
The method was evaluated using simulated holograms of three distinct samples: a 1951 USAF Resolution Target, a biological cell, and a dendrite tag. Holograms were simulated at a distance of $5000\mu m$, with the model provided a candidate range from $4500\mu m$ to $5500\mu m$ in $100\mu m$ increments.
Performance and Efficiency
The proposed method demonstrated exceptional accuracy, outperforming alternative strategies like alternating descent by up to 15dB in Peak Signal-to-Noise Ratio (PSNR). The reconstructions were nearly indistinguishable from those where the distance was perfectly known, with differences of less than 1dB in PSNR and 0.002 in Structural Similarity Index (SSIM).
In terms of efficiency, the reverse-attention approach significantly reduced processing time. For a set of 11 candidate distances, the proposed method completed reconstruction in approximately 15 minutes, compared to 77 minutes for conventional autofocusing—a reduction of over 80%.
Discussion and Conclusion
The success of this method stems from the fact that the physics of light propagation acts as a natural supervisor. Because incorrect distances cannot physically generate a hologram that matches the captured data, the model's reverse-attention mechanism naturally gravitates toward the correct distance. The authors have mathematically demonstrated that this loss function shares the same optimal point and convergence rate as models with perfectly known distances.
While the method requires a predefined range of candidate distances and increases GPU memory load due to simultaneous loss calculations, it represents a significant step toward self-calibrating holographic microscopes. Future work may extend this reverse-attention logic to other uncertain parameters, such as illumination wavelength or sensor tilt angles.
Summary updated