LWFDD-YOLO: a lightweight defect detection algorithm based on improved YOLOv8
Source abstract
Abstract
Aiming at the existing fabric defect detection algorithms with their suboptimal detection accuracy, high model complexity, difficult deployment to the edge of the device, and insufficient ability to meet the problem of real-time detection of fabric defects, we propose a lightweight fabric defect detection model (LWFDD-YOLO) based on the improved YOLOv8n. First, a generalized efficient layer attention network with selective kernel attention (GELAN_SKA) is proposed to replace the C2f module, and selective kernel attention is added to the module to adjust the weights of the convolution kernel according to the different features of different scales, reduce the use of computational resources, thus improving the model’s detection performance and efficiency. Second, a cascaded group attention (CGA) mechanism is added to provide a different input segmentation for each head to enhance the feature diversity of the input attention heads and improve the model’s computational efficiency. An ultra-lightweight dynamic up-sampling operator (Dy_sample) is introduced, which employs a point-sampling-based approach to reduce the consumption of computational resources and improve model performance. Finally, the YOLOv8l framework is utilized to construct a complex model teacher network and the features learned from the teacher network are transferred to the lightweight network proposed in this paper, thus further improving the model performance of the algorithm. The experimental results show that on the self-built fabric defect dataset, the accuracy, recall, and mean average precision ( mAP ) of our algorithm reach 89.4%, 85.2%, and 87.9%, which are 8.9%, 7.2%, and 4.5% higher than the original model, respectively, the number of parameters of the model decreases by 23.4%, the amount of GFLOPs decreases by 25.6%, and the file size is only 9.2 MB. The detection speed can reach 163.4 FPS on GPU. On the AliCloud Tian Chi dataset, the accuracy, recall, and mAP were also improved by 7.4%, 2%, and 4.4%, respectively. The LWFDD-YOLO algorithm proposed in this study can realize real-time detection of fabric defects with relatively obvious improvement in accuracy, and the model requires less memory and is easier to deploy to edge devices, so can be used as a reference for real-time detection of fabric defects.
Source: crossref · Quality: baseline
Research context
OpenAlex topics: Industrial Vision Systems and Defect Detection · Advanced Neural Network Applications · Image Processing Techniques and Applications
SciVX discovery tags are terminology-based. OpenAlex topics are source-provided classifications.
Affiliations
College of Mechanical Engineering, Donghua University, China
Engineering Research Center of Digitalized Textile and Fashion Technology, Ministry of Education, China
Engineering Research Center of Advanced Textile Machinery, Ministry of Education, Donghua University, China
Funding
National Key Basic Research Program For Youth
References (30)
Show source-provided references
1. 10.1177/0040517522113077310.1177/00405175221130773 ↗
2. Luo B Wang H Jia J et al. Defect detection of metal sheets based on improved YOLOX algorithm. In: 2023 CAA Symposium on Fault Detection Supervision and Safety for Technical Processes (SAFEPROCESS). Piscataway NJ: IEEE 2023.10.1109/SAFEPROCESS58597.2023.10295669 ↗
3. 10.1007/s10845-023-02105-410.1007/s10845-023-02105-4 ↗
4. 10.1109/ACCESS.2024.335437210.1109/ACCESS.2024.3354372 ↗
5. 10.1177/0040517523115143910.1177/00405175231151439 ↗
6. 10.1109/ACCESS.2024.335820510.1109/ACCESS.2024.3358205 ↗
7. 10.1016/j.eswa.2023.12187910.1016/j.eswa.2023.121879 ↗
8. 10.1109/ACCESS.2024.335244510.1109/ACCESS.2024.3352445 ↗
9. 10.1109/ACCESS.2024.336343010.1109/ACCESS.2024.3363430 ↗
10. 10.1109/ACCESS.2024.335604810.1109/ACCESS.2024.3356048 ↗
11. 10.1109/ACCESS.2023.326426210.1109/ACCESS.2023.3264262 ↗
12. Wang CY Yeh I-H Liao H-YM. YOLOv9: Learning what you want to learn using programmable gradient information. arXiv preprint arXiv:2402.13616 (2024).10.1007/978-3-031-72751-1_1 ↗
13. 10.1177/0040517523120281710.1177/00405175231202817 ↗
14. 10.1016/j.engappai.2023.10709410.1016/j.engappai.2023.107094 ↗
15. 10.1109/ACCESS.2024.335330810.1109/ACCESS.2024.3353308 ↗
16. Zhang L, Cheng J, Liu J, et al. Unsupervised ship detection in SAR images using Superpixels and CSPNet. IEEE Geosci Remote Sens Lett 2023; 20: 4002005.
17. Li X Wang W Hu X et al. Selective kernel networks. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition 2019.10.1109/CVPR.2019.00060 ↗
18. Liu X Peng H Zheng N et al. EfficientViT: Memory efficient vision transformer with cascaded group attention. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition 2023.10.1109/CVPR52729.2023.01386 ↗
19. Rukundo O Cao GQ. Nearest neighbor value interpolation. arXiv preprint arXiv:1211.1768 (2012).
20. Liu W Lu H Fu H et al. Learning to upsample by learning to sample. In: Proceedings of the IEEE/CVF International Conference on Computer Vision 2023.10.1109/ICCV51070.2023.00554 ↗
21. 10.1016/j.eswa.2023.12210910.1016/j.eswa.2023.122109 ↗
22. 10.1109/ACCESS.2024.335100310.1109/ACCESS.2024.3351003 ↗
23. Ni FT, Li Q, Nie YJ, et al. Research on lightweight steel bar end face detection algorithm based on improved YOLOv8. J Taiyuan Univ Technol 2024; 55(04): 696–704.
24. Li M, Xiao YY, Zhong WY, et al. Lightweight chestnut fruit identification method based on improved YOLOv8 model. Chin J Agri Eng 2024; 40(01): 201–209.
25. Han XT. Viton: An image-based virtual try-on network. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition 2018.10.1109/CVPR.2018.00787 ↗
26. Kitaev N Kaiser Ł Levskaya A. Reformer: The efficient transformer. arXiv preprint arXiv:2001.04451 (2020).
27. Mehta S Rastegari M. Separable self-attention for mobile vision transformers. arXiv preprint arXiv:2206.02680 (2022).
28. Li Y, Yuan G, Wen Y, et al. Efficientformer: Vision transformers at mobileNET speed. Adv Neural Inform Process Syst 2022; 35: 12934–12949.
29. Wang J Chen K Xu R et al. Carafe: Content-aware reassembly of features. In: Proceedings of the IEEE/CVF International Conference on Computer Vision 2019.10.1109/ICCV.2019.00310 ↗
30. Hinton G Vinyals O Dean J. Distilling the knowledge in a neural network. arXiv preprint arXiv:1503.02531 (2015).