Abstract
This paper presents an end-to-end deep learning framework for multi-focus image fusion (MFIF) utilizing a fully convolutional two-stream network. By moving away from traditional hand-crafted fusion rules, the proposed model directly learns the mapping from a pair of partially blurred images to a single, sharp composite. The architecture achieves state-of-the-art results in both visual quality and objective metrics by preserving fine-grained pixel details through a pooling-free design.
Introduction
Optical sensors are inherently limited by a finite depth of field. When a camera focuses on a foreground object, the background typically becomes blurred, and vice versa. To obtain an image where all objects are in sharp focus—a "deep focus" image—researchers employ Multi-Focus Image Fusion (MFIF).
Traditional MFIF methods generally operate in either the spatial domain (processing pixels directly) or the transform domain (using wavelets or pyramids). However, these approaches often rely on complex, hand-crafted fusion rules to determine which regions are "in focus." Recent machine learning attempts have frequently treated this as a patch-based classification task, which can lead to undesirable artifacts at the boundaries between focused and unfocused regions. This research introduces a robust, efficient, and truly end-to-end system that learns the fusion process itself, bypassing the limitations of classification-based models.
Proposed Architecture
The core of the system is a Fully Convolutional Two-stream Network. The architecture is designed to maintain spatial resolution throughout the process to ensure high-fidelity reconstruction.
1. Two-Stream Encoder
The network accepts two registered images as input. Each image is processed through its own "stream" of convolutional layers to extract high-dimensional feature maps.
2. Convolutional Fusion Layer
Rather than using a simple mathematical average, the network employs a dedicated fusion layer. It concatenates the feature maps from both streams and applies a $1 \times 1$ convolution. This allows the network to learn the optimal weighted correspondences between the two source images at every pixel location.
3. Deconvolutional Decoder
To transform fused features back into a clear image, the model uses deconvolutional (transposed convolution) layers. This component acts as a generator that restores fine image details lost during feature extraction.
4. Design Philosophy: No Pooling
Crucially, the network contains no pooling layers. While pooling is effective for image classification where spatial invariance is desired, it destroys the fine-grained pixel details necessary for high-quality image fusion. By omitting pooling, the network preserves the precise spatial information required for sharp edge reconstruction.
Experimental Setup and Insights
To train the model, the authors synthesized a dataset using 1,000 high-quality images from the ILSVRC 2013 (ImageNet) and AVA datasets. For each clean image, pairs of blurred images were generated using Gaussian filters with varying standard deviations (ranging from 2 to 10) applied to different regions.
Several key insights emerged during the development process:
- The "Shallow" Advantage: Interestingly, deeper networks were not always superior. A "2-1-2" architecture (2 conv layers, 1 fusion, 2 deconv) outperformed a deeper "3-1-3" version, suggesting that excessive layers can corrupt fine details.
- Filter Size Trade-offs: While larger filters (e.g., $9 \times 9$) capture better structural information, they significantly increase computational cost. The authors identified $5 \times 5$ filters as the optimal balance between performance and speed.
- Patch Size: Training on larger image patches (e.g., $250 \times 250$) allowed the network to better capture the latent distributions of sharpness versus blurriness compared to smaller patches.
Results and Discussion
The proposed method was benchmarked against nine state-of-the-art methods, including Discrete Wavelet Transform (DWT), Guided Filtering (GF), and other CNN-based approaches.
Quantitative Performance
The model consistently achieved the highest scores on objective metrics such as Xydeas and Piella, which measure edge preservation and structural similarity. For instance, on the "Clock" benchmark, it achieved a Piella (Q) score of 0.8261, significantly outperforming the next best CNN-based method (0.8045).
Qualitative Quality
Visually, the method avoids common pitfalls like "halos" around focused objects or luminance distortion. It produces smoother transitions between fused regions, which is particularly evident in complex areas like the edges of the tripod in the "Camera" image or the fine details of animal fur in color images.
Conclusion
This fully convolutional two-stream network provides a powerful end-to-end solution for multi-focus image fusion. While the model currently assumes perfectly registered input images and was trained primarily on Gaussian blur, it demonstrates superior performance in detail preservation. Future work will explore more complex multi-stream structures and the adaptation of the model to handle real-world lens bokeh and potential registration misalignments.
Summary updated