Driving user fatigue detection method and device, electronic equipment and storage medium
By generating a facial model and detecting based on overall facial features, the problem of poor detection of changes in key facial parts in the existing technology is solved, achieving more efficient recognition of the fatigue status of driving users, and improving detection accuracy and safety.
Patent Information
- Application Number
- CN202410821201.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-24
- Publication Date
- 2024-10-15
AI Technical Summary
When the existing technology detects the fatigue of a driving user, the detection effect is not good based on the degree of change of key parts of the face. Especially when the driving user's fatigue state is mild, it is difficult to accurately judge.
By acquiring the driving user's facial data after the vehicle is started, a facial model is generated, and fatigue status detection is performed based on the state of the facial model. The overall facial features are fully considered, rather than partial features of key parts of the face, to improve detection accuracy.
It improves the accuracy and efficiency of driver fatigue state detection, can more effectively identify the driver's fatigue state, and reduces the risk of traffic accidents caused by fatigue driving.
Smart Images

Figure CN118766458A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of vehicle driving technology, and in particular to a method, device, electronic equipment and storage medium for detecting driver fatigue. Background Art
[0002] Fatigue driving is an important factor in traffic accidents, accounting for more than 20% of all traffic accidents. Especially in highway traffic accidents, this proportion soars to nearly one-third. According to relevant data, the proportion of traffic accidents related to death caused by fatigue driving is as high as more than 20%, which clearly reveals its potential dangers. In addition, more than half of driving users admit that they have experienced fatigue driving, reflecting the widespread existence of fatigue driving. The above facts all emphasize the serious harm of fatigue driving and its widespread occurrence.
[0003] The prior art generally detects the degree of change of key facial parts of a driver, and detects whether the driver is in a fatigue state based on the degree of change of key facial parts.
[0004] However, in actual use, it is found that when the driver is driving fatigued, the change degree of the key parts is small. In this case, the method of judging the fatigue state of the driver based on the change degree of the key parts of the driver is not effective. Summary of the invention
[0005] The present invention provides a driver fatigue detection method, device, electronic equipment and storage medium, which improve the detection effect of driver fatigue state detection.
[0006] According to one aspect of the present invention, a method for detecting driver fatigue is provided, the method comprising:
[0007] After the current vehicle is started, acquiring startup facial data of the current driving user, and generating a current driving user facial model according to the startup facial data of the current driving user;
[0008] Acquire current facial data of the current driving user, and determine a current facial state of the current driving user facial model according to the current facial data;
[0009] According to the current facial state of the current driving user's facial model, a fatigue state detection is performed on the current driving user to obtain a current fatigue state detection result of the current driving user.
[0010] According to another aspect of the present invention, a driving user fatigue detection device is provided, the device comprising:
[0011] A current driving user facial model generation module is used to obtain startup facial data of the current driving user after the vehicle is started, and generate a current driving user facial model based on the startup facial data of the current driving user;
[0012] A current facial state detection module, used to obtain current facial data of the current driving user, and determine the current facial state of the current driving user's facial model based on the current facial data;
[0013] The current fatigue state detection module is used to perform fatigue state detection on the current driving user according to the current facial state of the current driving user facial model to obtain the current fatigue state detection result of the current driving user.
[0014] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0015] at least one processor; and
[0016] a memory communicatively connected to the at least one processor; wherein,
[0017] The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the driving user fatigue detection method described in any embodiment of the present invention.
[0018] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the driving user fatigue detection method described in any embodiment of the present invention when executed.
[0019] According to another aspect of the present invention, a computer program product is provided. The computer program product includes a computer program. When the computer program is executed by a processor, the driving user fatigue detection method described in any embodiment of the present invention is implemented.
[0020] The technical solution of the embodiment of the present invention is to obtain the startup facial data of the current driving user after the current vehicle is started, generate the current driving user facial model according to the startup facial data of the current driving user, obtain the current facial data of the current driving user, and determine the current facial state of the current driving user facial model according to the current facial data, perform fatigue state detection on the current driving user according to the current facial state of the current driving user facial model, and obtain the current fatigue state detection result of the current driving user. Compared with detecting the degree of change of the key facial parts of the driving user, detecting the current facial state of the current driving user facial model and detecting the driving user fatigue state based on the current facial state comprehensively considers the overall facial features of the driving user rather than partial features of the key facial parts. The data based on which the driving user fatigue state detection is detected is more comprehensive and the detection accuracy is higher.
[0021] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0023] Figure 1 is a flow chart of a method for detecting driver fatigue according to Embodiment 1 of the present invention;
[0024] Figure 2 is a flow chart of a method for detecting driver fatigue provided according to Embodiment 2 of the present invention;
[0025] Figure 3 is a schematic diagram of a method for detecting driver fatigue according to Embodiment 2 of the present invention;
[0026] Figure 4 is a schematic diagram of a method for detecting driver fatigue according to Embodiment 2 of the present invention;
[0027] Figure 5 is a structural schematic diagram of a driving user fatigue detection device provided according to Embodiment 3 of the present invention;
[0028] Figure 6 It is a structural schematic diagram of an electronic device for implementing the driving user fatigue detection method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0029] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0030] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0031] Embodiment 1
[0032] Figure 1 A flowchart of a method for detecting driver fatigue provided in Embodiment 1 of the present invention. The embodiment of the present invention is applicable to the case where driver fatigue is detected during vehicle driving. The method can be performed by a driver fatigue detection device, which can be implemented in the form of hardware and / or software. The driver fatigue detection device can be configured in an electronic device that carries the driver fatigue detection function, such as a vehicle-mounted terminal or a server.
[0033] See also Figure 1 The method for detecting driver fatigue includes:
[0034] S110. After the current vehicle is started, the startup facial data of the current driving user is obtained, and a facial model of the current driving user is generated according to the startup facial data of the current driving user.
[0035] The current vehicle may be the vehicle being driven at the current moment. The current driving user may be the driving user who is driving the current vehicle at the current moment. The startup facial data may be the facial data of the current driving user detected after the current vehicle is started. Exemplarily, the startup facial data may be a facial image, a depth image or point cloud data of the current driving user. Among them, the facial image of the current driving user may be detected by a DMS (Driver Monitoring System Camera) installed in the vehicle. The current driving user facial model may be used to characterize the overall facial condition of the current driving user. The current driving user facial model may be used to assist in detecting the fatigue state of the current driving user. There is a one-to-one correspondence between the current driving user facial model and the current driving user. It can be understood that the same driving user uniquely corresponds to one driving user facial model. Optionally, the current driving user facial model may be a three-dimensional model.
[0036] Specifically, after the current vehicle is started, with the authorization of the driving user, the vehicle acquisition device can be used to obtain the startup facial data of the current driving user. The startup facial data of the current driving user can be processed by structured light stereo vision technology or 3D scanning technology to obtain the facial model of the current driving user. For example, structured light stereo vision technology simultaneously captures the startup facial data of the current driving user through multiple on-board cameras, calculates the corresponding depth information, and then integrates it into a three-dimensional model. The structured light system will emit a specific pattern, and the specific pattern captured by the on-board camera can be processed to obtain the facial surface shape of the current driving user, thereby obtaining the facial model of the current driving user. For another example, 3D scanning technology can use a 3D scanner to directly capture the point cloud data of the facial surface of the current driving user (i.e., the startup facial data of the current driving user), and then convert the point cloud data into the facial model of the current driving user through a software algorithm.
[0037] In an optional embodiment of the present invention, after the current vehicle is started, the startup facial data of the current driving user is obtained, and based on the startup facial data of the current driving user, a facial model of the current driving user is generated, including: after the current vehicle is started, the current speed of the current vehicle is detected; when the current speed reaches a preset detection speed, the startup facial data of the current driving user within a preset detection time period is obtained, and based on the startup facial data of the current driving user, a facial model of the current driving user is generated.
[0038] The current vehicle speed can be used to characterize the driving state of the current vehicle. If the current vehicle speed reaches the preset detection speed, that is, the current vehicle speed is greater than or equal to the preset detection speed, it can be understood that the current vehicle is in a driving state. If the current vehicle speed is less than the preset detection speed, it can be understood that the current vehicle is in a non-driving state, a starting state, or a stopping state. Among them, the preset detection speed can be the minimum speed when the current vehicle is in a driving state. The driving state can be used to characterize that the current vehicle is driving. The non-driving state can be used to characterize that the current vehicle is stopping. The starting state can be used to characterize that the current vehicle is starting and transitioning to the driving state. The stopping state can be used to characterize that the current vehicle is stopping and the current vehicle speed is gradually decreasing. The preset detection time period can be a preset time period for collecting the startup facial data of the current driving user. Exemplarily, the preset detection time period can be 3 minutes.
[0039] Specifically, after the current vehicle is started, a vehicle speed sensor may be used to detect the current speed of the current vehicle. The current speed may be compared with a preset detection speed, and when the current speed reaches the preset detection speed, the startup facial data of the current driving user within the preset detection time period is obtained, and the current driving user facial model is generated based on the startup facial data of the current driving user.
[0040] Before obtaining the startup facial data of the current driving user, this solution detects the current vehicle speed, thereby realizing the detection of the driving status of the current vehicle and avoiding the invalid acquisition of startup facial data when the current vehicle is not in a driving state, thereby saving the computing resources of the device and improving the effectiveness of the detection of the fatigue state of the driving user. In addition, by limiting the preset detection time period, the facial model of the current driving user can be quickly generated, thereby further improving the detection efficiency of the fatigue state of the driving user.
[0041] S120: Acquire current facial data of the current driving user, and determine a current facial state of the current driving user's facial model based on the current facial data.
[0042] The current facial data may be facial data of the current driving user detected at the current moment. The current facial state may be used to characterize the overall facial state of the current driving user at the current moment. The current facial state may be the current state of the facial model of the current driving user. Compared with detecting the degree of change of the key facial parts of the driving user, detecting the current facial state of the facial model of the current driving user and performing driving user fatigue state detection based on the current facial state comprehensively considers the overall facial features of the driving user rather than partial features of the key facial parts. The data used for the driving user fatigue state detection is more comprehensive and has a higher detection accuracy.
[0043] Specifically, with the authorization of the driving user, the vehicle acquisition device can be used to obtain the current facial data of the current driving user. The target detection algorithm can be used to detect the current facial data and determine the current facial state of the current driving user's facial model. Optionally, the current facial data can be input into a pre-trained current facial state detection model to output the current facial state. The training samples of the current facial state detection model include historical facial data and historical facial states. Exemplarily, the current facial data detection model can be a convolutional neural network model.
[0044] S130. Perform fatigue state detection on the current driving user according to the current facial state of the facial model of the current driving user to obtain a current fatigue state detection result of the current driving user.
[0045] The current fatigue state detection result can be used to characterize the fatigue state of the current driving user at the current moment. Exemplarily, the current fatigue state detection result can include a fatigue state or a normal state.
[0046] Specifically, the fatigue state of the current driving user can be detected by using a target detection algorithm according to the current facial state of the current driving user facial model, and the current fatigue state detection result of the current driving user can be obtained. Optionally, the current facial state of the current driving user facial model can be input into a pre-trained driving user state detection model to output the current fatigue state detection result of the current driving user.
[0047] The technical solution of the embodiment of the present invention is to obtain the startup facial data of the current driving user after the current vehicle is started, generate the current driving user facial model according to the startup facial data of the current driving user, obtain the current facial data of the current driving user, and determine the current facial state of the current driving user facial model according to the current facial data, perform fatigue state detection on the current driving user according to the current facial state of the current driving user facial model, and obtain the current fatigue state detection result of the current driving user. Compared with detecting the degree of change of the key facial parts of the driving user, detecting the current facial state of the current driving user facial model and detecting the driving user fatigue state based on the current facial state comprehensively considers the overall facial features of the driving user rather than partial features of the key facial parts. The data based on which the driving user fatigue state detection is detected is more comprehensive and the detection accuracy is higher.
[0048] In an optional embodiment of the present invention, the method also includes: after the current vehicle is turned off, storing the startup facial data and the current driving user facial model as the previous startup facial data and the previous driving user facial model; after the current vehicle is started again, obtaining the startup facial data of the current driving user; comparing the startup facial data of the current driving user with the previous startup facial data of the previous driving user to determine whether the current driving user is the previous driving user; when the current driving user is the previous driving user, determining the previous driving user facial model as the current driving user facial model.
[0049] The current vehicle is turned off, which can be understood as the current vehicle stops driving. The last startup facial data can be the startup facial data detected at the last historical moment representing the current moment. The last driving user facial model can be the driving user facial model generated at the last historical moment of the current moment. The last driving user can be the driving user of the current vehicle at the last historical moment of the current moment.
[0050] Specifically, after the current vehicle is turned off, the startup facial data and the facial model of the current driving user may be stored as the previous startup facial data and the facial model of the previous driving user. After the current vehicle is started again, with the authorization of the driving user, the startup facial data of the current driving user may be acquired using a vehicle acquisition device. The similarity between the startup facial data of the current driving user and the previous startup facial data of the previous driving user may be calculated, and when the similarity is greater than or equal to a preset similarity, it is determined that the current driving user is the previous driving user; when the similarity is less than a preset similarity, it is determined that the current driving user is not the previous driving user. When the current driving user is the previous driving user, the facial model of the previous driving user is determined as the facial model of the current driving user.
[0051] This solution stores the startup facial data and the current driving user's facial model as the previous startup facial data and the previous driving user's facial model after the current vehicle is turned off. After the current vehicle is started again, the startup facial data of the current driving user is compared with the previous startup facial data of the previous driving user. When the current driving user is the previous driving user, the previous driving user's facial model is determined as the current driving user's facial model. The previous driving user's facial model is utilized, the generation process of the current driving user's facial model is simplified, and the detection efficiency of the driving user's fatigue state detection is further improved.
[0052] Embodiment 2
[0053] Figure 2A flow chart of a method for detecting driving user fatigue provided in the second embodiment of the present invention. In addition to the above embodiments, the present embodiment of the present invention further specifies “generating a facial model of the current driving user based on the startup facial data of the current driving user” as “inputting the startup facial data of the current driving user into a pre-trained fatigue state detection model, and using the fatigue state detection model to fine-tune the initial facial model to obtain the facial model of the current driving user”, and specifies “determining the current facial state of the facial model of the current driving user based on the current facial data” as “inputting the current facial data of the current driving user into the fatigue state detection model, and outputting the current facial state of the facial model of the current driving user”, and specifies “performing fatigue state detection on the current driving user based on the current facial state of the facial model of the current driving user”. The present invention provides a method for detecting the current fatigue state of the current driving user by measuring the current facial state of the current driving user and obtaining the current fatigue state detection result of the current driving user. The method is embodied as follows: "the current facial state of the current driving user's facial model is input into the fatigue state detection model, and the current fatigue state detection result of the current driving user is output; wherein the training samples of the fatigue state detection model include historical facial data of at least one historical driving user, an actual facial model of the historical driving user, an actual historical facial state of the actual facial model of the historical driving user, and an actual result of the historical fatigue state". On the one hand, it saves the computing resources of the present device, and on the other hand, it can avoid the influence of the differences between different computing methods on the accuracy of the detection of the fatigue state of the driving user, and can improve the detection efficiency and accuracy of the detection of the fatigue state of the driving user. It should be noted that for the parts not described in detail in the embodiments of the present invention, reference can be made to the description of other embodiments.
[0054] See also Figure 2 The method for detecting driver fatigue includes:
[0055] S210. After the current vehicle is started, the startup facial data of the current driving user is obtained, and the startup facial data of the current driving user is input into a pre-trained fatigue state detection model, and the fatigue state detection model fine-tunes the initial facial model to obtain the facial model of the current driving user.
[0056] The fatigue state detection model can be used to generate a current driving user face model, determine the current face state of the current driving user face model, and detect the fatigue state of the current driving user. The training sample of the fatigue state detection model includes historical facial data of at least one historical driving user, an actual face model of the historical driving user, an actual face state of the actual face model of the historical driving user, and an actual result of the historical fatigue state. The historical driving user can be a driving user who drives a historical vehicle at a historical moment. The historical facial data can be facial data of the historical driving user detected at a historical moment. Exemplarily, the historical facial data can be a facial image, a depth image, or point cloud data of the historical driving user. The actual face model of the historical driving user can be used to characterize the actual state of the overall face of the historical driving user. The actual face model of the historical driving user can be used to correct the facial detection model of the historical driving user. The actual state of the historical face can be used to characterize the actual state of the overall face of the historical driving user at a historical moment. The actual state of the historical face can be the actual state of the historical driving user face model. The actual state of the historical face can be used to correct the historical facial detection state. The actual result of the historical fatigue state can be used to characterize the actual fatigue state of the historical driving user at a historical moment. Exemplarily, the historical fatigue state detection result can include a fatigue state or a normal state. The actual result of the historical fatigue state can be used to correct the historical fatigue state detection result. The initial facial model can be a facial model pre-stored in the fatigue state detection model. The initial facial model can be used as a reference model for the facial model of the current driving user. By fine-tuning the initial facial model to obtain the facial model of the current driving user, the generation efficiency of the facial model of the current driving user can be improved compared to regenerating the facial model of the current driving user each time.
[0057] Specifically, after the current vehicle is started, with the authorization of the driving user, the vehicle data acquisition equipment can be used to obtain the startup facial data of the current driving user, and the startup facial data of the current driving user is input into a pre-trained fatigue state detection model. The fatigue state detection model fine-tunes the initial facial model to obtain the current driving user facial model.
[0058] S220, obtaining current facial data of the current driving user, inputting the current facial data of the current driving user into a fatigue state detection model, and outputting the current facial state of the current driving user's facial model.
[0059] Specifically, with the authorization of the driving user, the vehicle collection equipment can be used to obtain the current facial data of the current driving user, and the current facial data of the current driving user can be input into the fatigue state detection model to output the current facial state of the current driving user's facial model.
[0060] S230: Input the current facial state of the current driving user's facial model into a fatigue state detection model, and output a current fatigue state detection result of the current driving user.
[0061] Specifically, the current facial state of the current driving user's facial model may be input into the fatigue state detection model, and the current fatigue state detection result of the current driving user may be output.
[0062] The technical solution of the embodiment of the present invention utilizes the same fatigue state detection model to realize the generation of the current driving user's facial model, the determination of the current facial state of the current driving user's facial model, and the detection of the current driving user's fatigue state. On the one hand, it saves the computing resources of the device, and on the other hand, it can avoid the influence of the differences between different computing methods on the accuracy of the driving user's fatigue state detection, thereby improving the detection efficiency and detection accuracy of the driving user's fatigue state detection.
[0063] In an optional embodiment of the present invention, before the startup facial data of the current driving user is input into a pre-trained fatigue state detection model, and the fatigue state detection model fine-tunes the initial facial model to obtain the facial model of the current driving user, it also includes: obtaining an initial deep learning model and training samples; wherein the training samples include historical facial data of at least one historical driving user, an actual facial model of the historical driving user, an actual historical facial state of the actual facial model of the historical driving user, and an actual result of a historical fatigue state; inputting the historical facial data of the historical driving user into the initial deep learning model, and outputting a facial detection model of the historical driving user; calculating a facial model loss value based on the actual facial model of the historical driving user and the facial detection model of the historical driving user, and adjusting the initial deep learning model based on the facial model loss value. The method comprises the following steps: obtaining the parameters of a deep learning model by adjusting the historical facial data of the historical driving user face detection model and obtaining a first deep learning model; inputting the historical facial data into the first deep learning model and outputting the historical facial detection status of the historical driving user face detection model; calculating the facial state loss value according to the historical facial detection status of the historical driving user face detection model and the historical facial actual status of the historical driving user face actual model, and adjusting the parameters of the first deep learning model according to the facial state loss value, and obtaining a second deep learning model; inputting the historical facial detection status of the historical driving user face detection model into the second deep learning model and outputting the historical fatigue state detection result; calculating the fatigue state loss value according to the historical fatigue state detection result and the historical fatigue state actual result, and adjusting the parameters of the second deep learning model according to the fatigue state loss value, and obtaining a fatigue state detection model.
[0064] The initial deep learning model may be an untrained initial deep learning model. The first deep learning model may be an initial deep learning model that has undergone the first parameter adjustment. The second deep learning model is a first deep learning model that has undergone the second parameter adjustment. The fatigue state detection model is a second deep learning model that has undergone the third parameter adjustment. In comparison, the first deep learning model adjusts parameters for the historical driving user face detection model. The second deep learning model adjusts parameters for the historical face detection state. The fatigue state detection model adjusts parameters for the historical fatigue state detection results. The historical driving user face detection model may be the detection result of the face model of the historical driving user. In comparison, the actual face model of the historical driving user is the true value; the face detection model of the historical driving user is the predicted value. The true value may be used to correct the predicted value, and then the parameters of the initial deep learning model are adjusted to obtain the first deep learning model. The historical face detection state may be the detection result of the face state of the historical driving user. In comparison, the actual face state of the historical driving user is the true value; the historical face detection state is the predicted value. The true value may be used to correct the predicted value, and then the parameters of the first deep learning model are adjusted to obtain the second deep learning model. The historical fatigue state detection result may be a detection result of the fatigue state of a historical driving user. In comparison, the actual result of the historical fatigue state is a true value; the historical fatigue state detection result is a predicted value. The predicted value may be corrected by the true value, and then the parameters of the second deep learning model may be adjusted to obtain a fatigue state detection model. The facial model loss value may be used to characterize the difference between the facial detection model of a historical driving user and the actual facial model of a historical driving user. The facial state loss value may be used to characterize the difference between the historical facial detection state and the historical facial actual state. The fatigue state loss value may be used to characterize the difference between the historical fatigue state detection result and the historical fatigue state actual result.
[0065] Specifically, before the startup facial data of the current driving user is input into a pre-trained fatigue state detection model, the fatigue state detection model fine-tunes the initial facial model, and before obtaining the facial model of the current driving user, an initial deep learning model, historical facial data of at least one historical driving user, an actual facial model of the historical driving user, an actual facial state of the historical actual facial model of the historical driving user, and an actual result of the historical fatigue state may be obtained. The historical facial data of at least one historical driving user, the actual facial model of the historical driving user, the actual facial state of the historical actual facial model of the historical driving user, and the actual result of the historical fatigue state may be determined as training samples. The historical facial data of the historical driving user may be input into the initial deep learning model, and a facial detection model of the historical driving user may be output. The actual facial model of the historical driving user and the facial detection model of the historical driving user may be compared, and a facial model loss value may be calculated. The parameters of the initial deep learning model may be adjusted with the goal of minimizing or converging the facial model loss value, to obtain a first deep learning model. The historical facial data is input into the first deep learning model, and the historical facial detection state of the facial detection model of the historical driving user may be output. The historical face detection state of the historical driving user face detection model and the historical face actual state of the historical driving user face actual model are compared to calculate the face state loss value. The parameters of the first deep learning model can be adjusted with the goal of minimizing or converging the face state loss value to obtain the second deep learning model. The historical face detection state of the historical driving user face detection model is input into the second deep learning model to output the historical fatigue state detection result. The historical fatigue state detection result and the historical fatigue state actual result are compared to calculate the fatigue state loss value. The parameters of the second deep learning model can be adjusted with the goal of minimizing or converging the fatigue state loss value to obtain the fatigue state detection model.
[0066] In an optional embodiment of the present invention, a facial model loss value is calculated based on the actual facial model of the historical driving user and the facial detection model of the historical driving user, and the parameters of the initial deep learning model are adjusted based on the facial model loss value to obtain a first deep learning model, including: comparing at least one historical facial actual key point in the actual facial model of the historical driving user with the corresponding historical facial predicted key point in the facial detection model of the historical driving user to obtain at least one key point loss value; comparing the actual facial bounding box in the actual facial model of the historical driving user with the predicted facial bounding box in the facial detection model of the historical driving user to obtain a facial bounding box loss value; adjusting the parameters of the initial deep learning model based on the key point loss values and the facial bounding box loss values to obtain the first deep learning model.
[0067] The actual key points of the historical face may be sampling points actually marked in the historical face data. The predicted key points of the historical face may be key points predicted based on the historical face data. The actual key points of the historical face are true values; the predicted key points of the historical face are predicted values. Based on the true values, the predicted values may be corrected. The key point loss value may be used to characterize the difference between the predicted key points of the historical face and the actual key points of the history. Exemplarily, the actual key points of the historical face (or the key points of the historical face detection) may include key points of the eyes, nose, mouth, chin, ears and other areas of the face. Optionally, the number of the actual key points of the historical face (or the key points of the historical face detection) may be 150. The actual face bounding box may be a face bounding box actually marked in the historical face data. The predicted face bounding box may be a face bounding box predicted based on the historical face data. The actual face bounding box is the true value; the predicted face bounding box is the predicted value. Based on the true value, the predicted value may be corrected. The face bounding box loss value may be used to characterize the difference between the predicted face bounding box and the actual face bounding box.
[0068] Specifically, at least one historical face actual key point in the historical driving user face actual model and the corresponding historical face prediction key point in the historical driving user face detection model can be compared to obtain at least one key point loss value. The actual face bounding box in the historical driving user face actual model and the predicted face bounding box in the historical driving user face detection model can be compared to obtain a face bounding box loss value. A weighted summation can be performed on at least one key point loss value and a face bounding box loss value to obtain a weighted summation result. With the goal of minimizing or converging the weighted summation result of each key point loss value and the face bounding box loss value, the parameters of the initial deep learning model can be adjusted to obtain a first deep learning model.
[0069] This solution obtains at least one key point loss value by comparing at least one historical facial actual key point in the historical driving user facial actual model with the corresponding historical facial predicted key point in the historical driving user facial detection model, and obtains a facial bounding box loss value by comparing the actual facial bounding box in the historical driving user facial actual model with the predicted facial bounding box in the historical driving user facial detection model. The parameters of the initial deep learning model are adjusted according to the key point loss values and the facial bounding box loss values to obtain a first deep learning model, thereby further improving the accuracy of the obtained first deep learning model, and then improving the accuracy of the fatigue state detection model finally obtained, thereby improving the detection accuracy of the driving user fatigue state detection.
[0070] This scheme introduces the facial model loss value, facial state loss value and fatigue state loss value, and performs three-stage parameter adjustment on the fatigue state detection model to obtain the fatigue state detection model, which provides convenience for driving users' fatigue state detection.
[0071] Figure 3 This is a schematic diagram of a method for detecting driver fatigue. Figure 3 It is a preferred embodiment of the present invention. A large number of facial images containing different historical driving users can be collected in advance as historical facial data. Among them, a large amount of historical facial data in a fatigue state is included. The facial images of these historical driving users have different angles, different lighting conditions, different expressions and different occlusion conditions to ensure that the fatigue state detection model has generalization capabilities. Sampling points can be set for the historical facial data in advance, that is, each facial image of the historical driving user can be annotated to indicate the actual key points of the historical face (such as the position of the eyes, nose, and mouth) or the actual facial boundary box. After that, a deep learning model can be adopted to perform a large amount of model training to train a fatigue state detection model. In this way, fatigue detection can be performed directly according to the current facial state without judging the degree of change of key parts. For the case where the degree of change of key parts of the driving user is small when the driving user is fatigued driving, the method of detecting the fatigue state by the degree of change of key parts has a poor detection effect. At this time, the use of this method to detect the fatigue state of the driving user can improve the accuracy of the fatigue state detection of the driving user to a certain extent. Figure 3As shown, after the driver gets on the vehicle and starts the vehicle, the system (i.e., the device) automatically identifies the driver's face, generates the driver's facial coordinate system, fine-tunes the initial facial model in the system, and generates the current driver's facial model of the current driver. According to the trained fatigue state detection model, the fatigue state of the driver is directly judged, thereby assisting fatigue monitoring. After the current vehicle is turned off, that is, after the engine of the current vehicle is turned off, a new driver gets on the vehicle and starts the vehicle, and the current driver's facial model of the last driver is refreshed. Specifically, the updating process of the current driver's facial model is as follows: when the current vehicle is ignited and started, at a certain speed, the system will collect the current driver's startup facial data within the first three minutes after the current vehicle is started, and according to the collected startup facial data of the current driver, the pre-generated deep learning initial facial model is fine-tuned to generate the current driver's facial model belonging to the current driver. Fatigue state detection is assisted according to the generated current driver's facial model. After the engine of the current vehicle is turned off, the current driver's facial model and the startup facial data of the current driver are not deleted. When the engine of the current vehicle is started next time, the system will refresh the current driving user's facial model according to the driving user and generate a new current driving user's facial model. Optionally, after the engine of the current vehicle is started and the current vehicle reaches a certain speed, the system deletes the last current driving user's facial model, collects the current driving user's startup facial data, and generates the current driving user's facial model for the current driving user to assist in fatigue monitoring.
[0072] Figure 4 This is a schematic diagram of a method for detecting driver fatigue. Figure 4 This is a preferred embodiment of the present invention. The hardware resources such as the DMS and camera integrated in the current vehicle can be used to accurately locate and identify the key points of the current driving user's face, such as the eyes, nose, mouth, chin and ears, to establish multiple key point data features of the current driving user's face. The key point data features of the current driving user's face can be analyzed and identified, and the state of the driving user's eyes and mouth can be combined to comprehensively judge whether the current driving user is in a fatigued state. Among them, the most important is to detect the state of the eyes and the mouth, which can preliminarily judge whether the driving user is in a fatigued state. When the driving user yawns, blinks frequently due to fatigue, or closes his eyes for a long time, the method can be used Figure 3The driver fatigue detection method shown assists in determining whether the current driver is in a fatigued state. Since the driver fatigue detection all relies on DMS, the eye contour of the current driver needs to be clearly seen in the DMS screen to achieve a better recognition effect. Specifically, the continuous eye-closing fatigue detection process is to detect that the current driver is in a closed-eye state and continues for a period of time, and determine that the current driver continues to close his eyes. At this time, the original video captured by DMS can be frame-extracted to obtain the current facial data of the current driver. Figure 3 The driver fatigue detection method shown in the figure assists in determining whether the current driver is in a fatigued state. If the driver is in a fatigued state, a voice prompt is given. The frequent eye-closing fatigue state detection process is to detect that the current driver is in a closed-eye state, and the cumulative eye-closing frequency within 10 seconds reaches a certain threshold, and it is determined that the current driver is frequently closing his eyes. At this time, the original video collected by the DMS can be frame-extracted to obtain the current facial data of the current driver. Figure 3 The driver fatigue detection method shown in the figure assists in determining whether the current driver is in a fatigued state. If the driver is in a fatigued state, a voice prompt is given. The fatigue state detection process of yawning is to detect the position of the upper and lower lips of the current driver and the opening amplitude value. If the opening amplitude value exceeds a certain threshold, it is determined to be a yawn. When the current driver is detected to be yawning and it lasts for a period of time, the original video collected by the DMS can be frame-extracted to obtain the current facial data of the current driver. Figure 3 The driver fatigue detection method shown in the figure assists in determining whether the current driver is in a fatigue state. If the driver is in a fatigue state, a voice prompt is given. Figure 4 As shown in the figure, the system mainly makes preliminary judgments based on three actions: yawning, frequent eye closure and continuous eye closure, and the fatigue state detection model makes another judgment to detect the fatigue state of the driver. When the driver is detected to be in a fatigued state, it prompts the driver to drive fatigued and take a rest.
[0073] Optionally, fatigue status detection can be performed separately for yawning, frequent eye closure and continuous eye closure. When the driving user is in a state of yawning, frequent eye closure and continuous eye closure, the driving user is directly reminded of the fatigue status. Specifically, when the driving user is in the main driving seat, the current vehicle is started, and during driving, after the current vehicle speed is greater than a certain preset detection speed, yawning is detected, and a voice prompt is given to drive fatigued and pay attention to rest. For the yawning alarm, the main recognition logic is to identify the position of the upper and lower lips and their opening amplitude values. When the opening amplitude value exceeds a certain threshold and reaches a certain duration, a yawning alarm will be generated. When the driving user is in the main driving seat, the current vehicle is started, and during driving, after the current vehicle speed is greater than a certain preset detection speed, frequent eye closure is detected, and a voice prompt is given to drive fatigued and pay attention to rest. For the frequent eye closure alarm, the main recognition logic is to identify the position of the upper and lower eyelids and whether the two eyes are closed. The concept of risk accumulation threshold is introduced, and the sum of the current risk value and the historical risk value is calculated according to the closing time. When the sum of the risk values ≥ a certain value, a frequent eye closure alarm will be generated. When the driver is in the main driving seat and the vehicle is started, during driving, if the current vehicle speed exceeds a certain preset detection speed, continuous eye closure is detected, and a voice prompt is given to indicate fatigue driving and to take a rest. For the continuous eye closure alarm, the main recognition logic is to identify the position of the upper and lower eyelids and whether the two eyes have been closed for a certain period of time.
[0074] For real fatigue (including direct eye closure), you can directly take Figure 3 The driving user fatigue detection method shown has a main recognition logic of using a rule-based judgment strategy to initially judge as real fatigue, automatically extract fatigue features through a pre-trained fatigue state detection model, and finally judge whether the current driving user is in a fatigue state.
[0075] At present, most of the fatigue state detection systems for commercial vehicles on the market have high hardware costs and low recognition accuracy, and a better fatigue state detection solution is needed. The driver fatigue state detection method described in this solution uses visual processing technology as the core technology for driver fatigue state detection. The current vehicle recorder integrates the DMS function. Through the on-board camera and the recorder integrated with DMS, the system function integration is improved and the hardware cost is reduced. It can support image acquisition and behavior recognition of the current facial data of the driver under environmental conditions such as daytime, night, strong light, side light and wearing sunglasses. The current facial data of the driver is collected through the camera, and the opening and closing state of the driver's eyes and mouth are identified. Then, the current driver's facial model generated by deep learning is used for auxiliary judgment. By combining the two methods of judging the fatigue state of the driver based on rules and judging the fatigue state of the current driver based on the current driver's facial model, the accuracy of fatigue state detection can be greatly improved, and the speed of fatigue state detection will also be greatly improved, which can improve the driving safety of existing commercial vehicle drivers, reduce the probability of driver fatigue driving, and reduce the problem of traffic accidents caused by fatigue driving.
[0076] Embodiment 3
[0077] Figure 5 This is a schematic diagram of the structure of a driver fatigue detection device provided in Embodiment 3 of the present invention. The embodiment of the present invention can be applied to the situation where driver fatigue detection is performed during vehicle driving. The device can execute a driver fatigue detection method. The device can be implemented in the form of hardware and / or software. The device can be configured in an electronic device that carries a driver fatigue detection function, such as a vehicle-mounted terminal or a server.
[0078] See also Figure 5 The driving user fatigue detection device shown includes: a current driving user facial model generation module 510, a current facial state detection module 520 and a current fatigue state detection module 530. The current driving user facial model generation module 510 is used to obtain the startup facial data of the current driving user after the vehicle is started, and generate the current driving user facial model according to the startup facial data of the current driving user; the current facial state detection module 520 is used to obtain the current facial data of the current driving user, and determine the current facial state of the current driving user facial model according to the current facial data; the current fatigue state detection module 530 is used to perform fatigue state detection on the current driving user according to the current facial state of the current driving user facial model, and obtain the current fatigue state detection result of the current driving user.
[0079] The technical solution of the embodiment of the present invention is to obtain the startup facial data of the current driving user after the current vehicle is started, generate the current driving user facial model according to the startup facial data of the current driving user, obtain the current facial data of the current driving user, and determine the current facial state of the current driving user facial model according to the current facial data, perform fatigue state detection on the current driving user according to the current facial state of the current driving user facial model, and obtain the current fatigue state detection result of the current driving user. Compared with detecting the degree of change of the key facial parts of the driving user, detecting the current facial state of the current driving user facial model and detecting the driving user fatigue state based on the current facial state comprehensively considers the overall facial features of the driving user rather than partial features of the key facial parts. The data based on which the driving user fatigue state detection is detected is more comprehensive and the detection accuracy is higher.
[0080] In an optional embodiment of the present invention, the current driving user facial model generation module 510 includes: a first current driving user facial model generation unit, which is used to input the startup facial data of the current driving user into a pre-trained fatigue state detection model, and the fatigue state detection model fine-tunes the initial facial model to obtain the current driving user facial model; the current facial state detection module 520 includes: a current facial state detection unit, which is used to input the current facial data of the current driving user into the fatigue state detection model, and output the current facial state of the current driving user facial model; the current fatigue state detection module 530 includes: a current fatigue state detection unit, which is used to input the current facial state of the current driving user facial model into the fatigue state detection model, and output the current fatigue state detection result of the current driving user; wherein the training samples of the fatigue state detection model include historical facial data of at least one historical driving user, an actual facial model of a historical driving user, an actual historical facial state of the actual facial model of the historical driving user, and an actual historical fatigue state result.
[0081] In an optional embodiment of the present invention, the current driving user facial model generation module 510 also includes: a training sample acquisition unit, which is used to obtain an initial deep learning model and training samples before inputting the startup facial data of the current driving user into a pre-trained fatigue state detection model, and fine-tuning the initial facial model by the fatigue state detection model to obtain the current driving user facial model; wherein the training samples include historical facial data of at least one historical driving user, an actual facial model of the historical driving user, an actual historical facial state of the actual facial model of the historical driving user, and an actual result of the historical fatigue state; a historical driving user facial detection unit, which is used to input the historical facial data of the historical driving user into the initial deep learning model, and output a facial detection model of the historical driving user; a facial model loss value calculation unit, which is used to calculate a facial model loss value based on the actual facial model of the historical driving user and the facial detection model of the historical driving user, and adjust the initial deep learning model based on the facial model loss value. The method comprises the following steps: a historical face detection state detection unit, which is used to input the historical face data into the first deep learning model, and output the historical face detection state of the historical driving user face detection model; a face state loss value calculation unit, which is used to calculate the face state loss value according to the historical face detection state of the historical driving user face detection model and the historical face actual state of the historical driving user face actual model, and adjust the parameters of the first deep learning model according to the face state loss value to obtain a second deep learning model; a historical fatigue state detection unit, which is used to input the historical face detection state of the historical driving user face detection model into the second deep learning model, and output the historical fatigue state detection result; a fatigue state detection model generation unit, which is used to calculate the fatigue state loss value according to the historical fatigue state detection result and the historical fatigue state actual result, and adjust the parameters of the second deep learning model according to the fatigue state loss value to obtain a fatigue state detection model.
[0082] In an optional embodiment of the present invention, the facial model loss value calculation unit includes: a key point loss value calculation subunit, which is used to compare at least one historical facial actual key point in the historical driving user facial actual model with the corresponding historical facial predicted key point in the historical driving user facial detection model to obtain at least one key point loss value; a facial bounding box loss value calculation subunit, which is used to compare the actual facial bounding box in the historical driving user facial actual model with the predicted facial bounding box in the historical driving user facial detection model to obtain a facial bounding box loss value; and a facial model loss value calculation subunit, which is used to adjust the parameters of the initial deep learning model according to the key point loss values and the facial bounding box loss values to obtain a first deep learning model.
[0083] In an optional embodiment of the present invention, the current driving user facial model generation module 510 includes: a current vehicle speed detection unit, which is used to detect the current vehicle speed of the current vehicle after the current vehicle is started; a second current driving user facial model generation unit, which is used to obtain the startup facial data of the current driving user within a preset detection time period when the current vehicle speed reaches a preset detection speed, and generate the current driving user facial model based on the startup facial data of the current driving user.
[0084] In an optional embodiment of the present invention, the device also includes: a previous driving user facial model storage module, which is used to store the startup facial data and the current driving user facial model as the previous startup facial data and the previous driving user facial model after the current vehicle is turned off; a startup facial data re-acquisition module, which is used to acquire the startup facial data of the current driving user after the current vehicle is restarted; a previous driving user detection module, which is used to compare the startup facial data of the current driving user with the previous startup facial data of the previous driving user to determine whether the current driving user is the previous driving user; and a current driving user facial model update module, which is used to determine the previous driving user facial model as the current driving user facial model when the current driving user is the previous driving user.
[0085] The driving user fatigue detection device provided in the embodiment of the present invention can execute the driving user fatigue detection method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0086] In the technical solution of the embodiment of the present invention, the acquisition, storage and application of the startup facial data of the current driving user, the current facial data of the current driving user, the initial deep learning model and training samples, etc., all comply with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0087] Embodiment 4
[0088] Figure 6 A schematic diagram of the structure of an electronic device 600 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0089] like Figure 6As shown, the electronic device 600 includes at least one processor 601, and a memory connected to the at least one processor 601, such as a read-only memory (ROM) 602, a random access memory (RAM) 603, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 601 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 602 or the computer program loaded from the storage unit 608 to the random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the electronic device 600 can also be stored. The processor 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0090] Multiple components in the electronic device 600 are connected to the I / O interface 605, including: an input unit 606, such as a keyboard, a mouse, etc.; an output unit 607, such as various types of displays, speakers, etc.; a storage unit 608, such as a disk, an optical disk, etc.; and a communication unit 609, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 609 allows the electronic device 600 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0091] The processor 601 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 601 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The processor 601 executes the various methods and processes described above, such as a driving user fatigue detection method.
[0092] In some embodiments, the driving user fatigue detection method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 608. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 600 via the ROM 602 and / or the communication unit 609. When the computer program is loaded into the RAM 603 and executed by the processor 601, one or more steps of the driving user fatigue detection method described above may be performed. Alternatively, in other embodiments, the processor 601 may be configured to perform the driving user fatigue detection method in any other appropriate manner (e.g., by means of firmware).
[0093] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0094] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0095] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0096] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0097] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0098] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship between the client and the server is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or a cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS (Virtual Private Server) services.
[0099] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0100] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for detecting current driving user fatigue, It is characterized in that The method comprises: After the current vehicle is started, acquiring startup facial data of the current driving user, and generating a facial model of the current driving user according to the startup facial data of the current driving user; Acquire current facial data of the current driving user, and determine a current facial state of the current driving user facial model according to the current facial data; According to the current facial state of the current driving user's facial model, a fatigue state detection is performed on the current driving user to obtain a current fatigue state detection result of the current driving user.
2. The method according to claim 1, It is characterized in that The step of generating a facial model of the current driving user according to the startup facial data of the current driving user comprises: Inputting the startup facial data of the current driving user into a pre-trained fatigue state detection model, and using the fatigue state detection model to fine-tune the initial facial model to obtain the facial model of the current driving user; The step of determining the current facial state of the current driving user facial model according to the current facial data includes: Inputting the current facial data of the current driving user into the fatigue state detection model, and outputting the current facial state of the current driving user's facial model; The step of performing fatigue state detection on the current driving user according to the current facial state of the current driving user facial model to obtain a current fatigue state detection result of the current driving user includes: The current facial state of the current driving user's facial model is input into the fatigue state detection model, and the current fatigue state detection result of the current driving user is output; wherein the training samples of the fatigue state detection model include historical facial data of at least one historical driving user, an actual facial model of a historical driving user, a historical actual facial state of the actual facial model of a historical driving user, and a historical actual fatigue state result.
3. The method according to claim 2, It is characterized in that Before inputting the startup facial data of the current driving user into a pre-trained fatigue state detection model and fine-tuning the initial facial model by the fatigue state detection model to obtain the facial model of the current driving user, the method further includes: Acquire an initial deep learning model and training samples; wherein the training samples include historical facial data of at least one historical driving user, an actual facial model of the historical driving user, an actual historical facial state of the actual facial model of the historical driving user, and an actual result of a historical fatigue state; Inputting the historical facial data of the historical driving user into the initial deep learning model, and outputting a historical driving user facial detection model; Calculating a facial model loss value according to the actual facial model of the historical driving user and the facial detection model of the historical driving user, and adjusting the parameters of the initial deep learning model according to the facial model loss value to obtain a first deep learning model; Inputting the historical facial data into the first deep learning model, and outputting the historical facial detection state of the historical driving user facial detection model; Calculating a facial state loss value according to the historical facial detection state of the historical driving user facial detection model and the historical facial actual state of the historical driving user facial actual model, and adjusting the parameters of the first deep learning model according to the facial state loss value to obtain a second deep learning model; Inputting the historical face detection state of the historical driving user face detection model into the second deep learning model, and outputting the historical fatigue state detection result; According to the historical fatigue state detection results and the historical fatigue state actual results, a fatigue state loss value is calculated, and according to the fatigue state loss value, the parameters of the second deep learning model are adjusted to obtain a fatigue state detection model.
4. The method according to claim 3, It is characterized in that The step of calculating a facial model loss value based on the actual facial model of the historical driving user and the facial detection model of the historical driving user, and adjusting the parameters of the initial deep learning model based on the facial model loss value to obtain a first deep learning model includes: Comparing at least one historical face actual key point in the historical driving user face actual model with a corresponding historical face predicted key point in the historical driving user face detection model to obtain at least one key point loss value; Comparing the actual face bounding box in the actual face model of the historical driving user with the predicted face bounding box in the face detection model of the historical driving user to obtain a face bounding box loss value; According to the key point loss values and the facial bounding box loss values, the parameters of the initial deep learning model are adjusted to obtain a first deep learning model.
5. The method according to claim 1, It is characterized in that The method of obtaining startup facial data of a current driving user after the current vehicle is started, and generating a facial model of the current driving user according to the startup facial data of the current driving user, comprises: After the current vehicle is started, the current speed of the current vehicle is detected; When the current vehicle speed reaches the preset detection vehicle speed, the startup facial data of the current driving user within the preset detection time period is acquired, and the current driving user facial model is generated according to the startup facial data of the current driving user.
6. The method according to claim 1, It is characterized in that Also includes: After the current vehicle is turned off, storing the startup facial data and the current driving user facial model as the previous startup facial data and the previous driving user facial model; After the current vehicle is started again, the startup facial data of the current driving user is obtained; Comparing the startup facial data of the current driving user with the last startup facial data of the last driving user to determine whether the current driving user is the last driving user; When the current driving user is the previous driving user, the facial model of the previous driving user is determined as the facial model of the current driving user.
7. A driver fatigue detection device, It is characterized in that The device comprises: A current driving user facial model generation module is used to obtain startup facial data of the current driving user after the vehicle is started, and generate a current driving user facial model based on the startup facial data of the current driving user; A current facial state detection module, used to obtain current facial data of the current driving user, and determine the current facial state of the current driving user's facial model based on the current facial data; The current fatigue state detection module is used to perform fatigue state detection on the current driving user according to the current facial state of the current driving user facial model to obtain the current fatigue state detection result of the current driving user.
8. An electronic device, It is characterized in that The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the driving user fatigue detection method according to any one of claims 1 to 6.
9. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the driving user fatigue detection method according to any one of claims 1 to 6 when executed.
10. A computer program product, It is characterized in that The computer program product comprises a computer program, which, when executed by a processor, implements the method for detecting driver fatigue according to any one of claims 1 to 6.
