Contrastive Texture Metric Learning: An Attention-Guided Siamese Model for Fabric Inspection
International Journal of Engineering Research and Development, cilt.22, sa.7, ss.1-11, 2026 (Hakemli Dergi)
- Yayın Türü: Makale / Tam Makale
- Cilt numarası: 22 Sayı: 7
- Basım Tarihi: 2026
- Dergi Adı: International Journal of Engineering Research and Development
- Derginin Tarandığı İndeksler: Academic Search Ultimate (EBSCO), Materials Science & Engineering Collection (ProQuest)
- Sayfa Sayıları: ss.1-11
- Açık Arşiv Koleksiyonu: AVESİS Açık Erişim Koleksiyonu
- Erzincan Binali Yıldırım Üniversitesi Adresli: Evet
Özet
In smart manufacturing systems, it is crucial to diagnose defects as products pass along conveyor belts using automated computer vision systems. Compared to traditional manual defect diagnosis methods, this approach reduces time loss, high costs, and operator errors. This study proposes a fast Siamese network supported by contrastive learning and attention mechanisms for the detection and classification of fabric defects. A Channel Attention 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 feature space, while different classes are distanced from each other. This aims to enable the model to more accurately distinguish small defects, especially between similar fabrics. During the training process, contrastive loss and cross-entropy loss were optimized together. In addition, computational costs were reduced using data augmentation methods and mixed precision training strategies. Experimental studies showed that the proposed model achieved 97% test accuracy. Grad-CAM visualization results showed that the model successfully localized defective regions. In conclusion, the proposed method offers a high-performance and practical solution for real-time textile quality control applications