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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
References
Ando, S.: Image field categorization and edge/corner detection from gradient covariance. IEEE Trans. Pattern Anal. Mach. Intell. 22(2), 179–190 (2000)
Baker, B., Gupta, O., Naik, N., Raskar, R.: Designing neural network architectures using reinforcement learning. arXiv preprint arXiv:1611.02167 (2016)
Bochkovskiy, A., Wang, C.Y., Liao, H.Y.M.: YOLOv4: optimal speed and accuracy of object detection. arXiv preprint arXiv:2004.10934 (2020)
Bodnár, P., Nyúl, L.G.: A novel method for barcode localization in image domain. In: Kamel, M., Campilho, A. (eds.) ICIAR 2013. LNCS, vol. 7950, pp. 189–196. Springer, Heidelberg (2013). https://doi.org/10.1007/978-3-642-39094-4_22
Bodnár, P., Nyúl, L.G.: Barcode detection with morphological operations and clustering (2012)
Bodnár, P., Nyúl, L.G.: Barcode detection with uniform partitioning and distance transformation (2013)
Creusot, C., Munawar, A.: Low-computation egocentric barcode detector for the blind. In: 2016 IEEE International Conference on Image Processing (ICIP), pp. 2856–2860. IEEE (2016)
Gallo, O., Manduchi, R.: Reading 1D barcodes with mobile phones using deformable templates. IEEE Trans. Pattern Anal. Mach. Intell. 33(9), 1834–1843 (2010)
Guo, G., Zhang, N.: A survey on deep learning based face recognition. Comput. Vis. Image Underst. 189, 102805 (2019)
Han, S., Mao, H., Dally, W.J.: Deep compression: compressing deep neural networks with pruning, trained quantization and Huffman coding. arXiv preprint arXiv:1510.00149 (2015)
Hansen, D.K., Nasrollahi, K., Rasmussen, C.B., Moeslund, T.B.: Real-time barcode detection and classification using deep learning. In: IJCCI, vol. 1, pp. 321–327 (2017)
He, K., Zhang, X., Ren, S., Sun, J.: Deep residual learning for image recognition. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 770–778 (2016)
Howard, A.G., et al.: MobileNets: efficient convolutional neural networks for mobile vision applications. arXiv preprint arXiv:1704.04861 (2017)
Huang, G., Liu, Z., Van Der Maaten, L., Weinberger, K.Q.: Densely connected convolutional networks. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 4700–4708 (2017)
Katona, M., Nyúl, L.G.: A novel method for accurate and efficient barcode detection with morphological operations. In: 2012 Eighth International Conference on Signal Image Technology and Internet Based Systems, pp. 307–314. IEEE (2012)
Liu, H., Simonyan, K., Yang, Y.: DARTS: differentiable architecture search. arXiv preprint arXiv:1806.09055 (2018)
Liu, Z., Li, J., Shen, Z., Huang, G., Yan, S., Zhang, C.: Learning efficient convolutional networks through network slimming. In: Proceedings of the IEEE International Conference on Computer Vision, pp. 2736–2744 (2017)
Puri, R., Jain, V.: Barcode detection using OpenCV-python. Science 4(1), 97–99 (2019)
Real, E., et al.: Large-scale evolution of image classifiers. arXiv preprint arXiv:1703.01041 (2017)
Redmon, J., Farhadi, A.: YOLO9000: better, faster, stronger. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 7263–7271 (2017)
Redmon, J., Farhadi, A.: YOLOv3: an incremental improvement. arXiv preprint arXiv:1804.02767 (2018)
Sörös, G.: GPU-accelerated joint 1D and 2D barcode localization on smartphones. In: 2014 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pp. 5095–5099. IEEE (2014)
Szentandrási, I., Herout, A., Dubská, M.: Fast detection and recognition of QR codes in high-resolution images. In: Proceedings of the 28th Spring Conference on Computer Graphics, pp. 129–136 (2012)
Tekin, E., Coughlan, J.: BLaDE: barcode localization and decoding engine. Technical report 2012-RERC. 01 (2012)
Wang, C.Y., Liao, H.Y.M., Wu, Y.H., Chen, P.Y., Hsieh, J.W., Yeh, I.H.: CSPNet: a new backbone that can enhance learning capability of CNN. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition Workshops, pp. 390–391 (2020)
Wang, Z., Chen, A., Li, J., Yao, Y., Luo, Z.: 1D barcode region detection based on the Hough transform and support vector machine. In: Tian, Q., Sebe, N., Qi, G.-J., Huet, B., Hong, R., Liu, X. (eds.) MMM 2016. LNCS, vol. 9517, pp. 79–90. Springer, Cham (2016). https://doi.org/10.1007/978-3-319-27674-8_8
Wu, P., Lin, Y.: Research on license plate detection algorithm based on SSD. In: Proceedings of the 2nd International Conference on Advances in Image Processing, pp. 19–23 (2018)
Yang, Q., Golwala, G., Sundaram, S., Lee, P., Allebach, J.: Barcode detection and decoding in on-line fashion images. Electron. Imaging 2019(8), 413-1–413-7 (2019)
Yun, I., Kim, J.: Vision-based 1D barcode localization method for scale and rotation invariant. In: TENCON 2017–2017 IEEE Region 10 Conference, pp. 2204–2208. IEEE (2017)
Zhang, X., Zhou, X., Lin, M., Sun, J.: ShuffleNet: an extremely efficient convolutional neural network for mobile devices. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 6848–6856 (2018)
Zheng, Z., Wang, P., Liu, W., Li, J., Ye, R., Ren, D.: Distance-IoU loss: faster and better learning for bounding box regression. In: AAAI, pp. 12993–13000 (2020)
Acknowledgements
This work is supported by the National Natural Science Foundation of China (Project No.: 61673115). This work is also partly funded by the German Science Foundation (DFG) and National Science Foundation of China (NSFC) in project Cross Modal Learning under contract Sonderforschungsbereich Transregio 169.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2021 Springer Nature Singapore Pte Ltd.
About this paper
Cite this paper
Zhang, L., Sui, Y., Zhu, F., Zhu, M., He, B., Deng, Z. (2021). Fast Barcode Detection Method Based on ThinYOLOv4. In: Sun, F., Liu, H., Fang, B. (eds) Cognitive Systems and Signal Processing. ICCSIP 2020. Communications in Computer and Information Science, vol 1397. Springer, Singapore. https://doi.org/10.1007/978-981-16-2336-3_4
Download citation
DOI: https://doi.org/10.1007/978-981-16-2336-3_4
Published:
Publisher Name: Springer, Singapore
Print ISBN: 978-981-16-2335-6
Online ISBN: 978-981-16-2336-3
eBook Packages: Computer ScienceComputer Science (R0)