Skip to main content

A Hybrid Machine Learning Approach to Fabric Defect Detection and Classification

  • 98 Accesses

Part of the Lecture Notes of the Institute for Computer Sciences, Social Informatics and Telecommunications Engineering book series (LNICST,volume 436)


This paper proposes a novel approach to detect and classify defects in fabric. Fabric defects may cause a roll of fabric to be graded as second or worse in quality checks, and may affect sales. Traditionally, fabrics are inspected by skilled workers at an inspection platform, which is a long and tiring process, and error-prone. Automated detection of defects in fabric has the potential to eliminate human errors and improve accuracy; therefore it has been an area of research over the last decade. This paper proposes a novel model to detect and classify defects in fabric by training and evaluating our model using the AITEX data set. In the proposed model, the images of fabrics are first fed into U-Net, which is a convolutional neural network (CNN), to determine whether the fabric is defect-free or not. VGG16 and random forest are then used to classify the defects in the fabrics. The training settings of the model were chosen as initial learning rate = 0.001, β1 = 0.9 and β2 = .999. The proposed approach achieved accuracy of 99.3% to detect defects, with high accuracy to classify sloughed filling (100%), broken pick (97%), broken yarn (80%) and fuzzy ball (74%), but low for nep (12.5%) and cut selvage (0%).


  • Fabric defects
  • Convolutional Neural Network
  • U-Net
  • CNN
  • VGG16
  • Random forest
  • Accuracy
  • Recall
  • Precision
  • F1 score

This is a preview of subscription content, access via your institution.

Buying options

USD   29.95
Price excludes VAT (USA)
  • DOI: 10.1007/978-3-031-01984-5_11
  • Chapter length: 13 pages
  • Instant PDF download
  • Readable on all devices
  • Own it forever
  • Exclusive offer for individuals only
  • Tax calculation will be finalised during checkout
USD   64.99
Price excludes VAT (USA)
  • ISBN: 978-3-031-01984-5
  • Instant PDF download
  • Readable on all devices
  • Own it forever
  • Exclusive offer for individuals only
  • Tax calculation will be finalised during checkout
Softcover Book
USD   84.99
Price excludes VAT (USA)
Fig. 1.
Fig. 2.
Fig. 3.
Fig. 4.
Fig. 5.
Fig. 6.
Fig. 7.
Fig. 8.
Fig. 9.
Fig. 10.


  1. Standard Test Methods for Visually Inspecting and Grading Fabrics. D5430–13 (2017)

    Google Scholar 

  2. İzbudak, H., Alkan, A.: Denim fabric defect detection by using correlation method. In: National Conference on Electrical, Electronics and Computer Engineering, Bursa, Turkey (2010)

    Google Scholar 

  3. Dorrity, J.L., Vachtsevanos, G., Jasper, W.: Real-time fabric defect detection and control in weaving processes. Natl. Textile Center Ann. Report G94-2 (1996)

    Google Scholar 

  4. Hanbay, K., Talub, M.F., Özgüven, Ö.F.: Fabric defect detection systems and methods—a systematic literature review. Optik 127, 11960–11973 (2016)

    CrossRef  Google Scholar 

  5. Zhang, Y.F., Bresee, R.R.: Fabric defect detection and classification using image analysis. Text. Res. J. 65(1), 1–9 (1995)

    CrossRef  Google Scholar 

  6. Chetverikov, D., Hanbury, A.: Finding defects in texture using regularity and local orientation. Pattern Recogn. 35(10), 2165–2180 (2002)

    CrossRef  Google Scholar 

  7. Jasper, W.J., Potlapalli, H.: Image analysis of mispicks in woven fabric. Text. Res. J. 65(11), 683–692 (1995)

    CrossRef  Google Scholar 

  8. Tsai, D.M., Hsieh, C.Y.: Automated surface inspection for directional textures. Image Vis. Comput. 18(1), 49–62 (1999)

    CrossRef  Google Scholar 

  9. Chan, C.H., Pang, G.K.: Fabric defect detection by Fourier analysis. IEEE Trans. Ind. Appl. 36(5), 1267–1276 (2000)

    CrossRef  Google Scholar 

  10. Escofet, J., Navarro, R.F., GarciaVerela, M.S.M., Pladellorens, J.M.: Detection of local defects in textile webs using Gabor filters. Opt. Eng. 37(8), 2297–2307 (1998)

    CrossRef  Google Scholar 

  11. Kumar, A.: Neural network based detection of local textile defects. Pattern Recogn. 36(7), 1645–1659 (2003)

    CrossRef  Google Scholar 

  12. Cohen, F.S., Fan, Z., Attali, S.: Automated inspection of textile fabrics using textural models. IEEE Trans. Pattern Anal. Mach. Intell. 13(08), 803–808 (1991)

    CrossRef  Google Scholar 

  13. Odemir, S., Baykut, A., Meylani, R., Erçil, A., Ertuzun, A.: Comparative evaluation of texture analysis algorithms for defect inspection of textile products. In: 14th International Conference on Pattern Recognition (Cat. No. 98EX170), vol. 2, pp. 1738–1740. IEEE, Brisbane, QLD, Australia (1998)

    Google Scholar 

  14. Campbell, J.G., Fraley, C., Murtagh, F., Raftery, A.E.: Linear flaw detection in woven textiles using model-based clustering. Pattern Recogn. Lett. 18(14), 1539–1548 (1997)

    CrossRef  Google Scholar 

  15. Şeker, A., Peker, K.A., Yüksek, A.G., Delibaş, E.: Fabric defect detection using deep learning. In: 24th Signal Processing and Communication Application Conference (SIU), pp. 1437–1440. IEEE, Zonguldak, Turkey (2016)

    Google Scholar 

  16. Mei, S., Wang, Y., Wen, G.: Automatic fabric defect detection with a multi-scale convolutional denoising autoencoder network model. Sensors 18(4), 1064 (2018)

    CrossRef  Google Scholar 

  17. Jing, J.F., Ma, H., Zhang, H.H.: Automatic fabric defect detection using a deep convolutional neural network. Color. Technol. 135(3), 213–223 (2019)

    CrossRef  Google Scholar 

  18. Rong-qiang, L., Ming-hui, L., Jia-chen, S., Yi-bin, L.: Fabric defect detection method based on improved U-Net. J. Phys. Conf. Ser. 1948(1), 012160 (2021)

    Google Scholar 

  19. Silvestre-Blanes, J., Albero, T., Miralles, I., PérezLlorens, R., Moreno, J.: A public fabric database for defect detection methods and results. Autex Res. J. 19(4), 363–374 (2019)

    CrossRef  Google Scholar 

  20. Ronneberger, O., Fischer, P., Brox, T.: U-net: convolutional networks for biomedical image segmentation. In: Navab, N., Hornegger, J., Wells, W.M., Frangi, A.F. (eds.) MICCAI 2015. Lecture Notes in Computer Science, vol. 9351, pp. 234–241. Springer, Cham (2015).

    CrossRef  Google Scholar 

  21. Wang, Z., Jing, J.: Pixel-wise fabric defect detection by CNNs without labelled training data. IEEE Access 8, 161317–161325 (2020)

    CrossRef  Google Scholar 

  22. Simonyan, K., Zisserman, A.: Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556 (2014)

    Google Scholar 

Download references

Author information

Authors and Affiliations


Corresponding author

Correspondence to Hülya Gökalp Clarke .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and Permissions

Copyright information

© 2022 ICST Institute for Computer Sciences, Social Informatics and Telecommunications Engineering

About this paper

Verify currency and authenticity via CrossMark

Cite this paper

Mohammed, S.S., Clarke, H.G. (2022). A Hybrid Machine Learning Approach to Fabric Defect Detection and Classification. In: Seyman, M.N. (eds) Electrical and Computer Engineering. ICECENG 2022. Lecture Notes of the Institute for Computer Sciences, Social Informatics and Telecommunications Engineering, vol 436. Springer, Cham.

Download citation

  • DOI:

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-031-01983-8

  • Online ISBN: 978-3-031-01984-5

  • eBook Packages: Computer ScienceComputer Science (R0)