SE-FabricNet: Channel Attention Driven Lightweight CNN with Visual Explanations for Textile Surface Defect Classification
Abstract
Manual inspection of running fabric remains the norm across most textile operations, especially in the smaller manufacturing units located in the Tirupur-Coimbatore belt. Fatigue, subjective judgment, and disagreements among inspectors make manual quality control a fragile process. This paper presents SE-FabricNet, a purposely compact convolutional architecture (approximately 1.77 M trainable weights) that embeds Squeeze-and-Excitation (SE) channel recalibration inside every convolutional block. The proposed model classifies six fabric surface conditions—hole, stain, thread error, pattern irregularity, colour bleed, and defect-free—using a custom-collected dataset of 4200 photographs sourced from three working mills. Geometric and photometric augmentations expand the pool to 12600 training samples. SE-FabricNet achieves an accuracy of 97.18% on the held-out test split, outperforming its attention-free baseline (96.52%) along with fine-tuned VGG-16 and ResNet-50 architectures. Beyond standard accuracy metrics, this study provides three elements critical for industrial deployment: (a) Grad-CAM heat maps that visually confirm the network attends to actual structural flaws rather than spurious background cues; (b) a leave-one-fabric-out evaluation averaging 93.50% on a weave type withheld entirely from training; and (c) INT8 quantisation via TensorFlow Lite, compressing the model from 21 MB to 5.5 MB while forfeiting a mere 0.23 accuracy points, delivering 52 ms inference on a standard laptop CPU. All experiments were conducted using a free Google Colab session, eliminating the need for specialised hardware.