Fabric Defect Identification based on KNN and PCA Algorithms
Subject Areas : Pattern Recognition
Zahra Nouri
1
,
Farahnaz Mohanna
2
*
,
Mina Boluki
3
1 - Department of Communications Engineering, University of Sistan and Baluchestan, Zahedan, Iran
2 - Department of Communications Engineering, University of Sistan and Baluchestan, Zahedan, Iran
3 - Department of Communications Engineering, University of Sistan and Baluchestan, Zahedan, Iran
Keywords: Fabric Defect Identification, Feature Extraction, KNN Classifier, PCA Algorithm,
Abstract :
In this study, a K-Nearest Neighbor (KNN) classifier is employed for fabric defect identification. First, directional Grey-Level Co-occurrence Matrix (GLCM) of the fabric image is computed in , and directions. Six intensity-based features are then extracted from these directional GLCMs. In addition, the minimum, maximum, median, and mean grey levels of the fabric image are computed. These sixteen features are combined into a single feature vector representing the fabric image. Next, Principal Component Analysis (PCA) is applied to reduce the dimensionality of the feature vector. The reduced features are then classified using the KNN classifier, categorizing each fabric image as either defective or defect-free based on training data. To localize defects, patches containing defects are segmented from the original fabric image. Features of these defect patches are extracted, reduced via PCA, and classified using KNN. Finally, each defect class is identified, and defect locations are visualized using morphological operations. The proposed method is evaluated on the comprehensive TILDA dataset, which contains 3,200) fabric images (both defective and defect-free). Experimental results demonstrate a mean average accuracy of 95.65% for fabric defect identification across classes , , and .
[1] S. Mei, Y. Wang, and G. Wen, “Automated Fabric Defect Detection with a Multi-Scale Convolutional De-Noising Auto-Encoder Network Model,” Sensors, Vol. 18, No. 4, 2018.
[2] J. F. Jing, H. Ma, and H. H. Zhang, “Automatic fabric defect detection using a deep convolutional neural network,” Coloration Technology, Vol. 135, No. 3, 2019, pp. 213–223.
[3] P. Guo, Y. Lin, Y. Wu, R. Hugh Gang, and Y. Li, “Intelligent quality control of surface defects in fabrics: A comprehensive research progress,” IEEE Access, Vol. 12, 2024, pp. 63777-63808.
[4] W. Wei, D. Deng, L Zeng, and C. Zhang, “Real-time implementation of fabric defect detection based on variational automatic encoder with structure similarity,” Real-Time Image Processing, Vol. 18, No. 3, 2021, pp. 807-823.
[5] L. Shao, E. Zhang, Q. Ma, and M. Lie, “Pixel-wise semi-supervised fabric detection method combined with multitask mean teacher,” IEEE Transactions on Instrumentation and Measurement, Vol. 71, 2506011, 2022.
[6] D. Mo, W. K. Wong, Z. Lai, and J. Zhou, “Weighted double-low-rank decomposition with application to fabric defect detection,” IEEE Transactions on Automation Science and Engineering, Vol. 18, No.3, 2021, pp. 1170-1190.
[7] Y. Li, H. Luo, M. Yu, G. Jiang, and H. Cong, “Fabric defect detection algorithm using RDPSO-based optimal Gabor filter,” The Journal of The Textile Institute, Vol. 110, No. 4, 2019, pp. 487–495.
[8] W. Wang, N. Deng, and B. Xin, “Sequential detection of image defects for patterned fabrics,” IEEE Access, Vol. 8, 2020, pp. 174751-174762.
[9] Q. Liu, C. Wang, Y. Li, M. Gao, and J. Li, “A fabric defect detection method based on deep learning,” IEEE Access, Vol. 10, 2022, pp. 4284-4296.
[10] Z. Zhu, G. Han, G. Jia, and L. Shu, “Modified DenseNet for automatic fabric defect detection with edge computing for minimizing latency,” IEEE Internet of Things Journal, Vol. 7, No. 10, 2020, pp. 9623-9636.
[11] H. Xie, Y. Zhang, and Z. Wu, “Fabric defect detection method combing image pyramid and direction template,” IEEE Access, Vol. 7, 2019, pp. 182320-182334.
[12] M. M. Khodier, S. M. Ahmed, and M. Sharaf Sayed, “Complex pattern jacquard fabrics defect detection using convolutional neural networks and multispectral imaging,” IEEE Access, Vol. 10, 2022, pp. 10653-10660. [13] l. Song, r. Li, and S. Chen, “Fabric defect detection based on membership degree of regions,” IEEE Access, Vol. 8, 2020, pp. 48752-48760.
[14] Y. Huang, J. Jing, and Z. Wang, “Fabric defect segmentation method based on deep learning,” IEEE Transactions on Instrumentation and Measurement, Vol. 70, 2021.
[15] X. Kang, and F. Zhang, “A universal and adaptive fabric defect detection algorithm based on sparse dictionary learning,” IEEE Access, Vol. 8, 2020, pp. 221808 - 221830.
[16] H. Lv, H. Zhang, M. Wang, J. Xu, X. Li, and C. Liu, “Hyperspectral imaging based nonwoven fabric-defect-detection method using LL-YOLOv5,” IEEE Access, Vol. 12, 2024, pp. 41988-41998.
[17] C. Zhang, Y. Qi, and Y. Wang, “ Learning the color space for effective fabric defect detection,” IEEE Transactions on Emerging Topics in Computational Intelligence, Vol. 8, No. 1, 2024, pp. 981-991.
[18] S. Tian, P. Huang, H. Ma, J. Wang, X. Zhou, S. Zhang, J. Zhou, R. Huang, and Y. Li, “CASDD: Automatic surface defect detection using a complementary adversarial network,” IEEE Sensors Journal, Vol. 22, No. 20, 2024, pp. 19583-19595.
[19] X. Luo, Q. Ni, R. Tao, and Y. Shi, “A lightweight detector based on attention mechanism for fabric defect detection,” IEEE Access, Vol. 11, 2023, pp. 33554-33569. [20] Z. Xiang, Y. Shen, M. Ma, and M. Qian, “HookNet: Efficient multiscale context aggregation for high-accuracy detection of fabric,” IEEE Transactions on Instrumentation and Measurement, Vol. 72, 2023.
[21] Y. Zhao, Q. Liu, H. Su, J. Zhang, H. Ma, W. Zou, and S. Liu, “Attention-based multiscale feature fusion for efficient surface defect detection,” IEEE Transactions on Instrumentation and Measurement, Vol. 73, 2024.
[22] H. Chugh, M. Garg, S. Gupta, and S. Sharma, “Plant leaf image identification with texture features using microstructure descriptor,” in the 10th International Conference on Reliability, Infocom Technologies, and Optimization (Trend and Future Decisions), 2022.
DOI:10.1109/ICRITO56286.2022.9965064 [23] Z. Xia, Y. Chen, and C. Xu, “Multiview PCA: a methodology of feature extraction and dimension reduction for high-order data,” IEEE Transaction on Cybernetics, Vol. 52, No. 10, 2022, pp. 11068-11080.
[24] F. Nie, Z. Li, R. Wang, and X. Li, “An effective and efficient algorithm for k-means clustering with new formulation,” IEEE Transactions on Knowledge and Data Engineering, Vol. 35, No. 4, 2023, pp. 3433-3443.
[25] B. Yang, Z. Jia, J. Yang, and N. K. Kasabov, “Video snow removal based on self-adaptation snow detection and patch-based Gaussian mixture model,” IEEE Access, Vol. 8, 2020, pp. 60188-160201.
[26] I. Misra, M. Kumar Rahil, S. Manthira Moorthi, and Debajyoti Dhar, “Direct feature extraction and image co-registration of morphological structure from Bayer pattern raw planetary images,” Expert Systems and Application, Vol. 238, 2024.
[27] M. Boluki, and F. Mohanna, “Inspection of textile fabrics based on the optimal Gabor filter,” Signal, Image, and Video Processing, Vol. 15, 2021, pp. 1617-1625.