Applied Sciences (Nov 2024)

A Lightweight Barcode Detection Algorithm Based on Deep Learning

  • Jingchao Chen,
  • Ning Dai,
  • Xudong Hu,
  • Yanhong Yuan

DOI
https://doi.org/10.3390/app142210417
Journal volume & issue
Vol. 14, no. 22
p. 10417

Abstract

Read online

For existing situations of missed detections, false detections, and repeated detections in barcode detection algorithms in real-world scenarios, a barcode detection algorithm based on improved YOLOv8 is proposed. The EfficientViT block based on a linear self-attention mechanism is introduced into the backbone of the original model to enhance the model’s attention to barcode features. In the model’s neck, linear mapping and grouped convolution are used to improve the C2f module, and the ADown convolution block is utilized to modify the model’s downsampling, which reduces the model’s parameters and computational cost while improving the efficiency of model feature fusion. Finally, the reconstruction of the model’s detection head and the modification of the loss function are implemented to enhance the model’s training quality and reduce the model’s error in barcode detection. Experimental results indicate that the improved model exhibits an increase of 1.8% in recall rate and 1.9% in mAP50:95 for barcode localization and classification. The FPS is improved by 40 frames per second. The model’s parameter count is reduced by 74.2%, and FLOPs are decreased by 79.6%. Furthermore, the proposed model outperforms other models in terms of model size and barcode detection accuracy.

Keywords