Improved YOLO for fabric defect detection algorithm deployment based on FPGA
摘要
With the rapid development of embedded artificial intelligence (EAI) and deep learning (DL), the research of real-time object detection and classification is gradually shifting to edge devices, especially in the field of fabric defect detection. However, the application of traditional deep learning methods on edge devices faces many challenges, mainly due to the high demand for resources and computing power for real-time detection, as well as the diversity and small size of defect types. Therefore, this paper proposes an efficient and lightweight detection algorithm. First, by introducing the efficient Ghost module, the structure of the original YOLOv5s is improved, significantly reducing model parameters and computational complexity, while improving feature extraction capabilities. Secondly, Powerful-IoU (PIoU) is used to improve the convergence speed and detection accuracy of the model. Finally, a real-time defect detection and classification system based on FPGA was designed and implemented on the Kria KV260 development board for edge deployment. The experimental results are based on the Alibaba Cloud Tianchi public fabric defect data set, showing that the mAP50 and mAP50–95 of the improved model increased by 1.7% and 0.8%, respectively, and the parameters and calculation amount were reduced by 30.3% and 35.5%, respectively. The system deployed on FPGA processes the pre-processed video frames at a speed of 47 frames per second (FPS) and consumes only 3.95 W. This shows that the system performs well in fast, accurate, and reliable fabric defect detection and meets the industry’s real-time requirements.