/AGMFusion

Code of AGMFusion: A real-time end-to-end infrared and visible image fusion network based on adaptive guidance module. IEEE SENSORS JOURNAL.

Primary LanguagePythonMIT LicenseMIT

πŸ”₯AGMFusion: A Real-Time End-to-End Infrared and Visible Image Fusion Network Based on Adaptive Guidance Module

Shenghao Liu 1  Xiaoxiong Lan 1  Wenyong Chen 2  Zhiyong Zhang 1  Changzhen Qiu 1† 
1 Sun Yat-Sen University  2 Yiren Technology  † Corresponding author

πŸ”₯ Updates

  • 2024/08/13: ✨ We released the paper on TechRxiv.
  • 2024/08/03: πŸ€— We added a description of the dataset and how to make your own dataset.
  • 2024/07/21: 😊 We released the initial version of the code and models. Continuous updates, stay tuned!

Introduction πŸ“–

This repo, named AGMFusion, contains the official PyTorch implementation of our paper AGMFusion: A Real-Time End-to-End Infrared and Visible Image Fusion Network Based on Adaptive Guidance Module. We are actively updating and improving this repository. If you find any bugs or have suggestions, welcome to raise issues or submit pull requests (PR) πŸ’–.

If you are interested in image fusion, you can visit our IVIF-Code-Interpretation to read articles with open-source code.

Getting Started 🏁

1. Clone the code and prepare the environment

git clone https://github.com/liushh39/AGMFusion.git
cd AGMFusion

# create env using conda
conda create -n AGMFusion python==3.7.3
conda activate AGMFusion

# install dependencies with pip
pip install torch==1.9.1+cu111 torchvision==0.10.1+cu111 torchaudio==0.9.1 -f https://download.pytorch.org/whl/torch_stable.html
pip install -r requirements.txt

2. Train

Download the dataset, put it in dataset

β”œβ”€β”€ AGMFusion/dataset
|     β”œβ”€β”€train
|         β”œβ”€β”€ img1
|         β”œβ”€β”€ img2
|         β”œβ”€β”€ vi
|         β”œβ”€β”€ ir

It does not matter if there are blank images in the img2 folder of the downloaded dataset.

Or you can create your dataset by running python create_dataset.py

python train.py

3. Inference πŸš€

python test.py

If the script runs successfully, you will get fusion results named in fusion_results.

Or, you can change the parameters:

# more options to see
python test.py -h

Contact Informaiton

If you have any questions, please feel free to contact me at liushh39@mail2.sysu.edu.cn.

Citation πŸ’–

If you find AGMFusion useful for your research, welcome to 🌟 this repo and cite our work using the following BibTeX:

@ARTICLE{10605610,
  author={Liu, Shenghao and Lan, Xiaoxiong and Chen, Wenyong and Zhang, Zhiyong and Qiu, Changzhen},
  journal={IEEE Sensors Journal}, 
  title={AGMFusion: A Real-Time End-to-End Infrared and Visible Image Fusion Network Based on Adaptive Guidance Module}, 
  year={2024},
  keywords={Adaptive guidance module;deep learning;image fusion;infrared and visible images},
  doi={10.1109/JSEN.2024.3426274}}