Fatigue driving detection method, computer equipment, storage medium and program product

By acquiring multiple target images in non-fatigue states in the fatigue driving detection system, the personalized eye closing threshold and time percentage for different drivers are calculated, and the detection caused by differences in physiological characteristics and habits in the existing system is solved. Accuracy issues improve the accuracy and pertinence of detection.

CN118314559BActive Publication Date: 2024-12-06镁佳(北京)科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410492383.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-04-23
Publication Date
2024-12-06
Estimated Expiration
2044-04-23

AI Technical Summary

Technical Problem

The existing fatigue driving detection system has the problem of inaccurate judgment among different drivers, especially the inaccurate eye closure and fatigue detection results caused by differences in physiological characteristics and habits.

Method used

By acquiring multiple target images in non-fatigue states, each preset eye closing threshold and eye closing time percentage are determined, and the target eye closing threshold and target eye closing time percentage are calculated based on the reference threshold and similarity. Perform personalized fatigue driving testing.

Benefits of technology

It improves the accuracy of fatigue driving detection, adapts to the physiological characteristics and habits of different drivers, reduces misjudgment, and enhances the pertinence and accuracy of detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118314559B_ABST
    Figure CN118314559B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of fatigue driving detection, and discloses a fatigue driving detection method, a computer device, a storage medium and a program product, wherein the fatigue driving detection method comprises: obtaining a plurality of target images, the target images are obtained by continuously collecting the driver's eyes when the driver is in a non-fatigue state; obtaining a plurality of preset eye closing thresholds; identifying the plurality of target images, calculating the preset eye closing time percentage corresponding to each preset eye closing threshold; determining the target eye closing threshold and the target eye closing time percentage of the driver in a fatigue state based on the reference eye closing threshold and the reference eye closing time percentage of the non-fatigue state, and a plurality of preset eye closing thresholds and the corresponding preset eye closing time percentages; and performing fatigue detection on the driver based on the target eye closing threshold and the target eye closing time percentage. The present invention can solve the problem of inaccurate fatigue driving detection for different drivers.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of fatigue driving detection, and in particular to a fatigue driving detection method, computer equipment, storage medium and program product. Background Art

[0002] Fatigue driving is an important factor affecting vehicle driving safety. Fatigue driving detection on drivers to prevent fatigue driving is of great significance in preventing traffic accidents.

[0003] With the development of economy, most cars are equipped with driver fatigue detection system (Driver Monitor System, DMS), which will send out an alarm when the driver is fatigued. The vision-based DMS solution is to have a camera in the car to continuously shoot the driver, and the algorithm module continuously receives the image data and gives the prediction result of whether the eyes are closed. The background processing module gives the judgment of whether the driver is fatigued.

[0004] Generally, fixed thresholds are used for eye closure detection and fatigue detection, but fixed thresholds are not suitable for all drivers. For drivers with different physiological characteristics, inaccurate judgments may occur. For example, drivers with smaller eyes are more likely to be judged as having closed eyes, and drivers who habitually blink frequently are more likely to be judged as driving fatigued. Summary of the invention

[0005] In view of this, the present invention provides a fatigue driving detection method, a computer device, a storage medium and a program product to solve the problem of inaccurate fatigue driving detection for different drivers.

[0006] In a first aspect, the present invention provides a fatigue driving detection method, characterized in that the fatigue driving detection method includes: acquiring multiple target images, the target images are obtained by continuously capturing the driver's eyes when the driver is in a non-fatigue state; acquiring multiple preset eye-closing thresholds; identifying the multiple target images, and calculating the preset eye-closing time percentage corresponding to each preset eye-closing threshold; the preset eye-closing time percentage is the proportion of time that the driver is in a closed eye state within a preset time; based on a baseline eye-closing threshold and a baseline eye-closing time percentage in a non-fatigue state, as well as multiple preset eye-closing thresholds and corresponding preset eye-closing time percentages, determining a target eye-closing threshold and a target eye-closing time percentage of the driver in a fatigue state; and performing fatigue detection on the driver based on the target eye-closing threshold and the target eye-closing time percentage.

[0007] In this embodiment, multiple sets of preset eye-closing thresholds and preset eye-closing time percentages for non-fatigue states are determined by testing drivers in a non-fatigue state in advance. Different eye-closing time percentages are determined for different drivers, and the impact of the driver's blinking habits on fatigue driving monitoring is taken into consideration. The baseline eye-closing threshold and baseline eye-closing time percentage for the non-fatigue state are used as a reference, and the target eye-closing threshold and target eye-closing time percentage corresponding to the driver in the fatigue state are determined based on multiple sets of preset eye-closing thresholds and preset eye-closing time percentages for the non-fatigue state. Different eye-closing thresholds are determined for different drivers, and the impact of different drivers' eye physiological characteristics on fatigue driving detection is taken into consideration. Different target eye-closing thresholds and target eye-closing time percentages are determined for different drivers, and targeted fatigue driving detection is performed, which can solve the problem of inaccurate fatigue driving detection for different drivers.

[0008] In an optional embodiment, the preset eye closure threshold is a preset eye aspect ratio threshold, and multiple target images are identified. Calculating the preset eye closure time percentage corresponding to each preset eye aspect ratio threshold includes: identifying the driver's eyes in multiple target images to obtain the eye aspect ratio of each target image; and calculating the preset eye closure time percentage corresponding to each preset eye closure threshold based on the eye aspect ratio of each target image.

[0009] In an optional embodiment, based on the eye aspect ratio of each target image, calculating the preset eye closure time percentage corresponding to each preset eye aspect ratio threshold includes: obtaining the total number of target images; obtaining a first number of target images whose eye aspect ratio is less than the preset eye aspect ratio threshold; calculating the ratio of the first number in the total number, and using the ratio as the preset eye closure time percentage corresponding to the preset eye aspect ratio threshold.

[0010] In an optional embodiment, the baseline eye closing threshold is a baseline eye aspect ratio threshold, the target eye closing threshold is a target eye aspect ratio threshold, and based on the baseline eye closing threshold and the baseline eye closing time percentage in a non-fatigue state, as well as multiple preset eye closing thresholds and corresponding preset eye closing time percentages, determining the target eye closing threshold and the target eye closing time percentage of the driver in a fatigue state includes: obtaining a baseline set and multiple preset sets, the baseline set includes a baseline eye aspect ratio threshold and a baseline eye closing time percentage in a non-fatigue state; the preset set includes a preset eye aspect ratio threshold and a corresponding preset eye closing time percentage; calculating the similarity between the baseline set and multiple preset sets, determining the preset set with the highest similarity to the baseline set, using the preset eye aspect ratio threshold and the preset eye closing time percentage in the preset set as the first eye aspect ratio threshold and the first eye closing time percentage of the driver in a non-fatigue state; using the first eye aspect ratio threshold as the target eye aspect ratio threshold of the driver in a fatigue state; increasing the first eye closing time percentage by a preset value to obtain the target eye closing time percentage of the driver in the fatigue state.

[0011] In this embodiment, a reference set and a preset set are determined, similarities between the reference set and multiple preset sets are calculated, a first eye aspect ratio threshold and a first eye closing time percentage in a non-fatigue state of a driver closest to the reference eye aspect ratio threshold and the reference eye closing time percentage in the reference set are determined, and a target eye aspect ratio threshold and a target eye closing time percentage of the driver in a fatigue state are further determined. It is possible to set specific thresholds for different drivers, which can be more suitable for the physiological characteristics of the driver and improve the accuracy of subsequent fatigue driving detection.

[0012] In an optional embodiment, calculating the similarity between a baseline set and multiple preset sets, and determining the preset set with the highest similarity to the baseline set includes: constructing a baseline function, which is a function that measures the degree of difference between the baseline set and each preset set; using the baseline function to calculate function values ​​corresponding to the baseline set and each preset set; when the function value is minimum, using the preset eye aspect ratio threshold and the preset eye closure time percentage in the preset set as the first eye aspect ratio threshold and the first eye closure time percentage of the driver in a non-fatigue state.

[0013] In this embodiment, the set reference function can ensure that the preset eye aspect ratio threshold is close to the reference eye aspect ratio threshold, while ensuring that the preset eye closing time percentage is close to the reference eye closing time percentage, thereby improving the accuracy of fatigue driving detection.

[0014] In an optional implementation, acquiring multiple target images includes: in response to vehicle startup, detecting a vehicle speed; when the vehicle speed is greater than or equal to a preset vehicle speed, acquiring multiple consecutive target images of the driver within a preset time period.

[0015] In this embodiment, data collection is performed during the initial driving of the vehicle, so that the eye data of the driver in a non-fatigue state can be accurately collected, thereby improving the accuracy of subsequent eye aspect ratio thresholds and percentage of eye closure time.

[0016] In an optional embodiment, driver fatigue detection based on a target eye-closing threshold and a target eye-closing time percentage includes: obtaining multiple detection images of the driver within a preset time period; identifying eye features of the driver in the multiple detection images; comparing the eye features with the target eye-closing threshold, and when the eye features meet the eye-closing condition, determining that the detection image is a closed-eye image; obtaining the number ratio of closed-eye images; determining whether the number ratio is greater than the target eye-closing time percentage; when the number ratio is greater than or equal to the target eye-closing time percentage, determining that the driver is driving fatigued.

[0017] In a second aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the fatigue driving detection method of the above-mentioned first aspect or any corresponding embodiment thereof by executing the computer instructions.

[0018] In a third aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the fatigue driving detection method of the first aspect or any corresponding embodiment thereof.

[0019] In a fourth aspect, the present invention provides a computer program product, comprising computer instructions for causing a computer to execute the fatigue driving detection method of the first aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0021] Figure 1 is a flow chart of a fatigue driving detection method according to an embodiment of the present invention;

[0022] Figure 2 is a flow chart of another fatigue driving detection method according to an embodiment of the present invention;

[0023] Figure 3 is a flow chart of another fatigue driving detection method according to an embodiment of the present invention;

[0024] Figure 4 is a structural block diagram of a fatigue driving detection device according to an embodiment of the present invention;

[0025] Figure 5 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0026] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution 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 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 those skilled in the art without creative work are within the scope of protection of the present invention.

[0027] Generally, the image data of the driver is collected by a camera, and by detecting whether the driver closes his eyes and the time of closing his eyes, it is determined whether the driver is driving fatigued. Among them, for each frame of image data, the eyes are detected to determine the first data used to characterize the degree of eye opening. The first data is compared with the first threshold. When the first data is less than the first threshold, it means that the driver's eyes are less open in the current image and can be judged as closed eyes; when the first data is greater than or equal to the first threshold, it means that the driver's eyes are more open in the current image and can be judged as open eyes.

[0028] The first data used to characterize the degree of eye opening may include multiple implementation methods.

[0029] In one implementation, the eye aspect ratio is used as the first data.

[0030] The eye aspect ratio (EAR) refers to the ratio of the vertical opening height of the eye to the horizontal width of the eye, which is used to characterize the degree of eye opening.

[0031] Specifically, the image data of the driver collected by the camera is detected using a face detection algorithm and a key point model to obtain the eye aspect ratio. The larger the eye aspect ratio, the more open the driver's eyes are.

[0032] Generally, in order to facilitate the judgment of open eyes and closed eyes, a first threshold is set. The first threshold is determined based on multiple sample data of multiple human bodies. Therefore, the first threshold is a fixed universal threshold. By comparing the eye aspect ratio and the first threshold, when the eye aspect ratio is greater than or equal to the first threshold, it is judged that the driver is in an open-eye state in the current frame image; when the eye aspect ratio is less than the first threshold, it is judged that the driver is in a closed-eye state in the current frame image.

[0033] Understandably, due to differences in physiological characteristics, different people have different eye sizes. When the first threshold is fixed, there are differences in the judgment results of open eyes and closed eyes. Specifically, for a driver with small eyes, it is easier to be judged as closed eyes; relatively speaking, for a driver with large eyes, it is less likely to be judged as closed eyes.

[0034] Furthermore, second data is determined based on the eye closing conditions of multiple frames of images within a period of time, and the second data is used to judge whether the driver is tired. The second data used to characterize whether the driver is tired can include multiple implementation methods.

[0035] In one implementation, the percentage of eyelid closure time (PERCLOS) is used as the second data.

[0036] The percentage of closed-eye time is the percentage of time the driver's eyes are closed within a preset time period, that is, the percentage of the cumulative closed-eye time in the total time within a period of time.

[0037] Optionally, a second threshold is set. The second threshold is determined based on multiple sample data of multiple human bodies. Therefore, the second threshold is a fixed universal threshold. The percentage of closed eyes time is compared with the second threshold. When the percentage of closed eyes time is greater than or equal to the second threshold, it is judged that the driver is in a fatigue driving state; when the percentage of closed eyes time is less than the second threshold, it is judged that the driver is in a non-fatigue state.

[0038] Based on the above-mentioned first data and second data, the first data and the second data are combined to determine whether the driver is in a fatigue driving state. For drivers with different eye physiological characteristics, since the first threshold is fixed, there are differences in judging whether to close the eyes; on this basis, since the second threshold is fixed, there are differences in judging whether to drive fatigued. That is, drivers with small eyes are more likely to be judged as fatigue driving. Due to different physiological habit characteristics, the blinking conditions of different human bodies are also different. Since the second threshold is fixed, there are differences in judging whether to drive fatigued. Even for drivers with the same eye physiological characteristics, drivers with frequent blinking physiological habits are more likely to be judged as fatigue driving. Based on this, an embodiment of the present invention provides a fatigue driving detection method, which solves the problem of inaccurate fatigue driving detection for different drivers by determining different target eye closing thresholds and target eye closing time percentages for different drivers.

[0039] According to an embodiment of the present invention, an embodiment of a fatigue driving detection method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0040] In this embodiment, a fatigue driving detection method is provided, and different target eye-closing thresholds and target eye-closing time percentages can be set for different drivers.

[0041] Figure 1 is a flow chart of a fatigue driving detection method according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:

[0042] Step S101, acquiring multiple target images.

[0043] Before fatigue driving detection is performed, multiple target images of the driver in a non-fatigue state are acquired in advance. The multiple target images are used to determine the eye physiological characteristics of the driver.

[0044] Specifically, when it is determined that the driver is in a non-fatigue state, the driver's eyes are continuously captured by an image acquisition device to obtain a plurality of target images, wherein the target image may be each frame of an image within a preset time period.

[0045] Step S102, obtaining a plurality of preset eye closing thresholds.

[0046] A plurality of preset eye-closing thresholds are predetermined, and the plurality of preset eye-closing thresholds include values ​​within a certain range of a reference eye-closing threshold in a non-fatigue state.

[0047] Step S103, identifying multiple target images, and calculating a preset eye closing time percentage corresponding to each preset eye closing threshold.

[0048] The preset percentage of eyes closed time refers to the proportion of time the driver keeps his eyes closed within the preset time.

[0049] Specifically, eye recognition is performed on multiple target images to determine eye features of each target image. For a preset eye closing threshold, the preset eye closing threshold is compared with the eye features of each target image to determine a preset eye closing time percentage. Similarly, using the above method, each preset eye closing threshold determines a preset eye closing time percentage.

[0050] Step S104, determining a target eye-closing threshold and a target eye-closing time percentage of the driver in a fatigue state based on a baseline eye-closing threshold and a baseline eye-closing time percentage in a non-fatigue state, and a plurality of preset eye-closing thresholds and corresponding preset eye-closing time percentages.

[0051] The reference eye-closing threshold and reference eye-closing time percentage in the non-fatigue state are obtained based on statistical learning of a large number of general people's data. Therefore, the settings of the reference eye-closing threshold and reference eye-closing time percentage are reasonable and moderate.

[0052] Based on the benchmark eye-closing threshold and the benchmark eye-closing time percentage, a reasonable and moderate preset eye-closing threshold and preset eye-closing time percentage for the driver in a non-fatigue state are selected from each preset eye-closing threshold and the corresponding preset eye-closing time percentage obtained in the above steps.

[0053] Understandably, in the non-fatigue state and the fatigue state, the eye closing threshold for judging open eyes and closed eyes is the same, but the eye closing time percentage is different. Specifically, when the driver is in the non-fatigue state, the eye closing time percentage is small, and when the driver is in the fatigue state, the eye closing time percentage is large.

[0054] The preset eye-closing threshold value and the preset eye-closing time percentage in the non-fatigue state are adjusted to obtain the target eye-closing threshold value and the target eye-closing time percentage of the driver in the fatigue state.

[0055] Step S105 , performing fatigue detection on the driver based on the target eye-closing threshold and the target eye-closing time percentage.

[0056] When the driver is driving the vehicle, the target eyes-closing threshold is used to determine whether the driver has closed his eyes. On this basis, the target eyes-closing time percentage is used to determine whether the driver is fatigued driving within a period of time.

[0057] The fatigue driving detection method provided in the present embodiment determines multiple sets of preset eye-closing thresholds and preset eye-closing time percentages for non-fatigue states by pre-detecting drivers in non-fatigue states. Different eye-closing time percentages are determined for different drivers, taking into account the impact of the driver's blinking habits on fatigue driving monitoring. The baseline eye-closing threshold and baseline eye-closing time percentage for the non-fatigue state are used as a reference, and the target eye-closing threshold and target eye-closing time percentage corresponding to the driver in the fatigue state are determined based on multiple sets of preset eye-closing thresholds and preset eye-closing time percentages for non-fatigue states. Different eye-closing thresholds are determined for different drivers, taking into account the impact of different drivers' eye physiological characteristics on fatigue driving detection. Different target eye-closing thresholds and target eye-closing time percentages are determined for different drivers, and targeted fatigue driving detection is performed, which can solve the problem of inaccurate fatigue driving detection for different drivers.

[0058] In one implementation, the preset eye closing threshold is a preset eye aspect ratio threshold, the concentrated eye closing threshold is a reference eye aspect ratio threshold, and the target eye closing threshold is a target eye aspect ratio threshold. Figure 2 is a flow chart of another fatigue driving detection method according to an embodiment of the present invention. Figure 2 As shown, the process includes the following steps:

[0059] Step S201, acquiring multiple target images.

[0060] Before fatigue driving detection is performed, multiple target images of the driver in a non-fatigue state are acquired in advance. The multiple target images are used to determine the eye physiological characteristics of the driver.

[0061] Specifically, when it is determined that the driver is in a non-fatigue state, the driver's eyes are continuously captured by an image acquisition device to obtain a plurality of target images, wherein the target image may be each frame of an image within a preset time period.

[0062] Step S202, obtaining a plurality of preset eye aspect ratio thresholds.

[0063] A plurality of preset eye aspect ratio thresholds are predetermined, and the plurality of preset eye aspect ratio thresholds include values ​​within a certain range of a reference eye aspect ratio threshold in a non-fatigue state.

[0064] Step S203, identifying multiple target images, and calculating a preset eye closing time percentage corresponding to each preset eye aspect ratio threshold.

[0065] Among them, the preset percentage of closed eyes time is the proportion of time that the driver is in the eyes closed state within the preset time. When the driver's eye aspect ratio is less than the preset eye aspect ratio threshold, it is determined that the driver is in the eyes closed state.

[0066] Specifically, eye recognition is performed on multiple target images to determine the eye aspect ratio of each target image. For a preset eye aspect ratio threshold, the preset eye aspect ratio threshold is compared with the eye aspect ratio of each target image to determine a preset eye closing time percentage. Similarly, using the above method, each preset eye aspect ratio threshold determines a preset eye closing time percentage.

[0067] Step S204, based on the baseline eye aspect ratio threshold and baseline eye closure time percentage in the non-fatigue state, and multiple preset eye aspect ratio thresholds and corresponding preset eye closure time percentages, determine the target eye aspect ratio threshold and target eye closure time percentage of the driver in the fatigue state.

[0068] Among them, the baseline eye aspect ratio threshold and the baseline eye closure time percentage in the non-fatigue state are obtained based on a large amount of data statistical learning. Therefore, the settings of the baseline eye aspect ratio threshold and the baseline eye closure time percentage are reasonable and moderate.

[0069] Based on the benchmark eye aspect ratio threshold and the benchmark eyes closed time percentage, a reasonable and moderate preset eye aspect ratio threshold and preset eyes closed time percentage for the driver in a non-fatigue state are selected from each preset eye aspect ratio threshold and the corresponding preset eyes closed time percentage obtained in the above steps.

[0070] It is understandable that the eye aspect ratio threshold for judging open eyes and closed eyes is the same in the non-fatigue state and the fatigue state, but the percentage of closed eyes time is different. Specifically, when the driver is in the non-fatigue state, the percentage of closed eyes time is small, and when the driver is in the fatigue state, the percentage of closed eyes time is large.

[0071] The preset eye aspect ratio threshold and the preset eye closing time percentage in the non-fatigue state are adjusted to obtain the target eye aspect ratio threshold and the target eye closing time percentage of the driver in the fatigue state.

[0072] Step S205 , performing fatigue detection on the driver based on the target eye aspect ratio threshold and the target eye closing time percentage.

[0073] When the driver is driving the vehicle, the target eye aspect ratio threshold is used to determine whether the driver has his eyes closed. On this basis, the target eye closing time percentage is used to determine whether the driver is driving fatigued within a period of time.

[0074] The fatigue driving detection method provided in the present embodiment determines multiple sets of preset eye aspect ratio thresholds and preset eye closing time percentages for non-fatigue states by pre-detecting drivers in non-fatigue states. Different eye closing time percentages are determined for different drivers, taking into account the impact of the driver's blinking habits on fatigue driving monitoring. The baseline eye aspect ratio threshold and baseline eye closing time percentage for the non-fatigue state are used as a reference, and the target eye aspect ratio threshold and target eye closing time percentage corresponding to the driver in the fatigue state are determined according to multiple sets of preset eye aspect ratio thresholds and preset eye closing time percentages for non-fatigue states. Different eye aspect ratio thresholds are determined for different drivers, taking into account the impact of different drivers' eye physiological characteristics on fatigue driving detection. Different target eye aspect ratio thresholds and target eye closing time percentages are determined for different drivers, and targeted fatigue driving detection is performed, which can solve the problem of inaccurate fatigue driving detection for different drivers.

[0075] In this embodiment, a fatigue driving detection method is provided. In the initial stage of the driver's first driving, a period of time is set as a learning stage. During the learning stage, fatigue driving detection is not performed, and the target eye aspect ratio and the target eye closing time percentage are learned. In the subsequent driving process, fatigue detection is performed based on the learned target eye aspect ratio and the target eye closing time percentage. Figure 3 is a flow chart of another fatigue driving detection method according to an embodiment of the present invention. Figure 3 As shown, the process includes the following steps:

[0076] Step S301, acquiring multiple target images.

[0077] When the driver starts a new driving behavior, multiple target images are reacquired, wherein the main driver's door switch is considered as a new driving behavior, and the new driving behavior includes changing the driver.

[0078] Specifically, the above step S301 includes:

[0079] Step S3011, in response to the vehicle starting, detecting the vehicle speed.

[0080] When a new driving behavior is initiated and the vehicle is started, the vehicle speed is continuously detected.

[0081] Step S3012: when the vehicle speed is greater than or equal to a preset vehicle speed, a plurality of continuous target images of the driver within a preset time period are acquired.

[0082] When the vehicle speed is greater than or equal to the preset vehicle speed for the first time, it is considered that the vehicle is currently in a focused driving state, and a plurality of continuous target images of the driver within a preset time period are acquired.

[0083] For example, the preset vehicle speed is 20 kilometers per hour, and the preset time period is 5 minutes. When the detected vehicle speed reaches 20 kilometers per hour for the first time, each frame of the target image of the driver is obtained for 5 minutes.

[0084] Among them, data collection during the initial driving of the vehicle can accurately collect the driver's eye data in a non-fatigue state, thereby improving the accuracy of subsequent eye aspect ratio thresholds and percentage of eye closure time.

[0085] Step S302, obtaining a plurality of preset eye aspect ratio thresholds.

[0086] For details, please see Figure 2 Step S202 of the illustrated embodiment will not be described in detail here.

[0087] Step S303: Identify multiple target images and calculate the preset eye closing time percentage corresponding to each preset eye aspect ratio threshold.

[0088] Specifically, the above step S203 includes:

[0089] Step S3031, identifying the eyes of the driver in multiple target images to obtain the eye aspect ratio of each target image.

[0090] The eyes of the driver in multiple target images are identified respectively based on the recognition algorithm, and the aspect ratio of the eyes in each target image is calculated.

[0091] Exemplarily, the calculated eye aspect ratios of the ten target images are 0.15, 0.16, 0.15, 0.13, 0.11, 0.04, 0.09, 0.14, 0.15, 0.14. It can be understood that there are generally thousands of target images. For the convenience of explanation, this embodiment takes ten target images as an example for explanation.

[0092] Step S3032, based on the eye aspect ratio of each target image, calculating the preset eye closing time percentage corresponding to each preset eye aspect ratio threshold.

[0093] In some optional embodiments, the above step S3032 includes: obtaining the total number of target images; obtaining a first number of target images whose eye aspect ratio is less than a preset eye aspect ratio threshold, calculating the proportion of the first number in the total number, and using the proportion as a preset eye closure time percentage corresponding to the preset eye aspect ratio threshold.

[0094] Exemplarily, the eye aspect ratios obtained based on the above step S3031 are: 0.15, 0.16, 0.15, 0.13, 0.11, 0.04, 0.09, 0.14, 0.15, 0.14. When the preset eye aspect ratio is 0.12, there are three target images with eye aspect ratios less than 0.12, which are 0.11, 0.04 and 0.09, respectively, and the calculated preset eye closing time percentage is 30%. When the preset eye aspect ratio is 0.08, there is one target image with eye aspect ratio less than 0.08, which is 0.04, and the calculated preset eye closing time percentage is 10%.

[0095] Step S304: Determine the target eye aspect ratio threshold and target eye closing time percentage of the driver in the fatigue state based on the baseline eye aspect ratio threshold and baseline eye closing time percentage in the non-fatigue state, and multiple preset eye aspect ratio thresholds and corresponding preset eye closing time percentages.

[0096] Specifically, the above step S304 includes:

[0097] Step S3041, obtaining a benchmark set and multiple preset sets.

[0098] The reference set includes a reference eye aspect ratio threshold value and a reference eye closure time percentage in a non-fatigue state; and the preset set includes a preset eye aspect ratio threshold value and a corresponding preset eye closure time percentage.

[0099] By statistically analyzing the eye data of a large number of people, the benchmark eye aspect ratio threshold and benchmark eye closure time percentage of the average person in a non-fatigue state are obtained. The benchmark eye aspect ratio threshold and benchmark eye closure time percentage in a non-fatigue state are used as the benchmark set.

[0100] For example, the reference eye aspect ratio threshold value in the non-fatigue state is 0.12, and the reference eye closing time percentage is 3%. The reference set is (0.12, 3%).

[0101] Using the preset eye aspect ratio threshold and the preset eye closure time percentage obtained in the above steps, each preset eye aspect ratio threshold and its corresponding preset eye closure time percentage are taken as a preset set to obtain multiple preset sets, wherein the number of preset sets is consistent with the number of preset eye aspect ratio thresholds.

[0102] For example, the preset eye aspect ratio thresholds are: 0.12, 0.11, 0.1, 0.09, 0.08. The corresponding preset eye closing time percentages are 10%, 7%, 5%, 2%, 1%. Five preset sets are obtained: (0.12, 10%), (0.11, 7%), (0.1, 5%), (0.09, 2%), (0.08, 1%).

[0103] Step S3042, calculate the similarity between the baseline set and multiple preset sets, determine the preset set with the highest similarity to the baseline set, and use the preset eye aspect ratio threshold and preset eye closure time percentage in the preset set as the first eye aspect ratio threshold and first eye closure time percentage of the driver in a non-fatigue state.

[0104] Specifically, a benchmark function is constructed based on a benchmark set and a plurality of preset sets, and the benchmark function is a function that measures the degree of difference between the benchmark set and each preset set. The benchmark function is used to calculate the function values ​​corresponding to the benchmark set and each preset set; when the function value is the minimum, the preset eye aspect ratio threshold and the preset eye closing time percentage in the preset set are used as the first eye aspect ratio threshold and the first eye closing time percentage of the driver in a non-fatigue state.

[0105] In one implementation, the benchmark function is:

[0106]

[0107] Among them, y is the benchmark function, EAR0 is the benchmark eye aspect ratio threshold, EAR1 is the preset eye aspect ratio threshold, PERCLOS0 is the benchmark eye closure time percentage, and PERCLOS1 is the preset eye closure time percentage.

[0108] When the value of the reference function is the smallest, the preset eye aspect ratio threshold and the preset eye closing time in the preset set are used as the first eye aspect ratio threshold and the first eye closing time percentage of the driver in a non-fatigue state.

[0109] For example, the five preset sets are substituted into the benchmark function, and the function values ​​calculated are: 1.2, 0.93, 0.47, 0.69, 1.5. Among them, the smallest function value is 0.47, and its corresponding preset eye aspect ratio threshold is 0.1, and the preset eye closing time percentage is 4%. The first eye aspect ratio threshold of the driver in the non-fatigue state is 0.1, and the first eye closing time percentage is 4%.

[0110] Step S2043, using the first eye aspect ratio threshold as the target eye aspect ratio threshold of the driver in the fatigue state; increasing the first eye closing time percentage by a preset value to obtain the target eye closing time percentage of the driver in the fatigue state.

[0111] The percentage of closed eyes time of the driver in a non-fatigue state and a fatigue state is different, and the first percentage of closed eyes time is increased by a preset value to obtain a target percentage of closed eyes time of the driver in the fatigue state.

[0112] Exemplarily, the preset value is 6%. The first eye aspect ratio threshold of 0.1 is used as the target eye aspect ratio threshold of 0.1 for the driver in a fatigued state. The first eye closing time percentage of 4% is increased by the preset value of 6%, and the target eye closing time percentage of the driver in a fatigued state is obtained as 10%.

[0113] Step S305: Perform driver fatigue detection based on the target eye aspect ratio threshold and the target eye closing time percentage.

[0114] Specifically, the above step S305 includes: obtaining multiple detection images of the driver within a preset time period, identifying the eye features of the driver in the multiple detection images, comparing the eye features with the target eye-closing threshold, and when the eye features meet the eye-closing condition, judging that the detection image is a closed-eye image; obtaining the number percentage of closed-eye images, judging whether the number percentage is greater than or equal to the target closed-eye time percentage, and judging that the driver is fatigued when the number percentage is greater than or equal to the target closed-eye time percentage.

[0115] In this embodiment, a benchmark set and a preset set are determined, the similarity between the benchmark set and multiple preset sets is calculated, the first eye aspect ratio threshold and the first eye closing time percentage of the driver in a non-fatigue state that are closest to the benchmark eye aspect ratio threshold and the benchmark eye closing time percentage in the benchmark set are determined, and the target eye aspect ratio threshold and the target eye closing time percentage of the driver in a fatigued state are further determined. It is possible to set specific thresholds for different drivers, which can be more suitable for the physiological characteristics of the driver and improve the accuracy of subsequent fatigue driving detection. The set benchmark function can ensure that the preset eye aspect ratio threshold is close to the benchmark eye aspect ratio threshold, and at the same time, ensure that the preset eye closing time percentage is close to the benchmark eye closing time percentage, thereby improving the accuracy of fatigue driving detection.

[0116] In this embodiment, a fatigue driving detection device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0117] This embodiment provides a fatigue driving detection device, such as Figure 4 As shown, Figure 4 : is a structural block diagram of a fatigue driving detection device according to an embodiment of the present invention, the fatigue driving detection device comprises:

[0118] The first acquisition module 401 is used to acquire a plurality of target images, where the target images are acquired by continuously capturing the driver's eyes when the driver is in a non-fatigue state.

[0119] The second acquisition module 402 is used to acquire a plurality of preset eye closing thresholds.

[0120] The recognition module 403 is used to recognize multiple target images and calculate the preset eye closing time percentage corresponding to each preset eye closing threshold.

[0121] The calculation module 404 is used to determine the target eye closing threshold and target eye closing time percentage of the driver in the fatigue state based on the baseline eye closing threshold and baseline eye closing time percentage in the non-fatigue state, and multiple preset eye closing thresholds and corresponding preset eye closing time percentages.

[0122] The detection module 405 is used to perform fatigue detection on the driver based on the target eye-closing threshold and the target eye-closing time percentage.

[0123] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.

[0124] The fatigue driving detection device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.

[0125] The embodiment of the present invention also provides a computer device having the above Figure 4 The fatigue driving detection device shown.

[0126] See also Figure 5 , Figure 5 is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Figure 5As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 5 A processor 10 is taken as an example.

[0127] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.

[0128] The memory 20 stores instructions executable by at least one processor 10, so that at least one processor 10 executes the method shown in the above embodiment.

[0129] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0130] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.

[0131] The computer device further comprises a communication interface 30 for the computer device to communicate with other devices or a communication network.

[0132] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.

[0133] A part of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of the computer program instruction in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc., and accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium accessible to the computer.

[0134] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.

Claims

1. A method for detecting fatigue driving, characterized in that: The method comprises: Acquire a plurality of target images, wherein the target images are obtained by continuously capturing the driver's eyes when the driver is in a non-fatigue state; Acquire a plurality of preset eye closing thresholds, wherein the preset eye closing thresholds are preset eye aspect ratio thresholds; Identify the plurality of target images, and calculate the preset eye closing time percentage corresponding to each preset eye closing threshold; Determining a target eye closing threshold and a target eye closing time percentage of the driver in a fatigue state based on a baseline eye closing threshold and a baseline eye closing time percentage in a non-fatigue state, and a plurality of preset eye closing thresholds and corresponding preset eye closing time percentages, wherein the baseline eye closing threshold is a baseline eye aspect ratio threshold, and the target eye closing threshold is a target eye aspect ratio threshold; Performing driver fatigue detection based on the target eye-closing threshold and the target eye-closing time percentage; The identifying of the plurality of target images and calculating the preset eye closing time percentage corresponding to each preset eye closing threshold comprises: Identify the eyes of the driver in the plurality of target images to obtain the eye aspect ratio of each target image; and calculate the preset eye closing time percentage corresponding to each preset eye aspect ratio threshold based on the eye aspect ratio of each target image; The step of calculating the preset eye closing time percentage corresponding to each preset eye aspect ratio threshold based on the eye aspect ratio of each target image comprises: Acquire the total number of the target images; acquire the first number of the target images whose eye aspect ratio is less than the preset eye aspect ratio threshold; calculate the ratio of the first number in the total number, and use the ratio as the preset eye closing time percentage corresponding to the preset eye aspect ratio threshold; The reference eye-closing threshold and reference eye-closing time percentage based on the non-fatigue state, and the plurality of preset eye-closing thresholds and corresponding preset eye-closing time percentages, determine the target eye-closing threshold and target eye-closing time percentage of the driver in the fatigue state, including: Acquire a reference set and a plurality of preset sets, wherein the reference set includes the reference eye aspect ratio threshold value and the reference eye closure time percentage in a non-fatigue state; and one of the preset sets includes a preset eye aspect ratio threshold value and a preset eye closure time percentage corresponding thereto; Calculating the similarity between the benchmark set and the plurality of preset sets, determining the preset set having the highest similarity to the benchmark set, and using the preset eye aspect ratio threshold and the preset eye closing time percentage in the preset set as the first eye aspect ratio threshold and the first eye closing time percentage of the driver in a non-fatigue state; The first eye aspect ratio threshold is used as the target eye aspect ratio threshold of the driver in a fatigue state; the first eye closing time percentage is increased by a preset value to obtain the target eye closing time percentage of the driver in a fatigue state.

2. The fatigue driving detection method according to claim 1, characterized in that: The calculating the similarity between the benchmark set and the plurality of preset sets, and determining the preset set having the highest similarity to the benchmark set comprises: Constructing a benchmark function, wherein the benchmark function is a function for measuring the degree of difference between the benchmark set and each of the preset sets; Calculating function values ​​corresponding to the benchmark set and each of the preset sets using the benchmark function; When the function value is minimum, the preset eye aspect ratio threshold and the preset eye closing time percentage in the preset set are used as the first eye aspect ratio threshold and the first eye closing time percentage of the driver in a non-fatigue state.

3. The fatigue driving detection method according to claim 1, characterized in that: The acquiring of multiple target images comprises: In response to the vehicle being started, detecting a vehicle speed; When the vehicle speed is greater than or equal to a preset vehicle speed, a plurality of consecutive target images of the driver within a preset time period are acquired.

4. The fatigue driving detection method according to claim 1, characterized in that: The performing of driver fatigue detection based on the target eye-closing threshold and the target eye-closing time percentage comprises: Acquire multiple detection images of the driver within a preset time period; identifying eye features of the driver in a plurality of the detection images; Comparing the eye feature with the target eye-closing threshold, and when the eye feature meets the eye-closing condition, determining that the detected image is an eye-closing image; Obtaining the percentage of the closed-eye images; Determining whether the number ratio is greater than or equal to the target eye closing time percentage; When the proportion of the number is greater than or equal to the target eye-closing time percentage, it is determined that the driver is driving fatigued.

5. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the fatigue driving detection method according to any one of claims 1 to 4 by executing the computer instructions.

6. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the fatigue driving detection method according to any one of claims 1 to 4.

7. A computer program product, characterized in that The method comprises computer instructions for causing a computer to execute the fatigue driving detection method according to any one of claims 1 to 4.