Method and device for detecting bad driving behavior of vehicle driver

文档序号:8468 发布日期:2021-09-17 浏览:19次 中文

1. A method for detecting poor driving behavior of a vehicle driver, comprising: acquiring a single-frame image of a driver in real time, and performing facial feature positioning on the single-frame image of the driver by adopting a multitask cascaded convolutional neural network to obtain a facial region of the driver; acquiring an interested area of a face area, detecting a mobile phone and smoke in the interested area by using a trained first classifier, and if the credibility of the mobile phone and/or the smoke is detected to be greater than a probability threshold value, adding 1 to the count in an abnormal behavior alarm queue; modeling the face posture of the driver, acquiring the angle information of the face orientation of the driver, if the second angle is larger than a second angle threshold value, adding 1 to the count in the left-expected and right-expected alarm queue, and if the third angle is larger than a third angle threshold value, adding 1 to the count in the head-up and head-down alarm queue; acquiring the eyes and mouth area of a driver, judging whether a closed-eye behavior exists by using a trained second classifier, judging whether a yawning behavior exists by using a trained third classifier, if the closed-eye behavior exists, adding 1 to the count in a closed-eye alarm queue, and if the yawning behavior exists, adding 1 to the count in the yawning alarm queue.

2. The method for detecting the poor driving behavior of the vehicle driver according to claim 1, wherein the facial feature localization of the single-frame image of the driver by using a multitask cascade convolutional neural network comprises the following steps: scaling a single-frame image of a driver in different scales to generate an image pyramid; adopting a shallow convolutional neural network as a proposed network to output a plurality of candidate face frames, acquiring a boundary regression vector of each face frame, calibrating the candidate face frames, combining overlapped face frames by using a non-maximum inhibition method, adopting a deep convolutional neural network as a refining network to judge the face frames output by the proposed network, deleting the non-face frames, calculating the boundary regression vector of the face frames, and refining the face frames by using the non-maximum inhibition method; and judging the face frame output by the refining network by adopting an output convolutional neural network, calculating a boundary regression vector of the face frame, deleting the overlapped face frame by adopting a non-maximum suppression method, and outputting the five-sense organ coordinates of the final face.

3. The method according to claim 2, wherein the acquiring a region of interest of the face region includes: and expanding the obtained face area by half the width of the face leftwards and rightwards simultaneously to obtain the interested area of the face area.

4. The method according to claim 3, wherein the obtaining of the angle information of the orientation of the face of the driver comprises: defining a 3D face model of six facial feature points of a left eye corner, a right eye corner, a nose tip, a left mouth corner, a right mouth corner and a lower jaw of a driver; acquiring six corresponding facial feature points of the facial area, and calculating an affine transformation matrix from the 3D model to the face of the driver to obtain a rotation vector; the rotation vector is converted into an Euler angle, and angle information of the face orientation of the driver is obtained.

5. The method of detecting poor driving behavior of a vehicle driver as set forth in claim 4, further comprising, after the count in the yawning warning queue is increased by 1: different statistical durations are respectively set for the smoking driving behavior, the mobile phone driving behavior, the distraction driving behavior, the eye-closing driving behavior and the yawning driving behavior.

6. The method for detecting the poor driving behavior of the vehicle driver according to claim 5, wherein the setting of the different statistical time periods respectively comprises: the statistical duration of the smoking driving behavior is set to be 1 second to 3 seconds, the statistical duration of the mobile phone driving behavior is set to be 4 seconds to 6 seconds, the statistical duration of the distraction driving behavior is set to be 4 seconds to 6 seconds, the statistical duration of the eye-closing driving behavior is set to be 1 second to 3 seconds, and the statistical duration of the yawning driving behavior is set to be 1.5 seconds to 3.5 seconds.

7. The method for detecting poor driving behavior of a vehicle driver according to claim 6, comprising: and triggering a safety alarm if the statistical time length is greater than a time length threshold value according to the statistical time length obtained by counting in the alarm queue.

8. A vehicle driver's poor driving behavior detection apparatus, characterized by comprising: the first main module is used for acquiring a single-frame image of a driver in real time, and performing facial feature positioning on the single-frame image of the driver by adopting a multitask cascaded convolutional neural network to obtain a facial area of the driver; the second main module is used for acquiring an interested area of the face area, detecting the mobile phone and the smoke in the interested area by using the trained first classifier, and counting and adding 1 in the abnormal behavior alarm queue if the credibility of the detected mobile phone and/or smoke is greater than a probability threshold; the third main module is used for modeling the face posture of the driver and acquiring the angle information of the face orientation of the driver, if the second angle is larger than a second angle threshold value, 1 is added to the count in the warning queue of the left-to-right anticipation, and if the third angle is larger than a third angle threshold value, 1 is added to the count in the warning queue of the head-up and head-down anticipation; and the fourth main module is used for acquiring the eyes and mouth areas of the driver, judging whether a closed-eye behavior exists by using the trained second classifier, judging whether a yawning behavior exists by using the trained third classifier, if the closed-eye behavior exists, adding 1 to the count in the closed-eye alarm queue, and if the yawning behavior exists, adding 1 to the count in the yawning alarm queue.

9. An electronic device, comprising:

at least one processor, at least one memory, and a communication interface; wherein the content of the first and second substances,

the processor, the memory and the communication interface are communicated with each other;

the memory stores program instructions executable by the processor, the processor invoking the program instructions to perform the method of any of claims 1 to 7.

10. A non-transitory computer-readable storage medium storing computer instructions for causing a computer to perform the method of any one of claims 1 to 7.

Background

With the continuous development of science and technology, automobiles become indispensable vehicles for daily trips of people, bring convenience to people along with automobile driving, and have a great deal of bad driving behaviors, such as smoking driving vehicles, mobile phone driving vehicles or fatigue driving vehicles, and unnecessary traffic accidents are easily caused by the bad driving behaviors. At present, the method mainly adopts laws and regulations to restrain and punish the bad driving behaviors of drivers, and an effective method for restraining the bad driving behaviors outside the regulations in real time is lacked. Therefore, it is an urgent technical problem to be solved in the art to develop a method and a device for detecting adverse driving behavior of a vehicle driver, which can effectively overcome the above-mentioned drawbacks in the related art.

Disclosure of Invention

In order to solve the above problems in the prior art, embodiments of the present invention provide a method and an apparatus for detecting a bad driving behavior of a vehicle driver.

In a first aspect, an embodiment of the present invention provides a method for detecting poor driving behavior of a vehicle driver, including: acquiring a single-frame image of a driver in real time, and performing facial feature positioning on the single-frame image of the driver by adopting a multitask cascaded convolutional neural network to obtain a facial region of the driver; acquiring an interested area of a face area, detecting a mobile phone and smoke in the interested area by using a trained first classifier, and if the credibility of the mobile phone and/or the smoke is detected to be greater than a probability threshold value, adding 1 to the count in an abnormal behavior alarm queue; modeling the face posture of the driver, acquiring the angle information of the face orientation of the driver, if the second angle is larger than a second angle threshold value, adding 1 to the count in the left-expected and right-expected alarm queue, and if the third angle is larger than a third angle threshold value, adding 1 to the count in the head-up and head-down alarm queue; acquiring the eyes and mouth area of a driver, judging whether a closed-eye behavior exists by using a trained second classifier, judging whether a yawning behavior exists by using a trained third classifier, if the closed-eye behavior exists, adding 1 to the count in a closed-eye alarm queue, and if the yawning behavior exists, adding 1 to the count in the yawning alarm queue.

On the basis of the content of the embodiment of the method, the method for detecting the bad driving behavior of the vehicle driver provided by the embodiment of the invention adopts a multitask cascaded convolutional neural network to perform facial feature positioning on the single-frame image of the driver, and comprises the following steps: scaling a single-frame image of a driver in different scales to generate an image pyramid; adopting a shallow convolutional neural network as a proposed network to output a plurality of candidate face frames, acquiring a boundary regression vector of each face frame, calibrating the candidate face frames, combining overlapped face frames by using a non-maximum inhibition method, adopting a deep convolutional neural network as a refining network to judge the face frames output by the proposed network, deleting the non-face frames, calculating the boundary regression vector of the face frames, and refining the face frames by using the non-maximum inhibition method; and judging the face frame output by the refining network by adopting an output convolutional neural network, calculating a boundary regression vector of the face frame, deleting the overlapped face frame by adopting a non-maximum suppression method, and outputting the five-sense organ coordinates of the final face.

On the basis of the content of the above method embodiment, the method for detecting poor driving behavior of a vehicle driver provided in the embodiment of the present invention, where the obtaining of the region of interest of the face region includes: and expanding the obtained face area by half the width of the face leftwards and rightwards simultaneously to obtain the interested area of the face area.

On the basis of the content of the above method embodiment, the method for detecting poor driving behavior of a vehicle driver provided in an embodiment of the present invention, where the obtaining of the angle information of the orientation of the face of the driver includes: defining a 3D face model of six facial feature points of a left eye corner, a right eye corner, a nose tip, a left mouth corner, a right mouth corner and a lower jaw of a driver; acquiring six corresponding facial feature points of the facial area, and calculating an affine transformation matrix from the 3D model to the face of the driver to obtain a rotation vector; the rotation vector is converted into an Euler angle, and angle information of the face orientation of the driver is obtained.

On the basis of the content of the embodiment of the method, the method for detecting the poor driving behavior of the vehicle driver provided by the embodiment of the invention further comprises the following steps of, after the count in the yawning alarm queue is increased by 1: different statistical durations are respectively set for the smoking driving behavior, the mobile phone driving behavior, the distraction driving behavior, the eye-closing driving behavior and the yawning driving behavior.

On the basis of the content of the embodiment of the method, the method for detecting the bad driving behavior of the vehicle driver provided by the embodiment of the invention comprises the following steps of respectively setting different statistical time lengths: the statistical duration of the smoking driving behavior is set to be 1 second to 3 seconds, the statistical duration of the mobile phone driving behavior is set to be 4 seconds to 6 seconds, the statistical duration of the distraction driving behavior is set to be 4 seconds to 6 seconds, the statistical duration of the eye-closing driving behavior is set to be 1 second to 3 seconds, and the statistical duration of the yawning driving behavior is set to be 1.5 seconds to 3.5 seconds.

On the basis of the content of the embodiment of the method, the method for detecting the bad driving behavior of the vehicle driver provided by the embodiment of the invention comprises the following steps: and triggering a safety alarm if the statistical time length is greater than a time length threshold value according to the statistical time length obtained by counting in the alarm queue.

In a second aspect, an embodiment of the present invention provides a vehicle driver's poor driving behavior detection apparatus, including: the first main module is used for acquiring a single-frame image of a driver in real time, and performing facial feature positioning on the single-frame image of the driver by adopting a multitask cascaded convolutional neural network to obtain a facial area of the driver; the second main module is used for acquiring an interested area of the face area, detecting the mobile phone and the smoke in the interested area by using the trained first classifier, and counting and adding 1 in the abnormal behavior alarm queue if the credibility of the detected mobile phone and/or smoke is greater than a probability threshold; the third main module is used for modeling the face posture of the driver and acquiring the angle information of the face orientation of the driver, if the second angle is larger than a second angle threshold value, 1 is added to the count in the warning queue of the left-to-right anticipation, and if the third angle is larger than a third angle threshold value, 1 is added to the count in the warning queue of the head-up and head-down anticipation; and the fourth main module is used for acquiring the eyes and mouth areas of the driver, judging whether a closed-eye behavior exists by using the trained second classifier, judging whether a yawning behavior exists by using the trained third classifier, if the closed-eye behavior exists, adding 1 to the count in the closed-eye alarm queue, and if the yawning behavior exists, adding 1 to the count in the yawning alarm queue.

In a third aspect, an embodiment of the present invention provides an electronic device, including:

at least one processor; and

at least one memory communicatively coupled to the processor, wherein:

the memory stores program instructions executable by the processor, and the processor calls the program instructions to execute the method for detecting poor driving behavior of a driver of a vehicle provided by any one of the various implementations of the first aspect.

In a fourth aspect, embodiments of the present invention provide a non-transitory computer-readable storage medium storing computer instructions for causing a computer to perform the method for detecting poor driving behavior of a driver of a vehicle provided in any of the various implementations of the first aspect.

According to the method and the device for detecting the bad driving behavior of the vehicle driver, the facial features of the single-frame image of the driver are positioned by adopting the multi-task cascaded convolutional neural network, so that the facial area of the driver is obtained; the method comprises the steps of obtaining an interested area of a face area, using a trained first classifier to carry out corresponding detection in the interested area, carrying out corresponding counting in an alarm queue according to a detection result, detecting various bad driving behaviors, and having the characteristics of objectivity, comprehensiveness, good real-time performance, strong robustness, high accuracy and easiness in transplantation, so that the method assists safe driving of a driver and reduces traffic accidents.

Drawings

In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, a brief description will be given below to the drawings required for the description of the embodiments or the prior art, and it is obvious that the drawings in the following description are some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.

FIG. 1 is a flow chart of a method for detecting poor driving behavior of a vehicle driver according to an embodiment of the present invention;

FIG. 2 is a schematic structural diagram of a device for detecting poor driving behavior of a vehicle driver according to an embodiment of the present invention;

fig. 3 is a schematic physical structure diagram of an electronic device according to an embodiment of the present invention.

Detailed Description

In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention. In addition, technical features of various embodiments or individual embodiments provided by the present invention may be arbitrarily combined with each other to form a feasible technical solution, and such combination is not limited by the sequence of steps and/or the structural composition mode, but must be realized by a person skilled in the art, and when the technical solution combination is contradictory or cannot be realized, such a technical solution combination should not be considered to exist and is not within the protection scope of the present invention.

The embodiment of the invention provides a method for detecting poor driving behavior of a vehicle driver, and referring to fig. 1, the method comprises the following steps: acquiring a single-frame image of a driver in real time, and performing facial feature positioning on the single-frame image of the driver by adopting a multitask cascaded convolutional neural network to obtain a facial region of the driver; acquiring an interested area of a face area, detecting a mobile phone and smoke in the interested area by using a trained first classifier, and if the credibility of the mobile phone and/or the smoke is detected to be greater than a probability threshold value, adding 1 to the count in an abnormal behavior alarm queue; modeling the face posture of the driver, acquiring the angle information of the face orientation of the driver, if the second angle is larger than a second angle threshold value, adding 1 to the count in the left-expected and right-expected alarm queue, and if the third angle is larger than a third angle threshold value, adding 1 to the count in the head-up and head-down alarm queue; acquiring the eyes and mouth area of a driver, judging whether a closed-eye behavior exists by using a trained second classifier, judging whether a yawning behavior exists by using a trained third classifier, if the closed-eye behavior exists, adding 1 to the count in a closed-eye alarm queue, and if the yawning behavior exists, adding 1 to the count in the yawning alarm queue. The first classifier is used for detecting the mobile phone and the smoke; the probability threshold is 30%; the second angle is yaw, which represents the angle of the head of the driver moving left and right; the second angle threshold may be 50 degrees; the third angle is pitch, which represents the angle of the head of the driver moving up and down; the third angle threshold may be 30 degrees.

Specifically, modeling the face posture of the driver, and calculating angle information (pitch, yaw, roll) of the face orientation of the driver, wherein pitch is a third angle representing an angle of up-and-down movement of the head of the driver; yaw is a second angle, representing the angle of side-to-side movement of the driver's head; and roll is a first angle and represents the angle of the head of the driver rotating in the plane, if yaw is greater than a second angle threshold (namely 50 degrees), 1 is counted and added in an alarm queue considering right-hand behavior at left, and if pitch is greater than a third angle threshold (namely 30 degrees), 1 is counted and added in a head-up and head-down alarm queue, and the next frame of image is judged.

Based on the content of the foregoing method embodiment, as an optional embodiment, the method for detecting an adverse driving behavior of a vehicle driver provided in the embodiment of the present invention, where the method for locating facial features of a single frame image of the driver by using a multi-task cascaded convolutional neural network includes: scaling a single-frame image of a driver in different scales to generate an image pyramid; adopting a shallow convolutional neural network as a proposed network to output a plurality of candidate face frames, acquiring a boundary regression vector of each face frame, calibrating the candidate face frames, combining overlapped face frames by using a non-maximum inhibition method, adopting a deep convolutional neural network as a refining network to judge the face frames output by the proposed network, deleting the non-face frames, calculating the boundary regression vector of the face frames, and refining the face frames by using the non-maximum inhibition method; and judging the face frame output by the refining network by adopting an output convolutional neural network, calculating a boundary regression vector of the face frame, deleting the overlapped face frame by adopting a non-maximum suppression method, and outputting the five-sense organ coordinates of the final face.

The proposed network adopts a shallow convolutional neural network to rapidly output a large number of candidate face windows, calculates the boundary regression vector of each face frame, calibrates the candidate face windows, and combines highly overlapped face frames by using a non-maximum suppression method. The refining network adopts a complex convolutional neural network to judge the face frame output by the proposed network, deletes a non-face window, calculates the boundary frame regression vector of the face frame and refines the face frame by using a non-maximum suppression method. And the output convolutional neural network is used as an output network, a stronger convolutional neural network is adopted to judge the output face frame of the refining network, the boundary regression vector of the face frame is calculated, the overlapped face frame is deleted by using a non-maximum inhibition method, and the final facial feature coordinates are output.

Based on the content of the foregoing method embodiment, as an optional embodiment, the method for detecting poor driving behavior of a vehicle driver provided in the embodiment of the present invention, where the obtaining of the region of interest of the face region includes: and expanding the obtained face area by half the width of the face leftwards and rightwards simultaneously to obtain the interested area of the face area.

Specifically, after the face area of the driver is obtained, the face area is simultaneously enlarged by half the face width to the left and right as the region of interest. The mobile phone and cigarette detector is trained by marking the mobile phone and cigarette in a training sample and then modeling the characteristics of the mobile phone and cigarette by using a convolutional neural network based on a deep learning technology. The loss functions of the model training comprise the category credibility loss of the mobile phone and the cigarette and the position positioning loss of the mobile phone and the cigarette. The mobile phone and smoke are detected in the defined region of interest using a trained driver smoking mobile phone model. And if the mobile phone and the smoke are detected in the image and the credibility of the smoke and the mobile phone is greater than the manually set probability threshold, adding 1 to the count in the alarm queue of the abnormal behavior of smoking or playing the mobile phone of the driver. And if the smoke and the mobile phone are detected at the same time, and the credibility of the smoke and the mobile phone is greater than the manually set probability threshold, adding 1 to the alarm queue of the abnormal behaviors of smoking and playing the mobile phone of the driver. If the smoke and the mobile phone are detected, other abnormal behaviors of the driver are not judged, and the smoke and the mobile phone are directly detected for the next frame of image.

Based on the content of the foregoing method embodiment, as an optional embodiment, the method for detecting poor driving behavior of a driver of a vehicle according to an embodiment of the present invention, where the obtaining of the angle information of the orientation of the face of the driver includes: defining a 3D face model of six facial feature points of a left eye corner, a right eye corner, a nose tip, a left mouth corner, a right mouth corner and a lower jaw of a driver; acquiring six corresponding facial feature points of the facial area, and calculating an affine transformation matrix from the 3D model to the face of the driver to obtain a rotation vector; the rotation vector is converted into an Euler angle, and angle information of the face orientation of the driver is obtained.

Specifically, in order to ensure the accuracy of the side face influencing yawning and eye closing behaviors, under the condition that the driver does not have smoking or mobile phone behavior, the angle information of the face orientation of the driver is calculated by modeling the face posture of the driver, and the invention uses three Euler angles (pitch, yaw, roll) to represent the face posture information of the driver. In another embodiment, the euler angle calculation method includes: the method comprises the steps of firstly defining a 3D face model of six face feature points including a left eye corner, a right eye corner, a nose tip, a left mouth corner, a right mouth corner and a lower jaw of a driver, then adopting six corresponding face feature points detected in a picture of the driver, calculating an affine transformation matrix from the 3D model to the face of the driver to obtain a rotation vector, and finally converting the rotation vector into an Euler angle. Whether the driver has the distraction behavior is judged by setting an angle threshold value in the vertical direction and an angle threshold value in the horizontal direction. If the euler angle yaw of the driver's face is greater than the threshold, the driver has a look ahead warning queue count of plus 1, and if the euler angle pitch of the driver's face is greater than the threshold, the driver heads up and heads down warning queue count of plus 1. If the situation that the driver has a left expectation or heads up and heads down is detected, other abnormal behaviors of the driver are not judged, and smoke and mobile phone detection is directly carried out on the next frame of image.

Based on the content of the foregoing method embodiment, as an optional embodiment, the method for detecting poor driving behavior of a vehicle driver provided in the embodiment of the present invention, after adding 1 to the count in the yawning warning queue, further includes: different statistical durations are respectively set for the smoking driving behavior, the mobile phone driving behavior, the distraction driving behavior, the eye-closing driving behavior and the yawning driving behavior.

Specifically, by extracting the eyes and mouth region of the driver, respectively. Based on a deep learning technology, the eye region characteristic and the mouth region characteristic are extracted by using a convolutional neural network, and an eye state classifier and a mouth state classifier of a driver are trained respectively. And judging whether the driver has the eye closing behavior by using the eye state classifier, and judging whether the driver has the yawning behavior by using the mouth state classifier. And if the closed-eye behavior exists in the driver, adding 1 to the count in the closed-eye warning queue of the driver, and if the yawning behavior exists, adding 1 to the count in the yawning warning queue of the driver.

Based on the content of the foregoing method embodiment, as an optional embodiment, the method for detecting poor driving behavior of a vehicle driver provided in the embodiment of the present invention, where the setting of different statistical durations respectively includes: the statistical duration of the smoking driving behavior is set to be 1 second to 3 seconds, the statistical duration of the mobile phone driving behavior is set to be 4 seconds to 6 seconds, the statistical duration of the distraction driving behavior is set to be 4 seconds to 6 seconds, the statistical duration of the eye-closing driving behavior is set to be 1 second to 3 seconds, and the statistical duration of the yawning driving behavior is set to be 1.5 seconds to 3.5 seconds. In another embodiment, the statistical duration of the smoking driving behavior is set to 2 seconds, the statistical duration of the mobile phone driving behavior is set to 5 seconds, the statistical duration of the distracted driving behavior is set to 5 seconds, the statistical duration of the closed-eye driving behavior is set to 2 seconds, and the statistical duration of the yawning driving behavior is set to 2.5 seconds.

Specifically, since the smoking and cell phone hitting behavior of the driver is the most prominent, the smoking and cell phone hitting behavior of the driver is detected first. Considering the fixation of the camera position, the eyes and the mouth of the driver are partially lost in imaging due to the fact that the driver has the behavior of looking ahead or looking down, and therefore the positioning of the eyes and the mouth of the driver is affected, and therefore when the driver does not have smoking or playing a mobile phone, whether the driver has the behavior of looking ahead or not is judged. When the driver does not have the behaviors of left look and right look and head raising and lowering, the eye closing and yawning behaviors of the driver are identified. Respectively setting a time length threshold tsmoke to be 1.5 seconds, a time length threshold tcall to be 4 seconds for the smoking behavior of the driver, a time length threshold tdiistrction to be 4 seconds for the distraction behavior, a time length threshold tcloseeye to be 1.5 seconds for the eye closing behavior, and a time length threshold topenmouth to be 2 seconds for the yawning behavior. When the driver detects that five abnormal behaviors of smoking, playing a mobile phone, distracting, closing eyes and yawning exist and the duration exceeds the corresponding duration threshold, the corresponding alarm is triggered, and voice prompt is carried out at the terminal, so that the safe driving of the driver is ensured, and the occurrence of traffic accidents is reduced.

Based on the content of the foregoing method embodiment, as an optional embodiment, the method for detecting the bad driving behavior of the vehicle driver provided in the embodiment of the present invention includes: and triggering a safety alarm if the statistical time length is greater than a time length threshold value according to the statistical time length obtained by counting in the alarm queue.

According to the method for detecting the bad driving behavior of the vehicle driver, the facial features of the single-frame image of the driver are positioned by adopting a multi-task cascaded convolutional neural network, so that the facial area of the driver is obtained; the method comprises the steps of obtaining an interested area of a face area, using a trained first classifier to carry out corresponding detection in the interested area, carrying out corresponding counting in an alarm queue according to a detection result, detecting various bad driving behaviors, and having the characteristics of objectivity, comprehensiveness, good real-time performance, strong robustness, high accuracy and easiness in transplantation, so that the method assists safe driving of a driver and reduces traffic accidents.

The implementation basis of the various embodiments of the present invention is realized by programmed processing performed by a device having a processor function. Therefore, in engineering practice, the technical solutions and functions thereof of the embodiments of the present invention can be packaged into various modules. Based on this reality, on the basis of the above embodiments, embodiments of the present invention provide a vehicle driver bad driving behavior detection apparatus for executing the vehicle driver bad driving behavior detection method in the above method embodiments. Referring to fig. 2, the apparatus includes: the first main module is used for acquiring a single-frame image of a driver in real time, and performing facial feature positioning on the single-frame image of the driver by adopting a multitask cascaded convolutional neural network to obtain a facial area of the driver; the second main module is used for acquiring an interested area of the face area, detecting the mobile phone and the smoke in the interested area by using the trained first classifier, and counting and adding 1 in the abnormal behavior alarm queue if the credibility of the detected mobile phone and/or smoke is greater than a probability threshold; the third main module is used for modeling the face posture of the driver and acquiring the angle information of the face orientation of the driver, if the second angle is larger than a second angle threshold value, 1 is added to the count in the warning queue of the left-to-right anticipation, and if the third angle is larger than a third angle threshold value, 1 is added to the count in the warning queue of the head-up and head-down anticipation; and the fourth main module is used for acquiring the eyes and mouth areas of the driver, judging whether a closed-eye behavior exists by using the trained second classifier, judging whether a yawning behavior exists by using the trained third classifier, if the closed-eye behavior exists, adding 1 to the count in the closed-eye alarm queue, and if the yawning behavior exists, adding 1 to the count in the yawning alarm queue.

According to the device for detecting the bad driving behavior of the vehicle driver, provided by the embodiment of the invention, the facial features of the single-frame image of the driver are positioned by adopting a plurality of modules in the figure 2 and a multitask cascaded convolutional neural network to obtain the facial area of the driver; the method comprises the steps of obtaining an interested area of a face area, using a trained first classifier to carry out corresponding detection in the interested area, carrying out corresponding counting in an alarm queue according to a detection result, detecting various bad driving behaviors, and having the characteristics of objectivity, comprehensiveness, good real-time performance, strong robustness, high accuracy and easiness in transplantation, so that the method assists safe driving of a driver and reduces traffic accidents.

It should be noted that, the apparatus in the apparatus embodiment provided by the present invention may be used for implementing methods in other method embodiments provided by the present invention, except that corresponding function modules are provided, and the principle of the apparatus embodiment provided by the present invention is basically the same as that of the apparatus embodiment provided by the present invention, so long as a person skilled in the art obtains corresponding technical means by combining technical features on the basis of the apparatus embodiment described above, and obtains a technical solution formed by these technical means, on the premise of ensuring that the technical solution has practicability, the apparatus in the apparatus embodiment described above may be modified, so as to obtain a corresponding apparatus class embodiment, which is used for implementing methods in other method class embodiments. For example:

based on the content of the above device embodiment, as an optional embodiment, the device for detecting the bad driving behavior of the vehicle driver provided in the embodiment of the present invention further includes: the first sub-module is used for realizing facial feature localization of the driver single-frame image by adopting the multitask cascaded convolutional neural network, and comprises: scaling a single-frame image of a driver in different scales to generate an image pyramid; adopting a shallow convolutional neural network as a proposed network to output a plurality of candidate face frames, acquiring a boundary regression vector of each face frame, calibrating the candidate face frames, combining overlapped face frames by using a non-maximum inhibition method, adopting a deep convolutional neural network as a refining network to judge the face frames output by the proposed network, deleting the non-face frames, calculating the boundary regression vector of the face frames, and refining the face frames by using the non-maximum inhibition method; and judging the face frame output by the refining network by adopting an output convolutional neural network, calculating a boundary regression vector of the face frame, deleting the overlapped face frame by adopting a non-maximum suppression method, and outputting the five-sense organ coordinates of the final face.

Based on the content of the above device embodiment, as an optional embodiment, the device for detecting the bad driving behavior of the vehicle driver provided in the embodiment of the present invention further includes: a second sub-module for implementing the acquiring of the region of interest of the facial region, comprising: and expanding the obtained face area by half the width of the face leftwards and rightwards simultaneously to obtain the interested area of the face area.

Based on the content of the above device embodiment, as an optional embodiment, the device for detecting the bad driving behavior of the vehicle driver provided in the embodiment of the present invention further includes: a third sub-module, configured to implement the obtaining of the angle information of the orientation of the face of the driver, including: defining a 3D face model of six facial feature points of a left eye corner, a right eye corner, a nose tip, a left mouth corner, a right mouth corner and a lower jaw of a driver; acquiring six corresponding facial feature points of the facial area, and calculating an affine transformation matrix from the 3D model to the face of the driver to obtain a rotation vector; the rotation vector is converted into an Euler angle, and angle information of the face orientation of the driver is obtained.

Based on the content of the above device embodiment, as an optional embodiment, the device for detecting the bad driving behavior of the vehicle driver provided in the embodiment of the present invention further includes: a fourth sub-module, configured to, after the count in the yawning alarm queue is increased by 1, further include: different statistical durations are respectively set for the smoking driving behavior, the mobile phone driving behavior, the distraction driving behavior, the eye-closing driving behavior and the yawning driving behavior.

Based on the content of the above device embodiment, as an optional embodiment, the device for detecting the bad driving behavior of the vehicle driver provided in the embodiment of the present invention further includes: a fifth sub-module, configured to implement the setting of different statistical durations, respectively, including: the statistical duration of the smoking driving behavior is set to be 1 second to 3 seconds, the statistical duration of the mobile phone driving behavior is set to be 4 seconds to 6 seconds, the statistical duration of the distraction driving behavior is set to be 4 seconds to 6 seconds, the statistical duration of the eye-closing driving behavior is set to be 1 second to 3 seconds, and the statistical duration of the yawning driving behavior is set to be 1.5 seconds to 3.5 seconds.

Based on the content of the above device embodiment, as an optional embodiment, the device for detecting the bad driving behavior of the vehicle driver provided in the embodiment of the present invention further includes: a sixth submodule, configured to implement the method, including: and triggering a safety alarm if the statistical time length is greater than a time length threshold value according to the statistical time length obtained by counting in the alarm queue.

The method of the embodiment of the invention is realized by depending on the electronic equipment, so that the related electronic equipment is necessarily introduced. To this end, an embodiment of the present invention provides an electronic apparatus, as shown in fig. 3, including: the system comprises at least one processor (processor), a communication Interface (communication Interface), at least one memory (memory) and a communication bus, wherein the at least one processor, the communication Interface and the at least one memory are communicated with each other through the communication bus. The at least one processor may invoke logic instructions in the at least one memory to perform all or a portion of the steps of the methods provided by the various method embodiments described above.

In addition, the logic instructions in the at least one memory may be implemented in software functional units and stored in a computer readable storage medium when sold or used as a stand-alone product. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the method embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.

The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.

Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.

The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. Based on this recognition, each block in the flowchart or block diagrams may represent a module, a program segment, or a portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.

In this patent, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.

Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

完整详细技术资料下载
上一篇:石墨接头机器人自动装卡簧、装栓机
下一篇:基于Sentinel-2卫星影像和云平台的滨海养殖池智能提取方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!