This folder contains the implementation of the paper Cross-Scale Pansharpening via ScaleFormer and the PanScale Datasets (CVPR 2026).
Recommended: Python 3.10+ with CUDA-enabled PyTorch.
Install a minimal dependency set:
pip install torch torchvision numpy pyyaml pillow opencv-python tifffile scipy tqdm tensorboardX einops rotary-embedding-torch matplotlibPanScale is publicly available on Hugging Face:
Download example:
pip install -U huggingface_hub
huggingface-cli download kecao/PanScale --repo-type dataset --local-dir ./datasets/hddatasetEdit one of the YAML files before running (for example options/option_jilin.yml).
All option files are now organized under the options/ folder:
-
options/option_jilin.yml -
options/option_landsat.yml -
options/option_skysat.yml -
options/option_full_jilin.yml -
options/option_full_landsat.yml -
options/option_full_skysat.yml -
algorithm: model name (must match a python file undermodel/) -
checkpoint: root directory for checkpoints -
log_dir: training log directory -
data_dir_train: training split root (containsms/andpan/) -
data_dir_eval: validation/test split root (containsms/andpan/) -
test.data_dir: dataset used by test scripts -
test.model: relative checkpoint path undercheckpoint -
test.save_dir: output directory for fused images
Scale settings used in this project:
- Jilin:
upsacle: 4 - Landsat:
upsacle: 2 - SkySat:
upsacle: 2.5
Examples:
python runners/main_jilin.py --option_path options/option_jilin.yml
python runners/main_landsat.py --option_path options/option_landsat.yml
python runners/main_skysat.py --option_path options/option_skysat.ymlThe training loop saves:
latest.pthbestPSNR.pthbestSSIM.pth- additional best checkpoints for no-reference metrics
under:
<checkpoint>/<algorithm>_<upsacle>_<timestamp>/
python runners/test_jilin.py
python runners/test_landsat.py
python runners/test_skysat.pypython runners/test_full_jilin.py
python runners/test_full_landsat.py
python runners/test_full_skysat.py@article{cao2026cross,
title={Cross-Scale Pansharpening via ScaleFormer and the PanScale Benchmark},
author={Cao, Ke and He, Xuanhua and Li, Xueheng and Zhu, Lingting and Wang, Yingying and Ma, Ao and Zhang, Zhanjie and Zhou, Man and Xie, Chengjun and Zhang, Jie},
journal={arXiv preprint arXiv:2603.00543},
year={2026}
}