A drunk driving behavior early warning identification method and system

By building a red face database and trajectory tracking analysis, combined with high-definition cameras and artificial intelligence algorithms, the problem of identifying drunk driving behavior has been solved, and high-accuracy and high-efficiency drunk driving warnings have been achieved, reducing the risk of accidents.

CN119540927BActive Publication Date: 2025-10-21CHONGQING TONGLIANG DISTRICT PUBLIC SECURITY BUREAU +1
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411617105.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-13
Publication Date
2025-10-21
Estimated Expiration
2044-11-13

AI Technical Summary

Technical Problem

Existing technologies are difficult to effectively identify and warn of drunk driving behavior, especially when the blushing feature disappears but alcohol remains in the body, resulting in missed identification.

Method used

By building a red face database, using red face recognition algorithms and database-based face recognition technology, combined with trajectory tracking analysis, it is possible to determine whether the driver has engaged in drunk driving behavior, and use high-definition cameras and visual artificial intelligence algorithms for real-time and historical behavior recognition.

Benefits of technology

It has achieved high-accuracy recognition of drunk driving behavior, expanded the recognition time range, reduced the missed recognition rate, improved the efficiency of investigation and punishment, and issued warnings to non-drivers through text messages and phone calls, reducing the risk of drunk driving.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119540927B_ABST
    Figure CN119540927B_ABST
Patent Text Reader

Abstract

The application discloses a novel drunk driving behavior early warning identification method and system, a red face database is constructed, a face image obtained on site is analyzed and processed, whether the target object to be detected has a drunk driving suspicion is judged, if yes, a warning signal is sent, and if no, the face image on site is continuously collected. The method is assisted by a red face recognition algorithm and a face recognition algorithm based on a database, can not only realize real-time drunk driving behavior identification, but also can realize drinking behavior identification within a time range, and fills the blank of missing identification caused by the fast disappearance of a red face and the still high residual alcohol concentration in the body. The method based on red face detection can obtain higher drunk driving behavior identification accuracy, and in combination with the face recognition method based on the database, the method effectively expands the time range of drunk driving behavior identification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of intelligent security technology, and in particular to a novel drunk driving behavior early warning identification method and system. Background Art

[0002] Drunk driving refers to the act of controlling and operating a motor vehicle while under the influence of alcohol or other alcoholic beverages. Drinking alcohol can lead to visual impairment, reduced tactile perception, judgment, and operational abilities, overconfidence, and fatigue, all of which can easily lead to traffic accidents. Therefore, prompt investigation and punishment of drunk driving is crucial.

[0003] Studies have found that drinking alcohol can cause facial blushing, which can appear pink or reddish-brown. Blushing typically occurs within minutes of drinking and persists for about one to two hours after the drinking period before gradually disappearing. After a small amount of alcohol, it takes about 24 hours for the alcohol in the body to be completely metabolized. Excessive alcohol consumption, which exceeds the liver's metabolic capacity, can take up to 72 hours to metabolize completely. To prevent drivers from driving with a high level of alcohol in their system after one to two hours of drinking, even after the blush disappears, it is crucial to monitor public video surveillance in the jurisdiction to identify blushing patterns and provide early warning of blushing and alcohol consumption.

[0004] In addition, according to statistical results, the driving routes of vehicles driven by drunk drivers are usually in the shape of "S" or "Z". Therefore, the blushing features of the face and the driving trajectory features can be used as the basis for identifying drunk driving behavior.

[0005] Therefore, a method and system for early warning and identification of drunk driving behavior are needed. Summary of the Invention

[0006] In view of this, the purpose of the present invention is to provide a method and system for early warning and identification of drunk driving behavior, which uses a red face database to identify drunk driving behavior, improve the drunk driving recognition rate, improve management efficiency, reduce the accident rate, and enhance the society's sense of traffic safety.

[0007] In order to achieve the above object, the present invention provides the following technical solutions:

[0008] The present invention provides a method for early warning and identification of drunk driving behavior, comprising the following steps:

[0009] S1: Constructing a red face database, wherein the red face database is used to store red face images and image acquisition time;

[0010] S2: Obtain red face images of the target object on site, and store the red face images in a red face database in a queue format. Perform red face validity analysis on the red face image queues within a set time period, and mark the red face image queues that meet the requirements as valid records.

[0011] S3: Analyze and process the red face image at the scene and the red face images in the red face database to determine whether the detected target object is suspected of drunk driving. If so, issue a warning signal; if not, return to continue collecting face images at the scene.

[0012] Furthermore, in step S3, determining whether the detected target object is suspected of drunk driving is performed according to the following steps:

[0013] The red face image of the target object collected on site is added to the red face queue of the target in the red face database. Each time a red face image is added, the queue is analyzed for validity. If the validity analysis conditions are met, it is immediately verified whether the target object has a driver's license. If so, an early warning signal is issued;

[0014] If not, return to continue collecting on-site facial images.

[0015] Furthermore, the method further includes trajectory tracking analysis, which includes the following steps:

[0016] S4: Acquire vehicle image;

[0017] S5: Determine the vehicle position based on the vehicle image;

[0018] S6: Determine the driving trajectory according to the vehicle position;

[0019] S7: Determine whether the vehicle's driving is abnormal based on the driving trajectory. If so, determine it as suspected drunk driving and issue a warning signal; if not, return to continue collecting on-site vehicle images.

[0020] Furthermore, the vehicle trajectory is formed according to the following steps:

[0021] S61: Calculate the number of vehicles whose position coordinates are within a set distance range in a continuous time;

[0022] S62: Calculating a ratio value within a predetermined distance range, where the ratio value is a ratio of the number of position coordinates within the predetermined distance range to the number of position coordinates within a continuous time;

[0023] S62: Determine whether the ratio value is greater than a predetermined threshold value. If yes, the trajectory is normal; if no, the trajectory is abnormal.

[0024] Furthermore, the red face database is established according to the following steps:

[0025] S11: Collecting facial images;

[0026] S12: Classify the detected face image and determine whether the face is in a red face state. If it is recognized as a red face, determine whether there is a similar red face in the database. If there is a similar red face, save the red face image and update the image acquisition time.

[0027] S13: If the same red face does not exist, a person ID queue of the red face image is created, the red face image is saved in the queue, and the capture time of the red face image is recorded.

[0028] Furthermore, the method further comprises the following steps:

[0029] S13: When the red face image is added to the queue and reaches the queue capacity Q, the validity of the red face image of the person ID is calculated. The validity is the number of red face images in the queue within a certain time interval T limit The proportion of red faces in Q ratio , the calculation formula is as follows:

[0030]

[0031] Among them, x represents the red face in the queue, if Q ratio Greater than the set threshold T Q , then the red face record of the person ID in the database is considered valid.

[0032] The recognition system provided by the present invention, constructed according to the above-mentioned drunk driving behavior warning recognition method, includes an image acquisition module, a red face database, and a warning signal generation module;

[0033] The image acquisition module is used to obtain the red face image on the scene;

[0034] The red face database is used to store red face images and image acquisition time;

[0035] The warning signal generating module is used to generate and send a drunk driving suspicion warning signal when it is determined that the detected target object is a drunk driving suspect based on the red face image on the scene and the red face images in the red face database.

[0036] Furthermore, the target object is judged as suspected of drunk driving in the following manner:

[0037] The red face image of the target object collected on site is added to the red face queue of the target in the red face database. Each time a red face image is added, the queue is analyzed for validity. If the validity analysis conditions are met, it is immediately verified whether the target object has a driver's license. If so, an early warning signal is issued;

[0038] If not, return to continue collecting on-site facial images.

[0039] Furthermore, it also includes a trajectory recognition module, which is used to determine whether the driving is abnormal based on the acquired vehicle driving trajectory;

[0040] The trajectory recognition module is performed according to the following steps:

[0041] First, the vehicle image is acquired; the vehicle position is determined based on the vehicle image; then the driving trajectory is determined based on the vehicle position; finally, the driving trajectory is used to determine whether the vehicle is driving abnormally. If so, it is determined to be suspected drunk driving and a warning signal is issued; if not, the system returns to continue collecting vehicle images at the scene;

[0042] The vehicle trajectory is formed according to the following steps:

[0043] First, calculate the number of vehicles whose position coordinates are within the set distance range in continuous time;

[0044] Then, a ratio value within the predetermined distance range is calculated, wherein the ratio value is a ratio of the number within the predetermined distance range to the number of position coordinates within the continuous time;

[0045] Finally, it is determined whether the ratio value is greater than a predetermined threshold. If so, the trajectory is normal; if not, the trajectory is abnormal.

[0046] Furthermore, the image acquisition module uses a camera for shooting, and the camera is set on a camera mounting bracket, and the mounting bracket includes a vertical rod and a horizontal rod; the vertical rod cross-mounts two cameras to illuminate in a "<" direction; the horizontal rod is equipped with a two-way camera, and the two-way camera illuminates in an "I" line; the four lenses are arranged in a K-shaped structure.

[0047] The beneficial effects of the present invention are:

[0048] The present invention provides a method for early warning and identification of drunk driving behavior. By constructing a red face database, facial images captured on-site are analyzed and processed to determine whether the face is red. If so, it is determined to be suspected drunk driving behavior and a warning signal is issued. If not, the method returns to continue collecting facial images on-site. By means of a red face recognition algorithm and a database-based face recognition algorithm, this method can not only achieve real-time drunk driving behavior recognition, but also achieve drinking behavior recognition within a time range, filling the gap in missed recognition caused by the red face disappearing too quickly but the residual alcohol concentration in the body is still high. The red face detection-based method can achieve a higher drunk driving behavior recognition accuracy. Combined with the database-based face recognition method, this method effectively expands the time range for drunk driving behavior recognition.

[0049] This invention addresses the issue of drunk driving in road traffic safety management by installing new, wide-area surveillance cameras and using a visual artificial intelligence algorithm to intelligently identify drivers driving under the influence by identifying their red face and driving trajectory. The cameras are mounted in a K-shaped pattern, significantly increasing the camera's monitoring range, reducing blind spots, and improving the capture rate of faces on vehicles like motorcycles obscured by windshields, umbrellas, and awnings by approximately 4 to 5 times.

[0050] This method uses target tracking to identify abnormal driving trajectories, capturing the vehicle's complete trajectory and driving direction. Using trajectory fitting to perform driving route fitting and comprehensive multi-frame offset analysis, this method eliminates the need for reference line configuration and lane detection, enabling more accurate identification of abnormal vehicle trajectories. This eliminates the need for pre-configured reference lines and additional lane detection algorithms, significantly reducing costs. Furthermore, the comprehensive analysis of multi-frame results significantly improves the accuracy of abnormal driving trajectory identification.

[0051] This method, for the first time, proposes a red face recognition method based on database face recognition. By leveraging red face recognition algorithms and database-based face recognition algorithms, it not only enables real-time drunk driving identification, but also identifies drunk driving based on red face features. Simultaneously, by using full-scene red face detection and data storage, it can simultaneously meet the requirements of real-time driver red face recognition, red face recognition within a certain timeframe, and provide early warnings for qualified non-drivers. In addition to effectively improving the accuracy of drunk driving identification, it also effectively expands the timeframe for drunk driving identification, addressing the gaps in missed identification caused by rapid red face fading while the residual alcohol concentration in the body remains high. Furthermore, the combination of non-driver red face recognition and driving qualification information retrieval can provide early warnings for drunk driving, reduce the risk of drunk driving, and serve as a warning and educational tool.

[0052] The present invention provides a method for early warning and identification of drunk driving behavior, which uses target detection, face recognition, database construction, and trajectory anomaly recognition methods to identify drunk driving behavior. With the help of high-definition cameras and back-end computing services, the scope of human investigation can be reduced, suspicious targets can be screened in advance, and the efficiency of investigating and punishing drunk driving behavior can be greatly improved, providing an additional guarantee for road traffic safety.

[0053] In addition, red face recognition can also be used to send text messages or phone calls to non-drivers with driving records to persuade them, playing a role in promoting and warning against drunk driving.

[0054] Other advantages, objects, and features of the present invention will be described in part in the following description and, in part, will be apparent to those skilled in the art upon examination of the following description or may be learned from practice of the present invention. The objects and other advantages of the present invention may be realized and obtained through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] In order to make the purpose, technical solutions and beneficial effects of the present invention more clear, the present invention provides the following drawings for illustration.

[0056] Figure 1 This is the flow chart of the model inference stage.

[0057] Figure 2 Construct a flow chart for the red face database.

[0058] Figure 3 Schematic diagram of the drunk driving behavior recognition system.

[0059] Figure 4 Schematic diagram for camera installation. DETAILED DESCRIPTION

[0060] The present invention will be further described below with reference to the accompanying drawings and specific embodiments so that those skilled in the art can better understand the present invention and implement it. However, the embodiments are not intended to limit the present invention.

[0061] Example 1

[0062] like Figure 1 As shown, this embodiment provides a method for early warning and identification of drunk driving behavior, including the following steps:

[0063] S1: Constructing a red face database, wherein the red face database is used to store red face images and image acquisition time;

[0064] S2: Obtain red face images of the target object on site, and store the red face images in a red face database in a queue format. Perform red face validity analysis on the red face image queues within a set time period, and mark the red face image queues that meet the requirements as valid records.

[0065] S3: Analyze and process the face image at the scene and the face image in the red face database to determine whether the detected target object is suspected of drunk driving. If so, issue a warning signal; if not, return to continue collecting face images at the scene.

[0066] In step S3 of this embodiment, determining whether the detected target object is suspected of drunk driving is performed according to the following steps:

[0067] The red face image of the target object collected on site is added to the red face queue of the target in the red face database. Each time a red face image is added, the queue is analyzed for validity. If the validity analysis conditions are met, it is immediately verified whether the target object has a driver's license. If so, an early warning signal is issued;

[0068] If not, return to continue collecting on-site facial images.

[0069] In this embodiment, the target subject suspected of drunk driving meets the following three conditions: (1) has a red face; (2) the red face record in the database is valid; (3) meets the driving conditions, that is, has a vehicle or a driver's license;

[0070] In this embodiment, the warning signals include text messages, telephone persuasion and other signals. Through red face recognition, this method can send text messages and telephone persuasion to non-drivers with driving records, and send warning signals to the corresponding detection objects, thereby playing a role in publicity and warning to prevent drunk driving.

[0071] In this embodiment, on-site facial images are collected from all people under surveillance. Red face recognition is performed on the collected facial images to provide early warning and judgment of drunk driving behavior. Combined with the construction and comparison of the red face database, red face individuals can be tracked across time and their drinking habits over a period of time can be inferred.

[0072] This embodiment also includes trajectory tracking analysis, which includes the following steps:

[0073] S4: Acquire vehicle image;

[0074] S5: Determine the vehicle position based on the vehicle image;

[0075] S6: Determine the driving trajectory according to the vehicle position;

[0076] S7: Determine whether the vehicle's driving is abnormal based on the driving trajectory. If so, determine that it is suspected drunk driving and issue a warning signal; if not, return to continue collecting on-site vehicle images;

[0077] In this embodiment, after obtaining the vehicle image in step S4, the following steps are also included:

[0078] S41: Acquire a driver's face image from the vehicle image;

[0079] S42: Analyze and process the driver's facial image and the facial images in the red face database to determine whether the driver has a red face. If so, issue a warning signal and update the red face database. If not, return to continue collecting facial images on the scene.

[0080] In this embodiment, the trajectory and red face of vehicles and faces in the video frame are judged respectively. If the driver meets one of the judgment conditions, it can be identified as drunk driving. If the pedestrian has a red face and driving qualifications, a drunk driving warning can be issued;

[0081] The vehicle trajectory is formed according to the following steps:

[0082] S61: Calculate the number of vehicles whose position coordinates are within a set distance range in a continuous time;

[0083] S62: Calculating a ratio value within a predetermined distance range, where the ratio value is a ratio of the number of position coordinates within the predetermined distance range to the number of position coordinates within a continuous time;

[0084] S62: Determine whether the ratio value is greater than a predetermined threshold value. If yes, the trajectory is normal; if no, the trajectory is abnormal.

[0085] In this embodiment, when the target person in step S3 is determined to be a driver, if the face image is identified as a red face image, or if the driving trajectory of the vehicle is determined to be abnormal, it can be determined as suspected drunk driving and a warning signal is issued;

[0086] When the target object is a pedestrian, if the facial image of the pedestrian is recognized as a red face image, the red face record of the person is valid in the database, and the pedestrian has a driver's license, only an early warning signal is output;

[0087] like Figure 2 As shown, Figure 2 The red face database is constructed as a flowchart. The red face database in this embodiment is established according to the following steps:

[0088] The red face of each person ID in the red face database is stored in the form of a queue with a queue capacity of Q. The queue is updated according to the time when the red face enters the database. Each element in the queue is a red face image and a timestamp.

[0089] First, the face detection model is used to perform full-scene face detection on the collected images. After the detected faces are cut out, they are classified using the red face classification model to determine whether the face is in a red face state. If it is recognized as a red face, the twin network is used for face recognition. If the same red face exists in the database, the red face is added to the person ID queue and the latest timestamp of the queue is updated. If it is recognized as a new red face, the red face person ID queue is created and the red face is saved in the queue, and the capture time of the red face is recorded. The construction process is as follows: Figure 2 shown.

[0090] When the red face joins the queue and reaches the queue capacity Q, the red face validity of the person ID is calculated. The validity is defined as the number of red faces in the queue within a certain time interval T limitThe proportion of red faces in Q ratio , calculated as

[0091]

[0092] Among them, x represents the red face in the queue, if Q ratio Greater than the set threshold T Q , then the red face record of the person ID in the database is considered valid, the purpose of which is to filter out the red face misrecognition caused by lighting;

[0093] Warning of drunk driving behavior: When building a red face database, if the red face comes from a facial capture of a non-vehicle driver and the red face record of the person is valid, a system information search can be performed on the red face person to check whether the person has the driving qualification. If so, the person will be reminded to prohibit drunk driving, and can be informed to stop drunk driving through text messages, phone calls, etc.

[0094] In this embodiment, the image facial data collected from the pedestrian includes the collection time. The red face image and collection time collected by different cameras are analyzed to calculate whether the red face record of the pedestrian in the database is valid. If valid, it is analyzed whether the pedestrian has a driver's license. If so, a warning signal is issued. If not, the face image collection process is returned to the loop; the time threshold of the drunk driving experience in this embodiment can be preset according to the specific situation.

[0095] In this embodiment, the red face data comes from red face images captured by a camera, including red face images of pedestrians captured by the camera, and red face images of people in vehicles captured by the camera;

[0096] In this embodiment, when constructing a red face database, it is necessary to perform validity judgment on the captured images. This validity judgment can filter out the influence of lighting on the captured images. The validity judgment is performed by analyzing the proportion of red face images in the image queue captured within a set time period. For example, if the target queue capacity is 10 and 6 red face images of the target are captured within 5 minutes, which is greater than the set threshold of 5, the red face data queue is considered valid. If only 1 red face image is captured, the red face data queue is considered invalid, which may be caused by lighting influence. Regardless of whether the data queue is valid, it needs to be stored in the database.

[0097] When building the database, as long as there is a valid record and the driver has a license, a text message warning will be sent;

[0098] In this embodiment, the target tracking can be used to determine whether the vehicle's trajectory is normal, and then the image can be used to perform red face image validity analysis, and the photos determined to be red face images are stored in the database;

[0099] When the sum of the facial image taken within the set time and the red face image stored in the database meets the validity judgment, the detected target object is deemed to be suspected of drunk driving and a warning signal is issued.

[0100] Example 2

[0101] like Figure 3 As shown, Figure 3 Schematic diagram of a drunk driving behavior recognition system. The drunk driving behavior warning recognition system proposed in this embodiment includes an image acquisition module, a red face database, and a warning signal generation module;

[0102] The image acquisition module is used to obtain the red face image on the scene;

[0103] The red face database is used to store red face images and image acquisition time;

[0104] The warning signal generating module is used to generate and send a drunk driving suspicion warning signal when the detected target object is determined to be a drunk driving suspect based on the red face image on the scene and the red face images in the red face database;

[0105] In this embodiment, the target object is judged to be suspected of drunk driving in the following manner:

[0106] The red face image of the target object collected on site is added to the red face queue of the target in the red face database. Each time a red face image is added, the queue is analyzed for validity. If the validity analysis conditions are met, it is immediately verified whether the target object has a driver's license. If so, an early warning signal is issued;

[0107] If not, return to continue collecting on-site facial images.

[0108] The system provided in this embodiment further includes a trajectory recognition module, which is used to determine whether the vehicle's driving is abnormal based on the acquired vehicle's driving trajectory;

[0109] The trajectory recognition module is performed according to the following steps:

[0110] First, the vehicle image is acquired; the vehicle position is determined based on the vehicle image; then the driving trajectory is determined based on the vehicle position; finally, the driving trajectory is used to determine whether the vehicle is driving abnormally. If so, it is determined to be suspected drunk driving and a warning signal is issued; if not, the system returns to continue collecting vehicle images at the scene;

[0111] The vehicle trajectory in this embodiment is formed according to the following steps:

[0112] First, calculate the number of vehicles whose position coordinates are within the set distance range in continuous time;

[0113] Then, a ratio value within the predetermined distance range is calculated, wherein the ratio value is the ratio of the number within the predetermined distance range to the number of position coordinates within the continuous time;

[0114] Finally, it is determined whether the ratio value is greater than a predetermined threshold. If so, the trajectory is normal; if not, the trajectory is abnormal.

[0115] In this embodiment, the vehicle trajectory is determined by comparing the vehicle position coordinate points with a predetermined distance value. For example, a vehicle has 10 coordinate points in 10 consecutive frames. If 8 of the 10 coordinate points are within the set distance range, the ratio is 8 / 10=0.8. Finally, it is determined whether this ratio value is less than a set threshold. If the set threshold is set to 0.5, then 0.8>0.5, indicating that the trajectory is normal.

[0116] The image acquisition module in this embodiment uses a camera for shooting, and the camera is set on a camera mounting bracket, and the mounting bracket includes a vertical rod and a horizontal rod;

[0117] The two low-altitude cameras cross-mounted on the vertical poles illuminate in a "<" direction;

[0118] The crossbar is provided with a two-way camera, and the two-way camera is illuminated in an "I" line;

[0119] The four lenses are arranged in a K-shaped structure.

[0120] like Figure 4 As shown, Figure 4 Schematic diagram for camera installation; Figure 4 (a) illustrates the K-shaped camera installation method; (b) illustrates the monitoring field of view from a bird's-eye view. The two-way camera on the horizontal bar forms an "I" line, while the two low-altitude cameras mounted crosswise on the vertical bar form a "<" line. The four lenses form a roughly K-shaped configuration. In this embodiment, facial images are captured by cameras mounted on mounting brackets. These cameras are mounted in a K-shaped configuration. This K-shaped video surveillance installation allows for better capture of obstructed objects and reduces blind spots.

[0121] In this embodiment, facial images are derived from video data captured by a camera and analyzed and processed using visual artificial intelligence. The visual artificial intelligence algorithm consists of two parts: one is to detect the driver's red face. By building a database and determining the recent time of the driver's red face detection results, the driver's alcohol consumption over a period of time can be inferred. The other part is to determine the vehicle's driving trajectory. These two conditions can effectively achieve the identification of drunk driving behavior.

[0122] This embodiment provides a drunk driving identification system for detailed drunk driving behavior identification. The main process includes the following:

[0123] Step 1: Data preparation and model training

[0124] Camera installation and data collection: The camera installation angle is selected according to different road conditions. The two-way cameras on the horizontal poles and the low-altitude cross cameras on the vertical poles are set up in a K-shape. The installed cameras collect video footage from different scenes, and the video footage is extracted and framed to construct the original image dataset D0. Video is collected over a period of time and extracted and framed to obtain a series of image frames.

[0125] Step 2: Vehicle detection model training

[0126] The dataset D0 is labeled with bounding boxes for all motor vehicles and non-motor vehicles in the image using the labelme annotation tool to obtain the dataset D1. This dataset contains two types of objects: motor vehicles and non-motor vehicles, and is randomly split into a training set and a validation set with a ratio of 4:1.

[0127] Secondly, select yolov8m.pt as the pre-training model, change the data augmentation parameter fliplr in the hyperparameter configuration file hyp.scratch-low.yaml to 0.5, write the paths of the training set and validation set to a yaml file, and configure it in the data parameter in train.py;

[0128] Finally, run train.py for training. In this example, the number of training rounds is 100 and the input image size is 640. Use the vehicle detection model to infer the vehicle images and obtain the vehicle detection result R for each image. V .

[0129] Step 3: Face detection model training

[0130] The dataset D0 is labeled with bounding boxes of the faces in the image using the labelme annotation tool to obtain the dataset D2. This dataset contains one type of target, faces, and is randomly split into a training set and a validation set with a ratio of 4:1.

[0131] Secondly, select yolov8m.pt as the pre-training model, change the data augmentation parameter fliplr in the hyperparameter configuration file hyp.scratch-low.yaml to 0.5, write the paths of the training set and validation set to a yaml file, and configure it in the data parameter in train.py;

[0132] Finally, run train.py to perform training. In this example, the number of training rounds is 100 and the input image size is 640.

[0133] Step 4: Red face classification model training

[0134] First, the face images in the obtained dataset D2 were cropped and saved, and the saved face images were manually screened into red face and non-red face parts to obtain a two-category dataset D3; then, the dataset D3 was randomly split into a training set and a validation set with a ratio of 4:1. The DeiT model was selected as the pre-training model, and the steps in the official ReadMe.md file were used to start training to obtain the red face classification model.

[0135] The fifth step is the model inference stage

[0136] In the inference and judgment stage, the trained model is used to judge the trajectory and red face of vehicles and faces in the video frames respectively. If one of the judgment conditions is met, it can be identified as drunk driving behavior.

[0137] The vehicle detection model reasoning in this embodiment is performed according to the following steps:

[0138] Vehicle target tracking: The vehicle detection result R of each image V Input ByteTrack model to calculate the vehicle's driving trajectory and output the tracking result Track for each vehicle V , including its coordinate frame, driving direction and corresponding frame number in each frame image.

[0139] Red face database construction: The red face of each person ID in the red face database is stored in the form of a queue with a queue capacity of Q. The queue is updated according to the time when the red face is stored. Each element in the queue is a red face image and a timestamp;

[0140] First, the face detection model is used to perform full-scene face detection on the collected images. After the detected faces are cut out, they are classified using the red face classification model to determine whether the face is in a red face state. If it is recognized as a red face, the twin network is used for face recognition. If the same red face exists in the database, the red face is added to the person ID queue and the latest timestamp of the queue is updated. If it is recognized as a new red face, the red face person ID queue is created and the red face is saved in the queue, and the capture time of the red face is recorded. The construction process is as follows: Figure 2 shown.

[0141] When the red face joins the queue and reaches the queue capacity Q, the red face validity of the person ID is calculated. The validity is defined as the number of red faces in the queue within a certain time interval T limit The proportion of red faces in Q ratio , calculated as

[0142]

[0143] Among them, x represents the red face in the queue, if Q ratioGreater than the set threshold T Q , then the red face record of the person ID in the database is considered valid, the purpose of which is to filter out the red face misrecognition caused by lighting;

[0144] Determine whether the driver's driving trajectory is abnormal: For each vehicle target, according to Track V Extract the center coordinates of the target in all video frames to obtain a coordinate sequence S xy =[x1, y1, x2, y2, ...x i ,y i ...x n ,y n ], perform quadratic curve fitting on the coordinate sequence to obtain curve C, and set a reference threshold T shift Used to measure the distance error from the reference point to the quadratic curve. If the trajectory is smooth, the trajectory coordinate points are all within a certain error range of curve C. Calculate the distance dist from each coordinate point to curve C. i , if dist exists i <T shift , then the coordinate point is considered to be within the reasonable error range of the fitting trajectory, and the number of all points within the error range m is counted, and the ratio R of the number of all points in the coordinate sequence n is calculated. in , if R in Greater than a specified threshold T num , then the vehicle target trajectory is judged to be normal, otherwise it is judged to be abnormal;

[0145] Determine whether the driver is red-faced: For each vehicle target, according to Track V Extract the coordinate frame and driving direction of the target in all video frames, and use the coordinate frame to cut out the original image to obtain a cutout image sequence S I =[11, I2, ...I i ,...I n ], for each picture I i ,Use the face detection model to perform face detection. If there are multiple detection results in the longitudinal direction, only the results close to the driving direction are retained;

[0146] If there are multiple detection results in the horizontal direction, only the right side result of the driving direction is retained. The final face detection result is cut out and then judged using the red face classification model. If it is recognized as a red face, the current image I i The state is counted as 1. If it is not a red face, the current face is compared with the red face in the red face database using the twin network for face recognition. If it is recognized as the same person and the red face record is valid, the interval T between the latest snapshot timestamp of the personnel queue in the database and the current date is calculated. interval , if the interval is less than the set interval threshold Ttime , then the current picture state is counted as 1, and the picture sequence S is counted I The ratio of the number of states 1 to the length of the sequence R state , if R state Greater than a specified threshold T state , then the vehicle is judged to be suspected of drunk driving, and the red face images marked as 1 are entered into the red face database in chronological order;

[0147] For each target, if the target has any of the following judgment conditions: blushing or abnormal driving trajectory, it can be determined that there is drunk driving behavior.

[0148] This embodiment performs target detection on various videos: identifying and locating targets of interest in images or videos. These targets may be people, objects, faces, etc. Object detection has a wide range of applications, including scenic area security, facial recognition, medical diagnosis, and pedestrian detection in autonomous driving.

[0149] Face recognition: Face recognition refers to the technology of detecting a face through a target detection algorithm, extracting features from the face, and comparing the extracted features with features in the system database to achieve identity confirmation or identity search.

[0150] Siamese Network: A Siamese Network is a type of neural network structure that consists of two or more identical networks. The basic idea is to input the input data into two identical neural networks at the same time. The two networks share the same weights and parameters. By learning the representation of the input data in the two networks, the Siamese Network can calculate the similarity between the two input samples.

[0151] The YOLO (You Only Look Once) object detection algorithm is a CNN-based object detection algorithm. YOLO is one of the fastest object detection algorithms, making it ideal for scenarios requiring high real-time performance. This example uses YOLOv8. Compared to YOLOv5, YOLOv8 achieves higher performance while significantly reducing detection latency, better meeting the high-precision and high-performance requirements for driving behavior in traffic scenarios.

[0152] Multiple Object Tracking (MOT) algorithm aims to detect objects of interest or desired tracking in a video image and obtain their positions in the image. It also assigns an ID to each target and maintains the ID of each target unchanged during the target's motion. As one of the most important research directions in the field of computer vision, MOT can be widely used in smart cities, smart retail, security monitoring, autonomous driving, robotics and other fields.

[0153] ByteTrack Multi-Target Tracking Algorithm: This is a tracking method based on the tracking-by-detection paradigm. It solves the problems existing in most multi-target tracking methods. In some previous target tracking algorithms, only detection boxes with association scores above a threshold are used to obtain target IDs. Targets with lower detection scores, such as occluded targets, are simply discarded, resulting in a large number of missed detections and fragmented tracks. ByteTrack proposes BYTE, a simple, efficient, and universal data association method, which tracks by associating every detection box, not just high-scoring ones. For low-scoring detection boxes, their similarity to the track is leveraged to recover the true target and filter out background detections. BYTE can be easily applied to a variety of excellent MOT methods and achieves excellent tracking results.

[0154] Data-efficient Image Transformers (DeiT): is an image classification model developed by Facebook AI in collaboration with Sorbonne University. It aims to improve data efficiency, that is, to generate high-performance image classification models using less data and computing resources.

[0155] The above embodiments are merely preferred embodiments for the purpose of fully illustrating the present invention, and the scope of protection of the present invention is not limited thereto. Equivalent substitutions or modifications made by those skilled in the art based on the present invention are within the scope of protection of the present invention. The scope of protection of the present invention shall be subject to the claims.

Claims

1. A method for early warning and identification of drunk driving behavior, characterized by: The following steps are involved: S1: Constructing a red face database, wherein the red face database is used to store red face images and image acquisition time; S2: Obtain red face images of the target object on site, and store the red face images in a red face database in a queue format. Perform red face validity analysis on the red face image queues within a set time period, and mark the red face image queues that meet the requirements as valid records. S3: Analyze and process the red face image at the scene and the red face images in the red face database to determine whether the detected target object is suspected of drunk driving. If yes, issue a warning signal; if not, return to continue collecting face images at the scene; The red face database is established according to the following steps: Use the face detection model to perform full-scene face detection on the collected images. After the detected faces are cut out, use the red face classification model to classify them to determine whether the face is in a red face state. If it is recognized as a red face, use the twin network for face recognition. If the same red face exists in the database, the red face is added to the corresponding person ID queue and the latest timestamp of the queue is updated. If it is recognized as a new red face, a red face person ID queue is created and the red face is saved in the queue, and the capture time of the red face is recorded; S14: When the red face image is added to the queue and the queue capacity is reached , then calculate the validity of the red face image of the person ID, the validity is the number of red face images in the queue at a certain time interval The proportion of red faces in , the calculation formula is as follows: in, Indicates the red face in the queue, if Greater than the set threshold , then the red face record of the person ID in the database is considered valid; In step S3, it is determined whether the detected target object is suspected of drunk driving by following the steps below: The red face image of the target object collected on site is added to the red face queue of the target object in the red face database. Each time a red face image is added, the queue is analyzed for validity. If the validity analysis conditions are met, it is immediately verified whether the target object has a driver's license. If so, an early warning signal is issued; If not, return to continue collecting face images on site; The method further includes trajectory tracking analysis, which includes the following steps: S4: Acquire vehicle image; S5: Determine the vehicle position based on the vehicle image; S6: Determine the driving trajectory according to the vehicle position; The driving trajectory is formed according to the following steps: S61: Calculate the number of vehicles whose position coordinates are within a set distance range in a continuous time; S62: Calculating a ratio value within a predetermined distance range, where the ratio value is a ratio of the number of position coordinates within the predetermined distance range to the number of position coordinates within a continuous time; S62: Determine whether the ratio value is greater than a predetermined threshold value. If yes, the trajectory is normal; if no, the trajectory is abnormal. S7: Determine whether the vehicle's driving is abnormal based on the driving trajectory. If so, determine that it is suspected drunk driving and issue a warning signal; if not, return to continue collecting on-site vehicle images; The warning signal includes a text message or telephone persuasion signal, which is used to persuade non-drivers with driving records through text messages or telephone calls, and send the warning signal to the corresponding detection object.

2. The recognition system constructed according to the drunk driving behavior warning recognition method of claim 1 is characterized by: It includes image acquisition module, red face database, and early warning signal generation module; The image acquisition module is used to obtain the red face image on the scene; The red face database is used to store red face images and image acquisition time; The warning signal generating module is used to generate and send a drunk driving suspicion warning signal when the detected target object is determined to be a drunk driving suspect based on the red face image on the scene and the red face images in the red face database; The target object is judged as a suspected drunk driver in the following manner: The red face image of the target object collected on site is added to the red face queue of the target object in the red face database. Each time a red face image is added, the queue is analyzed for validity. If the validity analysis conditions are met, it is immediately verified whether the target object has a driver's license. If so, an early warning signal is issued; If not, return to continue collecting face images on site; The system further includes a trajectory recognition module, which is used to determine whether the vehicle's driving is abnormal based on the acquired vehicle's driving trajectory; The trajectory recognition module is performed according to the following steps: First, the vehicle image is acquired; the vehicle position is determined based on the vehicle image; then the driving trajectory is determined based on the vehicle position; finally, the driving trajectory is used to determine whether the vehicle is driving abnormally. If so, it is determined to be suspected drunk driving and a warning signal is issued; if not, the system returns to continue collecting vehicle images at the scene; The driving trajectory is formed according to the following steps: First, calculate the number of vehicles whose position coordinates are within the set distance range in continuous time; Then, a ratio value within the predetermined distance range is calculated, wherein the ratio value is a ratio of the number within the predetermined distance range to the number of position coordinates within the continuous time; Finally, it is determined whether the ratio value is greater than a predetermined threshold. If so, the trajectory is normal; if not, the trajectory is abnormal. The warning signal includes a text message or telephone persuasion signal, which is used to persuade non-drivers with driving records through text messages or telephone calls, and send the warning signal to the corresponding detection object.

3. The drunk driving behavior recognition system according to claim 2, characterized in that: The image acquisition module uses a camera for shooting, and the camera is set on a camera mounting bracket. The mounting bracket includes a vertical rod and a horizontal rod; two cameras are cross-mounted on the vertical rod to illuminate in a "<" direction; a two-way camera is set on the horizontal rod, and the two-way camera illuminates in an "I" line; the four lenses are arranged in a K-shaped structure.

Citation Information

Patent Citations

  • Drunk driving intelligent identification method, device and system

    CN109147342A

  • Face picture storage method and device

    CN109635148A

  • Face state recognition method and device based on deep learning

    CN110472512A

  • Stopping and parking monitoring camera device for deadzone monitoring

    KR1020160053488A