Skip to main content

Fast Barcode Detection Method Based on ThinYOLOv4

  • Conference paper
  • First Online:
Cognitive Systems and Signal Processing (ICCSIP 2020)

Part of the book series: Communications in Computer and Information Science ((CCIS,volume 1397))

Included in the following conference series:

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Similar content being viewed by others

References

  1. Ando, S.: Image field categorization and edge/corner detection from gradient covariance. IEEE Trans. Pattern Anal. Mach. Intell. 22(2), 179–190 (2000)

    Article  Google Scholar 

  2. Baker, B., Gupta, O., Naik, N., Raskar, R.: Designing neural network architectures using reinforcement learning. arXiv preprint arXiv:1611.02167 (2016)

  3. Bochkovskiy, A., Wang, C.Y., Liao, H.Y.M.: YOLOv4: optimal speed and accuracy of object detection. arXiv preprint arXiv:2004.10934 (2020)

  4. 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

    Chapter  Google Scholar 

  5. Bodnár, P., Nyúl, L.G.: Barcode detection with morphological operations and clustering (2012)

    Google Scholar 

  6. Bodnár, P., Nyúl, L.G.: Barcode detection with uniform partitioning and distance transformation (2013)

    Google Scholar 

  7. 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)

    Google Scholar 

  8. Gallo, O., Manduchi, R.: Reading 1D barcodes with mobile phones using deformable templates. IEEE Trans. Pattern Anal. Mach. Intell. 33(9), 1834–1843 (2010)

    Article  Google Scholar 

  9. Guo, G., Zhang, N.: A survey on deep learning based face recognition. Comput. Vis. Image Underst. 189, 102805 (2019)

    Article  Google Scholar 

  10. 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)

  11. 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)

    Google Scholar 

  12. 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)

    Google Scholar 

  13. Howard, A.G., et al.: MobileNets: efficient convolutional neural networks for mobile vision applications. arXiv preprint arXiv:1704.04861 (2017)

  14. 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)

    Google Scholar 

  15. 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)

    Google Scholar 

  16. Liu, H., Simonyan, K., Yang, Y.: DARTS: differentiable architecture search. arXiv preprint arXiv:1806.09055 (2018)

  17. 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)

    Google Scholar 

  18. Puri, R., Jain, V.: Barcode detection using OpenCV-python. Science 4(1), 97–99 (2019)

    Google Scholar 

  19. Real, E., et al.: Large-scale evolution of image classifiers. arXiv preprint arXiv:1703.01041 (2017)

  20. Redmon, J., Farhadi, A.: YOLO9000: better, faster, stronger. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 7263–7271 (2017)

    Google Scholar 

  21. Redmon, J., Farhadi, A.: YOLOv3: an incremental improvement. arXiv preprint arXiv:1804.02767 (2018)

  22. 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)

    Google Scholar 

  23. 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)

    Google Scholar 

  24. Tekin, E., Coughlan, J.: BLaDE: barcode localization and decoding engine. Technical report 2012-RERC. 01 (2012)

    Google Scholar 

  25. 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)

    Google Scholar 

  26. 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

    Chapter  Google Scholar 

  27. 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)

    Google Scholar 

  28. 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)

    Article  Google Scholar 

  29. 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)

    Google Scholar 

  30. 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)

    Google Scholar 

  31. 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)

    Google Scholar 

Download references

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

Authors

Corresponding author

Correspondence to Zhen Deng .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2021 Springer Nature Singapore Pte Ltd.

About this paper

Check for updates. Verify currency and authenticity via CrossMark

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)

Publish with us

Policies and ethics