Driver Attention Detection Based on Improved YOLOv5
Abstract
:1. Introduction
- First, the key facial points of the tested personnel are located, and their aspect ratio is calculated by locating the eye and mouth key points. Then a fatigue condition such as yawning or blinking is judged by the aspect ratio value. After that, distracted behavior is detected by selecting several behaviors which are more likely to divert attention in daily work situations, such as drinking, smoking, and playing with cell phones.
- Secondly, in terms of improvement, we modify the feature extraction element of the YOLOv5 backbone network and add a designated module to enhance the model’s feature extraction capability, achieving accurate detection of small-sized targets in the feature map.
- Finally, the feature fusion network in YOLOv5 was improved by introducing the Swin Transformer module to replace the Bottleneck module from the C3 module, which enhanced the global perception of the model. After that, the network connection was improved, thereby enhancing the ability of the model to fuse different-sized feature maps.
2. YOLOv5 Algorithm Introduction
3. Related Work
3.1. Fatigue Detection
3.2. Distraction Behavior Detection
4. Related Improvement Work
4.1. Backbone Network Improvement
4.2. Swin Transformer Module
4.3. Neck Network Improvement
4.4. Loss Function
5. Experimental Results
5.1. Introduction to Experimental Dataset
5.2. Experimental Environment Configuration
5.3. Evaluation Index
5.4. Analysis of Experimental Results
6. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Yan, Y.; Zhong, S.; Tian, J.; Song, L. Driving distraction at night: The impact of cell phone use on driving behaviors among young drivers. Transp. Res. Part F Traffic Psychol. Behav. 2022, 91, 401–413. [Google Scholar] [CrossRef]
- Wang, X.; Xu, R.; Zhang, S.; Zhuang, Y.; Wang, Y. Driver distraction detection based on vehicle dynamics using naturalistic driving data. Transp. Res. Part C Emerg. Technol. 2022, 136, 103561. [Google Scholar] [CrossRef]
- Xiao, W.; Liu, H.; Ma, Z.; Chen, W. Attention-based deep neural network for driver behavior recognition. Future Gener. Comput. Syst. 2022, 132, 152–161. [Google Scholar] [CrossRef]
- Tan, W.; Yuan, X.; Zhang, X.; Wang, J. An enhanced adaptive large neighborhood search for fatigue-conscious electric vehicle routing and scheduling problem considering driver heterogeneity. Expert Syst. Appl. 2023, 218, 119644. [Google Scholar] [CrossRef]
- Xue, Q.; Wang, X.; Li, Y.; Guo, W. Young Novice Drivers’ Cognitive Distraction Detection: Comparing Support Vector Machines and Random Forest Model of Vehicle Control Behavior. Sensors 2023, 23, 1345. [Google Scholar] [CrossRef]
- Wang, F.; Wan, Y.; Li, M.; Huang, H.; Li, L.; Hou, X. Recent Advances in Fatigue Detection Algorithm Based on EEG. Intell. Autom. Soft Comput. 2023, 35, 3573–3586. [Google Scholar] [CrossRef]
- Choi, G.; Ziyang, G.; Wu, J.; Esposito, C.; Choi, C. Multi-modal Biometrics Based Implicit Driver Identification System Using Multi-TF Images of ECG and EMG. Comput. Biol. Med. 2023, 159, 106851. [Google Scholar] [CrossRef]
- Chang, R.C.-H.; Wang, C.-Y.; Chen, W.-T.; Chiu, C.-D. Drowsiness Detection System Based on PERCLOS and Facial Physiological Signal. Sensors 2022, 22, 5380. [Google Scholar] [CrossRef]
- Liu, Z.; Gu, X.; Chen, J.; Wang, D.; Chen, Y.; Wang, L. Automatic recognition of pavement cracks from combined GPR B-scan and C-scan images using multiscale feature fusion deep neural networks. Autom. Constr. 2023, 146, 104698. [Google Scholar] [CrossRef]
- Wang, D.; Liu, Z.; Gu, X.; Wu, W.; Chen, Y.; Wang, L. Automatic Detection of Pothole Distress in Asphalt Pavement Using Improved Convolutional Neural Networks. Remote Sens. 2022, 14, 3892. [Google Scholar] [CrossRef]
- Wu, J.; Shen, T.; Wang, Q.; Tao, Z.; Zeng, K.; Song, J. Local Adaptive Illumination-Driven Input-Level Fusion for Infrared and Visible Object Detection. Remote Sens. 2023, 15, 660. [Google Scholar] [CrossRef]
- Yang, R.; Li, W.; Shang, X.; Zhu, D.; Man, X. KPE-YOLOv5: An Improved Small Target Detection Algorithm Based on YOLOv5. Electronics 2023, 12, 817. [Google Scholar] [CrossRef]
- Ying, Y.; Zhang, H.; Zhang, W.; Yuan, Y.; Li, C. Fatigue Working Detection Based on Facial Multifeature Fusion. IEEE Sens. J. 2023, 23, 5956–5961. [Google Scholar]
- Jia, H.; Xiao, Z.; Ji, P. Real-time fatigue driving detection system based on multi-module fusion. Comput. Graph. 2022, 108, 22–33. [Google Scholar] [CrossRef]
- Chen, J.; Yan, M.; Zhu, F.; Xu, J.; Li, H.; Sun, X. Fatigue Driving Detection Method Based on Combination of BP Neural Network and Time Cumulative Effect. Sensors 2022, 22, 4717. [Google Scholar] [CrossRef]
- Xiang, W.; Wu, X.; Li, C.; Zhang, W.; Li, F. Driving Fatigue Detection Based on the Combination of Multi-Branch 3D-CNN and Attention Mechanism. Appl. Sci. 2022, 12, 4689. [Google Scholar] [CrossRef]
- Huang, T.; Fu, R. Driver Distraction Detection Based on the True Driver’s Focus of Attention. IEEE Trans. Intell. Transp. Syst. 2022, 23, 19374–19386. [Google Scholar] [CrossRef]
- Du, G.; Zhang, L.; Su, K.; Wang, X.; Teng, S.; Liu, P.X. A multimodal fusion fatigue driving detection method based on heart rate and PERCLOS. IEEE Trans. Intell. Transp. Syst. 2022, 23, 21810–21820. [Google Scholar] [CrossRef]
- Qin, B.; Qian, J.; Xin, Y.; Liu, B.; Dong, Y. Distracted driver detection based on a CNN with decreasing filter size. IEEE Trans. Intell. Transp. Syst. 2021, 23, 6922–6933. [Google Scholar] [CrossRef]
- Ye, M.; Zhang, W.; Cao, P.; Liu, K. Driver Fatigue Detection Based on Residual Channel Attention Network and Head Pose Estimation. Appl. Sci. 2021, 11, 9195. [Google Scholar] [CrossRef]
- Zheng, H.; Wang, Y.; Liu, X. Adaptive Driver Face Feature Fatigue Detection Algorithm Research. Appl. Sci. 2023, 13, 5074. [Google Scholar] [CrossRef]
- 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, Las Vegas, NV, USA, 27–30 June 2016; pp. 779–788. [Google Scholar]
- Li, Z.; Li, E.; Xu, T.; Samat, A.; Liu, W. Feature Alignment FPN for Oriented Object Detection in Remote Sensing Images. IEEE Geosci. Remote Sens. Lett. 2023, 20, 1–5. [Google Scholar] [CrossRef]
- Sun, K.; Xiao, B.; Liu, D.; Wang, J. Deep high-resolution representation learning for human pose estimation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, Long Beach, CA, USA, 15–20 June 2019; pp. 5693–5703. [Google Scholar]
- Dewi, C.; Chen, R.-C.; Chang, C.-W.; Wu, S.-H.; Jiang, X.; Yu, H. Eye Aspect Ratio for Real-Time Drowsiness Detection to Improve Driver Safety. Electronics 2022, 11, 3183. [Google Scholar] [CrossRef]
- Zhu, T.; Zhang, C.; Wu, T.; Ouyang, Z.; Li, H.; Na, X.; Liang, J.; Li, W. Research on a Real-Time Driver Fatigue Detection Algorithm Based on Facial Video Sequences. Appl. Sci. 2022, 12, 2224. [Google Scholar] [CrossRef]
- Liu, Z.; Lin, Y.; Cao, Y.; Hu, H.; Wei, Y.; Zhang, Z. Swin transformer: Hierarchical vision transformer using shifted windows. In Proceedings of the IEEE/CVF International Conference on Computer Vision Workshops (ICCVW), Montreal, BC, Canada, 11–17 October 2021; pp. 10012–10022. [Google Scholar]
Network Model | mAP/% | FPS/(f/s) | Size (MB) |
---|---|---|---|
YOLOv4 | 85.2 | 24 | 244 |
YOLOv5s | 83.9 | 63.3 | 13.7 |
YOLOv7 | 85.5 | 49 | 71.3 |
Improved YOLOv5 | 86.3 | 55 | 17.5 |
Swin Transformer | Backbone Improvement | Neck Improvement | mAP/% | FPS/(f/s) | Size (MB) |
---|---|---|---|---|---|
- | - | - | 83.9 | 63.3 | 13.7 |
√ | - | - | 84.2 | 58.1 | 13.8 |
- | √ | √ | 84.6 | 59 | 17.4 |
√ | √ | √ | 86.3 | 55 | 17.5 |
Distracted Behavior | Before AP/% | Improved AP/% |
---|---|---|
face | 93.2 | 95 |
smoke | 61.8 | 65.8 |
drink | 95.8 | 96.7 |
phone | 84.7 | 87.7 |
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. |
© 2023 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
Wang, Z.; Yao, K.; Guo, F. Driver Attention Detection Based on Improved YOLOv5. Appl. Sci. 2023, 13, 6645. https://doi.org/10.3390/app13116645
Wang Z, Yao K, Guo F. Driver Attention Detection Based on Improved YOLOv5. Applied Sciences. 2023; 13(11):6645. https://doi.org/10.3390/app13116645
Chicago/Turabian StyleWang, Zhongzhou, Keming Yao, and Fuao Guo. 2023. "Driver Attention Detection Based on Improved YOLOv5" Applied Sciences 13, no. 11: 6645. https://doi.org/10.3390/app13116645
APA StyleWang, Z., Yao, K., & Guo, F. (2023). Driver Attention Detection Based on Improved YOLOv5. Applied Sciences, 13(11), 6645. https://doi.org/10.3390/app13116645