LG-YOLOv8: A Lightweight Safety Helmet Detection Algorithm Combined with Feature Enhancement
<p>Network structure of YOLOv8.</p> "> Figure 2
<p>Conventional convolution and Ghost module. (<b>a</b>) The convolutional layer; (<b>b</b>) The Ghost module.</p> "> Figure 3
<p>The structure of DynamicConv.</p> "> Figure 4
<p>Comparison of C2f and C2f-GhostDynamicConv modules: (<b>a</b>) C2f module; (<b>b</b>) C2f-GhostDynamicConv module.</p> "> Figure 5
<p>(<b>a</b>) FPN introduces a top-down path to fuse multiscale features from the third to the seventh level (P3–P7); (<b>b</b>) PANet enhances the FPN (Feature Pyramid Network) by incorporating an additional bottom-up pathway; and (<b>c</b>) BiFPN offers a superior balance between accuracy and efficiency.</p> "> Figure 6
<p>YOLOv8-n Detection Head.</p> "> Figure 7
<p>Network structure of the lightweight asymmetric detection head (LADH-Head).</p> "> Figure 8
<p>Example of experimental dataset (Reprinted from [<a href="#B35-applsci-14-10141" class="html-bibr">35</a>]).</p> "> Figure 9
<p>Changes in key metrics during YOLOv 8-n and LG-YOLOv8 trainings.</p> "> Figure 10
<p>Changes in loss during YOLOv8-n and LG-YOLOv8 training.</p> "> Figure 11
<p>Histogram comparison of results of different algorithms.</p> "> Figure 12
<p>Visualization results for different scenarios (adapted from ref. [<a href="#B35-applsci-14-10141" class="html-bibr">35</a>]). (<b>a</b>) The pictures in the original dataset and the helmet detection pictures in different scenarios; (<b>b</b>) Base model YOLOv8-n; (<b>c</b>) Improved model LG-YOLOv8.</p> ">
Abstract
:1. Introduction
2. Related Work
3. Materials and Methods
3.1. The Original YOLOv8 Algorithm
3.2. LG-YOLOv8 Algorithm
3.2.1. GhostDynamicConv
- GhostModule
- C2f-GhostDynamicConv
3.2.2. BiFPN
3.2.3. LAHD-Head
4. Results
4.1. Experimental Environment and Dataset
4.2. Evaluation of Indicators
4.3. Ablation Experiments
4.4. Model Training Analysis Before and After Improvement
4.5. Comparative Experiments
4.6. Visualization of the Results
5. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
References
- 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, Columbus, OH, USA, 23–28 June 2014; pp. 580–587. [Google Scholar]
- Girshick, R. Fast r-cnn. In Proceedings of the IEEE International Conference on Computer Vision, Santiago, Chile, 7–13 December 2015; pp. 1440–1448. [Google Scholar]
- Liu, W.; Anguelov, D.; Erhan, D.; Szegedy, C.; Reed, S.; Fu, C.Y.; Berg, A.C. Ssd: Single shot multibox detector. In Proceedings of the Computer Vision–ECCV 2016: 14th European Conference, Amsterdam, The Netherlands, 11–14 October 2016; Proceedings, Part I 14. Springer: Berlin/Heidelberg, Germany, 2016; pp. 21–37. [Google Scholar]
- Xu, X.; Jiang, Y.; Chen, W.; Huang, Y.; Zhang, Y.; Sun, X. DAMO-YOLO: A Report on Real-Time Object Detection Design. arXiv 2022, arXiv:2211.15444. [Google Scholar]
- Adarsh, P.; Rathi, P.; Kumar, M. YOLO v3-Tiny: Object Detection and Recognition using one stage improved model. In Proceedings of the 6th International Conference on Advanced Computing and Communication Systems (ICACCS), Coimbatore, India, 6–7 March 2020; pp. 687–694. [Google Scholar]
- Li, C.; Li, L.; Jiang, H.; Weng, K.; Geng, Y.; Li, L.; Ke, Z.; Li, Q.; Cheng, M.; Nie, W.; et al. YOLOv6: A Single-Stage Object Detection Framework for Industrial Applications. arXiv 2022, arXiv:2209.02976. [Google Scholar]
- 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, Vancouver, BC, Canada, 18–22 June 2023; pp. 7464–7475. [Google Scholar]
- Ge, Z.; Liu, S.; Wang, F.; Li, Z.; Sun, J. YOLOX: Exceeding YOLO Series in 2021. arXiv 2021, arXiv:2107.08430. [Google Scholar]
- Chen, Q.; Wang, Y.; Yang, T.; Zhang, X.; Cheng, J.; Sun, J. You Only Look One-level Feature. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Virtual, 19–25 June 2021; p. 13034. [Google Scholar]
- Glenn, J.; Ayush, C.; Jing, Q. Ultralytics YOLOv8. Available online: https://github.com/ultralytics/ultralytics (accessed on 2 July 2024).
- Lian, Y.; Li, J.; Dong, S.; Li, X. HR-YOLO: A Multi-Branch Network Model for Helmet Detection Combined with High-Resolution Network and YOLOv5. Electronics 2024, 13, 2271. [Google Scholar] [CrossRef]
- Liang, H.; Seo, S. Automatic detection of construction workers’ helmet wear based on lightweight deep learning. Appl. Sci. 2022, 12, 10369. [Google Scholar] [CrossRef]
- Chen, S.; Tang, W.; Ji, T.; Zhu, H.; Ouyang, Y.; Wang, W. Detection of safety helmet wearing based on improved faster R-CNN. In Proceedings of the 2020 International Joint Conference on Neural Networks (IJCNN), Glasgow, UK, 19–24 July 2020; pp. 1–7. [Google Scholar]
- Chen, J.; Deng, S.; Wang, P.; Huang, X.; Liu, Y. Lightweight helmet detection algorithm using an improved YOLOv4. Sensors 2023, 23, 1256. [Google Scholar] [CrossRef] [PubMed]
- Ma, N.; Zhang, X.; Zheng, H.T.; Sun, J. Shufflenet v2: Practical guidelines for efficient cnn architecture design. In Proceedings of the European Conference on Computer Vision–ECCV 2018, Munich, Germany, 8–14 September 2018; pp. 116–131. [Google Scholar]
- Sandler, M.; Howard, A.; Zhu, M.; Zhmoginov, A.; Chen, L.-C. Mobilenetv2: Inverted residuals and linear bottlenecks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Salt Lake City, UT, USA, 18–23 June 2018; pp. 4510–4520. [Google Scholar]
- 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, Seattle, WA, USA, 14–19 June 2020; pp. 1580–1589. [Google Scholar]
- Talaat, F.M.; ZainEldin, H. An improved fire detection approach based on YOLO-v8 for smart cities. Neural Comput. Appl. 2023, 35, 20939–20954. [Google Scholar] [CrossRef]
- Li, Y.; Fan, Q.; Huang, H.; Han, Z.; Gu, Q. A Modified YOLOv8 Detection Network for UAV Aerial Image Recognition. Drones 2023, 7, 304. [Google Scholar] [CrossRef]
- Wang, C.Y.; Liao, H.Y.M.; Wu, Y.H. Cspnet: A new backbone that can enhance learning capability of cnn. In Proceedings of the IEEE 2020/CVF Conference on Computer Vision and Pattern Recognition Workshops, Seattle, WA, USA, 14–19 June 2020; pp. 390–391. [Google Scholar]
- Liu, S.; Qi, L.; Qin, H.; Shi, J.; Jia, J. Path aggregation network for instance segmentation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Salt Lake City, UT, USA, 18–23 June 2018; pp. 8759–8768. [Google Scholar]
- Lin, T.Y.; Dollár, P.; Girshick, R.; He, K.; Hariharan, B.; Belongie, S. Feature pyramid networks for object detection. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Honolulu, HI, USA, 21–26 July 2017; pp. 2117–2125. [Google Scholar]
- Ma, N.; Su, Y.; Yang, L.; Li, Z.; Yan, H. Wheat Seed Detection and Counting Method Based on Improved YOLOv8 Model. Sensors 2024, 24, 1654. [Google Scholar] [CrossRef] [PubMed]
- Yang, B.; Bender, G.; Le, Q.V.; Ngiam, J. Condconv: Conditionally parameterized convolutions for efficient inference. Adv. Neural Inf. Process. Syst. 2019, 32. Available online: https://neurips.cc/virtual/2019/poster/13351 (accessed on 26 October 2024).
- Han, K.; Wang, Y.; Guo, J.; Wu, E. ParameterNet: Parameters Are All You Need for Large-scale Visual Pretraining of Mobile Networks. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, Seattle, WA, USA, 16–22 June 2024; pp. 15751–15761. [Google Scholar]
- Hu, J.; Shen, L.; Sun, G. Squeeze-and-excitation networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Salt Lake City, UT, USA, 18–23 June 2018; pp. 7132–7141. [Google Scholar]
- Kim, J.H.; Kim, N.; Park, Y.W.; Won, C.S. Object detection and classification based on YOLO-V5 with improved maritime dataset. J. Mar. Sci. Eng. 2022, 10, 377. [Google Scholar] [CrossRef]
- Qu, Z.; Gao, L.Y.; Wang, S.Y.; Yin, H.N.; Yi, T.M. An improved YOLOv5 method for large objects detection with multi-scale feature cross-layer fusion network. Image Vis. Comput. 2022, 125, 104518. [Google Scholar] [CrossRef]
- Tan, M.; Pang, R.; Le, Q.V. EfficientDet: Scalable and efficient object detection. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, Seattle, WA, USA, 14–19 June 2020; pp. 10781–10790. [Google Scholar]
- Guo, C.; Fan, B.; Zhang, Q.; Xiang, S.; Pan, C. Augfpn: Improving multi-scale feature learning for object detection. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, Seattle, WA, USA, 14–19 June 2020; pp. 12595–12604. [Google Scholar]
- Zhang, J.; Chen, Z.; Yan, G.; Wang, Y.; Hu, B. Faster and Lightweight: An Improved YOLOv5 Object Detector for Remote Sensing Images. Remote Sens. 2023, 15, 4974. [Google Scholar] [CrossRef]
- Wang, J.; Zhu, G.; Wu, S.; Luo, C. Worker’s helmet recognition and identity recognition based on deep learning. Open J. Model. Simul. 2021, 9, 135–145. [Google Scholar] [CrossRef]
- Yue, S.; Zhang, Q.; Shao, D.; Fan, Y.; Bai, J. Safety helmet wearing status detection based on improved boosted random ferns. Multimed. Tools Appl. 2022, 81, 16783–16796. [Google Scholar] [CrossRef]
- Sun, H.; Gong, P. November. A Safety-Helmet Detection Algorithm Based on Attention Mechanism. In Proceedings of the 2021 7th IEEE International Conference on Network Intelligence and Digital Content, Beijing, China, 17–19 November 2021; pp. 11–15. [Google Scholar]
- njvisionpower. Safety-Helmet-Wearing-Dataset. 2019. Available online: https://github.com/njvisionpower/Safety-Helmet-Wearing-Dataset (accessed on 22 July 2024).
- Deng, L.; Li, H.; Liu, H.; Gu, J. A lightweight YOLOv3 algorithm used for safety helmet detection. Sci. Rep. 2022, 12, 10981. [Google Scholar] [CrossRef] [PubMed]
- Xiao, Z.; Liu, W.; Ye, Z.; Yuan, J.; Liu, S. MG-YOLOv5s: A Faster and Stronger Helmet Detection Algorithm. Comput. Syst. Sci. Eng. 2024, 48, 1009–1029. [Google Scholar] [CrossRef]
- Lin, B. Safety helmet detection based on improved YOLOv8. IEEE Access 2024, 12, 28260–28272. [Google Scholar] [CrossRef]
- Lin, B. YOLOv8n-ASF-DH: An Enhanced Safety Helmet Detection Method. IEEE Access 2024, 12, 126313–126328. [Google Scholar] [CrossRef]
Name | Environmental Parameters |
---|---|
Operating system | Windows 11 Chinese version 64 bit |
Graphics processing unit | NVIDIA GeForce RTX4050 |
Video memory | 16 |
Python | 3.8 |
Framework | PyTorch1.11 |
Parameter | Value |
---|---|
Mosaic | 1.0 |
Weight deacy | 0.0005 |
Batch size | 8 |
Epochs | 100 |
Momentum | 0.937 |
Learning rate | 0.01 |
Model | G-DConv | BiFPN | LADH | Model Size/M | FLOPS/G | P/% | /% | FPS | |
---|---|---|---|---|---|---|---|---|---|
Model-1 | × | × | × | 3.0 | 6.0 | 8.1 | 92.41 | 92.2 | 106.3 |
Model-2 | √ | × | × | 2.2 | 4.6 | 5.7 | 93.4 | 93.7 | 158.6 |
Model-3 | × | √ | × | 2.0 | 4.2 | 7.1 | 93.5 | 94.5 | 204.4 |
Model-4 | × | × | √ | 2.4 | 4.8 | 5.7 | 91.9 | 94 | 247.1 |
Model-5 | √ | √ | × | 1.7 | 3.4 | 5.7 | 93.5 | 94 | 133.8 |
Model-6 | √ | √ | √ | 1.2 | 2.7 | 3.7 | 92.2 | 94.1 | 153.3 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2024 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Fan, Z.; Wu, Y.; Liu, W.; Chen, M.; Qiu, Z. LG-YOLOv8: A Lightweight Safety Helmet Detection Algorithm Combined with Feature Enhancement. Appl. Sci. 2024, 14, 10141. https://doi.org/10.3390/app142210141
Fan Z, Wu Y, Liu W, Chen M, Qiu Z. LG-YOLOv8: A Lightweight Safety Helmet Detection Algorithm Combined with Feature Enhancement. Applied Sciences. 2024; 14(22):10141. https://doi.org/10.3390/app142210141
Chicago/Turabian StyleFan, Zhipeng, Yayun Wu, Wei Liu, Ming Chen, and Zeguo Qiu. 2024. "LG-YOLOv8: A Lightweight Safety Helmet Detection Algorithm Combined with Feature Enhancement" Applied Sciences 14, no. 22: 10141. https://doi.org/10.3390/app142210141
APA StyleFan, Z., Wu, Y., Liu, W., Chen, M., & Qiu, Z. (2024). LG-YOLOv8: A Lightweight Safety Helmet Detection Algorithm Combined with Feature Enhancement. Applied Sciences, 14(22), 10141. https://doi.org/10.3390/app142210141