This is the official implementation of the paper 'Spatial-X Fusion for Remote Sensing Images'.
SpaXFus is a unified framework designed for four distinct remote sensing image fusion tasks.
├── data/ # Place your datasets here
├── dataset.py # Dataset loader for pan-sharpening
├── dataset_mh.py # Dataset loader for Hyper- & Multi-spectral Fusion
├── dataset_sar.py # Dataset loader for PolSAR Fusion
├── dataset_stf.py # Dataset loader for Spatiotemproal Fusion
├── train_adalr_HMFus.py # Training script for Hyper- & Multi-spectral Fusion
├── train_adalr_PanSharP.py # Training script for pan-sharpening
├── train_adalr_PolSARFus.py# Training script for PolSAR Fusion
├── train_adalr_STFus.py # Training script for Spatiotemproal Fusion
└── test.py # Unified testing script
-
Download the provided datasets and place them into the
data/folder.- If you use the datasets provided in this work, you only need to download them and adjust the corresponding paths in the training/testing scripts.
-
If you want to use your own datasets:
- Make sure to structure your data according to the corresponding
dataset*.pyfile (e.g.,dataset.py,dataset_mh.py, etc.). - After organizing your dataset, modify the paths in the training/testing scripts to point to your custom data.
- Make sure to structure your data according to the corresponding
To start training, select the script corresponding to your task.
Before running the scripts, you must manually set the following parameters inside the respective train_adalr_*.py file:
ratio: The spatial resolution enhancement ratio.hrms_channels: Number of channels for HR image.lrms_channels: Number of channels for LR image.
python train_adalr_PanSharP.py --batchSize 4 --lr 0.0001 --gpus "0"python train_adalr_HMFus.py --batchSize 4 --lr 0.0001 --gpus "0"python train_adalr_STFus.py --batchSize 4 --lr 0.0001 --gpus "0"python train_adalr_PolSARFus.py --batchSize 4 --lr 0.0001 --gpus "0"All tasks use a single unified testing script.
-
Open
test.py. -
Modify the checkpoint path to point to your trained .pth file.
-
Modify the test dataset path to point to your testing data.
-
Run the script:
python test.pyThe results can be found in output/ folder.
If this work is helpful in your research, please cite our paper:
BibTeX:
@article{spaxfus2024,
title={Spatial-X fusion for multi-source satellite imageries},
author={He, Jiang and Lin, Liupeng and Zheng, Zhuo and Yuan, Qiangqiang and Li, Jie and Zhang, Liangpei and xiang Zhu, Xiao},
journal={Remote Sensing of Environment},
volume={334},
pages={115214},
year={2026},
}