Fabric defect detection using fine-tuned Yolo-12 - Waqar Ahmad; Rehan Ashraf; Toqeer Mahmood; Tanveer Hussain; Muhammad Haris Abid (PLoS ONE, 2026)
Defect identification is critical for ensuring the reliability and price of fabrics. Defective fabrics result in significant waste and losses. Automatic defect identification using the use of deep learning is a faster and more efficient way to analyze fabric quality, replacing human inspection. Furthermore, both plain and printed textiles are produced concurrently in enterprises; hence, one design should be effective in identifying faults in both types of fabric. As a result, a strong deep learning algorithm must be trained to detect defects within fabric datasets produced during manufacturing with excellent performance and cheap computing costs. This study incorporates a local dataset collected from Chenab Textiles and validated with three publicly available datasets, such as Tildav2, DPFD-DET, and ZJU-Leaper. The experiment provides a comprehensive and diversified range of defective images. To identify textile defects successfully, the suggested approach, universal and optimized YOLOv12, named universal defect detect network (UniDefectNet-Omni) for robust identification of a wide spectrum of fabric defects with multi and diverse types of fabric using YOLOv12 by fine-tuning and optimizing training, integrating high determination feature learning, heterogeneous defect representation, and adaptive augmentation. As a consequence, UniDefectNet-Omni is a lightweight, computationally efficient, and robust framework across varied fabrics.The Chenab textile dataset mean Average Precision (mAP) is 85.1%, precision is 84.5%, and recall is 81.7% over seven separate fabric defect categories. The proposed fine-tuned YOLOv12 outperformed on validated datasets, such as the TILDAv2 dataset, having a mean Average Precision (mAP) score 86.7%, precision about 83.7%, in addition recall about 83.6% over four separate fabric defect categories. DPFD-DET with a mean Average Precision (mAP) score 93.6%, precision is 92.2%, and recall is 87.8% over four separate fabric defect categories. ZJU-Leaper with groups 1, 2, 3, and 4 having a mean Average Precision (mAP) score 93%, precision about 78.1%, in addition recall about 90.3% over twelve separate fabric defect categories.