Skip to content

Latest commit

 

History

69 Commits

Folders and files

Repository files navigation

🔬 SwinMFF

Toward High-Fidelity End-to-End Multi-Focus Image Fusion via Swin Transformer-Based Network

Paper License Python PyTorch

Official implementation of SwinMFF for multi-focus image fusion


🚀 Quick Start

📊 Dataset Preparation

Step 1: Download the DUTS dataset

DUTS Dataset

Step 2: Extract the dataset to your project directory

Step 3: Generate training and testing datasets

# Generate training dataset
python ./make_dataset.py --mode='TR'

# Generate testing dataset
python ./make_dataset.py --mode='TE'

🏋️ Training

Start training with the following command:

python ./train.py

💡 Tip: Make sure you have sufficient GPU memory for training. The model requires at least 8GB VRAM.

🧪 Testing & Evaluation

📥 Download Pre-trained Weights

Pre-trained Weights

Download the pre-trained weights and place them in your project directory

🎯 Inference on Different Datasets

Dataset Command Description
Lytro python ./predict.py --dataset_path='./assets/Lytro' --model_path='./checkpoint.ckpt' --is_gray=False Light field camera dataset
MFFW python ./predict.py --dataset_path='./assets/MFFW' --model_path='./checkpoint.ckpt' --is_gray=False Multi-focus fusion dataset
MFI-WHU python ./predict.py --dataset_path='./assets/MFI-WHU' --model_path='./checkpoint.ckpt' --is_gray=False Wuhan University dataset
Custom python ./predict.py --dataset_path='your_path' --model_path='your_path' --is_gray=False/True Your own dataset

📈 Benchmark Results

📊 Comparison Results: Download comprehensive comparison results with various learning-based methods

Benchmark Results

🔗 Traditional Methods: For traditional method comparisons, visit the MFIF repository


📝 Citation

If you find our work helpful in your research, please consider citing our paper:

📋 BibTeX Citation
@article{xie2024swinmff,
  title={SwinMFF: toward high-fidelity end-to-end multi-focus image fusion via swin transformer-based network},
  author={Xie, Xinzhe and Guo, Buyu and Li, Peiliang and He, Shuangyan and Zhou, Sangjun},
  journal={The Visual Computer},
  pages={1--24},
  year={2024},
  publisher={Springer}
}

⭐ If you find this project helpful, please consider giving it a star! ⭐

Made with ❤️ by the SwinMFF Team

About

Code for "SwinMFF: Pure Transformer for End-to-End Multi-focus Image Fusion"

Resources

Stars

11 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages