A safe driving method, system and storage medium based on multi-source data
Through multi-source data fusion, including visual images, lidar point clouds and vehicle sensor data, combined with deep neural networks and YOLOv4 transfer learning, co-pilot interference can be identified in real time, solving the problem of difficult collaboration of vehicle multi-source data and realizing vehicle driving control. Real-time identification and early warning of risks significantly improve driving safety.
Patent Information
- Application Number
- CN202410891676.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-04
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2044-07-04
AI Technical Summary
Existing technologies fail to effectively solve the problem of difficult collaboration of vehicle-mounted multi-source data, and provide a relatively single identification method that is difficult to adapt to emergencies in actual driving.
By collecting visual images, lidar point clouds and vehicle-mounted sensor data, time synchronization processing and feature extraction are performed, using concat for feature fusion, combined with deep neural network model training to predict vehicle risks, and using YOLOv4 transfer learning to identify co-pilot interference in real time, launching Hedging instructions.
It realizes real-time identification and early warning of vehicle driving risks, provides comprehensive risk monitoring and safety assurance, significantly improves driving safety, and can quickly respond and issue emergency avoidance instructions.
Smart Images

Figure CN118429935B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent driving technology, and more specifically, to a safe driving method, system and storage medium based on multi-source data. Background Art
[0002] Multi-source data refers to data sets from multiple different sources, which can include structured data, semi-structured data, and unstructured data. Multi-source data is usually used to improve the comprehensiveness and accuracy of data analysis. By integrating information from different data sources, better decision support, pattern recognition, and predictive analysis can be performed. In-vehicle multi-source data is often used in intelligent driving.
[0003] Intelligent driving refers to a technical system that uses advanced computer technology, sensor technology, artificial intelligence and communication technology to enable vehicles to drive autonomously or with assistance. It achieves safe, efficient and comfortable driving and reduces traffic accidents and congestion through technical means such as environmental perception, positioning and mapping, decision-making and planning, vehicle control, and vehicle networking.
[0004] The Chinese patent with authorization announcement number CN107618512B discloses a driving behavior safety evaluation method based on multiple data sources of human-vehicle-environment; the patent obtains the driver's information data, the vehicle's driving data and environmental factor data as the vehicle driving source data, establishes a driving risk evaluation index system and calculates the driving risk score of the vehicle to be evaluated, and finally determines the driving behavior safety level of the vehicle.
[0005] However, the above patent fails to effectively solve the problem of difficulty in coordinating multi-source data on board the vehicle, and the identification method provided is relatively simple, which is not enough to adapt to some emergencies that may occur in actual driving.
[0006] In view of this, the present invention proposes a safe driving method, system and storage medium based on multi-source data to solve the above problems. Summary of the invention
[0007] In order to overcome the above-mentioned defects of the prior art, embodiments of the present invention provide a safe driving method, system and storage medium based on multi-source data.
[0008] To achieve the above object, the present invention provides the following technical solutions:
[0009] A safe driving method based on multi-source data, the method comprising:
[0010] Collect visual images, LiDAR point clouds and vehicle-mounted sensor data; visual images include co-pilot interference images; co-pilot interference images are images taken by a camera installed above the front seat; the camera is marked as an internal view camera; vehicle-mounted sensor data include wheel speed, acceleration, angular velocity, brake pressure and vehicle status information; vehicle status information includes gear position, turn signal status and battery temperature; gear positions include P, R, N, D and S; turn signal status includes left, right, double flash and off;
[0011] Calculate the co-pilot safety distance based on the co-pilot interference image;
[0012] Perform time synchronization processing on visual images, LiDAR point clouds and vehicle-mounted sensor data; perform feature extraction on the time-synchronized visual images, LiDAR point clouds and vehicle-mounted sensor data; use concat to fuse visual image features, point cloud features, sensor features and co-pilot safety distance to obtain multi-source data features;
[0013] Collect multiple sets of multi-source data features and corresponding labels to build a data set, and train a second machine learning model for predicting vehicle risks; and issue a risk avoidance command to the vehicle based on the second machine learning model.
[0014] Preferably, the co-pilot interference image includes a picture of the vehicle steering wheel and a picture of the co-pilot's hands in a pre-experimental environment;
[0015] The experimental environment includes: when the vehicle is stationary, a person is arranged to sit in the co-pilot seat and use his hands to raise both hands, grab the steering wheel with both hands, grab the steering wheel with one hand, and block the main driver's view of the steering wheel;
[0016] LabelImg is used to annotate the co-pilot interference image, the position of the co-pilot's hand and the position of the steering wheel; based on the annotated co-pilot interference image training, transfer learning is performed on the basis of YOLOv4 to train the first machine learning model that can recognize the co-pilot's hand position and the steering wheel position in real time; the transfer learning process includes:
[0017] Preprocess the annotated co-pilot interference image; preprocessing includes size normalization, grayscale conversion and noise removal; freeze some convolutional layers; fine-tune the fully connected layer;
[0018] When the accuracy of real-time recognition of the co-pilot's hand position and steering wheel position reaches a preset accuracy threshold, the training is stopped.
[0019] Preferably, the co-pilot safety distance FJ= ; Take the position of the interior camera as the origin, and make a ray perpendicular to the left and right doors as the x-axis; take the origin as the starting point, and make a ray perpendicular to the horizontal plane of the bottom of the car as the y-axis; where, =1 means the co-pilot's left hand; =2 means the co-pilot’s right hand; The horizontal coordinate of the rightmost edge point of the steering wheel in real time. represents the real-time horizontal coordinate of the co-pilot's hand, Indicates the real-time vertical coordinate of the co-pilot's hand.
[0020] Preferably, the time synchronization process includes:
[0021] Dedistort and color normalize visual images;
[0022] Downsample and normalize the intensity of the LiDAR point cloud; downsample the LiDAR point cloud using voxel grid filtering and normalize the reflection intensity values to the range of [0, 1];
[0023] Convert the units and encode the data of the vehicle sensors; convert all physical quantities into SI units; encode the gear position and turn signal status into numbers;
[0024] Use a unified timestamp to match visual images, lidar point clouds, and vehicle-mounted sensor data one by one according to the timestamp to complete time synchronization processing.
[0025] Preferably, the feature extraction process includes:
[0026] Use pre-trained ResNet50 to extract visual image features;
[0027] Use PointNet++ to learn point cloud features from the original point cloud of LiDAR point cloud data;
[0028] The mean and standard deviation of the vehicle sensor data are calculated as two sensor features.
[0029] Preferably, the label corresponding to the multi-source data feature is the vehicle state corresponding to the multi-source data feature; the vehicle state includes forward collision, side collision, rear collision, lane departure risk, and co-pilot interference risk; a corresponding code is set for each vehicle state; the encoding method is one-hot encoding:
[0030] One-hot encoding creates a binary vector for each state:
[0031] forward collision: [1, 0, 0, 0, 0];
[0032] Side collision: [0, 1, 0, 0, 0];
[0033] Backward collision: [0, 0, 1, 0, 0];
[0034] Lane departure risk: [0, 0, 0, 1, 0];
[0035] Co-pilot interference risk: [0, 0, 0, 0, 1];
[0036] The dataset is divided into a training set, a validation set, and a test set, where the training set accounts for 60% of the dataset, and the validation set and the test set each account for 20% of the dataset;
[0037] The training set is used as the input of the second machine learning model, and the second machine learning model uses real-time vehicle condition data as output; the historical vehicle condition data corresponding to a set of real-time feature vectors is used as the prediction target, and minimizing the loss function value of the second machine learning model is used as the training target; when the loss function value of the second machine learning model is less than or equal to the preset target loss value, the training is stopped;
[0038] The second machine learning model loss function is a mean square error; the mean square error is calculated by Minimize to train the model; in the loss function is the loss function value, i is the multi-source data feature group number; is the number of feature groups of multi-source data; is the label corresponding to the i-th group of multi-source data features, The probability of the vehicle risk type predicted by the i-th group of multi-source data features;
[0039] The second machine learning model is a deep neural network model;
[0040] Deep Neural Network Model Hidden Layers The calculation methods include:
[0041] G[ b i + w i s( b i-1 + w i-1 x)] ; In the formula, is the output of the hidden layer; G is the activation function; is the bias term of the hidden layer; is the weight of the hidden layer; is the activation function; is the bias term of the previous layer; is the weight of the previous layer; x is the input training set;
[0042] The deep neural network model consists of 4 fully connected layers. The first 3 hidden layers contain 32, 64 and 32 neurons respectively. The SoftMax classification layer contains 5 neurons. The neurons are connected to each other through weights and activated by the ReLU activation function.
[0043] Data collection module, collecting visual images, LiDAR point clouds and vehicle sensor data; visual images include co-pilot interference images; co-pilot interference images are images taken by a camera installed above the front seat; the camera is marked as an internal view camera; vehicle sensor data include wheel speed, acceleration, angular velocity, brake pressure and vehicle status information; vehicle status information includes gear position, turn signal status and battery temperature; gear positions include P, R, N, D and S; turn signal status includes left, right, double flash and off;
[0044] A safe driving system based on multi-source data, the system comprising:
[0045] A data processing module, which calculates the co-pilot safety distance based on the co-pilot interference image;
[0046] The feature processing module performs time synchronization processing on the visual image, LiDAR point cloud and vehicle sensor data; extracts features from the time-synchronized visual image, LiDAR point cloud and vehicle sensor data; uses concat to fuse the visual image features, point cloud features, sensor features and the co-pilot safety distance to obtain multi-source data features;
[0047] The model training module collects multiple sets of multi-source data features and corresponding labels to construct a data set, and trains a second machine learning model for predicting vehicle risks; and issues risk avoidance instructions to the vehicle based on the second machine learning model.
[0048] An electronic device comprises: a processor and a memory, wherein the memory stores a computer program that can be called by the processor; the processor executes the above-mentioned safe driving method based on multi-source data by calling the computer program stored in the memory.
[0049] A computer-readable storage medium stores instructions, which, when executed on a computer, enable the computer to execute the above-mentioned safe driving method based on multi-source data.
[0050] The technical effects and advantages of the safe driving method, system and storage medium based on multi-source data of the present invention are as follows: by integrating visual images, lidar point clouds and on-board sensor data, real-time identification and early warning of vehicle driving risks are achieved. ResNet50 and PointNet++ are used for feature extraction, and the YOLOv4 transfer learning model is used to identify co-pilot interference in real time. Combined with the predictive ability of the deep neural network model, comprehensive risk monitoring and safety assurance are provided. The multi-source data fusion of the scheme makes up for the shortcomings of a single data source, is effective and practical in emergencies, can quickly respond and issue emergency avoidance instructions, and significantly improves driving safety. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Figure 1 A schematic diagram of a safe driving method based on multi-source data according to the present invention;
[0052] Figure 2 A schematic diagram of a safe driving system based on multi-source data according to the present invention;
[0053] Figure 3 It is a schematic diagram of the structure of an electronic device provided by an embodiment of the present application;
[0054] Figure 4 It is a schematic diagram of the structure of a computer-readable storage medium provided by an embodiment of the present application. DETAILED DESCRIPTION
[0055] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0056] Example 1
[0057] See also Figure 1 As shown, the safe driving method, system and storage medium based on multi-source data described in this embodiment include:
[0058] Collect visual images, LiDAR point clouds and vehicle-mounted sensor data; visual images are obtained through vehicle-mounted high-definition cameras. The specific placement methods of vehicle-mounted high-definition cameras include:
[0059] Front view camera: 1, installed behind the front windshield;
[0060] Side view cameras: 2, installed on the left and right rearview mirrors;
[0061] Rear view camera: 1, installed on the rear windshield;
[0062] Interior camera: 1, installed above the front seat, used to monitor the status of the front seats of the vehicle. The image obtained by the interior camera is marked as the co-pilot interference image.
[0063] In-vehicle high-definition cameras include but are not limited to Mobileye 8 Connect™ or equivalent devices.
[0064] It can provide rich environmental information, including road conditions, traffic signs, other vehicles and pedestrians.
[0065] Visual images are crucial for driving risk recognition, identifying potentially dangerous situations.
[0066] The LiDAR point cloud is acquired by a vehicle-mounted LiDAR scanner;
[0067] Point cloud is a data set consisting of many points, each of which represents a position in three-dimensional space and usually contains attributes such as color and intensity. Point cloud data comes from sensors such as laser scanners, radars, and depth cameras, and is used to represent the three-dimensional structure of objects or scenes.
[0068] LiDAR point cloud data can provide high-precision three-dimensional environmental information, especially in complex environments or low-light conditions, which can make up for the deficiencies of visual images and improve overall perception accuracy.
[0069] On-board sensor data includes wheel speed, acceleration, angular velocity, brake pressure and vehicle status information;
[0070] The wheel speed is acquired in real time by the wheel speed sensor; the acceleration is acquired in real time by the three-axis accelerometer installed on the vehicle body, with a sampling frequency of 1000 Hz; the angular velocity is acquired in real time by the three-axis gyroscope; the brake pressure is acquired in real time by the brake system pressure sensor;
[0071] The brake system pressure sensor is a device used to detect pressure changes in the vehicle's brake system. It is usually installed in the hydraulic pipeline of the brake system. It can monitor the pressure of the brake fluid in real time and convert the pressure information into an electrical signal and send it to the vehicle's electronic control unit.
[0072] Vehicle status information includes gear position, turn signal status and battery temperature;
[0073] The gear positions include P, R, N, D and S;
[0074] P is Park; used when the vehicle is stopped, it prevents the vehicle from moving by locking the transmission output shaft. When parking, make sure to apply the handbrake and use P; R is Reverse: used for reversing. The vehicle must come to a complete stop before engaging R; N is Neutral: used when the engine is running but the vehicle does not need to move, such as short parking. In N, the transmission is disconnected from the engine and the vehicle can roll freely. D is Drive; used for normal driving. In D, the transmission automatically selects the appropriate gear based on vehicle speed and acceleration requirements. S is Sport: S is an optional driving mode that allows the transmission to delay upshifts and provide a faster acceleration response.
[0075] The turn signal status includes left, right, double flash and off; the battery temperature is obtained in real time by the temperature sensor installed on the edge of the vehicle battery;
[0076] Wheel speed data helps to accurately calculate vehicle speed and monitor tire conditions. Acceleration information can identify potentially dangerous driving behaviors, such as sudden acceleration or braking, thereby improving driving safety. Angular velocity can monitor vehicle steering and posture changes. Brake pressure monitoring helps evaluate brake system performance and identify emergency braking situations. Gear position can be used to analyze driving behavior and assist in autonomous driving decisions; turn signal status helps predict vehicle intentions and evaluate driving compliance; battery temperature monitoring can prevent safety hazards caused by battery overheating.
[0077] The co-pilot safety distance is calculated in real time based on the co-pilot interference image; the co-pilot interference image includes a picture of the vehicle steering wheel and a picture of the co-pilot's hand in a pre-experimental environment;
[0078] An exemplary experimental environment is as follows: when the vehicle is stationary, a person is arranged to sit in the co-pilot seat and use his hands to make any kind of actions; the actions include but are not limited to raising both hands, grabbing the steering wheel with both hands, grabbing the steering wheel with one hand, and blocking the main driver's view of the steering wheel.
[0079] Use LabelImg to annotate the co-pilot's hand position and the steering wheel position in the co-pilot interference image; LabelImg is a popular open source graphical interface image annotation tool, mainly used for data annotation in computer vision tasks;
[0080] Based on the labeled co-pilot interference image training, transfer learning is performed on the basis of YOLOv4 to train the first machine learning model that can recognize the co-pilot's hand position and steering wheel position in real time;
[0081] The process of transfer learning includes:
[0082] Preprocess the annotated co-pilot interference image; the preprocessing includes size normalization, grayscale conversion and noise elimination;
[0083] Freeze some convolutional layers; Freezing some convolutional layers means not updating weights in these convolutional layers. This is done to maintain the general feature extraction capabilities learned by the model during the YOLOv4 pre-training phase;
[0084] Fine-tune the fully connected layer; during the fine-tuning process, the weights of the fully connected layer will be updated according to the labeled co-pilot interference image during the back-propagation process, and learn the features that can recognize the co-pilot's hand position and steering wheel position in real time.
[0085] When the accuracy of real-time identification of the co-driver's hand position and steering wheel position reaches a preset accuracy threshold, training is stopped; other parameters and inter-layer weights of the first machine learning model are obtained by continuous tuning of actual engineering.
[0086] YOLOv4 (You Only Look Once version 4) is an object detection algorithm. YOLOv4 is known for its fast detection speed and high accuracy, and is suitable for application scenarios that require real-time detection. YOLOv4 combines a variety of advanced computer vision and deep learning technologies, such as convolutional neural networks, anchor boxes, and cross-stage local connections to improve detection performance.
[0087] Transfer learning is a machine learning technique that allows developers to leverage models pre-trained on large datasets to solve specific problems. In transfer learning, the weights of a pre-trained model are used as a starting point for a new task and then fine-tuned on a new dataset to adapt it to the new task. This approach can significantly reduce training time and improve model performance.
[0088] Co-pilot safety distance FJ= ; Take the position of the interior camera as the origin, and make a ray perpendicular to the left and right doors as the x-axis; take the origin as the starting point, and make a ray perpendicular to the horizontal plane of the bottom of the car as the y-axis; where, =1 means the co-pilot's left hand; =2 means the co-pilot’s right hand; The horizontal coordinate of the rightmost edge point of the steering wheel in real time. Indicates the real-time horizontal coordinate of the co-pilot's hand (left or right), Indicates the real-time vertical coordinate of the co-pilot's hand (left or right).
[0089] The co-driver's safety distance fully considers the situation that during driving, the co-driver may argue with the main driver for the steering wheel, causing the vehicle to deviate from the road seriously and eventually cause a traffic accident. The position of the co-driver's hands on the steering wheel is analyzed in real time. At the same time, the co-driver may not hold the steering wheel completely to cause interference. Once the co-driver touches the right edge closest to the steering wheel, it may have unpredictable serious consequences for the safety of the vehicle. At the same time, since the steering wheels of new energy vehicles are currently rectangular and circular, the rightmost edge point of the rectangular steering wheel will change in real time due to the main driver's behavior such as changing lanes and turning, so the consideration of the co-driver's safety distance is of great significance in handling emergencies.
[0090] Time-synchronize visual images, lidar point clouds, and vehicle-mounted sensor data;
[0091] The time synchronization process includes:
[0092] Dedistort and color normalize visual images;
[0093] The exemplary color normalization process includes: normalizing using the mean and standard deviation of the ImageNet dataset; mean: [0.485, 0.456, 0.406]; standard deviation: [0.229, 0.224, 0.225];
[0094] Downsample and normalize the intensity of the LiDAR point cloud; downsample the LiDAR point cloud using voxel grid filtering and normalize the reflection intensity values to the range of [0, 1];
[0095] Convert the units and encode the data of the vehicle sensors; convert all physical quantities into SI units; encode the gear position and turn signal status into numbers; for example, P, R, N, D and S are encoded as 0, 1, 2, 3 and 4; left, right, double flash and off are encoded as 1, 2, 3 and 4;
[0096] Use a unified timestamp to match visual images, lidar point clouds, and vehicle-mounted sensor data one by one according to the timestamp to complete time synchronization processing.
[0097] A timestamp is a mark used to record the time when a specific event occurred, usually expressed in the format of date and time. In computer science and information technology, timestamps are often used to record the time when data is created or modified to ensure the integrity and traceability of the data.
[0098] The visual image, the laser radar point cloud and the vehicle sensor data after time synchronization are subjected to feature extraction, and the feature extraction process includes:
[0099] Visual image features are extracted using a pre-trained ResNet50; ResNet50 involves passing the image through multiple convolutional layers and pooling layers of the network, and ultimately obtaining a feature vector that corresponds one-to-one to the visual image; the feature vector is of a fixed dimension.
[0100] Use PointNet++ to learn point cloud features from the original point cloud of lidar point cloud data; calculate the mean and standard deviation of the on-board sensor data as sensor features.
[0101] PointNet++ is a deep learning architecture designed for processing point cloud data to achieve efficient point cloud classification, segmentation and other 3D perception tasks. The core idea of PointNet++ is to gradually extract and aggregate features from different scales and local areas through a hierarchical feature learning method to capture the details and global structure in point cloud data.
[0102] Use concat to fuse visual image features, point cloud features, sensor features and co-pilot safety distance to obtain multi-source data features;
[0103] Feature fusion combines features from different sources or types to extract more comprehensive and accurate information. By fusing different feature vectors, better data representation can be obtained, the accuracy of classification and prediction can be improved, and deeper data associations can be discovered. Concat is a feature fusion technology that allows multiple feature vectors or feature maps to be spliced together in dimension to form a new feature vector or feature map.
[0104] The pseudo code of concat is as follows:
[0105] A = np.array([1, 2, 3])
[0106] B = np.array([4, 5, 6])
[0107] C = np.concatenate((A, B), axis=0)
[0108] print(C)
[0109] The label corresponding to the multi-source data feature is the vehicle status corresponding to the multi-source data feature; the vehicle status includes forward collision, side collision, rear collision, lane departure risk, and co-pilot interference risk; a corresponding code is set for each vehicle status; the encoding method is one-hot encoding:
[0110] One-hot encoding creates a binary vector for each state:
[0111] forward collision: [1, 0, 0, 0, 0];
[0112] Side collision: [0, 1, 0, 0, 0];
[0113] Backward collision: [0, 0, 1, 0, 0];
[0114] Lane departure risk: [0, 0, 0, 1, 0];
[0115] Co-pilot interference risk: [0, 0, 0, 0, 1];
[0116] Collect multiple sets of multi-source data features and corresponding labels to construct a data set, and train a second machine learning model for predicting vehicle risks; the data set is divided into a training set, a validation set, and a test set, where the training set accounts for 60% of the data set, and the validation set and the test set each account for 20% of the data set;
[0117] The training set is used as the input of the second machine learning model, and the second machine learning model uses real-time vehicle condition data as output; the historical vehicle condition data corresponding to a set of real-time feature vectors is used as the prediction target, and minimizing the loss function value of the second machine learning model is used as the training target; when the loss function value of the second machine learning model is less than or equal to the preset target loss value, the training is stopped;
[0118] The second machine learning model loss function is a mean square error; the mean square error is calculated by Minimize to train the model; in the loss function is the loss function value, i is the multi-source data feature group number; is the number of feature groups of multi-source data; is the label corresponding to the i-th group of multi-source data features, The probability of the vehicle risk type predicted by the i-th group of multi-source data features;
[0119] The second machine learning model is a deep neural network model;
[0120] Deep Neural Network Model Hidden Layers The calculation methods include:
[0121] G[ b i + w i s( b i-1 + w i-1 x)] ; In the formula, is the output of the hidden layer; G is the activation function; is the bias term of the hidden layer; is the weight of the hidden layer; is the activation function; is the bias term of the previous layer; is the weight of the previous layer; x is the input training set.
[0122] The deep neural network model consists of 4 fully connected layers. The first 3 hidden layers contain 32, 64 and 32 neurons respectively. One SoftMax classification layer contains 5 neurons. The neurons are connected to each other through weights and activated by the ReLU activation function.
[0123] The second machine model achieves the goal of real-time analysis of the risk probability of each vehicle by fusing multi-source data, thereby further improving driving safety.
[0124] Based on the second machine learning model, a risk avoidance command is issued to the vehicle, including but not limited to emergency braking and emergency lane change.
[0125] Example 1 integrates visual images, LiDAR point clouds and vehicle-mounted sensor data to achieve real-time identification and warning of vehicle driving risks. ResNet50 and PointNet++ are used for feature extraction, and the YOLOv4 transfer learning model is used to identify co-pilot interference in real time. Combined with the predictive ability of the deep neural network model, the system can respond quickly and issue emergency avoidance instructions, significantly improving driving safety.
[0126] Example 1 ensures the efficiency and accuracy of the system by synchronizing real-time data, giving full play to the advantages of deep learning models and providing comprehensive risk monitoring and safety assurance. The multi-source data fusion of the solution makes up for the shortcomings of a single data source, is effective and practical in emergencies, and significantly improves the safety and reliability of driving.
[0127] Example 2
[0128] See also Figure 2 As shown, the part not described in detail in this embodiment is described in Example 1, and a safe driving system and storage medium based on multi-source data are provided, wherein the system comprises: a data collection module, which collects visual images, laser radar point clouds and vehicle-mounted sensor data; the visual image comprises a co-pilot interference image; the co-pilot interference image is an image taken by a camera installed above the front seat; the camera is marked as an internal view camera; the vehicle-mounted sensor data comprises wheel speed, acceleration, angular velocity, brake pressure and vehicle status information; the vehicle status information comprises gear position, turn signal status and battery temperature; the gear position comprises P, R, N, D and S; the turn signal status comprises left, right, double flash and off;
[0129] A data processing module, which calculates the co-pilot safety distance based on the co-pilot interference image;
[0130] The feature processing module performs time synchronization processing on the visual image, LiDAR point cloud and vehicle sensor data; extracts features from the time-synchronized visual image, LiDAR point cloud and vehicle sensor data; uses concat to fuse the visual image features, point cloud features, sensor features and the co-pilot safety distance to obtain multi-source data features;
[0131] The model training module collects multiple sets of multi-source data features and corresponding labels to construct a data set, and trains a second machine learning model to predict vehicle risks; based on the second machine learning model, it issues a risk avoidance command to the vehicle. Each module is connected via a wired and / or wireless network.
[0132] Example 3
[0133] See also Figure 3 As shown, according to another aspect of the present application, a safe driving method, system and storage medium electronic device 500 based on multi-source data is also provided. The electronic device 500 may include one or more processors and one or more memories. Among them, the memory stores a computer readable code, and when the computer readable code is executed by one or more processors, a safe driving method, system and storage medium based on multi-source data as described above can be executed.
[0134] The method or system according to the embodiment of the present application can also be used by Figure 3 The electronic device architecture shown in FIG. Figure 3 As shown, the electronic device 500 may include a bus 501, one or more CPUs 502, a read-only memory (ROM) 503, a random access memory (RAM) 504, a communication port 505 connected to a network, an input / output component 506, a hard disk 507, etc. The storage device in the electronic device 500, such as ROM 503 or hard disk 507, can store a safe driving method, system and storage medium based on multi-source data provided in the present application. A safe driving method based on multi-source data may, for example, include: collecting visual images, lidar point clouds and vehicle-mounted sensor data; the visual image includes a co-pilot interference image; the co-pilot interference image is an image taken by a camera installed above the front seat; the camera is marked as an internal view camera; the vehicle-mounted sensor data includes wheel speed, acceleration, angular velocity, brake pressure and vehicle status information; the vehicle status information includes gear position, turn signal status and battery temperature; the gear position includes P, R, N, D and S; the turn signal status includes left, right, double flash and off;
[0135] Calculate the co-pilot safety distance based on the co-pilot interference image;
[0136] Perform time synchronization processing on visual images, LiDAR point clouds and vehicle-mounted sensor data; perform feature extraction on the time-synchronized visual images, LiDAR point clouds and vehicle-mounted sensor data; use concat to fuse visual image features, point cloud features, sensor features and co-pilot safety distance to obtain multi-source data features;
[0137] Collect multiple sets of multi-source data features and corresponding labels to construct a data set, and train a second machine learning model to predict vehicle risks; and issue a risk avoidance command to the vehicle based on the second machine learning model. Furthermore, the electronic device 500 may also include a user interface 508. Of course, Figure 3 The architecture shown is only exemplary and can be omitted according to actual needs when implementing different devices. Figure 3 One or more components of an electronic device are shown.
[0138] Example 4
[0139] See also Figure 4 As shown, a computer-readable storage medium 600 according to an embodiment of the present application is shown. Computer-readable instructions are stored on the computer-readable storage medium 600. When the computer-readable instructions are executed by the processor, a safe driving method, system and storage medium based on multi-source data according to an embodiment of the present application described with reference to the above figures can be executed. The storage medium 600 includes, but is not limited to, for example, volatile memory and / or non-volatile memory. Volatile memory may include, for example, random access memory (RAM) and cache memory (cache), etc. Non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc.
[0140] In addition, according to the embodiments of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the present application provides a non-transitory machine-readable storage medium, which stores machine-readable instructions, and the machine-readable instructions can be executed by a processor to execute instructions corresponding to the method steps provided by the present application. When the computer program is executed by a central processing unit (CPU), the above functions defined in the method of the present application are executed.
[0141] The above embodiments can be implemented in whole or in part by software, hardware, firmware or any other combination. When implemented by software, the above embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center through a wired network or a wireless network. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that contains one or more available media sets. The available medium can be a magnetic medium (for example, a floppy disk, a hard disk, a tape), an optical medium (for example, a DVD), or a semiconductor medium. The semiconductor medium can be a solid-state hard disk.
[0142] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed in the present invention can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0143] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0144] In the several embodiments provided by the present invention, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a safe driving method, system and storage medium based on multi-source data. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0145] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0146] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0147] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
[0148] Finally: The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A safe driving method based on multi-source data, characterized in that: include: Collect visual imagery, lidar point clouds, and onboard sensor data; Visual images include co-pilot interference images; The co-pilot interference image is an image taken by a camera installed above the front seat; the camera is marked as an internal view camera; the on-board sensor data includes wheel speed, acceleration, angular velocity, brake pressure and vehicle status information; the vehicle status information includes gear position, turn signal status and battery temperature; the gear positions include P, R, N, D and S; the turn signal status includes left, right, double flash and off; The co-pilot interference images included pictures of the vehicle steering wheel and pictures of the co-pilot’s hands in a pre-experimental environment; The experimental environment includes: when the vehicle is stationary, a person is arranged to sit in the co-pilot seat and use his hands to raise both hands, grab the steering wheel with both hands, grab the steering wheel with one hand, and block the main driver's view of the steering wheel; LabelImg is used to annotate the co-pilot interference image, the position of the co-pilot's hand and the position of the steering wheel; based on the annotated co-pilot interference image training, transfer learning is performed on the basis of YOLOv4 to train the first machine learning model that can recognize the co-pilot's hand position and the steering wheel position in real time; the transfer learning process includes: Preprocess the annotated co-pilot interference image; preprocessing includes size normalization, grayscale conversion and noise removal; freeze some convolutional layers; fine-tune the fully connected layer; When the accuracy of real-time recognition of the co-pilot's hand position and steering wheel position reaches a preset accuracy threshold, the training is stopped; Calculate the co-pilot safety distance based on the co-pilot interference image; Co-pilot safety distance ; Take the position of the interior camera as the origin, and make a ray perpendicular to the left and right doors as the x-axis; take the origin as the starting point, and make a ray perpendicular to the horizontal plane of the bottom of the car as the y-axis; where, =1 means the co-pilot's left hand; =2 means the co-pilot’s right hand; The horizontal coordinate of the rightmost edge point of the steering wheel in real time. represents the real-time horizontal coordinate of the co-pilot's hand, Indicates the real-time vertical coordinate of the co-pilot's hand; Perform time synchronization processing on visual images, LiDAR point clouds and vehicle-mounted sensor data; perform feature extraction on the time-synchronized visual images, LiDAR point clouds and vehicle-mounted sensor data; use concat to fuse visual image features, point cloud features, sensor features and co-pilot safety distance to obtain multi-source data features; Collect multiple sets of multi-source data features and corresponding labels to build a data set, and train a second machine learning model for predicting vehicle risks; and issue a risk avoidance command to the vehicle based on the second machine learning model.
2. A safe driving method based on multi-source data according to claim 1, characterized in that: The time synchronization process includes: Dedistort and color normalize visual images; Downsample and normalize the intensity of the LiDAR point cloud; downsample the LiDAR point cloud using voxel grid filtering and normalize the reflection intensity values to the range of [0, 1]; Convert the units and encode the data of the vehicle sensors; convert all physical quantities into SI units; encode the gear position and turn signal status into numbers; Use a unified timestamp to match visual images, lidar point clouds, and vehicle-mounted sensor data one by one according to the timestamp to complete time synchronization processing.
3. The safe driving method based on multi-source data according to claim 2, characterized in that: The feature extraction process includes: Extract visual image features using a pre-trained ResNet50 machine learning model; Use PointNet++ deep learning architecture to learn point cloud features from raw point clouds of LiDAR point cloud data; The mean and standard deviation of the vehicle sensor data are calculated as two sensor features.
4. The safe driving method based on multi-source data according to claim 3, characterized in that: The label corresponding to the multi-source data feature is the vehicle status corresponding to the multi-source data feature; the vehicle status includes forward collision, side collision, rear collision, lane departure risk, and co-pilot interference risk; a corresponding code is set for each vehicle status; the encoding method is one-hot encoding: One-hot encoding creates a binary vector for each state: forward collision: [1, 0, 0, 0, 0]; Side collision: [0, 1, 0, 0, 0]; Backward collision: [0, 0, 1, 0, 0]; Lane departure risk: [0, 0, 0, 1, 0]; Co-pilot interference risk: [0, 0, 0, 0, 1]; The data set is divided into a training set, a validation set and a test set, where the training set accounts for 60% of the data set, and the validation set and the test set each account for 20% of the data set; The training set is used as the input of the second machine learning model, and the second machine learning model uses real-time vehicle condition data as output; the historical vehicle condition data corresponding to a set of real-time feature vectors is used as the prediction target, and minimizing the loss function value of the second machine learning model is used as the training target; when the loss function value of the second machine learning model is less than or equal to the preset target loss value, the training is stopped; The second machine learning model loss function is a mean square error; the mean square error is calculated by Minimize to train the model; in the loss function is the loss function value, i is the multi-source data feature group number; is the number of feature groups of multi-source data; is the label corresponding to the i-th group of multi-source data features, The probability of the vehicle risk type predicted by the i-th group of multi-source data features; The second machine learning model is a deep neural network model; Deep Neural Network Model Hidden Layers The calculation methods include: In the formula, is the output of the hidden layer; G is the activation function; is the bias term of the hidden layer; is the weight of the hidden layer; is the activation function; is the bias term of the previous layer; is the weight of the previous layer; x is the input training set; The deep neural network model consists of 4 fully connected layers. The first 3 hidden layers contain 32, 64 and 32 neurons respectively. One SoftMax classification layer contains 5 neurons. The neurons are connected to each other through weights and activated by the ReLU activation function.
5. A safe driving system based on multi-source data, which is used to implement the safe driving method based on multi-source data according to any one of claims 1 to 4, characterized in that: Data collection module, which collects visual images, lidar point clouds and vehicle sensor data; visual images include co-pilot interference images; The co-pilot interference image is an image taken by a camera installed above the front seat; the camera is marked as an internal view camera; the on-board sensor data includes wheel speed, acceleration, angular velocity, brake pressure and vehicle status information; the vehicle status information includes gear position, turn signal status and battery temperature; the gear positions include P, R, N, D and S; the turn signal status includes left, right, double flash and off; A data processing module, which calculates the co-pilot safety distance based on the co-pilot interference image; The feature processing module performs time synchronization processing on visual images, lidar point clouds, and vehicle-mounted sensor data; Extract features from the visual image, lidar point cloud and vehicle-mounted sensor data after time synchronization; use concat to fuse the visual image features, point cloud features, sensor features and the co-pilot safety distance to obtain multi-source data features; The model training module collects multiple sets of multi-source data features and corresponding labels to build a data set, and trains a second machine learning model to predict vehicle risks; Initiate hazard avoidance instructions for the vehicle based on the second machine learning model.
6. An electronic device, characterized in that: include: A processor and a memory, wherein the memory stores a computer program that can be called by the processor; The processor executes the safe driving method based on multi-source data as described in any one of claims 1 to 4 by calling the computer program stored in the memory.
7. A computer-readable storage medium, characterized in that: Instructions are stored, and when the instructions are executed on a computer, the computer is caused to execute a safe driving method based on multi-source data as described in any one of claims 1 to 4.
