Abstract:Metal corrosion detection is critical for industrial infrastructure maintenance, yet pixel-level annotation of corrosion images is hindered by high cost and low efficiency. Few-shot semantic segmentation provides a potential solution, but its application is challenged by drastic illumination variations, blurred boundaries, and multi-scale characteristics in corrosion images. To address these issues, an Illumination-Robust Multi-Scale Boundary-Aware Few-Shot Segmentation Framework (IMB) is proposed; Specifically, a Multilevel Feature Extraction and Cross-Fusion Module (MFCF) with cosine sparse cross-attention is designed to mitigate illumination interference. A Boundary-Enhanced Self-Support Prototype Matching Module (BE-SSPM) is constructed to improve boundary detection accuracy, and a Multi-Scale Upsampling (MSU) module is developed for high-fidelity feature reconstruction. Experimental results on the few-shot corrosion segmentation dataset Corrosion-4i show that with ResNet-50 and ResNet-101 as backbones.our method outperforms state-of-the-art few-shot segmentation methods by 5.31% and 3.82% in mIoU under 1-shot and 5.66% and 4.88% under 5-shot settings, respectively, demonstrating its strong generalization and promising industrial application potential.