CN119027923A - A driver attention monitoring method and system based on artificial intelligence - Google Patents
A driver attention monitoring method and system based on artificial intelligence Download PDFInfo
- Publication number
- CN119027923A CN119027923A CN202411482971.4A CN202411482971A CN119027923A CN 119027923 A CN119027923 A CN 119027923A CN 202411482971 A CN202411482971 A CN 202411482971A CN 119027923 A CN119027923 A CN 119027923A
- Authority
- CN
- China
- Prior art keywords
- driver
- image
- angle
- eye
- mouth
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000012544 monitoring process Methods 0.000 title claims abstract description 51
- 238000000034 method Methods 0.000 title claims abstract description 48
- 238000013473 artificial intelligence Methods 0.000 title claims abstract description 21
- 238000012706 support-vector machine Methods 0.000 claims abstract description 15
- 238000013145 classification model Methods 0.000 claims abstract description 13
- 210000003128 head Anatomy 0.000 claims description 49
- 230000001815 facial effect Effects 0.000 claims description 28
- 238000004364 calculation method Methods 0.000 claims description 24
- 238000012549 training Methods 0.000 claims description 21
- 238000003708 edge detection Methods 0.000 claims description 20
- 239000013598 vector Substances 0.000 claims description 18
- 230000006403 short-term memory Effects 0.000 claims description 16
- 230000006870 function Effects 0.000 claims description 9
- 238000000605 extraction Methods 0.000 claims description 8
- 230000008569 process Effects 0.000 claims description 8
- 238000013507 mapping Methods 0.000 claims description 6
- 238000001514 detection method Methods 0.000 claims description 4
- 238000012935 Averaging Methods 0.000 claims description 3
- 230000004913 activation Effects 0.000 claims description 3
- 238000011478 gradient descent method Methods 0.000 claims description 3
- 239000000284 extract Substances 0.000 claims 4
- 230000015654 memory Effects 0.000 abstract description 36
- 238000005096 rolling process Methods 0.000 abstract description 17
- 230000008859 change Effects 0.000 abstract description 8
- 230000006399 behavior Effects 0.000 abstract description 6
- 238000012545 processing Methods 0.000 description 6
- 238000004458 analytical method Methods 0.000 description 5
- 238000005516 engineering process Methods 0.000 description 3
- 230000008901 benefit Effects 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 238000002372 labelling Methods 0.000 description 2
- 230000007787 long-term memory Effects 0.000 description 2
- 206010039203 Road traffic accident Diseases 0.000 description 1
- 230000004075 alteration Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000013136 deep learning model Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000008921 facial expression Effects 0.000 description 1
- 230000004886 head movement Effects 0.000 description 1
- 238000005286 illumination Methods 0.000 description 1
- 238000010191 image analysis Methods 0.000 description 1
- 238000010801 machine learning Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000002085 persistent effect Effects 0.000 description 1
- 238000011160 research Methods 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 238000012731 temporal analysis Methods 0.000 description 1
- 238000000700 time series analysis Methods 0.000 description 1
Landscapes
- Image Analysis (AREA)
Abstract
The invention discloses a driver attention monitoring method and system based on artificial intelligence, wherein the method comprises the following steps: extracting a direction histogram characteristic of the front image of the driver and classifying the front image of the driver by a support vector machine to obtain a face area image of the driver; detecting an eye region and a mouth region in a face region image of a driver, and outputting center position coordinates of a left eye, a right eye and a mouth; calculating a horizontal rotation angle, a pitching angle and a rolling angle of the head of the driver according to the central position coordinates; constructing an attention area classification model based on the horizontal rotation angle, the pitching angle and the rolling angle of the head of the driver to obtain an attention area of the driver; the horizontal rotation angle, the pitching angle, the rolling angle and the attention area of the head of the driver are processed by using the artificial intelligent driven long-short-time memory network, the distraction is monitored, and the monitoring result is output. The invention can more accurately identify the distraction behavior by analyzing the continuous change of the head gesture of the driver.
Description
Technical Field
The invention relates to the technical field of driving safety, in particular to a driver attention monitoring method and system based on artificial intelligence.
Background
Along with the rapid development of intelligent driving technology and the continuous increase of the quantity of automobile conservation, the driver state monitoring technology has important significance in improving driving safety and reducing the occurrence rate of traffic accidents, and particularly in long-time driving and complex road environments, potential dangerous behaviors can be timely found and early-warned through real-time monitoring of the attention of a driver, so that driving safety is ensured.
Currently, a common driver attention monitoring method mainly relies on continuous shooting of facial expressions or eye states of a driver by a camera, and analysis of shot data is performed by using a rule-based or traditional machine learning method. However, most monitoring methods are based on static images, and only the attention state of the driver at a certain moment can be detected, but the attention change of the driver in a time sequence is not involved, misjudgment or missed judgment is easy to occur, and the problem of persistent distraction cannot be accurately identified.
In addition, many existing monitoring methods only focus on the facial or eye area of the driver, and the external appearance features are various when the driver is not focused, so that more information needs to be introduced to improve the accuracy of the monitoring result. For example, the posture change information of the head of the driver, including but not limited to, horizontal rotation, pitch, roll, etc., can provide an important basis for determining whether the driver is focused.
Therefore, establishing a set of monitoring methods capable of identifying the attention state of the driver more accurately is one of the important research points in the current intelligent driving field.
Disclosure of Invention
In view of the above, the present invention provides an artificial intelligence-based driver attention monitoring method and system, aiming to more accurately recognize distraction by analyzing continuous changes in driver head pose.
In order to achieve the above object, the invention discloses a driver attention monitoring method based on artificial intelligence, which comprises the following steps:
s1: extracting a direction histogram characteristic of the collected front image of the driver and classifying the collected front image of the driver by a support vector machine to obtain circumscribed rectangular coordinates of a face area of the driver, and obtaining an image of the face area of the driver according to the circumscribed rectangular coordinates;
s2: extracting a face outline in a face area image of a driver through edge detection, positioning and detecting an eye area and a mouth area in the face area image of the driver by using a template matching algorithm, and outputting central position coordinates of a left eye, a right eye and a mouth;
S3: calculating the horizontal rotation angle, the pitching angle and the side tilting angle of the head of the driver by utilizing the geometric relationship according to the central position coordinates of the left eye, the right eye and the mouth;
s4: constructing an attention area classification model based on the horizontal rotation angle, the pitching angle and the rolling angle of the head of the driver to obtain an attention area of the driver; comprising the following steps:
constructing an attention area classification model, and obtaining the attention area of the driver, wherein the attention area classification model maps the horizontal rotation angle, the pitching angle and the rolling angle of the head of the driver to different attention areas respectively The mapping formula is as follows:;
in the formula, AndFront area thresholds for the horizontal rotation angle and the pitch angle, respectively; Is a lateral gaze threshold; is the lower gaze threshold; Is the upper gaze threshold; the attention areas are respectively represented as front, left, right, lower, upper and other areas;
s5: the horizontal rotation angle, the pitching angle and the rolling angle of the head of the driver and the attention area of the driver are processed by using the artificial intelligent driven long-short-time memory network, the distraction is monitored, and the monitoring result is output.
Preferably, the step S1 includes the steps of:
s11: extracting the direction histogram characteristics of the collected front image of the driver:
for the acquired front image of the driver Calculating the horizontal gradient of each pixelAnd a vertical gradient;
Based on horizontal gradientsAnd a vertical gradientCalculating gradient magnitudeAnd gradient angleThe calculation formula is as follows:
;
;
in the formula, Is the pixel location; And Respectively, front images of driversAt the pixel positionA gradient value of a gradient in the horizontal direction and a gradient value of a gradient in the vertical direction; is the amplitude of the gradient At the pixel positionGradient magnitude at; is the gradient angle At the pixel positionAngle value at the gradient angle represents the angle of the gradient direction relative to the horizontal direction, ranging from;
Image the front of driverDividing into a plurality of non-overlapping image blocks, the size of the image blocks beingWithin each image block, the gradient angle of each pixel is calculatedIs assigned to a corresponding direction interval in which,For pixel locations in an image block, the direction interval will beThe angular range is divided intoA plurality of equally spaced directional intervals; when (when)After the distribution is completedCorresponding toThe direction histogram of each image block is obtained by summing, and the calculation formula is as follows:
;
in the formula, Is thatDimension vector, representing the firstDirection histogram of individual image blockValues of dimensions;, Is the total number of image blocks; ; Is the first A set of pixel locations contained in the image blocks; Is the first A plurality of direction intervals; is the gradient angle At the pixel positionAn angle value at; Judging Whether or not the value of (2) is at the firstIn the direction intervals, if yes, the direction interval is 1, otherwise, the direction interval is 0; is the amplitude of the gradient At the pixel positionGradient magnitude at;
S12: facial region classification using support vectors:
Inputting the direction histogram feature of each image block into a pre-trained support vector machine, wherein the support vector machine is used for classifying the face area of the corresponding image block, and if the image block is classified as the face area, recording the pixel position of the upper left corner and the pixel position of the lower right corner of the image block;
After finishing the face region classification of all the image blocks, selecting a pixel position with the minimum horizontal direction coordinate and the minimum vertical direction coordinate as the upper left corner coordinate of the circumscribed rectangle of the face region of the driver, and selecting a pixel position with the maximum horizontal direction coordinate and the maximum vertical direction coordinate as the lower right corner coordinate of the circumscribed rectangle of the face region of the driver in all the image blocks classified as the face region;
Clipping the driver front image based on the upper left and lower right coordinates of the driver's face region An image of the driver's face area is obtained.
Preferably, the step S2 includes the steps of:
S21: and (3) carrying out Canny edge detection:
Extracting an edge image of the driver face region image obtained in the step S1 by applying a Canny edge detection algorithm Namely, the facial outline;
S22: detecting an eye area by using an eye shape template, and outputting center position coordinates of a left eye and a right eye in an edge image;
s23: and detecting a mouth region by using a mouth shape template, and outputting the central position coordinate of the mouth in the edge image.
Further preferably, the step S22 includes the steps of:
S221: eye shape template matching:
Matching by using an eye shape template, wherein the eye shape template is an image obtained by averaging a pre-collected image of the left eye and the right eye of a driver after being processed by a Canny edge detection algorithm, and the edge image is calculated by a sliding window method Each pixel position of (a)Eye match score of (2)The calculation formula is as follows:
;
in the formula, Is thatThe elements of the set are selected to be,Form for eyesA set of pixel locations contained in the image; Is an edge image At the pixel positionPixel values at; form for eyes At the pixel positionPixel values at;
s222: determining an eye area:
by maximizing edge images Eye matching score in top left quarter image block range, edge image is determinedCenter position coordinates of middle left eye; By maximizing edge imagesEye matching score in upper right quarter image block range, and edge image is determinedCenter position coordinates of middle right eye。
Further preferably, the step S23 includes the steps of:
S231: mouth shape template matching:
matching is carried out by using a mouth shape template, wherein the mouth shape template is an image obtained by processing a pre-collected driver mouth image through a Canny edge detection algorithm, and an edge image is calculated by a sliding window method Each pixel position of (a)Mouth match score of (a)The calculation formula is as follows:
;
in the formula, Is thatThe elements of the set are selected to be,Template with mouth shapeA set of pixel locations contained in the image; Is an edge image At the pixel positionPixel values at; Template with mouth shape At the pixel positionPixel values at;
S232: determining a mouth area:
by maximizing edge images Mouth matching score in the range of one-half image block below, and determining edge imageCenter position coordinates of middle mouth。
Preferably, the step S3 includes the steps of:
s31: calculating a horizontal rotation angle:
Calculating the horizontal rotation angle of the head of the driver according to the positions of the left eye and the right eye in the horizontal direction The calculation formula is as follows:
;
in the formula, A focal length of a camera for taking a front image of the driver;
s32: calculating a pitching angle:
calculating the pitching angle of the head of the driver according to the positions of the eyes and the mouth in the vertical direction The calculation formula is as follows:
;
s33: calculating the roll angle:
calculating the roll angle of the head of the driver based on the vertical and horizontal positions of the eyes The calculation formula is as follows:
。
preferably, the step S5 includes the steps of:
s51: constructing an input sequence of a long-short-time memory network:
Using the horizontal rotation angle, pitch angle and roll angle of the head of the driver obtained in step S3 and the attention area obtained in step S4 as input data of a long-short time memory network, the input feature vector of each time step of the long-short time memory network is The eigenvector formula is as follows:
;
in the formula, For the time steps, each time step will take a front image of the driver,AndRespectively the firstThe horizontal rotation angle, the pitching angle, the rolling angle and the attention area corresponding to the front images of the driver shot in each time step;
Length-based memory network The feature vector sequence contained in the time window of (2) is taken as input, the feature vector sequence formula is as follows:
;
in the formula, Is the firstA sequence of input feature vectors for each time step;
S52: building a long-time and short-time memory network:
Will be After being input into a long-short-time memory network, the obtained output is in a hidden stateAnd conceal the state through a full connection layer and activation functionMapping into two classification outputs;
S53: training long and short term memory network:
training a long-time memory network by using a two-class cross entropy loss function, wherein a training formula is as follows:
;
in the formula, The number of training samples;; Is the first Training sample at the firstThe real labels of the time steps are 1 or 0, wherein 1 represents distraction, 0 represents concentration and is obtained by manual labeling; output of the network for long-short time memory Training sample at the firstA driver distraction probability for each time step;
Training parameters of a long-short-time memory network by using a random gradient descent method to minimize a loss function, so as to obtain a trained long-short-time memory network;
S54: long and short time memory network with training completion:
Judging real-time data by using a trained long and short time memory network, and outputting each time step If it is determined that the attention is distracted over a plurality of consecutive time steps, it is determined that the driver is currently in a distracted state.
The invention also discloses a driver attention monitoring system based on artificial intelligence, which comprises:
face region extraction module: extracting a direction histogram characteristic of the collected front image of the driver and classifying the collected front image of the driver by a support vector machine to obtain circumscribed rectangular coordinates of a face area of the driver, and obtaining an image of the face area of the driver according to the circumscribed rectangular coordinates;
The eye and mouth positioning and monitoring module: extracting a face outline in a face area image of a driver through edge detection, positioning and detecting an eye area and a mouth area in the face area image of the driver by using a template matching algorithm, and outputting central position coordinates of a left eye, a right eye and a mouth;
A head pose estimation module: calculating the horizontal rotation angle, the pitching angle and the side tilting angle of the head of the driver by utilizing the geometric relationship according to the central position coordinates of the left eye, the right eye and the mouth;
Attention area extraction module: constructing an attention area classification model based on the horizontal rotation angle, the pitching angle and the rolling angle of the head of the driver to obtain an attention area of the driver;
And a monitoring and judging module: the method comprises the steps of processing a horizontal rotation angle, a pitching angle and a rolling angle of a head of a driver and an attention area of the driver by using an artificial intelligent driven long-short-time memory network, monitoring distraction, and outputting a monitoring result;
The driver attention monitoring method based on artificial intelligence is realized through the system.
The beneficial effects are that:
According to the invention, by combining with a plurality of advanced image processing technologies such as direction histogram feature extraction, support vector machine classification, template matching and the like, the facial features of the driver can be accurately extracted, the eyes and mouth areas can be accurately identified, and on the basis, the head posture change condition of the driver can be further obtained by calculating the geometric relationship, so that the system can not only identify whether the driver looks ahead, but also judge the distraction state of the driver by analyzing the rotation angle, the pitching angle and the side tilting angle of the head, and the multidimensional analysis greatly improves the attention monitoring precision of the driver and reduces misjudgment.
According to the invention, the time sequence information-based deep analysis is performed by utilizing the artificial intelligent driven long-short-time memory network, so that not only is the state of the driver at a single moment judged, but also the change of the head gesture and the attention area of the driver in a period of time is continuously analyzed, the change of the attention of the driver in a time sequence is captured, and the continuous distraction behavior is accurately identified, thereby effectively reducing false alarm caused by single-frame image analysis and improving the monitoring effect of the system in long-time driving.
According to the invention, through multidimensional analysis of the head gesture of the driver, false alarm caused by natural head movement or simple gesture adjustment of the driver is effectively avoided, and in addition, short non-attention-dispersing behaviors such as rearview mirrors or side-looking traffic conditions can be identified by using time series analysis based on long and short time memories, so that the system is prevented from being excessively sensitive; the method can still keep a stable monitoring effect under the complex illumination condition and under the condition of certain shielding, so that the driver monitoring system is more practical and reliable in practical application and is suitable for complex driving environments.
Drawings
Fig. 1 is a flow chart of a driver attention monitoring method based on artificial intelligence in embodiment 1 of the invention.
Detailed Description
The invention is further described below with reference to the accompanying drawings, without limiting the invention in any way, and any alterations or substitutions based on the teachings of the invention are intended to fall within the scope of the invention.
Example 1
As shown in fig. 1, a driver attention monitoring method based on artificial intelligence includes the following steps:
S1: extracting direction histogram features of the collected front face image of the driver and classifying the collected front face image of the driver by a support vector machine to obtain circumscribed rectangular coordinates of a face area of the driver, and obtaining an image of the face area of the driver according to the circumscribed rectangular coordinates:
s11: extracting the direction histogram characteristics of the collected front image of the driver:
for the acquired front image of the driver Calculating the horizontal gradient of each pixelAnd a vertical gradientThe calculation formula is as follows:
;
;
in the formula, For the pixel location(s),AndRespectively a horizontal direction coordinate and a vertical direction coordinate of the pixel position; And Respectively, front images of driversAt the pixel positionA gradient value of a gradient in the horizontal direction and a gradient value of a gradient in the vertical direction;、、 And Respectively, front images of driversAt the pixel position、、AndPixel values at;
based on horizontal gradients And a vertical gradientCalculating gradient magnitudeAnd gradient angleThe calculation formula is as follows:
;
;
in the formula, Is the amplitude of the gradientAt the pixel positionGradient magnitude at; is the gradient angle At the pixel positionAngle value at the gradient angle represents the angle of the gradient direction relative to the horizontal direction, ranging fromIgnoring the direction;
image the front of driver Dividing into a plurality of non-overlapping image blocks, the size of the image blocks beingWithin each image block, the gradient angle of each pixel is calculatedIs assigned to a corresponding direction interval in which,For pixel locations in an image block, the direction interval will beThe angular range is divided intoA plurality of equally spaced directional intervals; when (when)After the distribution is completedCorresponding toThe direction histogram of each image block is obtained by summing, and the calculation formula is as follows:
;
in the formula, Is thatDimension vector, representing the firstDirection histogram of individual image blockValues of dimensions;, Is the total number of image blocks; ; Is the first A set of pixel locations contained in the image blocks; Is the first A plurality of direction intervals; is the gradient angle At the pixel positionAn angle value at; Judging Whether or not the value of (2) is at the firstIn the direction intervals, if yes, the direction interval is 1, otherwise, the direction interval is 0; is the amplitude of the gradient At the pixel positionGradient magnitude at;
S12: facial region classification using support vectors:
Inputting the direction histogram feature of each image block into a pre-trained support vector machine, wherein the support vector machine is used for classifying the face area of the corresponding image block, and if the image block is classified as the face area, recording the pixel position of the upper left corner and the pixel position of the lower right corner of the image block;
After finishing the face region classification of all the image blocks, selecting a pixel position with the minimum horizontal direction coordinate and the minimum vertical direction coordinate as the upper left corner coordinate of the circumscribed rectangle of the face region of the driver, and selecting a pixel position with the maximum horizontal direction coordinate and the maximum vertical direction coordinate as the lower right corner coordinate of the circumscribed rectangle of the face region of the driver in all the image blocks classified as the face region;
Clipping the driver front image based on the upper left and lower right coordinates of the driver's face region An image of the driver's face area is obtained.
The direction histogram features can capture local gradient directions and edge information in the image, are particularly suitable for target detection of a face and the like with obvious edge structures, and can further improve the accuracy and the robustness of face region detection by combining the classification capability of a support vector machine; therefore, in step S1, the face region can be effectively and accurately identified from the front image of the driver by combining the direction histogram feature extraction with the support vector machine classification.
S2: extracting a face outline in a face area image of a driver through edge detection, positioning and detecting an eye area and a mouth area in the face area image of the driver by using a template matching algorithm, and outputting central position coordinates of a left eye, a right eye and the mouth:
S21: and (3) carrying out Canny edge detection:
Extracting an edge image of the driver face region image obtained in the step S1 by applying a Canny edge detection algorithm Namely, the facial outline;
S22: detecting an eye area by using an eye shape template, and outputting center position coordinates of a left eye and a right eye in an edge image;
S221: eye shape template matching:
Matching by using an eye shape template, wherein the eye shape template is an image obtained by averaging a pre-collected image of the left eye and the right eye of a driver after being processed by a Canny edge detection algorithm, and the edge image is calculated by a sliding window method Each pixel position of (a)Eye match score of (2)The calculation formula is as follows:
;
in the formula, Is thatThe elements of the set are selected to be,Form for eyesA set of pixel locations contained in the image; And Eye shape templates respectivelyA horizontal direction coordinate and a vertical direction coordinate of the middle pixel position; Is an edge image At the pixel positionPixel values at; form for eyes At the pixel positionPixel values at;
s222: determining an eye area:
by maximizing edge images Eye matching score in top left quarter image block range, edge image is determinedCenter position coordinates of middle left eye; By maximizing edge imagesEye matching score in upper right quarter image block range, and edge image is determinedCenter position coordinates of middle right eye。
S23: detecting a mouth region by using a mouth shape template, and outputting center position coordinates of a mouth in an edge image:
S231: mouth shape template matching:
matching is carried out by using a mouth shape template, wherein the mouth shape template is an image obtained by processing a pre-collected driver mouth image through a Canny edge detection algorithm, and an edge image is calculated by a sliding window method Each pixel position of (a)Mouth match score of (a)The calculation formula is as follows:
;
in the formula, Is thatThe elements of the set are selected to be,Template with mouth shapeA set of pixel locations contained in the image,AndRespectively mouth-shaped templatesA horizontal direction coordinate and a vertical direction coordinate of the middle pixel position; Is an edge image At the pixel positionPixel values at; Template with mouth shape At the pixel positionPixel values at;
S232: determining a mouth area:
by maximizing edge images Mouth matching score in the range of one-half image block below, and determining edge imageCenter position coordinates of middle mouth。
The Canny edge detection is very sensitive to edge changes in the image, edge contour information of the face of the driver can be effectively extracted, the central positions of eyes and the mouth can be accurately positioned by means of prior information through template matching, the accurate positioning of key features of the face is ensured, and the possibility of false detection is reduced; therefore, step S2, by combining Canny edge detection with template matching, can accurately identify the eyes and mouth, which are key areas in the driver' S face image.
S3: calculating the horizontal rotation angle, the pitching angle and the side tilting angle of the head of the driver by using the geometrical relationship according to the central position coordinates of the left eye, the right eye and the mouth:
s31: calculating a horizontal rotation angle:
Calculating the horizontal rotation angle of the head of the driver according to the positions of the left eye and the right eye in the horizontal direction The calculation formula is as follows:
;
in the formula, A focal length of a camera for taking a front image of the driver;
s32: calculating a pitching angle:
calculating the pitching angle of the head of the driver according to the positions of the eyes and the mouth in the vertical direction The calculation formula is as follows:
;
s33: calculating the roll angle:
calculating the roll angle of the head of the driver based on the vertical and horizontal positions of the eyes The calculation formula is as follows:
。
And step S3, the horizontal rotation angle, the pitching angle and the rolling angle of the head are calculated based on the geometric relation between the left eye, the right eye and the mouth, so that a complex three-dimensional reconstruction or deep learning model is avoided, the head posture of the driver can be judged in real time with lower calculation complexity, and the method is suitable for a driver monitoring system with high real-time requirements.
S4: constructing an attention area classification model based on the horizontal rotation angle, the pitching angle and the rolling angle of the head of the driver to obtain the attention area of the driver:
constructing an attention area classification model, and obtaining the attention area of the driver, wherein the attention area classification model maps the horizontal rotation angle, the pitching angle and the rolling angle of the head of the driver to different attention areas respectively The mapping formula is as follows:;
in the formula, AndThe front area threshold values of the horizontal rotation angle and the pitch angle are respectively, in this embodiment;The lateral gaze threshold, in this embodiment;For the lower gaze threshold, in this embodiment;For the upper gaze threshold, in this embodiment;The attention areas are respectively represented as front, left, right, lower, upper and other areas.
And S4, deducing the attention area by combining the horizontal rotation, pitching and rolling gesture changes of the head of the driver, wherein compared with the analysis of a single angle, the method can effectively capture the complex head gesture changes based on multiple dimensions, avoid missing or misjudging the attention state of the driver, and can quickly calculate and output the attention area of the driver due to the fact that the method mainly depends on the geometric calculation of the head angle, thereby being very suitable for being applied to a real-time driving monitoring system.
S5: the horizontal rotation angle, the pitching angle and the rolling angle of the head of the driver and the attention area of the driver are processed by using the artificial intelligent driven long-short-time memory network, the distraction is monitored, and the monitoring result is output:
s51: constructing an input sequence of a long-short-time memory network:
Using the horizontal rotation angle, pitch angle and roll angle of the head of the driver obtained in step S3 and the attention area obtained in step S4 as input data of a long-short time memory network, the input feature vector of each time step of the long-short time memory network is The eigenvector formula is as follows:
;
in the formula, For the time steps, each time step will take a front image of the driver,AndRespectively the firstThe horizontal rotation angle, the pitching angle, the rolling angle and the attention area corresponding to the front images of the driver shot in each time step;
Length-based memory network The feature vector sequence contained in the time window of (2) is taken as input, the feature vector sequence formula is as follows:
;
in the formula, Is the firstA sequence of input feature vectors for each time step;
S52: building a long-time and short-time memory network:
Will be After being input into a long-short-time memory network, the obtained output is in a hidden stateAnd conceal the state through a full connection layer and activation functionMapping into two kinds of output, the mapping formula is as follows:
;
;
in the formula, In this embodiment, a long-short-time memory network with a layer number of 3 is used, and the dimension of the hidden state is 128; And The weight and the bias value of the full connection layer are respectively; to activate the function, a sigmoid function is used in this embodiment; Is the first A driver distraction probability for each time step;
S53: training long and short term memory network:
training a long-time memory network by using a two-class cross entropy loss function, wherein a training formula is as follows:
;
in the formula, The number of training samples;; Is the first Training sample at the firstThe real labels of the time steps are 1 or 0, wherein 1 represents distraction, 0 represents concentration and is obtained by manual labeling; output of the network for long-short time memory Training sample at the firstA driver distraction probability for each time step;
Training parameters of a long-short-time memory network by using a random gradient descent method to minimize a loss function, so as to obtain a trained long-short-time memory network;
S54: long and short time memory network with training completion:
Judging real-time data by using a trained long and short time memory network, and outputting each time step If it is determined that the attention is distracted in a plurality of consecutive time steps, it is determined that the driver is currently in a distraction state; in this embodiment, the determination of the attention situation over 5 consecutive time steps is used.
The long-short-time memory network can process the data of the head gesture and the attention area of the driver in real time and generate a real-time judgment result of the attention state of the driver; the long-short-term memory network has the advantage that the long-short-term memory network can memorize past input data and make current judgment by utilizing the information, and is particularly suitable for processing time series data, so that the system can not only identify the attention state under a single frame image, but also identify the attention change in a continuous time period, and particularly identify more accurately aiming at short distraction behaviors and continuous distraction behaviors. Therefore, in the step S5, the time sequence information of the head gesture and the attention area of the driver is processed by using a long-short-time memory network, and the state change of the driver in the driving process is effectively captured by continuous time step monitoring, so that the dynamic attention state monitoring of the driver is realized.
Example 2
An artificial intelligence based driver attention monitoring system comprising the following five modules:
face region extraction module: extracting a direction histogram characteristic of the collected front image of the driver and classifying the collected front image of the driver by a support vector machine to obtain circumscribed rectangular coordinates of a face area of the driver, and obtaining an image of the face area of the driver according to the circumscribed rectangular coordinates;
The eye and mouth positioning and monitoring module: extracting a face outline in a face area image of a driver through edge detection, positioning and detecting an eye area and a mouth area in the face area image of the driver by using a template matching algorithm, and outputting central position coordinates of a left eye, a right eye and a mouth;
A head pose estimation module: calculating the horizontal rotation angle, the pitching angle and the side tilting angle of the head of the driver by utilizing the geometric relationship according to the central position coordinates of the left eye, the right eye and the mouth;
Attention area extraction module: constructing an attention area classification model based on the horizontal rotation angle, the pitching angle and the rolling angle of the head of the driver to obtain an attention area of the driver;
And a monitoring and judging module: the method comprises the steps of processing a horizontal rotation angle, a pitching angle and a rolling angle of a head of a driver and an attention area of the driver by using an artificial intelligent driven long-short-time memory network, monitoring distraction, and outputting a monitoring result;
The driver's attention monitoring method based on artificial intelligence in embodiment 1 is implemented by this system.
It should be noted that, the foregoing reference numerals of the embodiments of the present invention are merely for describing the embodiments, and do not represent the advantages and disadvantages of the embodiments. And the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, apparatus, article, or method 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, apparatus, article, or method. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, apparatus, article, or method that comprises the element.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) as described above, comprising instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method according to the embodiments of the present invention.
The foregoing description is only of the preferred embodiments of the present invention, and is not intended to limit the scope of the invention, but rather is intended to cover any equivalents of the structures or equivalent processes disclosed herein or in the alternative, which may be employed directly or indirectly in other related arts.
Claims (8)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202411482971.4A CN119027923B (en) | 2024-10-23 | 2024-10-23 | Driver attention monitoring method and system based on artificial intelligence |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202411482971.4A CN119027923B (en) | 2024-10-23 | 2024-10-23 | Driver attention monitoring method and system based on artificial intelligence |
Publications (2)
Publication Number | Publication Date |
---|---|
CN119027923A true CN119027923A (en) | 2024-11-26 |
CN119027923B CN119027923B (en) | 2024-12-24 |
Family
ID=93539425
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202411482971.4A Active CN119027923B (en) | 2024-10-23 | 2024-10-23 | Driver attention monitoring method and system based on artificial intelligence |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN119027923B (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20160129788A1 (en) * | 2014-11-11 | 2016-05-12 | Connaught Electronics Ltd. | Method for presenting safety information, driver assistance system and motor vehicle |
CN109770925A (en) * | 2019-02-03 | 2019-05-21 | 闽江学院 | A fatigue detection method based on deep spatiotemporal network |
CN112016472A (en) * | 2020-08-31 | 2020-12-01 | 山东大学 | Driver attention area prediction method and system based on target dynamic information |
-
2024
- 2024-10-23 CN CN202411482971.4A patent/CN119027923B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20160129788A1 (en) * | 2014-11-11 | 2016-05-12 | Connaught Electronics Ltd. | Method for presenting safety information, driver assistance system and motor vehicle |
CN109770925A (en) * | 2019-02-03 | 2019-05-21 | 闽江学院 | A fatigue detection method based on deep spatiotemporal network |
CN112016472A (en) * | 2020-08-31 | 2020-12-01 | 山东大学 | Driver attention area prediction method and system based on target dynamic information |
Also Published As
Publication number | Publication date |
---|---|
CN119027923B (en) | 2024-12-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105023008B (en) | The pedestrian of view-based access control model conspicuousness and multiple features recognition methods again | |
Ogale | A survey of techniques for human detection from video | |
CN103971386B (en) | A kind of foreground detection method under dynamic background scene | |
US9607228B2 (en) | Parts based object tracking method and apparatus | |
US8447100B2 (en) | Detecting apparatus of human component and method thereof | |
US8855363B2 (en) | Efficient method for tracking people | |
CN110334600A (en) | A multi-feature fusion method for driver's abnormal expression recognition | |
CN108416348A (en) | Plate location recognition method based on support vector machines and convolutional neural networks | |
CN105740758A (en) | Internet video face recognition method based on deep learning | |
CN107239762A (en) | Patronage statistical method in a kind of bus of view-based access control model | |
CN107315998B (en) | Method and system for classifying vehicle types based on lane lines | |
CN103310194A (en) | Method for detecting head and shoulders of pedestrian in video based on overhead pixel gradient direction | |
CN106295549A (en) | Multi-orientation Face collecting method and device | |
WO2011119117A1 (en) | Facial gender recognition | |
CN106778637B (en) | Statistical method for man and woman passenger flow | |
Tao et al. | Smoke vehicle detection based on spatiotemporal bag-of-features and professional convolutional neural network | |
CN109508657B (en) | Crowd gathering analysis method, system, computer readable storage medium and device | |
CN108921064B (en) | Pedestrian re-identification method based on multi-feature fusion | |
Qing et al. | A novel particle filter implementation for a multiple-vehicle detection and tracking system using tail light segmentation | |
CN119027923B (en) | Driver attention monitoring method and system based on artificial intelligence | |
CN107886060A (en) | Pedestrian's automatic detection and tracking based on video | |
CN108985216B (en) | Pedestrian head detection method based on multivariate logistic regression feature fusion | |
CN117475353A (en) | Video-based abnormal smoke identification method and system | |
CN115661903B (en) | Picture identification method and device based on space mapping collaborative target filtering | |
CN111444875A (en) | Face tracking method, device, equipment and computer readable storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |