Embedded System Performance Analysis for Implementing a Portable Drowsiness Detection System for Drivers
Abstract
:1. Introduction
1.1. Background
1.2. Prior Work
1.3. Our Approach
1.3.1. Portable Embedded System
1.3.2. Threshold Optimization Algorithm and Voting Algorithm
1.4. Review of the Research Process and Outline of This Paper
2. Materials
2.1. Hardware Setup
2.2. Software
2.2.1. Client
2.2.2. Server
2.3. Drowsiness Detection Model
2.3.1. Blink Detection and Blink Feature Extraction
2.3.2. Offline Training and Threshold Optimization Algorithm
- Alert: 0.0 predicted value < 3.3
- Low vigilance: 3.3 predicted value 6.6
- Drowsy: 6.6 < predicted value 10.0
2.3.3. Online Monitoring and Voting Algorithm
3. Methods
3.1. Communication Speed
3.2. Processing Time
- Right after the frame is received from the client
- Right after the face is detected (face detection)
- Right after 68 facial landmarks are detected (landmark detection)
- Right after blink detection is performed, which checks if a blink is occurring in the frame (blink detection)
- Devices: Desktop PC, Jetson Nano, Mini PC
- Resolutions: 320 × 240, 640 × 680, 960 × 540, and 1280 × 720
3.3. Threshold Optimization Algorithm
Algorithm 1: Threshold Optimization Algorithm. The algorithm finds the optimal threshold value which minimizes the value of 2FN + FP | ||||||
1: | Input: | |||||
2: | O: array of loaded models | |||||
3: | B: array of loaded blink sequences | |||||
4: | L: array of loaded blink sequences’ labels (0: not drowsy, 10: drowsy) | |||||
5: | Output: T: array of optimized threshold value for each model | |||||
6: | M ← length(O) | |||||
7: | N ← length(B) | |||||
8: | for m = 1, 2, …, M do | |||||
9: | initialize map V | |||||
10: | for t = 3.3˙, 3.6˙, …, 10 do | ▷iterate through thresholds | ||||
11: | initialize array C of length N | |||||
12: | for i = 1, 2, …, N do | ▷iterate through blink seq | ||||
13: | P = output of model O[m] on blink sequence B[i] | |||||
14: | if P ≥ threshold then | ▷P is a value from 0 to 10 | ||||
15: | C[i] ← 10 | ▷classify blink sequence as drowsy | ||||
16: | Else | |||||
17: | C[i] ← 0 | ▷classify blink sequence as not drowsy | ||||
18: | end if | |||||
19: | end for | |||||
20: | Calculate confusion matrix by comparing C and L | |||||
21: | Calculate FN and FP from confusion matrix | |||||
22: | V (t) ← 2FN + FP | |||||
23: | end for | |||||
24: | T[m] = | ▷find optimal threshold for model O[m] | ||||
25: | end for |
4. Results and Discussion
4.1. Communication Speed
4.2. Processing Time
4.3. Threshold Optimization
4.4. Future Work
5. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Global Status Report on Road Safety 2018. Available online: https://www.who.int/publications-detail-redirect/9789241565684 (accessed on 17 October 2022).
- Fatigued Driving-National Safety Council. Available online: https://www.nsc.org/road/safety-topics/fatigued-driver (accessed on 11 September 2022).
- About Half of Americans Admit to Driving While Drowsy. Available online: https://pittsburgh.legalexaminer.com/transportation/about-half-of-americans-admit-to-driving-while-drowsy/ (accessed on 11 September 2022).
- Fujiwara, K.; Abe, E.; Kamata, K.; Nakayama, C.; Suzuki, Y.; Yamakawa, T.; Hiraoka, T.; Kano, M.; Sumi, Y.; Masuda, F.; et al. Heart Rate Variability-Based Driver Drowsiness Detection and Its Validation With EEG. IEEE Trans. Biomed. Eng. 2019, 66, 1769–1778. [Google Scholar] [CrossRef]
- Borghini, G.; Astolfi, L.; Vecchiato, G.; Mattia, D.; Babiloni, F. Measuring Neurophysiological Signals in Aircraft Pilots and Car Drivers for the Assessment of Mental Workload, Fatigue and Drowsiness. Neurosci. Biobehav. Rev. 2014, 44, 58–75. [Google Scholar] [CrossRef]
- Kartsch, V.J.; Benatti, S.; Schiavone, P.D.; Rossi, D.; Benini, L. A Sensor Fusion Approach for Drowsiness Detection in Wearable Ultra-Low-Power Systems. Inf. Fusion 2018, 43, 66–76. [Google Scholar] [CrossRef] [Green Version]
- Yeo, M.V.M.; Li, X.; Shen, K.; Wilder-Smith, E.P.V. Can SVM Be Used for Automatic EEG Detection of Drowsiness during Car Driving? Saf. Sci. 2009, 47, 115–124. [Google Scholar] [CrossRef]
- Arefnezhad, S.; Hamet, J.; Eichberger, A.; Frühwirth, M.; Ischebeck, A.; Koglbauer, I.V.; Moser, M.; Yousefi, A. Driver Drowsiness Estimation Using EEG Signals with a Dynamical Encoder–Decoder Modeling Framework. Sci. Rep. 2022, 12, 2650. [Google Scholar] [CrossRef]
- Sikander, G.; Anwar, S. Driver Fatigue Detection Systems: A Review. IEEE Trans. Intell. Transp. Syst. 2019, 20, 2339–2352. [Google Scholar] [CrossRef]
- Lin, C.-T.; Chuang, C.-H.; Huang, C.-S.; Tsai, S.-F.; Lu, S.-W.; Chen, Y.-H.; Ko, L.-W. Wireless and Wearable EEG System for Evaluating Driver Vigilance. IEEE Trans. Biomed. Circuits Syst. 2014, 8, 165–176. [Google Scholar] [CrossRef]
- Lin, C.-T.; Chang, C.-J.; Lin, B.-S.; Hung, S.-H.; Chao, C.-F.; Wang, I.-J. A Real-Time Wireless Brain–Computer Interface System for Drowsiness Detection. IEEE Trans. Biomed. Circuits Syst. 2010, 4, 214–222. [Google Scholar] [CrossRef]
- Vicente, J.; Laguna, P.; Bartra, A.; Bailón, R. Drowsiness Detection Using Heart Rate Variability. Med. Biol. Eng. Comput. 2016, 54, 927–937. [Google Scholar] [CrossRef]
- Lee, B.-G.; Chung, W.-Y. Driver Alertness Monitoring Using Fusion of Facial Features and Bio-Signals. IEEE Sens. J. 2012, 12, 2416–2422. [Google Scholar] [CrossRef]
- Jung, S.-J.; Shin, H.-S.; Chung, W.-Y. Driver Fatigue and Drowsiness Monitoring System with Embedded Electrocardiogram Sensor on Steering Wheel. IET Intell. Transp. Syst. 2014, 8, 43–50. [Google Scholar] [CrossRef]
- Kundinger, T.; Sofra, N.; Riener, A. Assessment of the Potential of Wrist-Worn Wearable Sensors for Driver Drowsiness Detection. Sensors 2020, 20, 1029. [Google Scholar] [CrossRef] [Green Version]
- What Is ATTENTION ASSIST®?|Mercedes-Benz Safety Features|Fletcher Jones Motorcars. Available online: https://www.fjmercedes.com/mercedes-benz-attention-assist/ (accessed on 12 November 2022).
- Castignani, G.; Derrmann, T.; Frank, R.; Engel, T. Driver Behavior Profiling Using Smartphones: A Low-Cost Platform for Driver Monitoring. IEEE Intell. Transp. Syst. Mag. 2015, 7, 91–102. [Google Scholar] [CrossRef]
- Satish, K.; Lalitesh, A.; Bhargavi, K.; Prem, M.S.; Anjali, T. Driver Drowsiness Detection. In Proceedings of the 2020 International Conference on Communication and Signal Processing (ICCSP), Melmaruvathur, India, 28–30 July 2020; pp. 380–384. [Google Scholar]
- Jabbar, R.; Shinoy, M.; Kharbeche, M.; Al-Khalifa, K.; Krichen, M.; Barkaoui, K. Driver Drowsiness Detection Model Using Convolutional Neural Networks Techniques for Android Application. In Proceedings of the 2020 IEEE International Conference on Informatics, IoT, and Enabling Technologies (ICIoT), Doha, Qatar, 2–5 February 2020; pp. 237–242. [Google Scholar]
- Kolpe, P.; Kadam, P.; Mashayak, U. Drowsiness Detection and Warning System Using Python. In Proceedings of the 2nd International Conference on Communication & Information Processing (ICCIP), Tokyo, Japan, 27–29 November 2020. [Google Scholar]
- Mohammad, F.; Mahadas, K.; Hung, G.K. Drowsy Driver Mobile Application: Development of a Novel Scleral-Area Detection Method. Comput. Biol. Med. 2017, 89, 76–83. [Google Scholar] [CrossRef]
- Xu, L.; Li, S.; Bian, K.; Zhao, T.; Yan, W. Sober-Drive: A Smartphone-Assisted Drowsy Driving Detection System. In Proceedings of the 2014 International Conference on Computing, Networking and Communications (ICNC), Honolulu, HI, USA, 3–6 February 2014; pp. 398–402. [Google Scholar]
- García, I.; Bronte, S.; Bergasa, L.M.; Almazán, J.; Yebes, J. Vision-Based Drowsiness Detector for Real Driving Conditions. In Proceedings of the 2012 IEEE Intelligent Vehicles Symposium, Alcala de Henares, Spain, 3–7 June 2012; pp. 618–623. [Google Scholar]
- Mandal, B.; Li, L.; Wang, G.S.; Lin, J. Towards Detection of Bus Driver Fatigue Based on Robust Visual Analysis of Eye State. IEEE Trans. Intell. Transp. Syst. 2017, 18, 545–557. [Google Scholar] [CrossRef]
- You, F.; Li, X.; Gong, Y.; Wang, H.; Li, H. A Real-Time Driving Drowsiness Detection Algorithm With Individual Differences Consideration. IEEE Access 2019, 7, 179396–179408. [Google Scholar] [CrossRef]
- Manishi; Kumari, N. Development of an Enhanced Drowsiness Detection Technique for Car Driver. Xian Dianzi Keji Daxue Xuebao J. Xidian Univ. 2020, 14, 3181–3186. [Google Scholar] [CrossRef]
- Ghoddoosian, R.; Galib, M.; Athitsos, V. A Realistic Dataset and Baseline Temporal Model for Early Drowsiness Detection. arXiv 2019, arXiv:190407312. [Google Scholar]
- Dalal, N.; Triggs, B. Histograms of Oriented Gradients for Human Detection. In Proceedings of the 2005 IEEE Computer Society Conference on Computer Vision and Pattern Recognition (CVPR’05), San Diego, CA, USA, 20–25 June 2005; Volume 1, pp. 886–893. [Google Scholar]
- Kazemi, V.; Sullivan, J. One Millisecond Face Alignment with an Ensemble of Regression Trees. In Proceedings of the 2014 IEEE Conference on Computer Vision and Pattern Recognition, Columbus, OH, USA, 23–28 June 2014; pp. 1867–1874. [Google Scholar]
- Soukupová, T.; Cech, J. Real-Time Eye Blink Detection Using Facial Landmarks. In Proceedings of the 21st Computer Vision Winter Workshop, Rimske Toplice, Slovenia, 3–5 February 2016. [Google Scholar]
- Galarza, E.E.; Egas, F.D.; Silva, F.M.; Velasco, P.M.; Galarza, E.D. Real Time Driver Drowsiness Detection Based on Driver’s Face Image Behavior Using a System of Human Computer Interaction Implemented in a Smartphone. In Proceedings of the International Conference on Information Technology & Systems (ICITS 2018), Libertad, Ecuador, 10–12 January 2018; Rocha, Á., Guarda, T., Eds.; Advances in Intelligent Systems and Computing; Springer International Publishing: Berlin/Heidelberg, Germany, 2018; Volume 721, pp. 563–572. ISBN 978-3-319-73449-1. [Google Scholar]
- Rafid, A.-U.-I.; Niloy, A.; Islam Chowdhury, A.; Sharmin, N. A Brief Review on Different Driver’s Drowsiness Detection Techniques. Int. J. Image Graph. Signal Process. 2020, 12, 41–50. [Google Scholar] [CrossRef]
- Bergasa, L.M.; Almería, D.; Almazán, J.; Yebes, J.J.; Arroyo, R. DriveSafe: An App for Alerting Inattentive Drivers and Scoring Driving Behaviors. In Proceedings of the 2014 IEEE Intelligent Vehicles Symposium Proceedings, Dearborn, MI, USA, 8–11 June 2014; pp. 240–245. [Google Scholar]
- Shafiq, M.; Tian, Z.; Bashir, A.K.; Du, X.; Guizani, M. CorrAUC: A Malicious Bot-IoT Traffic Detection Method in IoT Network Using Machine-Learning Techniques. IEEE Internet Things J. 2021, 8, 3242–3254. [Google Scholar] [CrossRef]
- Shafiq, M.; Tian, Z.; Bashir, A.K.; Du, X.; Guizani, M. IoT Malicious Traffic Identification Using Wrapper-Based Feature Selection Mechanisms. Comput. Secur. 2020, 94, 101863. [Google Scholar] [CrossRef]
- Süzen, A.A.; Duman, B.; Şen, B. Benchmark Analysis of Jetson TX2, Jetson Nano and Raspberry PI Using Deep-CNN. In Proceedings of the 2020 International Congress on Human-Computer Interaction, Optimization and Robotic Applications (HORA), Ankara, Turkey, 26–27 June 2020; pp. 1–5. [Google Scholar]
Category of Input Signals to Detect Drowsiness | References | Predictiveness | Direct Sign of Drowsiness from Eyes | Embedded System Formfactor | |
---|---|---|---|---|---|
Biological Signals | [4,5,6,7,8,9,10,11,12,13] | Not clear | No | No | |
Driving Patterns | [14,15,16,17,33] | Not clear | No | Yes | |
Facial Landmarks | Simple closed eye detection based | [18] | Too late | Yes | Yes |
PERCLOS based | [22,23,24] | Too late | Yes | Yes | |
Blink pattern based | [27,28,29,30] | Yes | Yes | No |
Video Resolution | Desktop PC (ms) | Jetson Nano (ms) | Mini PC (ms) |
---|---|---|---|
320 × 240 | 33.319 ± 3.892 | 33.326 ± 4.197 | 33.333 ± 3.930 |
640 × 480 | 33.255 ± 4.121 | 33.186 ± 5.255 | 33.320 ± 4.462 |
960 × 540 | 33.303 ± 3.722 | 33.299 ± 4.108 | 33.315 ± 3.932 |
1280 × 720 | 33.322 ± 3.984 | 33.303 ± 3.933 | 33.316 ± 3.867 |
Inference | Video Resolution | Desktop PC (ms) | Jetson Nano (ms) | Mini PC (ms) |
---|---|---|---|---|
Face Detection | 320 × 240 | 17.177 ± 0.816 | 89.799 ± 1.064 | 19.031 ± 1.368 |
640 × 480 | 17.752 ± 0.925 | 96.453 ± 2.048 | 21.935 ± 1.928 | |
960 × 540 | 13.165 ± 0.762 | 73.182 ± 2.282 | 16.078 ± 1.169 | |
1280 × 720 | 13.082 ± 0.571 | 73.585 ± 2.288 | 16.218 ± 1.152 | |
Landmark Detection | 320 × 240 | 2.543 ± 0.121 | 8.533 ± 0.348 | 3.410 ± 0.332 |
640 × 480 | 2.570 ± 0.283 | 8.633 ± 0.590 | 3.346 ± 0.651 | |
960 × 540 | 2.391 ± 0.116 | 8.503 ± 0.314 | 3.375 ± 0.369 | |
1280 × 720 | 2.319 ± 0.320 | 8.528 ± 0.221 | 3.362 ± 0.383 | |
Blink Detection | 320 × 240 | 0.835 ± 0.063 | 2.645 ± 5.164 | 1.037 ± 0.124 |
640 × 480 | 0.803 ± 0.065 | 2.408 ± 0.106 | 1.083 ± 0.170 | |
960 × 540 | 0.790 ± 0.316 | 2.398 ± 0.108 | 1.019 ± 0.128 | |
1280 × 720 | 0.745 ± 0.037 | 2.401 ± 0.069 | 1.035 ± 0.125 | |
Total | 320 × 240 | 20.554 ± 0.876 | 100.997 ± 5.317 | 23.478 ± 1.533 |
640 × 480 | 21.126 ± 1.042 | 107.524 ± 2.121 | 26.364 ± 2.018 | |
960 × 540 | 16.345 ± 0.817 | 84.083 ± 2.344 | 20.471 ± 1.306 | |
1280 × 720 | 16.146 ± 0.671 | 84.514 ± 2.305 | 20.615 ± 1.366 |
Model Number | 2FN + FP at Optimal Threshold | FP at Optimal Threshold | FN at Optimal Threshold | Optimal Threshold | 2FN + FP at Default Threshold | FP at Default Threshold | FN at Default Threshold |
---|---|---|---|---|---|---|---|
1 | 0.47 | 0.35 | 0.061 | 3.33 | 0.59 | 0.24 | 0.177 |
2 | 0.30 | 0.22 | 0.041 | 6.33 | 0.31 | 0.20 | 0.054 |
3 | 0.40 | 0.31 | 0.043 | 5.00 | 0.43 | 0.21 | 0.114 |
4 | 0.45 | 0.36 | 0.055 | 5.33 | 0.47 | 0.26 | 0.104 |
5 | 0.43 | 0.30 | 0.064 | 6.33 | 0.43 | 0.28 | 0.077 |
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. |
© 2022 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
Kim, M.; Koo, J. Embedded System Performance Analysis for Implementing a Portable Drowsiness Detection System for Drivers. Technologies 2023, 11, 8. https://doi.org/10.3390/technologies11010008
Kim M, Koo J. Embedded System Performance Analysis for Implementing a Portable Drowsiness Detection System for Drivers. Technologies. 2023; 11(1):8. https://doi.org/10.3390/technologies11010008
Chicago/Turabian StyleKim, Minjeong, and Jimin Koo. 2023. "Embedded System Performance Analysis for Implementing a Portable Drowsiness Detection System for Drivers" Technologies 11, no. 1: 8. https://doi.org/10.3390/technologies11010008
APA StyleKim, M., & Koo, J. (2023). Embedded System Performance Analysis for Implementing a Portable Drowsiness Detection System for Drivers. Technologies, 11(1), 8. https://doi.org/10.3390/technologies11010008