Abstract
Pansharpening aims to generate high-resolution multi-spectral images by fusing the spatial detail of panchromatic images with the spectral richness of low-resolution multi-spectral (MS) data. However, most existing methods are evaluated under limited, low-resolution settings, limiting their generalization to real-world, high-resolution scenarios. To bridge this gap, we systematically investigate the data, algorithmic, and computational challenges of cross-scale pansharpening. We first introduce PanScale, the first large-scale, cross-scale pansharpening dataset, accompanied by PanScale-Bench, a comprehensive benchmark for evaluating generalization across varying resolutions and scales. To realize scale generalization, we propose ScaleFormer, a novel architecture designed for multi-scale pansharpening. ScaleFormer reframes generalization across image resolutions as generalization across sequence lengths: it tokenizes images into patch sequences of the same resolution but variable length proportional to image scale. A Scale-Aware Patchify module enables training for such variations from fixed-size crops. ScaleFormer then decouples intra-patch spatial feature learning from inter-patch sequential dependency modeling, incorporating Rotary Positional Encoding to enhance extrapolation to unseen scales. Extensive experiments show that our approach outperforms SOTA methods in fusion quality and cross-scale generalization. The datasets and source code are available at https://github.com/caoke-963/ScaleFormer.
Introduction: The Scale Gap in Pansharpening
Pansharpening is the process of fusing a high-resolution panchromatic (PAN) image with a low-resolution MS image to create a single high-resolution multi-spectral output. While deep learning has pushed the boundaries of this field, most models suffer from a "scale gap." They are typically trained on small, 256x256 pixel crops, but real-world satellite imagery is often 2000x2000 pixels or larger. When deployed at these scales, models face two major hurdles:
- Computational Collapse: Transformer-based models see memory usage explode quadratically with resolution, leading to "Out of Memory" (OOM) errors.
- Artifacts & Distribution Shift: To avoid OOM, engineers often use "tiled inference" (processing the image in small blocks), which often creates visible seams or "block artifacts." Furthermore, the statistical distribution of a large image differs from a small crop, causing a drop in fusion quality.
ScaleFormer: Architecture for Scale Generalization
ScaleFormer treats the challenge of varying image scales as a variable-length sequence problem. Key components include:
- Scale-Aware Patchify (SAP): Instead of resizing images, SAP tokenizes them into patches of a fixed spatial size. A larger image simply results in a longer sequence of patches, keeping "per-token" statistics stable and mitigating distribution shifts.
- Bucket-Based Training: The model is exposed to various sequence lengths during training, forcing it to learn features robust to scale changes.
- Decoupled Modeling: The architecture separates intra-patch spatial modeling (fine-grained details) from inter-patch sequential modeling (global dependencies).
- Rotary Positional Encoding (RoPE): By using RoPE instead of absolute positional embeddings, the model can effectively extrapolate to sequence lengths (image sizes) it never saw during training.
The PanScale Benchmark
The paper introduces PanScale, the first large-scale dataset specifically designed for cross-scale evaluation. It features multi-source imagery from Jilin-1, Landsat-9, and Skysat satellites, covering 16 geographically diverse regions with native resolutions ranging from 0.5m to 15m. The accompanying PanScale-Bench tests models on both Reduced-Resolution (RR) and Full-Resolution (FR) scenarios across scales from 200x200 to 2000x2000 pixels.
Key Results and Insights
ScaleFormer consistently outperformed state-of-the-art (SOTA) methods like HFIN and Pan-mamba. On the Landsat dataset at 1600x1600 resolution, ScaleFormer achieved a PSNR of 41.03, significantly higher than competitors.
Qualitative results show that ScaleFormer avoids the "blocky" artifacts seen in tiled inference methods and preserves sharper textures. By reframing image resolution as sequence length and decoupling spatial from sequential modeling, ScaleFormer achieves "controllable complexity," preventing the quadratic memory spike typical of standard Transformers.
Conclusion
ScaleFormer solves the "scale-up" problem in pansharpening by reinterpreting image resolution as sequence length. Combined with the PanScale benchmark, it enables training on small crops that generalizes to massive satellite images without memory explosions or tiling artifacts. While more efficient than standard Transformers at high resolutions, ScaleFormer still carries a higher computational load than some lightweight CNNs at very small scales. Future work will explore its potential as a foundation model across more diverse sensor types and other dense prediction tasks in remote sensing.
Summary updated