駕駛監測系統(DMS, Driver Monitoring System)可以通過即時影像,檢測駕駛頭部、面部和眼瞼運動的變化,來提示駕駛員他們的困倦或分心。中國及歐盟已規定該系統需配備於新出廠的車輛。 本論文提出一個基於YOLOv5s(You Only Look Once version 5 small)所設計的駕駛監測系統,並利用Kneron KL-520神經網路加速晶片運行於嵌入式裝置,能以低影像解析度,檢測駕駛閉眼、頭部姿態異常、打哈欠、使用手機、抽菸等行為。 Kneron KL-520是耐能(Kneron)在2019年推出的一款AI (Artificial Intelligence)晶片,約40 nm晶圓製程,算力為350 TOPS (Tera Operations Per Second),平均功耗降為300-500 mW,並且提供動態模型執行 (DME, Dynamic Model Execution),但對機器學習模型的大小及結構有嚴格限制。 為配合嵌入式系統的限制,本文將原本的YOLOv5s移除掉頭部及頸部等部分結構,在Ubuntu 18.0環境上透過自身收集的5萬張影像訓練,最後將模型佈署在配有Kneron KL-520開發板上,能將結果以平均5 FPS (Frames Per Second)顯示於顯示裝置上,即時對疲勞駕駛提出警告,各個種類的準確度(Accuracy)則可以達到90%以上。
The Driver Monitoring System (DMS, Driver Monitoring System) can detect changes in the driver's head, face and eyelid movements through real-time images to alert drivers of their drowsiness or distraction. China and the European Union have stipulated that brand-new vehicles must be equipped with DMS system. We propose a driver monitoring system based on YOLOv5s (You Only Look Once version 5 small) and use the Kneron KL-520 neural network accelerator chip to run on an embedded device, which can detect driving eyes closed, abnormal head posture, yawning, using mobile phones, smoking, and other behaviors. Kneron KL-520 is an AI (Artificial Intelligence) chip launched by Kneron in 2019, with 40 nm wafer process technology, a computing power of 350 TOPS, an average power consumption of 300-500 mW, and dynamic model execution. However, there are strict restrictions on the size and structure of machine learning model. To cope with the limitations of the embedded system, we remove some structures such as the head and neck from the original YOLOv5s, and train the model on the 50,000 images collected by ourselves in the Ubuntu 18.0 environment, and finally deploy machine learning model on the development board equipped with KL-520. The prediction result can be displayed on the display device with an average of 5 FPS (Frames Per Second), which can immediately warn fatigue drivers, and the accuracy of each category can reach more than 90%.