| With the development of the modern automobile industry,it is a very common phenomenon to smoke or answer the phone while driving a motor vehicle.Such common behaviors will cause the driver to be distracted during driving,thereby causing disastrous consequences.Therefore,the detection of distracted driving is closely related to road traffic safety.Using computer vision technology to monitor whether the driver is distracted and to call the police will help the driver to concentrate and avoid traffic safety accidents.At present,there are two solutions for distracted driving behavior recognition at home and abroad: one is based on the change of vehicle driving track,and the other is based on the external physiological performance of the driver.By indirectly monitoring the change of vehicle driving track,although it will not cause interference to the driver,vehicle differences and driver driving habits and other factors have brought challenges to the identification of distracted driving.In addition,the way of directly monitoring physiological indicators such as heart rate,blood pressure and EEG signals of drivers often requires wearing cumbersome detection instruments,and wearing them for a long time will cause discomfort to drivers.With the continuous improvement of the accuracy and robustness of algorithms in the field of machine learning,it brings a new direction for identifying distracted driving behaviors.In this thesis,a two-stage distracted driving behavior recognition method based on computer vision is proposed for smoking distracted driving behavior and answering and making phone distracted driving behavior.The main work and achievements of this thesis are as follows:(1)Build a dataset of distracted driving behaviors.Because there is no public dataset for distracted driving,and the dataset related to driving has small sample space,inaccurate labeling,unreasonable dataset division and collection methods,this thesis constructs a dataset for distracted driving behavior.The dataset is divided into two categories: smoking driving and telephone driving.The sample data is obtained in two forms.The first form mainly comes from real scenes,and the second form mainly comes from the network.We collected the sample data from different angles,different lighting,different weather and different complex backgrounds,and used Label Img to classify the sample data and label the location.In this dataset,8835 data pictures are manually marked,which is suitable for training and experiment in this thesis.(2)Improvement of object detection network.Yolo V5 model based target detection stage,as the applicable scope of our subject two improvement measures are put forward: First,on cigarettes and a mobile phone with the definition of relative size small target,we head to do the improvement,the prediction on the shallow network to add a P2 predicted head,make model can get more details on the shallow network information;Secondly,we optimize the problem of Sigmoid function probability sum not being one,so that its convergence result on loss more meets the requirements of our mutually exclusive class dataset.The m AP of the improved model reached 77.22%,about 9 percentage points higher than before,and the detection speed was similar.(3)The improvement of pose estimation network.The pose estimation stage is based on lightweight Openpose model.On this basis,we propose two improvement strategies: First,the structure of the network is improved,which can not only improve the propagation ability of the network,but also make the network more effective training;Secondly,CA attention mechanism is introduced to improve the efficiency and accuracy of information processing.In the COCO dataset,the average accuracy of the optimized network reaches 64.8%.(4)The design of two-stage behavior recognition network.Combining the improved Yolo V5 and Openpose network models,a new two-stage distracted driving behavior recognition algorithm is proposed.Euclid distance feature is used as the main judgment condition,and elbow angle feature is used as the auxiliary judgment condition.Under the test data set,the correct rate of smoking distracted driving behavior reached92.16%,the correct rate of answering and making calls distracted driving behavior reached 94.60%,the correct rate of normal driving recognition reached 100%,and the average correct rate of the model reached 93.76%.Finally,the two-stage distracted driving behavior recognition model proposed in this thesis can achieve the optimal recognition effect and recognition speed without disturbing the driver. |