Enhanced fabric defect detection via snake-shaped global–local feature shrinking network
摘要
Fabric defect detection (FDD) is crucial in textile quality control, impacting yield and production costs. Traditional methods rely heavily on manual feature engineering, facing limitations due to complex textures. Recent deep learning approaches, particularly vision transformer (ViT)-based models, have shown promise but suffer from high computational complexity and parameter redundancy. This paper introduces the snake-shaped global–local cooperation feature shrinking pyramid network (SGL-FSPNet), a lightweight ViT-based architecture designed for efficient and precise FDD. SGL-FSPNet integrates a global–local interaction module (GLIM) to enhance feature discriminability and a snake-shaped feature shrinkage decoder (Snake-FSD) to improve cross-scale information aggregation. Experiments on the ZJU-Leaper dataset demonstrate superior performance, achieving peak pixel-level PPV and F1-scores of 89.69% and 88.21%, respectively, outperforming baseline models. This work establishes a novel lightweight architecture paradigm for industrial visual inspection. The code is available at https://github.com/chenyuntaot/SGL-FSPNet.