SAMFF: A Semantic-Guided Zero-Shot Multi-focus Image Fusion Framework
摘要
Multi-focus image fusion aims to generate an all-in-focus image by integrating complementary focused regions from images captured at different focal depths. Existing deep learning approaches often rely on large-scale training pairs with ground-truth fused images, which are difficult or even impossible to acquire due to optical and physical constraints. To overcome this limitation, we propose SAMFF, a semantic-guided zero-shot MFF framework that eliminates training dependency while maintaining strong generalization. Specifically, SAMFF leverages semantic priors derived from the Segment Anything Model to decompose a scene into multi-scale object masks. A dedicated mask processing pipeline is then introduced, consisting of cross-focal mask matching, region-level sharpness assessment, attribute assignment, and pixel-wise voting with boundary refinement. This design ensures robust decision-making at both regional and pixel levels and adapts segmentation priors from the vision foundation model to low-level fusion tasks. The proposed framework requires no task-specific training, eliminating the need for gold-standard fused data or additional image acquisition. Extensive experiments on both real-world and synthetic datasets demonstrate that SAMFF achieves competitive performance against state-of-the-art methods.