Journal of Natural Fibers (Dec 2024)

Research on Fabric Defect Detection Algorithm Based on Lightweight YOLOv7-Tiny

  • Tang Li,
  • Mei Shunqi,
  • Shi Yishan,
  • Zhou Shi,
  • Zheng Quan,
  • Hongkai Jiang,
  • Xu Qiao,
  • Zhang Zhiming

DOI
https://doi.org/10.1080/15440478.2024.2352753
Journal volume & issue
Vol. 21, no. 1

Abstract

Read online

The current advanced neural network models are expanding in size and complexity to achieve improved detection accuracy. This study designs a lightweight fabric defect detection algorithm based on YOLOv7-tiny, called YOLOv7-tiny-MGCK. Its objectives are to improve the performance of fabric defect detection against complex backgrounds and to find a balance between the algorithm’s lightweight nature and its accuracy. The algorithm utilizes the Mish activation function, known for its superior nonlinear performance capability and smoother curve, enabling the neural network to manage more complex challenges. The Ghost convolution module is also incorporated to reduce computation and model parameters. The lightweight upsampling technique CARAFE facilitates the flexible extraction of deep features, coupled with their integration with shallow features. In addition, an improved K-Means clustering algorithm, KMMP, is employed to select appropriate anchor box for fabric defects. The experimental results show: a reduction in the number of parameters by 45.5% and computational volume by 41.0%, along with increases in precision by 3.9%, recall by 7.0%, and mAP by 3.0%. These results indicated that the improved algorithm achieves a more effective balance between detection performance and the requirement for a lightweight solution.

Keywords