Perceptual parallel prompt improves steel surface defect segmentation
P$^3$-SAM: SAM with Perceptual Parallel Prompt for Few-Shot Strip Steel Surface Defect Segmentation
Computer Vision and Pattern Recognition
Summary
Strip steel surface defect images are harder to analyze than natural images because of low contrast and complex textures. The authors improve the Segment Anything Model (SAM) by adding a new way to enhance local image details and generate both semantic and spatial prompts simultaneously. This new method, called P³-SAM, helps segment defects much better in few-shot learning settings. Tests on several benchmarks show it improves accuracy notably compared to previous methods.
What this means in practice
- •For industrial quality control teams: Improve defect segmentation accuracy in steel surface inspection systems using few-shot learning with enhanced perceptual prompts.
- •For manufacturing automation engineers: Integrate advanced prompt-based segmentation to enhance automated detection of subtle surface defects in steel production lines.
Authors
Qian Xu, Hang Xiong, Anpeng Wang, Sam Kwong, Cong Zhang, Runmin Cong
Abstract
Few-shot semantic segmentation (FSS) of strip steel surface defects (S$^3$D) has posed significant challenges distinct from natural scenes. Unlike natural images, S$^3$D task exhibits unique characteristics including low local contrast, uneven illumination, and complex fine-grained texture patterns. Although recent methods based on Segment Anything Model (SAM) have shown promise in FSS on natural images by leveraging SAM's powerful pre-trained representations, these unique industrial characteristics of S$^3$D images lead to performance drop when directly applying SAM to industrial defect scenarios. In this paper, we propose a novel Perceptual Parallel Prompt (P$^3$) framework that empowers SAM, creating the P$^3$-SAM model to address these challenges through two core strategies. First, we develop a Perceptual-Optimized Encoding (POE) strategy that enhances local contrast and preserves critical texture details for S$^3$D segmentation. Second, we introduce the Parallel Prompt Generator (PPG) strategy that simultaneously generates both semantic and spatial prompts, enabling comprehensive guidance for SAM's decoder across varying images. Extensive experiments on three few-shot S$^3$D benchmarks demonstrate that P$^3$-SAM achieves state-of-the-art performance, with particularly notable improvements of 12.00% in mIoU on Surface Defects-4i dataset.