SwinFuse: A Residual Swin Transformer Fusion Network for Infrared and Visible Images

Zhishe Wang, Yanlin Chen, Wenyu Shao, Hui Li, Lei Zhang

Introduction

Infrared (IR) and visible (VIS) image fusion is a critical task in computer vision, particularly for applications like autonomous driving, surveillance, and remote sensing. While IR sensors capture thermal radiation—allowing them to detect targets in low-light or obscured environments—they lack the high-resolution spatial details and textures provided by VIS sensors. Conversely, VIS sensors are limited by lighting conditions. The goal of fusion is to synthesize a single image that retains the salient thermal targets of the IR source and the rich structural information of the VIS source.

The Limitation of CNNs

Recent advancements in deep learning have largely relied on Convolutional Neural Networks (CNNs). However, CNNs possess inherent limitations for image fusion. Their local receptive fields prevent them from capturing long-range dependencies and global context. Furthermore, standard convolution kernels are content-independent, applying the same weights across different image regions regardless of the underlying features. This often results in the loss of fine details and suboptimal fusion of disparate sensor data.

The SwinFuse Framework

SwinFuse addresses these challenges by employing a fully attentional feature encoding backbone based on the Swin Transformer. The architecture is divided into three primary components:

  1. Global Feature Extraction: The network utilizes Residual Swin Transformer Blocks (RSTB). Unlike standard Transformers, Swin Transformers use a shifted window approach to compute self-attention, which enables the model to capture global relationships while maintaining linear computational complexity. The residual connections ensure that low-level features are preserved throughout the encoding process.
  2. $L_1$-Norm Fusion Strategy: Instead of simple concatenation or averaging, SwinFuse introduces a fusion rule based on the $L_1$-norm of sequence matrices. By calculating activity levels across both row and column dimensions, the network can effectively prioritize the most significant features—such as thermal intensity from IR or edge information from VIS—during the merging process.
  3. Feature Reconstruction: The fused features are mapped back into the image space using a reconstruction module, typically involving a 1×1 convolutional layer to produce the final high-quality output.

Training and Evaluation

The encoder-decoder architecture is pre-trained on the MS-COCO dataset to learn robust, general-purpose feature representations. For the fusion task, the model is optimized using a dual loss function: the Structural Similarity Index (SSIM) to maintain texture and the $L_1$ loss to preserve pixel intensity. Evaluation was conducted on benchmark datasets including TNO, Roadscene, and OTCBVS.

Performance and Results

SwinFuse demonstrates superior performance compared to state-of-the-art methods like DenseFuse, FusionGAN, and RFN-Nest. Quantitatively, it leads across eight evaluation metrics, including Average Gradient (AG), Spatial Frequency (SF), and Visual Information Fidelity (VIFF).

Qualitatively, the results show higher contrast, sharper edges, and better preservation of thermal targets against complex backgrounds. Thermal targets (such as pedestrians) remain distinct and "glowing," while background textures (such as brickwork or foliage) stay crisp. Despite the complexity of Transformers, SwinFuse remains efficient, processing TNO images in approximately 0.215 seconds, making it faster than several deep learning competitors like Res2Fusion.

Conclusion and Future Work

SwinFuse represents a significant shift from CNN-based fusion to Transformer-based architectures. By leveraging global context and a sophisticated $L_1$-norm fusion strategy, it achieves a more balanced and detailed integration of IR and VIS data. While the current fusion strategy is manually designed, the authors suggest that future work will involve developing a fully end-to-end model where the fusion rule is also learned during training, as well as extending the framework to multi-focus and multi-exposure image merging.

Summary updated

BibTeX
@article{wang2022swinfuse,
  author = {Zhishe Wang and Yanlin Chen and Wenyu Shao and Hui Li and Lei Zhang},
  title = {{SwinFuse: A Residual Swin Transformer Fusion Network for Infrared and Visible Images}},
  journal = {IEEE Trans. Instrumentation \& Measurement},
  year = {2022},
  doi = {10.1109/tim.2022.3191664},
}
Figure