| According to statistics,about 25% of traffic accidents are caused by motorists driving motor vehicles in a fatigued state.In order to reduce the frequency of traffic accidents caused by fatigue,an embedded system for detecting fatigue based on machine vision has been designed and developed in this project.The driver’s driving status is monitored through machine vision,a non-contact detection method.When the system detects that the driver is in a fatigued driving state,it will alert the driver by voice in time to reduce the number of traffic accidents.The specific research of this dissertation is as follows:(1)The traditional SSD(Single Shot Multi Box Detector)model is improved to OSSD(Optimized Single Shot Multi Box Detector)model for detecting the driver’s face area.According to the actual needs of the system,the base network of the SSD model is improved and the group normalization is added to form the base network of the OSSD model,which not only speeds up the training speed of the neural network but also solves the deficiency of increasing error when the bitch size is small;according to the actual needs of the subject,the processing of the feature map of the SSD model is improved and the OSSD model actively abandons the extraction of the first two feature maps,which makes the model ignore the detection of small This reduces the computational effort of the model and improves the real-time performance of the system while ensuring the detection accuracy.The training results show that the OSSD model has a correct detection rate of 92.3% for the driver’s face.(2)Considering the connection between the fatigue detection methods based on facial features and head posture,the open source image processing library Dlib(Dependable Lists Incorporated Bellwood)is used to mark the face feature points;the improved eye aspect ratio algorithm determines the driver’s eye state;the mouth aspect ratio algorithm determines the driver’s mouth state;the multi-point perspective The algorithm calculates the driver’s head posture information.By carefully selecting the cameras,the interference of lighting changes is greatly reduced,which provides the basis for the Dlib library to accurately mark the face feature points and facilitate the system to detect the driver’s eyes,mouth and head posture.The system uses three indicators to determine the driver’s driving status: the percentage of eyes closed per unit time,the frequency and duration of yawning and the time spent with the head down,reducing the possibility of misjudgement.(3)Development of embedded hardware system and software process.This thesis comprehensively compares the popular image processing chips on the market,takes full consideration of the actual situation and chooses the RK3399 Pro chip as the processor of the embedded product.The system is based on the purchased RK3399 Pro core board,and the peripheral circuitry is designed to meet the actual requirements,realising the functions of collecting,processing,analysing and voice alerting the driver’s facial information.When designing the system program flow,the actual application is fully considered and more judgement statements are used to reduce the image processing aspects of the system under the premise of satisfying the conditions to improve the system’s real-time performance.Finally,the embedded hardware and software for fatigue driving detection based on machine vision was tested in practice.The experimental results show that the embedded system developed in this project can accurately detect the driver’s eye state,yawn frequency,duration and head posture without delay;it can complete the detection of the driver’s driving state and issue voice alerts to drivers in a fatigued driving state. |