Skip to main content
Log in

Lightweight target detection algorithm based on YOLOv4

  • Original Research Paper
  • Published:
Journal of Real-Time Image Processing Aims and scope Submit manuscript

Abstract

Aiming at the problem that the model parameters of YOLOv4 algorithm are large and difficult to deploy in edge computing devices, a lightweight target detection algorithm (Light-YOLOv4) is proposed based on YOLOv4 algorithm. The algorithm uses the GhostNet structure to replace the backbone feature extraction network in YOLOv4 algorithm, and introduces the depthwise separable convolution to replace the vanilla convolution, which greatly reduces the parameters of the original network model. Light-YOLOv4 also replaces the ReLU activation function in the deep structure of GhostNet with the improved lightweight activation function H-MetaACON, which improves the detection accuracy when the amount of model parameters and calculation are basically unchanged. Finally, the coordinate attention module is added to the effective feature layer and the PANet upsampling module, so that the model captures the cross-channel information while capturing the direction and position awareness information to further improve the detection accuracy. The experimental results show that the detection accuracy of the optimized model is improved by 0.89% and the size of the model is reduced to 17.48% compared to the original YOLOv4 model. The Light-YOLOv4 model can effectively reduce the inference calculation of the original model while maintaining high detection accuracy, and significantly improve the detection speed of the model on devices with insufficient computing power.

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

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11
Fig. 12

Similar content being viewed by others

References

  1. Wang, Y.H., Ding, H.W., Li, B.: Mask wearing detection algorithm based on improved YOLOv3 in complex scenes. Comput. Eng. 46(11), 12–22 (2020)

    Google Scholar 

  2. Ruan, S.F.: Research on pedestrian wearing mask detection based on improved SSD algorithm. Technol. Econ. Guide 28(10), 9–13 (2020)

    Google Scholar 

  3. Deng, H.X.: Method of mask wearing detection based on transfer learning and RetinaNet. Electron. Technol. Softw. Eng. 11(5), 209–211 (2020)

    Google Scholar 

  4. Wu, F., Jin, G., Gao, M., Zhiwei, H.E., Yang, Y.: Helmet detection based on improved YOLOv3 deep model. In: Proceedings of the 2019IEEE 16th International Conference on Networking, Sensing and Control (ICNSC), pp. 363–368 (2019)

  5. Zhou, M.X., Zhang, F.Z., Gong, S.R.: Detection of non-hardhat-use based on new feature fusion. Comput Eng Design 42(11), 3181–3187 (2021)

    Google Scholar 

  6. Szegedy, C., Vanhoucke, V., Ioffe, S., Shlens, J., Wojna, Z. Rethinking the inception architecture for computer vision. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 2818–2826 (2016)

  7. Law, H., Teng, Y., Russakovsky, O., Deng, J. Cornernet-lite: efficient keypoint based object detection (2019). arXiv preprint. http://arxiv.org/abs/1904.08900

  8. Wang, Y., Zhou, Q., LIU, J., Xiong, J., Latecki L.J.: LedNet: A lightweight encoder-decoder network for real-time semantic segmentation. In: proceedings of the 2019 IEEE International Conference on Image Processing (ICIP), pp. 1860–1864 (2019)

  9. Fang, W., Wang, L., Ren, P.: Tinier-YOLO: a real-time object detection method for constrained environments. IEEE Access 8(99), 1935–1944 (2019)

    Google Scholar 

  10. Zhang, X., Zhou, X., Lin, M., Sun, J.: ShuffleNet: An extremely efficient convolutional neural network for mobile devices. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pp. 6848–6856 (2018)

  11. Li, Z., Peng, C., Yu, G., Zhang, X., Sun, J.: Detnet: design backbone for object detection. In: Proceedings of the European Conference on Computer Vision (ECCV), pp. 334–350 (2018)

  12. Hu, J., Shen, L., Albanie, S., Sun, G., Wu, E.: Squeeze-and-excitation networks. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Providence, pp. 7132–7148 (2018)

  13. Woo, S., Park, J., Lee, J.Y., Kweon, I.: CBAM: convolutional block attention module. In: Proceedings of the European Conference on Computer Vision (ECCV), pp. 3–19 (2018)

  14. Bochkovskiy, A., Wang, C.Y., Liao, H.Y.M.: YOLOv4: Optimal speed and accuracy of object detection (2020). arXiv preprint. http://arxiv.org/abs/2004.10934

  15. Liu, S., Qi, L., Qin, H., Shi, J., Jia, J.: Path Aggregation network for instance segmentation. In: Proceedings of the 2018 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), (2018)

  16. Han, k., Wang, Y., Tian, Q., Guo, J., Xu, C.: Ghostnet: more features from cheap operations. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pp. 1580–1589 (2020)

  17. Chen, L.C., Zhu, Y., Papandreou, G., Schroff, F., Adam, H.: Encoder-decoder with atrous separable convolution for semantic image segmentation. In: Proceedings of the European Conference on Computer Vision (ECCV), pp. 801–818 (2018)

  18. Ma, N., Zhang, X., Liu, M., Sun, J.: Activate or not: learning customized activation (2020). arXiv preprint. http://arxiv.org/abs/2009.04759

  19. Howard, A., Sandler, M., Chu, G., Chen, L.C., Chen, B., Tan, M., Wang, W., Zhu, Y., Pang, R., Vasudevan V.: Searching for MobileNetV3. In: Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), pp. 1314–1324 (2019)

  20. Hou, Q., Zhou, D., Feng, J.: Coordinate attention for efficient mobile network design. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pp. 13713–13722 (2021)

  21. Li, Y., Wei, H., Han, Z., Huang, J., Wang, W.: Deep learning-based safety helmet detection in engineering management based on convolutional neural networks. Adv. Civil Eng. 2020(6), 1–10 (2020)

    Google Scholar 

  22. Yue, S., Zhang, Q., Shao, D., Fan, Y., Bai, J.: Safety helmet wearing status detection based on improved boosted random ferns. Multimed. Tools Appl. 81(12), 16783–16796 (2022)

    Article  Google Scholar 

  23. Njvisionpower. “NJVISIONPOWER/Safety-helmet-wearing-dataset: safety helmet wearing detect dataset, with pretrained model.” GitHub. https://github.com/njvisionpower/Safety-Helmet-Wearing-Dataset. Accessed 10 Feb 2022

  24. Peng, D., Sun, Z., Chen, Z., Xie, L., Jin, L.: Detecting heads using feature refine net and cascaded multi-scale architecture (2018). arXiv preprint. https://arxiv.org/abs/1803.09256

  25. Wang, C.Y., Bochkovskiy, A., Liao, H.Y.M.: Scaled YOLOv4: scaling cross stage partial network (2020). arXiv preprint. https://arxiv.org/abs/2011.08036

  26. Zhang, Z.G., Zhang, Z.D., Li, J.N.: Potato detection in complex environment based on improved YOLOv4 model. Trans. Chin. Soc. Agric. Eng. 37(22), 170–178 (2021)

    Google Scholar 

  27. Ge, Z., Liu, S., Wang, F., Li, Z., Sun, J.: YOLOX: exceeding yolo series in 2021 (2021). arXiv preprint. https://arxiv.org/abs/2107.08430

  28. Law, H., Deng, J.: Cornernet: detecting objects as paired keypoints. In: Proceedings of the European Conference on Computer Vision (ECCV), pp. 734–750 (2018)

  29. Williams, S., Waterman, A., Patterson, D.: Roofline: an insightful visual performance model for multicore architectures. Commun. ACM 52(4), 65–76 (2009)

    Article  Google Scholar 

Download references

Acknowledgements

This work was supported by Scientific Research Startup Fund of Chaohu University (Grant No. KYQD-202013), Key Project of Natural Science Research in Anhui Universities (Grant No. KJ2021A1029) and School Level Scientific Research Project of Chaohu University(Grant No. XLY-202007).

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Chuan Liu.

Ethics declarations

Conflict of interest

The authors declare that they have no confict of interest.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and permissions

Springer Nature or its licensor holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Liu, C., Wang, X., Wu, Q. et al. Lightweight target detection algorithm based on YOLOv4. J Real-Time Image Proc 19, 1123–1137 (2022). https://doi.org/10.1007/s11554-022-01251-x

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s11554-022-01251-x

Keywords

Navigation