Abstract
Barcode detection is a key step before decoding so that achieving a fast and accurate detection algorithm is of significant importance. In the present study, we propose to guide the pruning of channels and shortcut layers in YOLOv4 through sparse training to obtain the compressed model ThinYOLOv4 for barcode detection. Then a binary classification network is established to remove the prediction boxes that do not contain a barcode, thereby obtaining a fast and accurate barcode detection model. In order to evaluate the performance of the proposed method, a barcode dataset consisting of 16,545 images is provided. This dataset contains common types of barcodes in the market and covers different practical scenarios. Furthermore, interference factors such as blur, low-contrast are considered in the dataset purposefully. Obtained results show that the proposed method achieves a recall rate of 93.8% on the provided dataset, Meanwhile, parameters of YOLOv4 are reduced from 63,943,071 to 400,649, and the model size is reduced from 250,037 KB to 1,587 KB, while the corresponding detection speed is increased to 260% of YOLOv4. When the experiment is performed on the 1050Ti GPU, a detection speed of 23.308 ms/image is achieved.
Talk to us
Join us for a 30 min session where you can share your feedback and ask us any queries you have