错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

Ebp-yolov5: channel pruning-based lightweight YOLOv5 for QR code detection

  • Xin Tang,
  • Kaiwen Tang,
  • Kexue Sun,
  • Wencheng Gu,
  • Lingqi Xiang

摘要

QR codes are extensively utilized in multiple domains including product management, security authentication, and intelligent Internet of Things. However, current QR code detection models can be hindered by complex backgrounds, low real-time performance, and high resource consumption. To solve this problem, based on the You Only Look Once version 5 (YOLOv5) algorithm, we propose a lightweight real-time QR code detection algorithm called EBP-YOLOv5. This work introduces an Efficient Channel Attention mechanism in the backbone network to strengthen the network feature extraction capability. Bi-directional Feature Pyramid Network is utilized to replace the PANet module to enhance the network’s ability to capture features along the path. Additionally, EBP-YOLOv5 undergoes lightweight operation by reducing the number of model parameters through sparse training. L1 regularization is incorporated into the loss function to prune the weights of the Batch Normalization layer. Finally, distillation learning is applied to enhance the accuracy of the network model. Extensive evaluations on a natural scene QR code dataset demonstrate that EBP-YOLOv5 achieves superior performance. Compared to the original YOLOv5s algorithm, EBP-YOLOv5 enhances the average accuracy by 4.6% while reducing the model size to only 9MB. This significantly reduces the parameter count and computational load while maintaining a high average accuracy of 97%. Meanwhile, EBP-YOLOv5 outperforms other lightweight models in terms of parameter count, computational complexity, detection accuracy, and model size, and is more suitable for deployment on edge devices.