Fabric Defect Detection Reviewed Digital - Image - Processing
Fabric Defect Detection Reviewed Digital - Image - Processing
Abstract—Fabric defects significantly impact the textile in- on manual visual inspection. While this approach offers some
dustry. Maintaining high fabric quality is crucial in the textile level of control, it suffers from significant drawbacks. Manual
industry. However, defects can occur during various stages of inspection is time-consuming, subjective, and prone to human
production. Automating defect detection reduces reliance on
manual inspection, and leads to faster throughput and increased error. Additionally, manual inspection becomes impractical for
productivity. Existing fabric defect detection methods often rely high-volume production lines. Recent advancements in deep
on manual visual inspection, which is time-consuming, subjective, learning offer a promising solution for automated fabric defect
and prone to human error. Complex algorithms may not be suit- detection and classification. Deep learning models, particularly
able for real-time deployment in resource-constrained environ- convolutional neural networks (CNNs), have demonstrated
ments. This research addresses the limitations of existing methods
by proposing a deep learning and Ensemble-based approach for remarkable capabilities in image recognition and object detec-
fabric defect detection and classification. A custom fabric defect tion tasks. By leveraging these capabilities, we can automate
dataset was constructed specifically designed for this research. defect detection, freeing up human resources for other tasks
Our proposed approach achieved promising results. YOLOv8m and accelerating production. Existing automated fabric defect
and YOLOv8n-obb variants were fine-tuned for defect detection, detection methods often rely on complex algorithms that
achieving a mAP@50 of 0.89. The ensemble approach based
on Weighted voting achieved an overall classification accuracy may not be suitable for real-time deployment in resource-
of 90% and a balanced F1 score across six defect classes: constrained environments. Additionally, some methods require
Broken-button (95%), Button-hike (93%), Color-defect (86%), vast amounts of labeled data for training, which can be time-
Foreign-yarn (90%), Hole (84%), and Swing-error (88%). This consuming and resource-intensive to collect.
demonstrates the effectiveness of lightweight object detection and This research addresses these limitations by proposing a novel
ensemble approach using five CNN models (VGG16, ResNet50,
MobileNet, InceptionV3, Xception) for robust fabric defect de- deep learning and ensemble-based approach for fabric defect
tection and classification, highlighting its potential for automated detection and classification. We leverage the efficiency and ac-
quality control in the textile industry. curacy of YOLOv8, a state-of-the-art object detection model,
Index Terms—Fabric defect detection, Classification, Ensem- for defect localization. YOLOv8’s lightweight design makes
ble learning, Deep learning, YOLOv8, CNN, Object detection, it suitable for real-time deployment in resource-constrained
Weighted averaging, Mean Average Precision (mAP), Textile
industry environments. Furthermore, we contribute a custom fabric
defect dataset specifically designed for this research. This
dataset encompasses a variety of defect types commonly en-
I. I NTRODUCTION
countered in the textile industry, facilitating model training and
The textile industry is one of the foundations of the global evaluation. For defect classification, we employ an ensemble
economy, contributing significantly to both employment and learning approach utilizing five pre-trained CNNs (VGG16,
GDP. High-quality fabric is essential for the textile industry, ResNet50, MobileNet, InceptionV3, Xception) with custom
but defects can arise during production. One of the major chal- top layers. This ensemble approach leverages the strengths
lenges faced by this industry is the detection and classification of each individual model, combining their predictions through
of fabric defects. Fabric defects costs make up about 80% of weighted voting to achieve more robust and accurate classifi-
the total costs in the garment industry [1]. A study by the cation.
Waste and Resources Action Programme found that up to 15% Our proposed approach achieved promising results. The fine-
of knitted fabric goes to waste during production due to defects tuned YOLOv8 models for defect detection achieved a mean
such as snags and needle lines [1]. The exact global financial Average Precision at an IoU threshold of 50 (mAP@50) of
loss in the textile garments industry due to fabric defects 0.89, demonstrating good performance in defect localization.
is not readily available. However, In a case study at Bahir The ensemble learning approach based on weighted voting
Dar Textile Share Company, it was found that the company achieved an overall classification accuracy of 90% and a
lost approximately 560,799.6 birr per year due to different balanced F1-score exceeding 84% across six defect classes.
defects/problems [2]. Furthermore, defective products can This level of accuracy signifies the effectiveness of the pro-
damage a company’s reputation, leading to a loss of customer posed methodology in identifying and classifying various
trust and market share. Automated quality guarantee of textile fabric defects. This research demonstrates the potential of
fabric materials is one of the most important and demanding deep learning and ensemble-based methods for automated
computer vision tasks in textile smart manufacturing [3]. fabric defect detection and classification and offers a promising
Traditional methods for fabric defect detection rely heavily solution for automated quality control in the textile industry.
Automating defect detection can lead to faster throughput, in- provides valuable insights into their applicability and perfor-
creased productivity, and ultimately, a more consistent product mance in real-world fabric defect detection scenarios.
with fewer defects. Another research [10] Focused on fabric defect detection
The rest of the paper is organized as follows, Section II reviews using statistical, spectral, and model-based approaches. Differ-
related works within the field. Section III details the overall ent techniques including histogram-based. Fourier transform-
methodology of this research, including dataset construction, based approaches for fabric defect detection using Markov
model selection, prediction, and evaluation metrics. Section IV random fields, FFT, KL transform, Laws filters, co-occurrence
presents the experimental results, demonstrating the effective- matrix, Sobel edge detection, fractal dimension, thresholding,
ness of our approach. Finally, Section V concludes the paper regular tape, and Gabor filters has been introduced in this
and discusses the limitations and future research scope. research. This Gabor transform offers optimal defect detection
in the spatial and frequency domain. That excels in defect
II. LITERATURE REVIEW detection for spatial and frequency domains. Also, Fourier
Machine vision-based fabric defect detection methods have transform-based methods that are effective for fabric defect
evolved over the years to extract defect-related characteris- detection have been found in this research [10]. They catego-
tics from textile images [4] [5]. Earlier approaches utilized rized methods into seven classes and evaluated them based on
grayscale statistics and histogram-based fuzzy inference to criteria such as accuracy, cost, reliability, and suitability for
identify defects sensitive to illumination changes and robust different fabric types.
to rotation and translation [6] [7]. However, these methods Fabric defect detection, plagued by complex textures and
struggled with complex image textures and specific defect limitations of traditional methods, received a boost with this
recognition. paper’s [11] novel CNN-SVM approach. Inspired by CNNs’
In this literature review, we summarized and analyzed recent success in defect detection, an improved AlexNet architec-
advancements in automated fabric defect detection methods. ture meticulously extracts deep features from fabric images.
Khan et al. [8] aimed to detect fabric defects rather than Replacing the standard Softmax classifier, an SVM leverages
classify them, performing well on single-colored fabrics but its potential to decipher defects from background textures.
potentially limited on textured or printed fabrics. Their method Tested on the TILDA dataset, the model impresses with
utilized filter-based edge detection and heuristics within MAT- 99% accuracy, surpassing traditional methods by a significant
LAB to predict defects. RGB images were preprocessed margin. However, its current inability to detect defect size
into grayscale, employing thresholding techniques to enhance hinders its real-world application. By incorporating this crucial
contrast and facilitate edge detection. Canny Edge detection information into the model through additional processing or
identified defect regions, with subsequent noise removal for architectural modifications.
accuracy. The heuristic thresholding approach achieved a 98% This review categorizes detection methods into traditional
detection rate, showcasing effectiveness on single-colored fab- (statistical, structural, spectral, model-based) and learning-
rics. based (machine learning, deep learning) algorithms. Auto-
Fabric defect detection methods can be categorized into non- mated detection improves efficiency and reduces costs, vital
motif-based and motif-based approaches [9]. Non-motif-based for Industry 4.0 adaptation [12]. The integration of artificial
methods are conventional techniques not reliant on specific intelligence (AI) in textile manufacturing aligns with Industry
motif patterns, while motif-based approaches use motifs as 4.0 principles, emphasizing interdisciplinary advancements.
fundamental units for detection, inspired by fabric texture sym- Qiang Liu introduced an improved YOLOv4 model [13], en-
metries. Seven distinct approaches exist within fabric defect hancing defect detection with a SoftPool-based SPP structure
detection: statistical, spectral, model-based, learning, struc- that boosts accuracy without compromising speed. Additional
tural, hybrid, and motif-based. Statistical methods like bi-level post-SPP convolutional layers optimize feature maps for sub-
thresholding lack robustness for complex defects. Spectral sequent processing, ensuring compatibility with PANet. Pre-
methods, such as using the Wigner distribution, analyze fabric processing techniques like contrast-limited adaptive histogram
textures’ frequency but need precise parameter tuning. Model- equalization enhance image quality, increasing mean Average
based methods, like Poisson’s model, simulate defect patterns Precision (mAP) by 6% with a negligible 2% FPS decrease.
but struggle with real-world variability. Learning approaches, This advancement underscores deep learning’s practical impact
particularly with CNNs, automate feature learning from large on defect detection beyond textiles, with the potential for
datasets, enhancing defect identification. Hybrid methods com- broader industry adoption.
bine statistical and machine learning for robust detection, and
motif-based methods exploit fabric texture symmetries for III. M ETHODOLOGY
accurate defect analysis. These approaches cater to different
textile industry applications based on their unique strengths A. Dataset
and weaknesses. A custom dataset of fabric defects was constructed, utilizing
Each method are reviewed [9] in this paper undergoes a images captured from garments with various imperfections.
qualitative analysis, evaluating detection success rates, sample The dataset comprises 2468 high-quality images manually
quantities for testing, and strengths and weaknesses as well as inspected each image to ensure quality. The dataset contains
Fig. 2. Classification Model Architecture
TABLE II
YOLOV8 N -OBB O BJECT D ETECTION P ERFORMANCE
Model Macro Precision Macro Recall Macro F1-Score Class Precision Recall F1-Score
VGG16 0.80 0.80 0.78 Broken-button 0.99 0.93 0.95
ResNet50 0.85 0.87 0.86 Button-hike 0.92 0.95 0.93
MobileNet 0.76 0.78 0.76 Color-defect 0.78 0.96 0.86
InceptionV3 0.56 0.55 0.54 Foreign-yarn 0.85 0.96 0.90
Xception 0.64 0.64 0.64 Hole 0.90 0.79 0.84
Ensemble 0.89 0.90 0.90 Swing-error 0.93 0.84 0.88
TABLE IV
C OMPARISON OF P ERFORMANCE M ETRICS W EIGHTED AVERAGE types and defect variations could potentially improve model
(P RECISION , R ECALL , AND F1 S CORE ) generalizability and overall performance.
For future work, we aim to explore other object detec-
Model W Precision W Avg Recall W Avg F1-Score
VGG16 0.82 0.80 0.80 tion models and alternative ensemble methods like stacking
ResNet50 0.87 0.86 0.86 or boosting to enhance classification performance further.
MobileNet 0.79 0.77 0.77 Additionally, investigating the impact of data augmentation
InceptionV3 0.56 0.56 0.55
Xception 0.66 0.65 0.65
and preprocessing techniques on individual model accuracy
Ensemble 0.91 0.90 0.90 and overall ensemble performance could be a valuable area
for further exploration. By addressing these limitations and
pursuing future work directions, This lightweight detection
a more accurate and potentially more generalizable ensemble and ensemble-based classification approach has the potential
model. to become a robust and generalizable solution for automated
fabric defect classification in the textile industry.
V. C ONCLUSION AND F UTURE W ORK
R EFERENCES
In conclusion, this research investigated the application of
pre-trained models and ensemble methods for fabric defect [1] Knitting Industry. Goodbye to fabric defects with ai fabric inspection
from pailung, Year.
detection and classification. This paper employed pre-trained
[2] Iris Publishers. Causes of woven fabric defects and cost analysis, 2021.
CNN architectures fine-tuned on a custom dataset with cus- [3] Hindawi. A real-time fault diagnosis system for digital circuits using
tom top layers and explored weighted voting for ensemble machine learning and deep learning techniques, 2021.
prediction. While the approach showed promise, the primary [4] Aqsa Rasheed, Bushra Zafar, Amina Rasheed, Nouman Ali, Muham-
mad Sajid, Saadat Hanif Dar, Usman Habib, Tehmina Shehryar, and
limitation of this study was the dataset size (around 2500 Muhammad Tariq Mahmood. Fabric defect detection using computer
images). Despite data augmentation techniques, a larger and vision techniques: a comprehensive review. Mathematical Problems in
more diverse dataset encompassing a wider range of fabric Engineering, 2020:1–24, 2020.
[5] Afshan Latif, Aqsa Rasheed, Umer Sajid, Jameel Ahmed, Nouman Ali,
Naeem Iqbal Ratyal, Bushra Zafar, Saadat Hanif Dar, Muhammad Sajid,
Tehmina Khalil, et al. Content-based image retrieval and feature extrac-
tion: a comprehensive review. Mathematical problems in engineering,
2019, 2019.
[6] Thierry Thomas and Michel Cattoen. Automatic inspection of simply
patterned material in the textile industry. In Machine Vision Applications
in Industrial Inspection II, volume 2183, pages 2–12. SPIE, 1994.
[7] Yuan Ye. Fabric defect detection using fuzzy inductive reasoning based
on image histogram statistic variables. In 2009 Sixth International
Conference on Fuzzy Systems and Knowledge Discovery, volume 6,
pages 191–194. IEEE, 2009.
[8] Md Rakibul Alam Khan and Halima Akhter. Fabric defect detection
using image processing. Global Journal of Computer Science and
Technology, 22(G1):1–7, 2022.
[9] Henry Y.T. Ngan, Grantham K.H. Pang, and Nelson H.C. Yung. Auto-
mated fabric defect detection—a review. Image and Vision Computing,
29(7):442–458, 2011.
[10] Kazım Hanbay, Muhammed Fatih Talu, and Ömer Faruk Özgüven.
Fabric defect detection systems and methods—a systematic literature
review. Optik, 127(24):11960–11973, 2016.
[11] Junhao Qiu, Yihua Hu, Jinrong Cui, Junjian Lian, Xin Liu, and Jun Ye.
Textile defect classification based on convolutional neural network and
svm. AATCC Journal of Research, 8(1 suppl):75–81, 2021.
[12] Chao Li, Jun Li, Yafei Li, Lingmin He, Xiaokang Fu, and Jingjing Chen.
Fabric defect detection in textile manufacturing: a survey of the state of
the art. Security and Communication Networks, 2021:1–13, 2021.
[13] Qiang Liu, Chuan Wang, Yusheng Li, Mingwang Gao, and Jingao Li.
Fig. 7. Confusion Matrix of Prediction using Weighted Voting Ensemble A fabric defect detection method based on deep learning. IEEE Access,
Method 10:4284–4296, 2022.