Unsupervised Deep Multi-focus Image Fusion

Xiang Yan, Syed Zulqarnain Gilani, Hanlin Qin, Ajmal MianarXiv 2018

Introduction

Multi-Focus Image Fusion (MFIF) is a critical task in computer vision, aiming to synthesize a single "all-in-focus" image from multiple source images captured with different focal settings. Standard cameras suffer from limited depth-of-field, making it impossible to keep all objects at varying distances in sharp focus simultaneously. While deep learning, particularly Convolutional Neural Networks (CNNs), has significantly advanced MFIF, most existing methods rely on supervised learning. This approach is hampered by the scarcity of ground-truth "all-in-focus" images for real-world scenes, often forcing researchers to rely on synthetic datasets with artificial Gaussian blur that fail to capture complex real-world defocus characteristics. Furthermore, many current pipelines require cumbersome post-processing steps to eliminate artifacts, hindering real-time application.

MFNet: Architecture and Unsupervised Learning

To address these challenges, we introduce MFNet, a novel feed-forward, fully convolutional network designed for end-to-end unsupervised multi-focus image fusion. MFNet eliminates the need for ground-truth images by utilizing a structural similarity (SSIM)-based loss function, allowing it to learn directly from real-world multi-focus pairs.

Network Architecture

The MFNet architecture consists of four primary components designed to extract and integrate focused information efficiently:

  1. Parallel Feature Extractors: Two identical branches process the input images independently to capture unique high-frequency details from different focus regions.
  2. Low-Level Feature Branch: A third branch processes the average of the input images to extract common structural features.
  3. Fusion Layer: This component integrates the feature maps from all three extraction branches.
  4. Reconstruction Sub-network: A series of convolutional layers reconstructs the final fused image from the integrated features.

Unsupervised Loss Function

The core innovation of MFNet is its unsupervised training objective. Instead of a pixel-wise comparison to a reference image, the network optimizes a "Scope" function based on Multi-focus Structural Similarity (SSIM). By calculating local sharpness (via standard deviation) within the source images, the network identifies which input provides the best focus for a given region. The loss function then penalizes the structural divergence between the fused output and the sharper source image in that region. This mechanism enables the model to learn the characteristics of "in-focus" pixels without external supervision.

Experimental Results

MFNet was trained on 50,000 patches derived from the Lytro Multi-focus dataset and evaluated against several state-of-the-art methods, including NSCT, GF, DSIFT, and traditional CNN-based approaches.

Visual and Objective Performance

Qualitative analysis demonstrates that MFNet produces superior visual results, effectively avoiding the "pseudo-edges" and halo artifacts common in classification-based fusion methods. As shown in the "Clock" dataset comparison, MFNet maintains high clarity across both foreground and background objects.

Quantitatively, MFNet consistently outperforms competitors across multiple metrics, including human perception ($Q_{CV}$), visual information fidelity (VIFF), and information entropy (EN). Notably, on the "Clock" benchmark, MFNet achieved a $Q_{CV}$ score of 98.37, a substantial improvement over the next best method's score of 75.08.

Computational Efficiency

Beyond image quality, MFNet offers a significant leap in processing speed. By adopting an end-to-end architecture that bypasses complex post-processing, MFNet can fuse a $520 \times 520$ image in approximately 5.1 seconds. This represents a 20x speedup compared to previous leading CNN-based methods, which required over 115 seconds for the same task.

Conclusion

MFNet represents a significant step forward in multi-focus image fusion by demonstrating the viability of unsupervised deep learning. By training on real-world data with an SSIM-based loss function, MFNet achieves state-of-the-art performance while offering the efficiency required for practical deployment. Future work will focus on improving edge preservation ($Q_S$ metric) and extending the framework to handle more than two source images.

Summary updated

BibTeX
@misc{yan2018unsupervised,
  author = {Xiang Yan and Syed Zulqarnain Gilani and Hanlin Qin and Ajmal Mian},
  title = {{Unsupervised Deep Multi-focus Image Fusion}},
  year = {2018},
  eprint = {1806.07272},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1806.07272},
}
Figure