Contrastive Texture Metric Learning: An Attention-Guided Siamese Model for Fabric Inspection
In smart manufacturing systems, it is crucial to diagnose defects as products pass along conveyor belts usingautomated computer vision systems. Compared to traditional manual defect diagnosis methods, this approachreduces time loss, high costs, and operator errors. This study proposes a fast Siamese network supported bycontrastive learning and attention mechanisms for the detection and classification of fabric defects. A ChannelAttention module is integrated during the feature extraction phase to ensure the network focuses on key regions. Thanks to the Siamese structure, samples belonging to the same class are brought closer together in the featurespace, while different classes are distanced from each other. This aims to enable the model to more accuratelydistinguish small defects, especially between similar fabrics. During the training process, contrastive loss andcross-entropy loss were optimized together. In addition, computational costs were reduced using dataaugmentation methods and mixed precision training strategies. Experimental studies showed that the proposedmodel achieved 97% test accuracy. Grad-CAM visualization results showed that the model successfullylocalized defective regions. In conclusion, the proposed method offers a high-performance and practicalsolution for real-time textile quality control applications
Authors
- Feyzanur Özden (ORCID: https://orcid.org/0009-0006-9155-0420)
- Canan Taştimur Temiz
Institutions
- Erzincan Binali Yıldırım University (TR)
Publication Details
- Journal
- Erzincan Binali Yıldırım University - AVESIS
- Published
- 2026-12-01
- Primary Topic
- Industrial Vision Systems and Defect Detection
- Type
- article
- Field-Weighted Citation Impact
- 0.00