SkillAgentSearch skills...

SwinFusion

Official code for “SwinFusion: Cross-domain Long-range Learning for General Image Fusion via Swin Transformer”. IEEE/CAA JAS, 2022 · 🔥 ESI Hot Paper · 🏆 ESI Highly Cited Paper · 🏅 Hsue-shen Tsien Paper Award 2023.

Install / Use

npx skills add Linfeng-Tang/SwinFusion

Installs into whichever agent you are using.

About this skill

Quality Score

0/100

Supported Platforms

Universal

README

<h1 align="center"><a href="https://ieeexplore.ieee.org/document/9812535">SwinFusion: Cross-domain Long-range Learning for General Image Fusion via Swin Transformer</a></h1> <p align="center"><a href="https://sites.google.com/site/jiayima2013">Jiayi Ma</a>&emsp; <a href="https://github.com/Linfeng-Tang">Linfeng Tang</a>&emsp; Fan Fan&emsp; Jun Huang&emsp; Xiaoguang Mei&emsp; Yong Ma</p> <p align="center"><strong>Wuhan University &middot; Northwestern Polytechnical University</strong></p> <p align="center"><strong>IEEE/CAA Journal of Automatica Sinica</strong> &middot; 2022</p> <p align="center"><a href="https://esi.help.clarivate.com/Content/overview.htm"><img src="https://img.shields.io/badge/%F0%9F%94%A5_ESI_Hot-Top_0.1%25-E85D3F?style=flat-square" alt="ESI Hot Paper (top 0.1%)"></a> <a href="https://esi.help.clarivate.com/Content/overview.htm"><img src="https://img.shields.io/badge/%F0%9F%8F%86_ESI_Highly_Cited-Top_1%25-D4A017?style=flat-square" alt="ESI Highly Cited Paper (top 1%)"></a> <a href="https://www.ieee-jas.net/news/news_en/5e720d40-3647-459c-acd8-df750fa9f74f_en.htm"><img src="https://img.shields.io/badge/%F0%9F%8F%85_Hsue--shen_Tsien_Paper_Award-2023-7B61A8?style=flat-square" alt="Hsue-shen Tsien Paper Award 2023"></a><br><sub><a href="https://scholar.google.com/citations?view_op=view_citation&hl=en&user=PyRqpAsAAAAJ&citation_for_view=PyRqpAsAAAAJ:u-x6o8ySG0sC">Google Scholar &middot; <strong>1,582 citations</strong></a> &middot; updated July 18, 2026</sub></p>

✨ News

Image Fusion Example

Schematic illustration of multi-modal image fusion and digital photography image fusion. Schematic illustration of multi-modal image fusion and digital photography image fusion. First row: source image pairs, second row: fused results of U2Fusion and our SwinFusion.

Framework

The framework of the proposed SwinFusion for multi-modal image fusion and digital photography image fusion. The framework of the proposed SwinFusion for multi-modal image fusion and digital photography image fusion.

Visible and Infrared Image Fusion (VIF)

To Train

Download the training dataset from MSRS dataset, and put it in ./Dataset/trainsets/MSRS/.

python -m torch.distributed.launch --nproc_per_node=3 --master_port=1234 main_train_swinfusion.py --opt options/swinir/train_swinfusion_vif.json  --dist True

To Test

Download the test dataset from MSRS dataset, and put it in ./Dataset/testsets/MSRS/.

python test_swinfusion.py --model_path=./Model/Infrared_Visible_Fusion/Infrared_Visible_Fusion/models/ --iter_number=10000 --dataset=MSRS --A_dir=IR  --B_dir=VI_Y

Visual Comparison

Qualitative comparison of SwinFusion with five state-of-the-art methods on visible and infrared image fusion Qualitative comparison of SwinFusion with five state-of-the-art methods on visible and infrared image fusion. From left to right: infrared image, visible image, and the results of GTF, DenseFuse, IFCNN SDNet, U2Fusion, and our SwinFusion.

Visible and Nir-infrared Image Fusion (VIS-NIR)

To Train

Download the training dataset from VIS-NIR Scene dataset, and put it in ./Dataset/trainsets/Nirscene/.

python -m torch.distributed.launch --nproc_per_node=3 --master_port=1234 main_train_swinfusion.py --opt options/swinir/train_swinfusion_nir.json  --dist True

To Test

Download the test dataset from VIS-NIR Scene dataset, and put it in ./Dataset/testsets/Nirscene/.

python test_swinfusion.py --model_path=./Model/RGB_NIR_Fusion/RGB_NIR_Fusion/models/ --iter_number=10000 --dataset=NirScene --A_dir=NIR  --B_dir=VI_Y

Visual Comparison

Qualitative comparison of SwinFusion with five state-of-the-art methods on visible and near-infrared image fusion. Qualitative comparison of SwinFusion with five state-of-the-art methods on visible and near-infrared image fusion. From left to right: near-infrared image, visible image, and the results of ANVF, DenseFuse, IFCNN, SDNet, U2Fusion, and our SwinFusion.

Medical Image Fusion (Med)

To Train

Download the training dataset from Harvard medical dataset, and put it in ./Dataset/trainsets/PET-MRI/ or ./Dataset/trainsets/CT-MRI/.

python -m torch.distributed.launch --nproc_per_node=3 --master_port=1234 main_train_swinfusion.py --opt options/swinir/train_swinfusion_med.json  --dist True

To Test

Download the training dataset from Harvard medical dataset, and put it in ./Dataset/testsets/PET-MRI/ or ./Dataset/testsets/CT-MRI/.

python test_swinfusion.py --model_path=./Model/Medical_Fusion-PET-MRI/Medical_Fusion/models/  --iter_number=10000 --dataset=NirScene --A_dir=MRI --B_dir=PET_Y

or

python test_swinfusion.py --model_path=./Model/Medical_Fusion-CT-MRI/Medical_Fusion/models/ --iter_number=10000 --dataset=CT-MRI--A_dir=MRI --B_dir=CT

Visual Comparison

Qualitative comparison of SwinFusion with five state-of-the-art methods on PET and MRI image fusion. Qualitative comparison of SwinFusion with five state-of-the-art methods on PET and MRI image fusion. From left to right: MRI image, PET image, and the results of CSMCA, DDcGAN, IFCNN, SDNet, U2Fusion, and our SwinFusion.

Qualitative comparison of SwinFusion with five state-of-the-art methods on CT and MRI image fusion. Qualitative comparison of SwinFusion with five state-of-the-art methods on CT and MRI image fusion. From left to right: MRI image, CT image, and the results of CSMCA, DDcGAN, IFCNN, SDNet, U2Fusion, and our SwinFusion.

Multi-Exposure Image Fusion (MEF)

To Train

Download the training dataset from MEF dataset, and put it in ./Dataset/trainsets/MEF.

python -m torch.distributed.launch --nproc_per_node=3 --master_port=1234 main_train_swinfusion.py --opt options/swinir/train_swinfusion_mef.json  --dist True

To Test

Download the training dataset from MEF Benchmark dataset, and put it in ./Dataset/testsets/MEF_Benchmark.

python test_swinfusion.py --model_path=./Model/Multi_Exposure_Fusion/Multi_Exposure_Fusion/models/ --iter_number=10000 --dataset=MEF_Benchmark --A_dir=under_Y --B_dir=over_Y

Visual Comparison

Qualitative results of multi-exposure image fusion. Qualitative results of multi-exposure image fusion. From left to right: under-exposed image, over-exposed image, and the results of SPD-MEF, MEF-GAN, IFCNN SDNet, U2Fusion, and our SwinFusion.

Multi-Focus Image Fusion (MFF)

To Train

Download the training dataset from MFI-WHU dataset, and put it in ./Dataset/trainsets/MEF.

python -m torch.distributed.launch --nproc_per_node=3 --master_port=1234 main_train_swinfusi

Related Skills

View on GitHub
GitHub Stars310
CategoryEducation
Updated5d ago
Forks28

Languages

Python

Security Score

80/100

Audited on Aug 3, 2026

No findings