Skip to main content

Advertisement

Log in

Research on real-time helmet detection and deployment based on an improved YOLOv7 network with channel pruning

  • Original Paper
  • Published:
Signal, Image and Video Processing Aims and scope Submit manuscript

Abstract

Wearing helmets correctly is crucial for the safety of workers in industrial and construction settings. This paper introduces an improved YOLOv7 algorithm that is designed to achieve efficient real-time detection of the usage and deployment of safety helmets. The improved YOLOv7 algorithm utilizes ReXNet as its backbone network and enhances the feature extraction ability of the constructed model by modifying the feature output layer of the network. To address the challenge of small target detection, the P2 detection layer is added to the backbone network to mitigate the loss of small target features. Furthermore, an asymptotic feature pyramid network (AFPN) is introduced in the neck part to facilitate direct interaction among the nonadjacent layers and feature fusion. Additionally, the channel pruning algorithm is applied to simplify the improved YOLOv7 detection model, which significantly reduces the number of model parameters, the model size, and the number of floating-point operations (FLOPs) by 74.5%, 73.4%, and 52.0%, respectively. The size of the pruned model is only 19.9 MB. Compared with 8 mainstream algorithms, this algorithm has better performance in terms of both accuracy and efficiency. Finally, by deploying the trained model on edge development equipment, validating the effectiveness of this helmet detection algorithm at industrial sites. In summary, the proposed lightweight helmet detection algorithm based on an improved YOLOv7 network satisfies the real-time requirements imposed in the field, providing technical support for safety inspection tasks in complex industrial environments.

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

Access this article

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

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

Similar content being viewed by others

Data Availability

The SHWD is available at https://github.com/njvisionpower/Safety-Helmet-Wearing-Dataset and was accessed on 17 December 2019. The FHPD will not be made available on the website.

References

  1. An, Q., Xu, Y., Yu, J., Tang, M., Liu, T., Xu, F.: Research on safety helmet detection algorithm based on improved yolov5s. Sensors 23(13), 5824 (2023). https://doi.org/10.3390/s23135824

    Article  MATH  Google Scholar 

  2. Li, T., Xu, H., Bai, J.: A lightweight safety helmet detection network based on bidirectional connection module and polarized self-attention. In: International Conference on Neural Information Processing, pp. 253–264 (2023). https://doi.org/10.1007/978-981-99-8073-4_20

  3. Zhang, H., Yan, X., Li, H., Jin, R., Fu, H.F.: Real-time alarming, monitoring, and locating for non-hard-hat use in construction. J. Constr. Eng. Manage. 145(3), 04019006 (2019). https://doi.org/10.1061/(ASCE)CO.1943-7862.0001629

    Article  MATH  Google Scholar 

  4. Li, J., Liu, H., Wang, T., Jiang, M., Wang, S., Li, K., Zhao, X.: Safety helmet wearing detection based on image processing and machine learning. In: 2017 Ninth International Conference on Advanced Computational Intelligence (ICACI), pp. 201–205 (2017). https://doi.org/10.1109/ICACI.2017.7974509

  5. Kai, Z., Xiaozhi, W.: Wearing safety helmet detection in substation. In: 2019 IEEE 2nd International Conference on Electronics and Communication Engineering (ICECE), pp. 206–210 (2019). https://doi.org/10.1109/ICECE48499.2019.9058524

  6. Liu, W., Anguelov, D., Erhan, D., Szegedy, C., Reed, S., Fu, C.-Y., Berg, A.C.: Ssd: Single shot multibox detector. In: Computer Vision–ECCV 2016: 14th European Conference, Amsterdam, The Netherlands, October 11–14, 2016, Proceedings, Part I 14, pp. 21–37 (2016)

  7. Redmon, J., Divvala, S., Girshick, R., Farhadi, A.: You only look once: Unified, real-time object detection. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 779–788 (2016). https://doi.org/10.1109/CVPR.2016.91

  8. Girshick, R., Donahue, J., Darrell, T., Malik, J.: Rich feature hierarchies for accurate object detection and semantic segmentation. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 580–587 (2014). https://doi.org/10.48550/arXiv.1311.2524

  9. Ren, S., He, K., Girshick, R., Sun, J.: Faster r-cnn: Towards real-time object detection with region proposal networks. IEEE Trans. Pattern Anal. Mach. Intel. 39(6), 1137–1149 (2017). https://doi.org/10.1109/TPAMI.2016.2577031

    Article  MATH  Google Scholar 

  10. Xu, J.: Safety helmet monitoring of power grid staff based on improved yolov3. Mechatronics and Automation Technology: Proceedings of ICMAT 2022 33, 58 (2023) https://doi.org/10.3233/ATDE221150

  11. Chen, J., Deng, S., Wang, P., Huang, X., Liu, Y.: Lightweight helmet detection algorithm using an improved yolov4. Sensors 23(3), 1256 (2023). https://doi.org/10.3390/s23031256

    Article  Google Scholar 

  12. Song, H., Zhang, X., Song, J., Zhao, J.: Detection and tracking of safety helmet based on deepsort and yolov5. Multimed. Tool. Appl. 82(7), 10781–10794 (2023). https://doi.org/10.1007/s11042-022-13305-0

    Article  MATH  Google Scholar 

  13. Han, J., Liu, Y., Li, Z., Liu, Y., Zhan, B.: Safety helmet detection based on yolov5 driven by super-resolution reconstruction. Sensors 23(4), 1822 (2023). https://doi.org/10.3390/s23041822

    Article  MATH  Google Scholar 

  14. Chen, X., Xie, Q., et al.: Safety helmet-wearing detection system for manufacturing workshop based on improved yolov7. J. Sensors (2023). https://doi.org/10.1155/2023/7230463

    Article  MATH  Google Scholar 

  15. Wang, C.-Y., Bochkovskiy, A., Liao, H.-Y.M.: Yolov7: Trainable bag-of-freebies sets new state-of-the-art for real-time object detectors. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 7464–7475 (2023). https://doi.org/10.48550/arXiv.2207.02696

  16. Han, D., Yun, S., Heo, B., Yoo, Y.: Rethinking channel dimensions for efficient model design. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 732–741 (2021). https://doi.org/10.48550/arXiv.2007.00992

  17. Yang, G., Lei, J., Zhu, Z., Cheng, S., Feng, Z., Liang, R.: Afpn: Asymptotic feature pyramid network for object detection. arXiv preprint arXiv:2306.15988 (2023) https://doi.org/10.1155/2023/7230463

  18. Zhang, J., Zhang, R., Shu, X., Yu, L., Xu, X.: Channel pruning-based yolov7 deep learning algorithm for identifying trolley codes. Appl. Sci. 13(18), 10202 (2023). https://doi.org/10.3390/app131810202

    Article  MATH  Google Scholar 

  19. njvisionpower: Safety-Helmet-Wearing-Dataset. (2019). https://github.com/njvisionpower/Safety-Helmet-Wearing-Dataset

  20. Han, K., Wang, Y., Tian, Q., Guo, J., Xu, C., Xu, C.: Ghostnet: More features from cheap operations. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 1580–1589 (2020). https://doi.org/10.1109/CVPR42600.2020.00165

  21. 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). https://doi.org/10.1109/CVPR.2016.90

  22. Liu, X., Peng, H., Zheng, N., Yang, Y., Hu, H., Yuan, Y.: Efficientvit: Memory efficient vision transformer with cascaded group attention. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 14420–14430 (2023). https://doi.org/10.48550/arXiv.2305.07027

  23. Howard, A., Sandler, M., Chu, G., Chen, L.-C., Chen, B., Tan, M., Wang, W., Zhu, Y., Pang, R., Vasudevan, V., et al.: Searching for mobilenetv3. In: Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 1314–1324 (2019). https://doi.org/10.48550/arXiv.1905.02244

  24. Redmon, J., Farhadi, A.: Yolov3: An incremental improvement. arXiv preprint arXiv:1804.02767 (2018) https://doi.org/10.48550/arXiv.1804.02767

  25. Bochkovskiy, A., Wang, C.-Y., Liao, H.-Y.M.: Yolov4: Optimal speed and accuracy of object detection. arXiv preprint arXiv:2004.10934 (2020) https://doi.org/10.48550/arXiv.2004.10934

  26. Ultralytics: YOLOv5. (2021). https://github.com/ultralytics/yolov5

  27. WongKinYiu: YOLOv7. (2023). https://github.com/WongKinYiu/yolov7

  28. Ultralytics: YOLOv8. (2023). https://gitcode.com/mirrors/ultralytics/ultralytics

Download references

Acknowledgements

Research conducted for this article was supported by the Major Science and Technology Projects of Anhui Province, China (grant number 2020b05050002).

Author information

Authors and Affiliations

Authors

Contributions

Ruihao Liu: Methodology, Software, Supervision, Writing-original draft. Zhongxi Shao: Methodology, Supervision, Formal analysis. Zhenzhong Yu: Supervision, Funding acquisition, Investigation. Rui Li: Data collection, Validation. All authors contributed to writing and revising the manuscript.

Corresponding author

Correspondence to Zhongxi Shao.

Ethics declarations

Conflict of interest

The authors declare that there are no conflict of interest.

Ethical approval

The study followed ethical guidelines and obtained informed consent from all participants involved in data collection. All procedures were conducted in accordance with Springer’s ethical standards.

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 (e.g. a society or other partner) 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, R., Shao, Z., Yu, Z. et al. Research on real-time helmet detection and deployment based on an improved YOLOv7 network with channel pruning. SIViP 19, 118 (2025). https://doi.org/10.1007/s11760-024-03584-5

Download citation

  • Received:

  • Revised:

  • Accepted:

  • Published:

  • DOI: https://doi.org/10.1007/s11760-024-03584-5

Keywords

Navigation