Driving state monitoring method and device
Through image collection and regional target detection model analysis, the driver's face, eyes, mouth and hand status are monitored, and the driver's abnormal behavior is identified and warned, which solves the problem of effectively monitoring the driver's safety status in the existing technology. problem, improving driving safety.
Patent Information
- Application Number
- CN202110004406.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-01-04
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2041-01-04
AI Technical Summary
It is difficult to effectively monitor and ensure the safety status of drivers during driving with existing technology. Especially when the traffic accident rate on highways increases, a method is needed to monitor the driver's driving status in real time to prevent accidents.
Collect the driver's driving images through image acquisition equipment and input them into the pre-trained regional target detection model to detect and analyze the face, eyes, mouth and hand area maps to determine the driver's driving status, including smoking, Abnormal states such as phone calls, fatigue, distraction, etc. will be detected, and early warning messages will be sent when abnormal states occur continuously.
It achieves accurate monitoring and early warning of the driver's driving status, improves driving safety and reduces the risk of traffic accidents.
Smart Images

Figure CN112633247B_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present disclosure relate to the field of computer technology, and in particular to a driving status monitoring method and device. Background Art
[0002] With the development of the transportation industry, the construction of a large number of highways and the rapid increase in the number of motor vehicles, the traffic accident rate has shown a clear upward trend.
[0003] In the related art, it is necessary to monitor the driving status of the driver during driving to ensure the driver's safety. Summary of the invention
[0004] The embodiments of the present disclosure provide a driving status monitoring method and device.
[0005] In a first aspect, an embodiment of the present disclosure provides a driving status monitoring method, the method comprising: in response to receiving a driving image of a driver captured by an image acquisition device connected to a communication link, inputting the driving image into a pre-trained area target detection model to obtain a target area map group corresponding to the driving image, wherein the target area map group includes any one or more of the following: a face area map, an eye area map, a mouth area map, and a hand area map; determining the driving status of the driver based on the characteristic information of the driver presented in each target area map in the target area map group.
[0006] In some embodiments, the driving state of the driver is determined based on the characteristic information of the driver presented by each target area map in the target area map group, including: in response to the absence of a facial area map in the target area map group, determining that the driving state of the driver is a state indicating that the facial area map does not exist.
[0007] In some embodiments, the driving state of the driver is determined based on the characteristic information of the driver presented by each target area map in the target area map group, including: in response to the existence of a hand area map in the target area map group, the hand area map is input into a pre-trained first state determination model to obtain a hand state corresponding to the hand area map, wherein the hand state includes a state for indicating that the driver is smoking, a state for indicating that the driver is making a phone call, and a state for indicating that the driver is normal; in response to the hand state belonging to the target state, the hand state is determined as a driving state, wherein the target state includes any one or more of the following: a state for indicating that the driver is smoking, a state for indicating that the driver is making a phone call.
[0008] In some embodiments, the driving state of the driver is determined based on the characteristic information of the driver presented by each target area map in the target area map group, including: in response to satisfying a preset trigger condition and the target area map group including a face area map, an eye area map and a mouth area map, the face area map, the eye area map and the mouth area map included in the target area map group are input into a pre-trained second state determination model to obtain a head state corresponding to the input face area map, the eye area map and the mouth area map, and determine the head state as a driving state; wherein the head state includes: a state indicating that the driver is smoking, a state indicating that the driver is tired, a state indicating that the driver is distracted, and a state indicating that the driver is normal, and the trigger condition includes: there is no hand area map in the target area map group, there is a hand area map in the target area map group and the hand state corresponding to the hand area map is a state indicating that the driver is normal.
[0009] In some embodiments, the face area map, eye area map and mouth area map included in the target area map group are input into a pre-trained second state determination model to obtain a head state corresponding to the input face area map, eye area map and mouth area map, including: according to a preset splicing rule, the face area map, eye area map and mouth area map included in the target area map group are spliced into a spliced map; the spliced map is input into the second state determination model to obtain a head state corresponding to the spliced map.
[0010] In some embodiments, the method also includes: in response to determining that the driver's driving state is the same state for a preset number of times in a row, and the same state is an abnormal state, sending a preset warning message to the target terminal; wherein the abnormal state includes: a state indicating that the driver is making a phone call, a state indicating that the driver is smoking, a state indicating that the driver is tired, a state indicating that the driver is distracted, and a state indicating that a facial area map does not exist.
[0011] In some embodiments, the regional target detection model is trained by the following steps: obtaining a pre-generated training sample set, wherein the training samples in the training sample set include a sample driving image and a sample target regional map group corresponding to the sample driving image, and the sample target regional map group includes: a sample face regional map, a sample eye regional map, a sample mouth regional map and a sample hand regional map; selecting training samples from the training sample set, and performing the following training steps: inputting the sample driving image in the selected training sample into the initial regional target detection model to obtain an actual output; adjusting the parameters of the initial regional target detection model according to the difference between the sample target regional map group corresponding to the input sample driving image and the actual output obtained to obtain an adjusted initial regional target detection model; determining whether there are unselected training samples in the training sample set; in response to determining that there are no training samples, determining the adjusted initial regional target detection model as the regional target detection model; in response to determining that there are training samples, using the adjusted initial regional target detection model as the initial regional target detection model, selecting unselected training samples from the training sample set, and continuing to perform the training steps.
[0012] In a second aspect, an embodiment of the present disclosure provides a driving status monitoring device, which includes: an area detection unit, configured to, in response to receiving a driving image of the driver captured by an image acquisition device connected to a communication device, input the driving image into a pre-trained area target detection model to obtain a target area map group corresponding to the driving image, wherein the target area map group includes any one or more of the following: a face area map, an eye area map, a mouth area map, and a hand area map; a state determination unit, configured to determine the driving status of the driver based on the characteristic information of the driver presented in each target area map in the target area map group.
[0013] In some embodiments, the state determination unit is further configured to determine the driving state of the driver as a state indicating that the face area map does not exist in response to the face area map not existing in the target area map group.
[0014] In some embodiments, the state determination unit is further configured to, in response to the presence of a hand area map in the target area map group, input the hand area map into a pre-trained first state determination model to obtain a hand state corresponding to the hand area map, wherein the hand state includes a state for indicating that the driver is smoking, a state for indicating that the driver is making a phone call, and a state for indicating that the driver is normal; in response to the hand state belonging to the target state, determine the hand state as a driving state, wherein the target state includes any one or more of the following: a state for indicating that the driver is smoking, a state for indicating that the driver is making a phone call.
[0015] In some embodiments, the state determination unit is further configured to input the face area map, eye area map and mouth area map included in the target area map group into a pre-trained second state determination model in response to satisfying a preset trigger condition and the target area map group including a face area map, an eye area map and a mouth area map, obtain a head state corresponding to the input face area map, eye area map and mouth area map, and determine the head state as a driving state; wherein the head state includes: a state indicating that the driver is smoking, a state indicating that the driver is tired, a state indicating that the driver is distracted, and a state indicating that the driver is normal, and the trigger condition includes: there is no hand area map in the target area map group, there is a hand area map in the target area map group and the hand state corresponding to the hand area map is a state indicating that the driver is normal.
[0016] In some embodiments, the face area map, eye area map and mouth area map included in the target area map group are input into a pre-trained second state determination model to obtain a head state corresponding to the input face area map, eye area map and mouth area map, including: according to a preset splicing rule, the face area map, eye area map and mouth area map included in the target area map group are spliced into a spliced map; the spliced map is input into the second state determination model to obtain a head state corresponding to the spliced map.
[0017] In some embodiments, the device also includes an information warning unit, which is configured to send a preset warning message to the target terminal in response to determining that the driver's driving state is the same state for a preset number of times in a row, and the same state is an abnormal state; wherein the abnormal state includes: a state indicating that the driver is making a phone call, a state indicating that the driver is smoking, a state indicating that the driver is tired, a state indicating that the driver is distracted, and a state indicating that a facial area map does not exist.
[0018] In some embodiments, the regional object detection model is trained by the following steps:
[0019] A pre-generated training sample set is obtained, wherein the training samples in the training sample set include a sample driving image and a sample target area map group corresponding to the sample driving image, and the sample target area map group includes: a sample face area map, a sample eye area map, a sample mouth area map and a sample hand area map; a training sample is selected from the training sample set, and the following training steps are performed: a sample driving image in the selected training sample is input into an initial area target detection model to obtain an actual output; according to the difference between the sample target area map group corresponding to the input sample driving image and the actual output obtained, the parameters of the initial area target detection model are adjusted to obtain an adjusted initial area target detection model; it is determined whether there are unselected training samples in the training sample set; in response to determining that there are no training samples, the adjusted initial area target detection model is determined as the area target detection model; in response to determining that there are training samples, the adjusted initial area target detection model is used as the initial area target detection model, unselected training samples are selected from the training sample set, and the training steps are continued.
[0020] In a third aspect, an embodiment of the present disclosure provides an electronic device, comprising: one or more processors; a storage device on which one or more programs are stored; when the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any implementation manner in the first aspect.
[0021] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable medium having a computer program stored thereon, which, when executed by a processor, implements the method described in any implementation manner in the first aspect.
[0022] The driving state monitoring method and device provided by the embodiment of the present disclosure can respond to receiving the driving image of the driver collected by the image acquisition device connected to the communication, input the driving image into the pre-trained regional target detection model, and obtain the target area map group corresponding to the driving image. Wherein, the target area map group includes any one or more of the following: face area map, eye area map, mouth area map and hand area map. Then, based on the characteristic information of the driver presented by each target area map in the target area map group, the driving state of the driver is determined. The method and device provided by the embodiment of the present disclosure detects the target area map group corresponding to the driving image through the pre-trained regional target detection model, so as to obtain the driving state of the driver by analyzing the target area map group. It is helpful to effectively determine the driving state of the driver during driving, so as to ensure the safety of the driver. In addition, the comprehensive analysis of the driving state of the driver from the face, eyes, mouth and hands of the driver presented in the driving image helps to accurately analyze the driving state, thereby improving the accuracy of monitoring the driving state of the driver in driving. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Other features, objects and advantages of the present disclosure will become more apparent from the detailed description of non-limiting embodiments made with reference to the following drawings:
[0024] Figure 1 is a flow chart of a driving state monitoring method provided by an embodiment of the present disclosure;
[0025] Figure 2 is a flow chart for determining a driving state provided by an embodiment of the present disclosure;
[0026] Figure 3 is another flow chart for determining a driving state provided by an embodiment of the present disclosure;
[0027] Figure 4 is a schematic diagram of the effect of a spliced image provided by an embodiment of the present disclosure;
[0028] Figure 5 is a flowchart of another driving state monitoring method provided by an embodiment of the present disclosure;
[0029] Figure 6 is a flowchart of another driving state monitoring method provided by an embodiment of the present disclosure;
[0030] Figure 7 is a structural schematic diagram of a driving state monitoring device provided by an embodiment of the present disclosure;
[0031] Figure 8 It is a schematic diagram of the structure of an electronic device suitable for implementing the embodiments of the present disclosure. DETAILED DESCRIPTION
[0032] The present disclosure is further described in detail below in conjunction with the accompanying drawings and embodiments. It is understood that the specific embodiments described herein are only used to explain the relevant invention, rather than to limit the invention. It is also necessary to explain that, for ease of description, only the parts related to the relevant invention are shown in the accompanying drawings.
[0033] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present disclosure may be combined with each other. The present disclosure will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0034] Figure 1 The process of an embodiment of the driving state monitoring method according to the present disclosure is shown. The driving state monitoring method comprises the following steps:
[0035] Step 101, in response to receiving a driving image of a driver captured by an image capture device connected to a communication channel, input the driving image into a pre-trained regional target detection model to obtain a target region map group corresponding to the driving image.
[0036] The target region map group includes any one or more of the following: a face region map, an eye region map, a mouth region map, and a hand region map. Here, the target region image in the target region map group is usually a part of the driving image.
[0037] In this embodiment, the execution subject of the driving state monitoring method may be an electronic device, such as a vehicle-mounted terminal device.
[0038] The driving image is usually an image showing a driver. An image acquisition device is usually installed in a vehicle to acquire an image of the driver while driving.
[0039] Here, the image acquisition device can acquire the driving image of the driver according to a preset image acquisition cycle, such as 5 seconds. After acquiring the driving image, the image acquisition device can send the acquired driving image to the above-mentioned execution subject through a wired connection or a wireless connection. In this way, the above-mentioned execution subject can receive the driving image, and input the received driving image into a pre-trained regional target detection model, thereby obtaining a target region map group corresponding to the driving image.
[0040] Among them, the regional target detection model can be used to characterize the correspondence between the driving image and the target region map group. Specifically, the regional target detection model can be a correspondence table that is generated based on statistics of a large number of driving images of a large number of drivers and stores the correspondence between multiple driving images and target region map groups. It can also be a model obtained by training an initial model (such as a convolutional neural network (CNN), a residual network (ResNet), etc.) based on training samples using a machine learning method.
[0041] In some optional implementations of this embodiment, the above regional object detection model can be trained through the following steps:
[0042] The first step is to obtain a pre-generated training sample set, wherein the training samples in the training sample set include a sample driving image and a sample target area map group corresponding to the sample driving image, and the sample target area map group includes: a sample face area map, a sample eye area map, a sample mouth area map, and a sample hand area map.
[0043] It should be pointed out that since the training samples are sample driving images and sample face region maps, sample eye region maps, sample mouth region maps, and sample hand region maps corresponding to the sample driving images. In the process of generating training samples, since it is relatively simple to annotate the sample face region map, sample eye region map, sample mouth region map, and sample hand region map from the sample driving images, each region map only needs to annotate 4 vertices, and the total number of points required for annotation is small, it helps to speed up the efficiency of annotating the sample driving images, thereby improving the efficiency of generating the training sample set. This helps to improve the efficiency of training the regional target detection model.
[0044] In the second step, a training sample is selected from the training sample set, and the following training steps are performed: a sample driving image in the selected training sample is input into the initial regional target detection model to obtain an actual output. Then, according to the difference between the sample target regional map group corresponding to the input sample driving image and the obtained actual output, the parameters of the initial regional target detection model are adjusted to obtain an adjusted initial regional target detection model. After that, it is determined whether there are unselected training samples in the training sample set. Finally, in response to determining that there are no such training samples, the adjusted initial regional target detection model is determined as the regional target detection model.
[0045] Here, as an example, the execution subject can adjust the parameters of the initial area target detection model in the following manner: adjust the parameters of the initial area target detection model by reducing the set value each time. For example, if the parameter value of a certain parameter of the model is m before adjustment, it becomes mh after adjustment. When it is adjusted again next time, it is adjusted to mhh. And so on.
[0046] Optionally, adjusting the parameters of the initial regional object detection model according to the difference between the sample target region map group corresponding to the input sample driving image and the obtained actual output may include: inputting the sample target region map group corresponding to the input sample image and the obtained actual output into a predetermined loss function to obtain a loss value. In response to determining that the obtained loss value is greater than a preset loss threshold, adjusting the parameters of the initial regional object detection model.
[0047] The above loss function is usually a function used to describe the degree of inconsistency between the actual output and the expected output. As an example, the above loss function can be a function that counts the sum of the differences in pixel values between the target area map of the actual output and the target area map of the expected output.
[0048] The above loss threshold may be a preset value.
[0049] Here, as an example, the execution entity can adjust the parameters of the initial area target detection model in the following manner: the execution entity can use the gradient descent method to calculate the gradient of the loss function with respect to the parameters in the initial area target detection model, and then determine the change in the parameters of the initial area target detection model based on the gradient, and superimpose the parameters and their change to form the adjusted parameters.
[0050] In the third step, in response to determining the existence, the adjusted initial regional target detection model is used as the initial regional target detection model, unselected training samples are selected from the training sample set, and the training step is continued.
[0051] Step 102 : determining the driving state of the driver based on the characteristic information of the driver presented by each target area map in the target area map group.
[0052] In this embodiment, the execution entity may determine the driving state of the driver based on the characteristic information of the driver presented by each target area map in the target area map group.
[0053] The method provided by the embodiment of the present disclosure detects the target area map group corresponding to the driving image through the pre-trained area target detection model, and then obtains the driving state of the driver by analyzing the target area map group. It is helpful to effectively determine the driving state of the driver during driving, so as to ensure the safety of the driver. In addition, the comprehensive analysis of the driving state of the driver from the face, eyes, mouth and hands of the driver presented in the driving image helps to accurately analyze the driving state, thereby improving the accuracy of monitoring the driving state of the driver while driving.
[0054] In some optional implementations of this embodiment, the determining the driving state of the driver based on the characteristic information of the driver presented by each target area map in the target area map group may include:
[0055] In response to the absence of the facial region map in the target region map group, it is determined that the driving state of the driver is a state indicating that the facial region map does not exist.
[0056] Here, if there is no face region map in the target region map group, that is, the region target detection model does not detect the driver's face region, then the execution subject can directly determine that the driver's driving state is a state indicating that the face region map does not exist.
[0057] In some optional implementations of the present embodiment, the above-mentioned determination of the driving state of the driver based on the characteristic information of the driver presented by each target area map in the target area map group may also include steps 201-202. Figure 2 It is a flowchart of determining a driving state provided by an embodiment of the present disclosure.
[0058] Step 201, in response to the existence of a hand area map in the target area map group, the hand area map is input into a pre-trained first state determination model to obtain a hand state corresponding to the hand area map.
[0059] The hand status is usually used to indicate the driver's hand movements. The hand status may include but is not limited to: indicating the driver is smoking, indicating the driver is making a phone call, and indicating the driver is normal.
[0060] Here, if there is a hand area map in the target area map group, that is, the area target detection model has detected the driver's hand area. At this time, the execution subject can input the hand area map into the first state determination model to obtain the hand state corresponding to the input hand area map.
[0061] The first state determination model can be used to characterize the correspondence between the hand area map and the hand state. Specifically, the first state determination model can be a correspondence table storing the correspondence between multiple hand area maps and hand states, which is generated based on statistics of a large number of hand area maps of a large number of drivers. It can also be a model obtained by training an initial model (e.g., CNN, ResNet, etc.) using a machine learning method based on training samples.
[0062] Step 202: In response to the hand state belonging to the target state, the hand state is determined as a driving state.
[0063] The target state includes any one or more of the following: a state for indicating that the driver is smoking, and a state for indicating that the driver is making a phone call. As an example, the target state may be a state for indicating that the driver is smoking, and may also be a state for indicating that the driver is making a phone call. In practice, the target state may generally include both a state for indicating that the driver is smoking and a state for indicating that the driver is making a phone call.
[0064] Here, if the hand state belongs to the target state, such as the hand state is used to indicate that the driver is smoking, or the hand state is used to indicate that the driver is making a phone call. At this time, the execution subject can directly determine the hand state as the driving state of the driver.
[0065] In this implementation, since the driver is usually in a sitting position during driving, the driver's hand state can usually reflect the driver's overall condition more accurately. Therefore, determining the hand state as the driving state can achieve accurate analysis of the driving state. In addition, since the driver's hands need to be on the steering wheel at all times during driving in actual application. If the driver's hands are not on the steering wheel, such as making a phone call or smoking, there is usually a major safety hazard. The hand movements of a driver in a sitting position are usually simple, and it is relatively easy to implement when analyzing the hand area map, which helps to reduce the difficulty of monitoring the driving state. That is, by analyzing the hand area map to obtain the driving state, the computational complexity can be reduced, which helps to speed up the data processing efficiency, thereby improving the efficiency of monitoring the driving state.
[0066] In some optional implementations of this embodiment, the determining the driving state of the driver based on the characteristic information of the driver presented by each target area map in the target area map group may also include:
[0067] In response to satisfying a preset trigger condition and the target area map group including a face area map, an eye area map and a mouth area map, the face area map, the eye area map and the mouth area map included in the target area map group are input into a pre-trained second state determination model to obtain a head state corresponding to the input face area map, the eye area map and the mouth area map, and the head state is determined as a driving state.
[0068] The head state is usually used to indicate the driver's head movement. The head state may include but is not limited to: a state indicating that the driver is smoking, a state indicating that the driver is tired, a state indicating that the driver is distracted, and a state indicating that the driver is normal.
[0069] Here, the trigger condition may be a pre-set condition. In practice, the trigger condition may be condition one or condition two.
[0070] Condition 1 is: there is no hand area map in the target area map group.
[0071] Condition 2 is: there is a hand area map in the target area map group, and the hand state corresponding to the hand area map is used to indicate that the driver is in a normal state.
[0072] Here, there is no hand area map in the target area map group. Or, there is a hand area map in the target area map group, but the hand state corresponding to the hand area map indicates that the driver is normal. At this time, the above-mentioned execution subject can use the head-related area map to further determine whether the driver's head movement is normal.
[0073] Specifically, the above-mentioned execution subject can input the face area map, the eye area map and the mouth area map into the second state determination model to obtain the head state corresponding to the input face area map, the eye area map and the mouth area map.
[0074] The second state determination model can be used to characterize the correspondence between the face area map, the eye area map, the mouth area map and the head state. Specifically, the second state determination model can be a correspondence table storing the correspondence between multiple face area maps, eye area maps and mouth area maps and the head state, which is generated based on statistics of a large number of face area maps, eye area maps and mouth area maps of a large number of drivers. It can also be a model obtained by training an initial model (for example, CNN, ResNet, etc.) using a machine learning method based on training samples.
[0075] This implementation can further analyze the driver's head state when the hand area map is not detected or the detected hand area map indicates that the hand state is normal. The driver's head state is further analyzed only when the trigger condition is met, which can save computing resources and help improve resource utilization. In addition, the driver's head state is analyzed as a supplement to the analysis of the driver's hand state, which can achieve a more accurate determination of the driver's driving state, which helps to improve the accuracy of monitoring the driving state of the driver while driving.
[0076] In some optional implementations of the present embodiment, the above-mentioned inputting the face area map, eye area map and mouth area map included in the target area map group into the pre-trained second state determination model to obtain the head state corresponding to the input face area map, eye area map and mouth area map may include step 301 and step 302. Figure 3 It is a flowchart of determining a driving state provided by an embodiment of the present disclosure.
[0077] Step 301 , according to a preset splicing rule, splice the face region map, the eye region map and the mouth region map included in the target region map group into a spliced map.
[0078] The stitching rule may be a pre-set rule. As an example, the stitching rule may be stitching the face area map, the eye area map, and the mouth area map into one image in a left-to-right order. As another example, the stitching rule may be stitching the face area map, the eye area map, and the mouth area map into one image in a top-to-bottom order.
[0079] Figure 4 is a schematic diagram of the effect of the splicing diagram provided by the embodiment of the present disclosure. Figure 4As shown, the face region map is located on the left side of the mosaic, the eye region map is located on the upper right side of the mosaic, and the mouth region map is located on the lower right side of the mosaic.
[0080] In practice, since the face area is usually larger than the eye area and the mouth area, Figure 4 The splicing method shown in FIG. 1 is used to obtain a spliced image, which can realize more effective splicing of the face area map, the eye area map and the mouth area map. Figure 4 The spliced image obtained by the splicing method shown can realize a more accurate judgment of the opening and closing of the driver's eyes, and can effectively solve the problem that it is difficult to extract the opening and closing information of the eyes of the driver with small eyes. It is helpful to more accurately determine the driver's head state.
[0081] Here, the execution subject may splice the face region map, the eye region map and the mouth region map included in the target region map group into a spliced map according to the splicing rule.
[0082] Step 302: input the spliced image into a second state determination model to obtain a head state corresponding to the spliced image.
[0083] Here, after obtaining the spliced graph, the execution subject may input the spliced graph into the second state model to obtain the head state corresponding to the spliced graph.
[0084] In this implementation, since it is usually easier to analyze one image than three images, the face area image, the eye area image, and the mouth area image are analyzed. Figure 3 The images are spliced into a spliced image, and then the spliced image is analyzed to obtain the head state. This can save computing resources and help further improve the efficiency of monitoring the driving state of the driver.
[0085] See also Figure 5 , Figure 5 : is a flow chart of a driving state monitoring method provided by an embodiment of the present disclosure. The driving state monitoring method comprises the following steps:
[0086] Step 501, in response to receiving a driving image of a driver captured by an image capture device connected to a communication channel, input the driving image into a pre-trained regional target detection model to obtain a target region map group corresponding to the driving image.
[0087] The target area map group includes any one or more of the following: a face area map, an eye area map, a mouth area map, and a hand area map.
[0088] Step 502 : determining the driving state of the driver based on the characteristic information of the driver presented by each target area map in the target area map group.
[0089] In this embodiment, the specific operations of steps 501-502 are the same as Figure 1 The operations of steps 101 - 102 in the illustrated embodiment are substantially the same and will not be described in detail herein.
[0090] Step 503, in response to determining that the driver's driving state is the same state for a preset number of consecutive times, and the same state is an abnormal state, sending a preset warning message to the target terminal.
[0091] The abnormal state is usually used to indicate that the driver is not driving safely. The abnormal state may include but is not limited to: a state indicating that the driver is making a phone call, a state indicating that the driver is smoking, a state indicating that the driver is tired, a state indicating that the driver is distracted, and a state indicating that the face area map does not exist.
[0092] The above-mentioned preset number can be a pre-set data value. The value of the preset number is usually a positive integer. As an example, the preset number can be 3.
[0093] The above-mentioned warning information may be a pre-set information for reminding the driver that he is in an abnormal state. In practice, the implementation form of the warning information is usually in the form of voice. As an example, the above-mentioned warning information may be: smoking while driving is very dangerous.
[0094] The target terminal may be a pre-set terminal device, for example, the target terminal may be a driver's mobile phone, or a voice playback device in a vehicle driven by the driver.
[0095] In this implementation, when the same abnormal state is detected to occur multiple times in succession, the above-mentioned execution entity can more accurately determine that the driver is indeed currently in a certain abnormal state. At this time, sending a warning message to the driver through the target terminal helps to remind the driver to drive safely, thereby ensuring the driver's safety.
[0096] See also Figure 6 , Figure 6 FIG. 1 is a flow chart of a driving state monitoring method provided by an embodiment of the present disclosure. Figure 6 As shown, the driving state monitoring method may include steps 601 to 610. It should be noted that the execution subject of steps 601 to 610 is an electronic device.
[0097] Step 601, the driving image of the driver received from the image acquisition device is input into the regional object detection model.
[0098] Step 602, determine whether a face region is detected. If a face region is detected, execute step 604, otherwise, execute step 603.
[0099] Step 603: determining the driving state corresponding to the current driving image as an abnormal driver posture state.
[0100] Here, the abnormal posture state of the driver is the aforementioned state for indicating that the facial area map does not exist.
[0101] Step 604, continue to determine whether the hand area is detected. If the hand area is detected, execute step 605, otherwise, execute step 608.
[0102] Step 605, input the hand area map into the three-classification model to obtain the driver's hand state.
[0103] Here, the three-classification model is the aforementioned first state determination model. Here, the hand states that can be obtained may include: a state indicating that the driver is smoking, a state indicating that the driver is making a phone call, and a state indicating that the driver is normal.
[0104] Step 606, determining whether the hand motion indicated by the hand state is making a phone call or smoking. If so, executing step 607. Otherwise, executing step 608.
[0105] Step 607: Determine the driving state corresponding to the current driving image as a phone call state or a smoking state.
[0106] Here, the calling state is the aforementioned state for indicating that the driver is calling. The smoking state is the aforementioned state for indicating that the driver is smoking.
[0107] Step 608, splicing the detected face area map, eye area map and mouth area map to obtain a spliced map.
[0108] Step 609, input the spliced image into the four-classification model to obtain the driver's head state.
[0109] Here, the four-classification model is the aforementioned second state determination model. Here, the head states that can be obtained may include: a state indicating that the driver is smoking, a state indicating that the driver is tired, a state indicating that the driver is distracted, and a state indicating that the driver is normal.
[0110] Step 610, based on the output of the four-classification model, the driving state corresponding to the current driving image is determined as fatigue, distraction, smoking, or normal state.
[0111] Further references Figure 7 , as a pair Figure 1 The present disclosure provides an embodiment of a driving state monitoring device, and the device embodiment is Figure 1Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.
[0112] like Figure 7 As shown, the driving state monitoring device of this embodiment includes: an area detection unit 701, which is configured to input the driving image into a pre-trained area target detection model in response to receiving a driving image of the driver acquired by an image acquisition device connected to a communication connection, and obtain a target area map group corresponding to the driving image, wherein the target area map group includes any one or more of the following: a face area map, an eye area map, a mouth area map and a hand area map; a state determination unit 702, which is configured to determine the driving state of the driver based on the characteristic information of the driver presented by each target area map in the target area map group.
[0113] In some optional implementations of this embodiment, the state determination unit 702 may be further configured to: in response to the absence of a facial area map in the target area map group, determine that the driver's driving state is a state indicating that the facial area map does not exist.
[0114] In some optional implementations of this embodiment, the state determination unit 702 can be further configured to: in response to the existence of a hand area map in the target area map group, input the hand area map into a pre-trained first state determination model to obtain a hand state corresponding to the hand area map, wherein the hand state includes a state for indicating that the driver is smoking, a state for indicating that the driver is making a phone call, and a state for indicating that the driver is normal; in response to the hand state belonging to the target state, determine the hand state as a driving state, wherein the target state includes any one or more of the following: a state for indicating that the driver is smoking, a state for indicating that the driver is making a phone call.
[0115] In some optional implementations of this embodiment, the state determination unit 702 can be further configured to: in response to satisfying a preset trigger condition and the target area map group including a face area map, an eye area map and a mouth area map, input the face area map, the eye area map and the mouth area map included in the target area map group into a pre-trained second state determination model, obtain a head state corresponding to the input face area map, the eye area map and the mouth area map, and determine the head state as a driving state; wherein the head state includes: a state for indicating that the driver is smoking, a state for indicating that the driver is tired, a state for indicating that the driver is distracted, and a state for indicating that the driver is normal, and the trigger condition includes: there is no hand area map in the target area map group, there is a hand area map in the target area map group and the hand state corresponding to the hand area map is a state for indicating that the driver is normal.
[0116] In some optional implementations of the present embodiment, the face area map, eye area map and mouth area map included in the target area map group are input into a pre-trained second state determination model to obtain a head state corresponding to the input face area map, eye area map and mouth area map, including: according to a preset splicing rule, the face area map, eye area map and mouth area map included in the target area map group are spliced into a spliced image; the spliced image is input into the second state determination model to obtain a head state corresponding to the spliced image.
[0117] In some optional implementations of this embodiment, the device may further include an information warning unit (not shown in the figure). The information warning unit may be configured to send preset warning information to the target terminal in response to determining that the driver's driving state is the same state for a preset number of consecutive times, and the same state is an abnormal state; wherein the abnormal state includes: a state indicating that the driver is making a phone call, a state indicating that the driver is smoking, a state indicating that the driver is tired, a state indicating that the driver is distracted, and a state indicating that the facial area map does not exist.
[0118] In some optional implementations of the present embodiment, the regional target detection model is trained through the following steps: obtaining a pre-generated training sample set, wherein the training samples in the training sample set include a sample driving image and a sample target regional map group corresponding to the sample driving image, and the sample target regional map group includes: a sample face regional map, a sample eye regional map, a sample mouth regional map and a sample hand regional map; selecting training samples from the training sample set, and performing the following training steps: inputting the sample driving image in the selected training sample into the initial regional target detection model to obtain an actual output; adjusting the parameters of the initial regional target detection model according to the difference between the sample target regional map group corresponding to the input sample driving image and the actual output obtained to obtain an adjusted initial regional target detection model; determining whether there are unselected training samples in the training sample set; in response to determining that there are no training samples, determining the adjusted initial regional target detection model as the regional target detection model; in response to determining that there are training samples, using the adjusted initial regional target detection model as the initial regional target detection model, selecting unselected training samples from the training sample set, and continuing to perform the training steps.
[0119] The device provided by the above-mentioned embodiment of the present disclosure detects the target area map group corresponding to the driving image through the pre-trained area target detection model, and then obtains the driving state of the driver by analyzing the target area map group. It is helpful to effectively determine the driving state of the driver during driving, so as to ensure the safety of the driver. In addition, a comprehensive analysis of the driving state of the driver from the face, eyes, mouth and hands of the driver presented in the driving image helps to accurately analyze the driving state, thereby improving the accuracy of monitoring the driving state of the driver while driving.
[0120] Reference below Figure 8 , which shows a schematic structural diagram of an electronic device suitable for implementing an embodiment of the present disclosure. Figure 8 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0121] like Figure 8 As shown, the electronic device may include a processing device (e.g., a central processing unit (CPU), a graphics processor, etc.) 801, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 802 or a program loaded from a storage device 808 into a random access memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the electronic device are also stored. The processing device 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.
[0122] Typically, the following devices may be connected to the I / O interface 805: input devices 806 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image acquisition device, a microphone, an accelerometer, a gyroscope, etc.; output devices 807 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 808 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 809. The communication device 809 may allow the electronic device to communicate with other devices wirelessly or by wire to exchange data. Although Figure 8 An electronic device having various devices is shown, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead. Figure 8 Each block shown in the figure may represent one device, or may represent multiple devices as required.
[0123] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through a communication device 809, or installed from a storage device 808, or installed from a ROM 802. When the computer program is executed by the processing device 801, the above functions defined in the method of the embodiment of the present disclosure are executed. It should be noted that the computer-readable medium of the embodiment of the present disclosure can be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium can be, for example, - but not limited to - an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to, an electrical connection with one or more conductors, 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 above. In an embodiment of the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, an apparatus, or a device. In an embodiment of the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in combination with an instruction execution system, an apparatus, or a device. The program code embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to: wire, optical cable, RF (radio frequency), etc., or any suitable combination of the foregoing.
[0124] The computer-readable medium may be included in the electronic device; or it may exist independently without being installed in the electronic device. The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device may perform the following steps: in response to receiving a driving image of the driver acquired by an image acquisition device connected to the communication, input the driving image into a pre-trained regional target detection model to obtain a target region map group corresponding to the driving image, wherein the target region map group includes any one or more of the following: a face region map, an eye region map, a mouth region map, and a hand region map; based on the characteristic information of the driver presented by each target region map in the target region map group, determine the driving state of the driver.
[0125] Computer program code for performing the operations of embodiments of the present disclosure may be written in one or more programming languages or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on a user's computer, partially on a user's computer, as a separate software package, partially on a user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0126] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0127] The units involved in the embodiments described in the present disclosure may be implemented by software or by hardware. The described units may also be provided in a processor, for example, may be described as: a processor including an area detection unit and a state determination unit. Among them, the names of these units do not constitute a limitation on the units themselves under certain circumstances, for example, the state determination unit may also be described as "a unit for determining the driving state of the driver based on the characteristic information of the driver presented by each target area map in the target area map group".
[0128] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the present disclosure is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above invention concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other.
Claims
1. A driving state monitoring method, in, The method comprises: In response to receiving a driving image of a driver acquired by an image acquisition device connected to the communication link, the driving image is input into a pre-trained regional target detection model to obtain a target regional map group corresponding to the driving image, wherein the target regional map group includes any one or more of the following: a face regional map, an eye regional map, a mouth regional map, and a hand regional map; Determining the driving state of the driver based on the characteristic information of the driver presented by each target area map in the target area map group includes: In response to satisfying a preset trigger condition and the target area map group including a face area map, an eye area map and a mouth area map, the face area map, the eye area map and the mouth area map included in the target area map group are input into a pre-trained second state determination model to obtain a head state corresponding to the input face area map, the eye area map and the mouth area map, and the head state is determined as the driving state; the trigger condition includes: there is no hand area map in the target area map group, or there is a hand area map in the target area map group and the hand state corresponding to the hand area map is a state for indicating that the driver is normal; Among them, the step of inputting the face area map, eye area map and mouth area map included in the target area map group into a pre-trained second state determination model to obtain a head state corresponding to the input face area map, eye area map and mouth area map comprises: according to a preset splicing rule, splicing the face area map, eye area map and mouth area map included in the target area map group into a spliced image; inputting the spliced image into the second state determination model to obtain a head state corresponding to the spliced image; the preset splicing rule comprises: the face area map is located on the left side of the spliced image, the eye area map is located on the upper right side of the spliced image, and the mouth area map is located on the lower right side of the spliced image.
2. The driving state monitoring method according to claim 1, in, The determining the driving state of the driver based on the characteristic information of the driver presented by each target area map in the target area map group includes: In response to the absence of a facial region map in the target region map group, it is determined that the driving state of the driver is a state indicating that a facial region map does not exist.
3. The driving state monitoring method according to claim 1, in, The determining the driving state of the driver based on the characteristic information of the driver presented by each target area map in the target area map group includes: In response to the existence of a hand area map in the target area map group, the hand area map is input into a pre-trained first state determination model to obtain a hand state corresponding to the hand area map, wherein the hand state includes a state for indicating that the driver is smoking, a state for indicating that the driver is making a phone call, and a state for indicating that the driver is normal; In response to the hand state belonging to the target state, the hand state is determined as the driving state, wherein the target state includes any one or more of the following: a state indicating that the driver is smoking, and a state indicating that the driver is making a phone call.
4. The driving state monitoring method according to claim 1, in, The head state includes: a state indicating that the driver is smoking, a state indicating that the driver is tired, a state indicating that the driver is distracted, and a state indicating that the driver is normal. The trigger conditions include: there is no hand area map in the target area map group, there is a hand area map in the target area map group and the hand state corresponding to the hand area map is a state indicating that the driver is normal.
5. The driving state monitoring method according to claim 1, in, The method further comprises: In response to determining that the driving state of the driver is the same state for a preset number of consecutive times, and the same state is an abnormal state, sending a preset warning message to the target terminal; The abnormal state includes: a state indicating that the driver is making a phone call, a state indicating that the driver is smoking, a state indicating that the driver is tired, a state indicating that the driver is distracted, and a state indicating that a facial area map does not exist.
6. The driving state monitoring method according to any one of claims 1 to 5, in, The regional object detection model is trained through the following steps: A pre-generated training sample set is obtained, wherein the training samples in the training sample set include a sample driving image and a sample target area map group corresponding to the sample driving image, and the sample target area map group includes: a sample face area map, a sample eye area map, a sample mouth area map, and a sample hand area map. A training sample is selected from a training sample set, and the following training steps are performed: a sample driving image in the selected training sample is input into an initial regional target detection model to obtain an actual output; a parameter of the initial regional target detection model is adjusted according to a difference between a sample target regional map group corresponding to the input sample driving image and the obtained actual output to obtain an adjusted initial regional target detection model; it is determined whether there is an unselected training sample in the training sample set; in response to determining that there is no such training sample, the adjusted initial regional target detection model is determined as the regional target detection model; In response to determining that it exists, using the adjusted initial regional object detection model as the initial regional object detection model, selecting unselected training samples from the training sample set, and continuing to perform the training step.
7. A driving status monitoring device, in, The device comprises: The area detection unit is configured to, in response to receiving a driving image of the driver acquired by the image acquisition device connected to the communication link, input the driving image into a pre-trained area target detection model to obtain a target area map group corresponding to the driving image, wherein the target area map group includes any one or more of the following: a face area map, an eye area map, a mouth area map, and a hand area map. The state determination unit is configured to determine the driving state of the driver based on the characteristic information of the driver presented by each target area map in the target area map group, including: In response to satisfying a preset trigger condition and the target area map group including a face area map, an eye area map and a mouth area map, the face area map, the eye area map and the mouth area map included in the target area map group are input into a pre-trained second state determination model to obtain a head state corresponding to the input face area map, the eye area map and the mouth area map, and the head state is determined as the driving state; the trigger condition includes: there is no hand area map in the target area map group, or there is a hand area map in the target area map group and the hand state corresponding to the hand area map is a state for indicating that the driver is normal; Among them, the state determination unit inputs the face area map, eye area map and mouth area map included in the target area map group into a pre-trained second state determination model to obtain a head state corresponding to the input face area map, eye area map and mouth area map, including: according to a preset splicing rule, the face area map, eye area map and mouth area map included in the target area map group are spliced into a spliced image; the spliced image is input into the second state determination model to obtain a head state corresponding to the spliced image; the preset splicing rule includes: the face area map is located on the left side of the spliced image, the eye area map is located on the upper right side of the spliced image, and the mouth area map is located on the lower right side of the spliced image.
8. An electronic device, include: one or more processors; a storage device having one or more programs stored thereon, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 6.
9. A computer readable medium having a computer program stored thereon, in, When the program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Method for detecting behavior of operating mobile phone in driving of driver
CN108564034A
Method and system for detecting fatigue of automobile driver
CN109063686A
Fatigue driving detection method and device, computer readable storage medium and terminal
CN110728206A
Driving state detection method and device, driver monitoring system and vehicle
CN111079475A
