Road obstacle identification method and system
The normal distribution of random spatial projection and Monte Carlo random forest algorithm are used to process road obstacle image data, which solves the problems of insufficient data diversity and static allocation of feature weights, and improves the accuracy of road obstacle recognition.
Patent Information
- Application Number
- CN202411028416.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-30
- Publication Date
- 2024-11-29
- Estimated Expiration
- 2044-07-30
AI Technical Summary
Existing road barrier identification technology faces the problems of data diversity and insufficient quantity. Traditional data augmentation methods may lose important information, and the static allocation of feature weights limits the accuracy of identification.
Using a random spatial projection image data augmentation algorithm based on normal distribution and a random forest algorithm of Monte Carlo method, road obstacle image data is processed through normal random spatial projection matrix and normal factors to expand the number and diversity of training samples, and Adaptively adjust the feature importance weight to improve identification accuracy.
Effectively expand training data, retain key image information, improve model generalization ability and prediction accuracy, enhance the model's ability to interpret key predictors, and improve the accuracy of road obstacle recognition.
Smart Images

Figure CN118552937B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image recognition technology, and in particular, to a method and system for identifying road obstacles. Background Art
[0002] At present, with the rapid development and widespread application of autonomous driving technology, how to ensure that autonomous vehicles can navigate safely and reliably in various environments has become a pressing issue. In this context, the identification of road obstacles is particularly important because it is directly related to the decision-making and behavior of the autonomous driving system, including obstacle avoidance, speed adjustment and path planning.
[0003] Traditional methods for identifying road obstacles face multiple challenges. First, existing technologies often rely on limited, well-labeled training data sets, which are expensive to obtain and have limited data diversity and quantity, which limits the generalization ability of the model. Second, although traditional data augmentation methods can expand training data to a certain extent, they often lose important information due to simple geometric transformations or color space transformations, or introduce unrealistic image changes, affecting the learning effect of the model. In addition, accurate identification of obstacle types is crucial for the correct response of autonomous vehicles, but existing classification methods often cannot dynamically adjust the weights of features, thereby failing to maximize the use of key features, limiting the improvement of recognition accuracy. Summary of the invention
[0004] The purpose of this application is to provide a road obstacle recognition method, system, electronic device, and computer-readable storage medium, which can achieve the technical effect of improving the accuracy of road obstacle recognition.
[0005] In a first aspect, the present application provides a road obstacle recognition method, comprising:
[0006] Acquire road obstacle image data;
[0007] Processing the road obstacle image data based on a normal distribution random space projection image data enhancement algorithm to obtain road obstacle image enhancement data;
[0008] Performing data preprocessing on the road obstacle image enhancement data to obtain a road obstacle image data set;
[0009] Identifying the position of the road obstacle based on the road obstacle image data set to obtain the road obstacle position information;
[0010] A random forest algorithm based on the Monte Carlo method is used to identify the types of road obstacles on the road obstacle image data to obtain road obstacle type information.
[0011] In the above implementation process, the road obstacle recognition method processes the road obstacle image data through a random space projection image data enhancement algorithm based on normal distribution, and performs data enhancement on the road obstacle image data, which can not only expand the number and diversity of training samples, but also effectively retain the key information of the image, avoiding the information loss problem that may occur in the traditional data enhancement method; in addition, in the type recognition of road obstacles, the random forest algorithm based on the Monte Carlo method recognizes the type of road obstacles on the road obstacle image data, and the algorithm can adaptively adjust the importance weights of the features, thereby improving the accuracy and explanatory power of the prediction model; thus, the road obstacle recognition method can achieve the technical effect of improving the accuracy of road obstacle recognition.
[0012] Furthermore, the random space projection image data enhancement algorithm based on normal distribution includes a random space projection matrix and a normal factor. The step of processing the road obstacle image data based on the random space projection image data enhancement algorithm to obtain road obstacle image enhancement data includes:
[0013] Performing Hadamard product processing based on the random space projection matrix and the normal factor to obtain a normal random space projection matrix;
[0014] A transformation operation is performed on the road obstacle image data based on the normal random space projection matrix to obtain road obstacle image enhancement data, wherein the random space projection matrix includes one or more of a rotation matrix, a translation matrix, a shear matrix, and a scaling matrix.
[0015] In the above implementation process, Hadamard product processing is performed based on the random space projection matrix and the normal factor, so as to limit the space projection range and the image output form, and limit the value range of each transformation parameter in the normal random space projection matrix to the normal distribution range; thus, after the normal random space projection, the image features of the road obstacle image enhancement data are obvious, the degree of transformation is moderate, and there will be no excessive transformation. In addition, the road obstacle image enhancement data and the initial data constitute a new data set, which expands the sample size during training.
[0016] Further, in the step of performing Hadamard product processing based on the random space projection matrix and the normal factor to obtain a normal random space projection matrix, the random space projection matrix is expressed as:
[0017] ;
[0018] Among them, A r Expressed as a rotation matrix, A sh Expressed as a shear matrix, A trExpressed as a translation matrix, A s Represented as a scaling matrix, a 11 、a 12 、a 13 、a 21 、a 22 、a 23 Indicates the changing parameters;
[0019] The normal factor is expressed as:
[0020] ;
[0021] Among them, x 11 、x 12 、x 13 、x 21 、x 22 、x 23 represents the normal distribution parameter;
[0022] The normal random space projection matrix is expressed as:
[0023] .
[0024] Furthermore, the step of performing data preprocessing on the road obstacle image enhancement data to obtain a road obstacle image data set includes:
[0025] One or more of normalization processing, denoising operation, and contrast enhancement operation are performed on the road obstacle image enhancement data to obtain a road obstacle image data set.
[0026] In the above implementation process, the road obstacle image enhancement data is preprocessed by standardization, denoising, contrast enhancement and other preprocessing operations, so that the road obstacle image enhancement data becomes a unified data set.
[0027] Furthermore, before the step of identifying the position of the road obstacle based on the road obstacle image data set and obtaining the road obstacle position information, the method further includes:
[0028] The road obstacle image dataset is enhanced by generating an adversarial network to obtain an optimized road obstacle image dataset, wherein the loss function of the generating adversarial network is expressed as:
[0029] ;
[0030] Among them, cG is the generator, cD is the discriminator, cz is random noise, is the loss function of the generative adversarial network, is the expected loss of the discriminator, is the expected loss of the generator, is random noise, is the real sample input to the discriminator;
[0031] The road obstacle image detection dataset is obtained by performing edge detection on the road obstacle image optimization dataset through image gradient.
[0032] In the above implementation process, the road obstacle image dataset is enhanced by generating an adversarial network, and the edge detection of the road obstacle image optimization dataset is performed through image gradient, so as to complete the image optimization of the preprocessed image dataset and further improve the accuracy of road obstacle recognition.
[0033] Furthermore, the step of identifying the position of the road obstacle based on the road obstacle image data set and obtaining the road obstacle position information includes:
[0034] The road obstacle image detection dataset is processed by capsule network positioning calibration to obtain road obstacle center data, where the capsule network positioning calibration is expressed as:
[0035] ;
[0036] ;
[0037] in, is the input vector, is the weight matrix, is the coupling coefficient, is a nonlinear activation function, is the calibration value;
[0038] Processing the road obstacle image detection data set based on an energy function to obtain road obstacle contour data;
[0039] The road obstacle position information is obtained according to the road obstacle center data and the road obstacle contour data.
[0040] In the above implementation process, the active contour model is completed through the energy function to detect road obstacles, thereby improving the accuracy of the road obstacle position information.
[0041] Furthermore, the step of identifying the type of road obstacles on the road obstacle image data using a random forest algorithm based on a Monte Carlo method to obtain information on the type of road obstacles includes:
[0042] The road obstacle image data is stretched to obtain one-dimensional vector data;
[0043] The one-dimensional vector data is input into a random forest for training to obtain random forest training data, wherein the random forest includes M decision trees, and the feature subset used by the decision tree From the feature set The feature subset is randomly selected from It is expressed as:
[0044] ;
[0045] in, Represents the feature set Random selection The operation of the features, is the number of features used by the decision tree, m=1, 2, ..., M;
[0046] Adaptively adjust the feature importance of the random forest training data to obtain feature weight data, wherein the feature weight data includes a plurality of feature importance weights, and the feature importance weights represent the degree to which the corresponding decision tree relies on the feature after training is completed;
[0047] Based on the feature weight data and the decision tree in the random forest, the types of road obstacles are identified to obtain road obstacle type information, wherein the types of road obstacles include one or more of static obstacles, dynamic obstacles, temporary obstacles, and traffic accident obstacles.
[0048] In the above implementation process, multiple decision trees are constructed and their prediction results are combined through the random forest algorithm based on the Monte Carlo method to improve the accuracy and robustness of the prediction. Each decision tree randomly selects a feature subset during the training process, which helps to increase the diversity of the model and reduce the risk of overfitting. In addition, the random forest algorithm based on the Monte Carlo method analyzes the prediction performance of each tree and adaptively adjusts the importance weights of the features, so that the features that contribute more to the prediction results receive more attention in the training of subsequent trees, which not only improves the accuracy of the prediction model, but also enhances the model's ability to explain key predictive factors.
[0049] In a second aspect, the present application provides a road obstacle recognition system, comprising:
[0050] An image acquisition module, used to acquire image data of road obstacles;
[0051] A normal random projection module, used for processing the road obstacle image data based on a normal distribution random space projection image data enhancement algorithm to obtain road obstacle image enhancement data;
[0052] A preprocessing module, used to perform data preprocessing on the road obstacle image enhancement data to obtain a road obstacle image data set;
[0053] A position module, used to identify the position of the road obstacle based on the road obstacle image data set and obtain the road obstacle position information;
[0054] The classification module is used to identify the types of road obstacles on the road obstacle image data based on the random forest algorithm of the Monte Carlo method to obtain road obstacle type information.
[0055] Furthermore, the random space projection image data enhancement algorithm based on normal distribution includes a random space projection matrix and a normal factor, and the normal random module is also used for:
[0056] Performing Hadamard product processing based on the random space projection matrix and the normal factor to obtain a normal random space projection matrix;
[0057] A transformation operation is performed on the road obstacle image data based on the normal random space projection matrix to obtain road obstacle image enhancement data, wherein the random space projection matrix includes one or more of a rotation matrix, a translation matrix, a shear matrix, and a scaling matrix.
[0058] Furthermore, the preprocessing module is also used to: perform one or more of standardization processing, denoising operation, and contrast enhancement operation on the road obstacle image enhancement data to obtain a road obstacle image data set.
[0059] Furthermore, the preprocessing module is also used for:
[0060] The road obstacle image dataset is enhanced by generating an adversarial network to obtain an optimized road obstacle image dataset, wherein the loss function of the generating adversarial network is expressed as:
[0061] ;
[0062] Among them, cG is the generator, cD is the discriminator, cz is random noise, is the loss function of the generative adversarial network, is the expected loss of the discriminator, is the expected loss of the generator, is random noise, is the real sample input to the discriminator;
[0063] The road obstacle image detection dataset is obtained by performing edge detection on the road obstacle image optimization dataset through image gradient.
[0064] Furthermore, the location module is also used for:
[0065] The road obstacle image detection dataset is processed by capsule network positioning calibration to obtain road obstacle center data, where the capsule network positioning calibration is expressed as:
[0066] ;
[0067] ;
[0068] in, is the input vector, is the weight matrix, is the coupling coefficient, is a nonlinear activation function, is the calibration value;
[0069] Processing the road obstacle image detection data set based on an energy function to obtain road obstacle contour data;
[0070] The road obstacle position information is obtained according to the road obstacle center data and the road obstacle contour data.
[0071] Furthermore, the category module is also used for:
[0072] The road obstacle image data is stretched to obtain one-dimensional vector data;
[0073] The one-dimensional vector data is input into a random forest for training to obtain random forest training data, wherein the random forest includes M decision trees, and the feature subset used by the decision tree From the feature set The feature subset is randomly selected from It is expressed as:
[0074] ;
[0075] in, Represents the feature set Random selection The operation of the features, is the number of features used by the decision tree, m=1, 2, ..., M;
[0076] Adaptively adjust the feature importance of the random forest training data to obtain feature weight data, wherein the feature weight data includes a plurality of feature importance weights, and the feature importance weights represent the degree to which the corresponding decision tree relies on the feature after training is completed;
[0077] Based on the feature weight data and the decision tree in the random forest, the types of road obstacles are identified to obtain road obstacle type information, wherein the types of road obstacles include one or more of static obstacles, dynamic obstacles, temporary obstacles, and traffic accident obstacles.
[0078] In a third aspect, the present application provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method described in any one of the first aspects when executing the computer program.
[0079] In a fourth aspect, the present application provides a computer-readable storage medium, on which instructions are stored. When the instructions are executed on a computer, the computer executes the method as described in any one of the first aspects.
[0080] In a fifth aspect, the present application provides a computer program product, which, when running on a computer, enables the computer to execute the method as described in any one of the first aspects.
[0081] Other features and advantages disclosed in the present application will be described in the following description, or some features and advantages can be inferred or determined without doubt from the description, or can be learned by implementing the above-mentioned technology disclosed in the present application.
[0082] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0083] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0084] Figure 1 A schematic diagram of a road obstacle identification method provided in an embodiment of the present application;
[0085] Figure 2 A schematic diagram of a flow chart of another road obstacle identification method provided in an embodiment of the present application;
[0086] Figure 3 A schematic diagram of a random space projection image data enhancement algorithm based on normal distribution provided in an embodiment of the present application;
[0087] Figure 4A structural block diagram of a road obstacle identification system provided in an embodiment of the present application;
[0088] Figure 5 A structural block diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0089] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.
[0090] It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. At the same time, in the description of this application, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.
[0091] Generally speaking, with the rapid development and widespread application of autonomous driving technology, how to ensure that autonomous vehicles can navigate safely and reliably in various environments has become a pressing issue. In this context, the identification of road obstacles is particularly important because it is directly related to the decision-making and behavior of the autonomous driving system, including obstacle avoidance, speed adjustment, and path planning. However, the existing technology still has the following defects:
[0092] (1) Existing data augmentation methods may fail to fully maintain the key information of the original image while increasing data diversity, resulting in the enhanced data losing some important features or introducing unrealistic changes. This is because traditional data augmentation techniques (such as simple geometric transformations, color space transformations, etc.) may not take into account the semantic consistency of image content and the authenticity of visual perception, thus affecting the quality and applicability of features learned by the model;
[0093] (2) In traditional obstacle type recognition methods, feature weights are often statically assigned, which means that all features are assigned fixed weights without considering their actual contribution to the model's prediction performance. This static allocation method may cause the model to be unable to fully utilize those features that have a greater impact on the prediction results, thereby limiting the improvement of recognition accuracy.
[0094] In order to solve the above-mentioned technical problems, the embodiments of the present application provide a road obstacle recognition method, system, electronic device, and computer-readable storage medium, which can be applied to the road obstacle recognition process for autonomous driving; see Figure 1 , Figure 1 A schematic diagram of a road obstacle recognition method provided in an embodiment of the present application, the road obstacle recognition method comprises the following steps:
[0095] S100: Acquire road obstacle image data;
[0096] Exemplarily, the data used in the road obstacle image data comes from professional road obstacle image acquisition equipment, which can acquire high-definition road obstacle images in a variety of scenarios, and all acquired road obstacle image data will be stored in grayscale image format; optionally, the resolution of the image in the road obstacle image data is 256×256 pixels.
[0097] S200: Processing the road obstacle image data based on a normal distribution random space projection image data enhancement algorithm to obtain road obstacle image enhancement data;
[0098] For example, in order to solve the problem of high cost of training sample collection and annotation and insufficient number of training samples in the field of autonomous driving, this application proposes to perform spatial projection on road obstacle photos to achieve the purpose of image enhancement; geometric transformation and color space enhancement in traditional image data enhancement methods will lose image information and affect the image label;
[0099] This random space projection image data enhancement algorithm based on normal distribution imitates the normal distribution sampling mechanism of biological visual perception, introduces normal distribution in random space projection, and outputs the road obstacle image enhancement data in the form of normal distribution. At the same time, it limits the distribution range of the output image, retains valid data, and deletes redundant data, so that the subsequent machine learning model can learn more invariant features in the transformed image and improve the generalization ability of the model.
[0100] S300: performing data preprocessing on the road obstacle image enhancement data to obtain a road obstacle image data set;
[0101] Exemplarily, data preprocessing is performed on the road obstacle image enhancement data, such as standardization processing, denoising processing, contrast enhancement processing, etc., so that the road obstacle image enhancement data becomes a unified data set.
[0102] S400: Identifying the position of a road obstacle based on a road obstacle image data set, and obtaining the position information of the road obstacle;
[0103] S500: Using a random forest algorithm based on a Monte Carlo method to identify the types of road obstacles in the road obstacle image data, and obtaining information on the types of road obstacles.
[0104] Exemplarily, after the location of the road obstacle is identified, the type of the road obstacle is identified. The present application uses a random forest algorithm based on the Monte Carlo method to identify the type of the road obstacle;
[0105] Random forest is an integrated learning method that can improve the accuracy and robustness of predictions by building multiple decision trees and combining their prediction results; each decision tree randomly selects a subset of features during training, which helps increase the diversity of the model and reduce the risk of overfitting. The random forest algorithm based on the Monte Carlo method used in this application analyzes the prediction performance of each tree and adaptively adjusts the importance weights of the features, so that the features that contribute more to the prediction results receive more attention in the training of subsequent trees, which not only improves the accuracy of the prediction model, but also enhances the model's ability to explain key predictors.
[0106] Exemplarily, the road obstacle recognition method processes the road obstacle image data through a random space projection image data enhancement algorithm based on normal distribution, and performs data enhancement on the road obstacle image data, which can not only expand the number and diversity of training samples, but also effectively retain the key information of the image, avoiding the information loss problem that may occur in traditional data enhancement methods; in addition, in the type recognition of road obstacles, the random forest algorithm based on the Monte Carlo method recognizes the type of road obstacles on the road obstacle image data, and the algorithm can adaptively adjust the importance weights of the features, thereby improving the accuracy and explanatory power of the prediction model; thus, the road obstacle recognition method can achieve the technical effect of improving the accuracy of road obstacle recognition.
[0107] See also Figure 2 , Figure 2 A schematic flow chart of another method for identifying road obstacles provided in an embodiment of the present application.
[0108] Exemplarily, the random space projection image data enhancement algorithm based on normal distribution includes a random space projection matrix and a normal factor. S200: the step of processing the road obstacle image data based on the random space projection image data enhancement algorithm to obtain the road obstacle image enhancement data includes:
[0109] S210: performing Hadamard product processing based on the random space projection matrix and the normal factor to obtain a normal random space projection matrix;
[0110] S220: Performing a transformation operation on the road obstacle image data based on a normal random space projection matrix to obtain road obstacle image enhancement data, wherein the random space projection matrix includes one or more of a rotation matrix, a translation matrix, a shear matrix, and a scaling matrix.
[0111] Exemplarily, Hadamard product processing is performed based on the random space projection matrix and the normal factor to limit the space projection range and the image output form, and the value range of each transformation parameter in the normal random space projection matrix is limited to the normal distribution range; thus, after the normal random space projection, the image features of the road obstacle image enhancement data are obvious, the degree of transformation is moderate, and there is no excessive transformation. The road obstacle image enhancement data and the initial data constitute a new data set, which expands the sample size during training.
[0112] Exemplarily, in the step of performing Hadamard product processing based on the random space projection matrix and the normal factor to obtain the normal random space projection matrix, the random space projection matrix is expressed as:
[0113] ;
[0114] Among them, A r Expressed as a rotation matrix, A sh Expressed as a shear matrix, A tr Expressed as a translation matrix, A s Represented as a scaling matrix, a 11 、a 12 、a 13 、a 21 、a 22 、a 23 Indicates the changing parameters;
[0115] The normal factor is expressed as:
[0116] ;
[0117] Among them, x 11 、x 12 、x 13 、x 21 、x 22 、x 23 represents the normal distribution parameter;
[0118] The normal random space projection matrix is expressed as:
[0119] .
[0120] Exemplarily, S300: performing data preprocessing on the road obstacle image enhancement data to obtain a road obstacle image data set includes:
[0121] S310: performing one or more of standardization processing, denoising operation, and contrast enhancement operation on the road obstacle image enhancement data to obtain a road obstacle image data set.
[0122] Exemplarily, the road obstacle image enhancement data is preprocessed by standardization, denoising, contrast enhancement, etc., so that the road obstacle image enhancement data becomes a unified data set.
[0123] Exemplarily, before the step of S400: identifying the position of the road obstacle based on the road obstacle image data set and obtaining the road obstacle position information, the method further includes:
[0124] S320: Enhance the road obstacle image dataset by generating an adversarial network to obtain an optimized road obstacle image dataset, wherein the loss function of the generated adversarial network is expressed as:
[0125] ;
[0126] Among them, cG is the generator, cD is the discriminator, cz is random noise, is the loss function of the generative adversarial network, is the expected loss of the discriminator, is the expected loss of the generator, is random noise, is the real sample input to the discriminator;
[0127] S330: Perform edge detection on the road obstacle image optimization dataset through image gradient to obtain a road obstacle image detection dataset.
[0128] Exemplarily, the road obstacle image dataset is enhanced by generating an adversarial network, and edge detection is performed on the road obstacle image optimization dataset through image gradient, completing image optimization of the preprocessed image dataset, thereby further improving the accuracy of road obstacle recognition.
[0129] Exemplarily, S400: the step of identifying the position of the road obstacle based on the road obstacle image data set and obtaining the road obstacle position information includes:
[0130] S410: Process the road obstacle image detection dataset through capsule network positioning calibration to obtain road obstacle center data, where the capsule network positioning calibration is expressed as:
[0131] ;
[0132] ;
[0133] in, is the input vector, is the weight matrix, is the coupling coefficient, is a nonlinear activation function, is the calibration value;
[0134] S420: Processing the road obstacle image detection data set based on the energy function to obtain road obstacle contour data;
[0135] S430: Obtaining road obstacle location information according to the road obstacle center data and the road obstacle contour data.
[0136] Exemplarily, the active contour model is completed through the energy function to detect road obstacles, thereby improving the accuracy of the road obstacle position information.
[0137] Exemplarily, S500: the step of identifying the type of road obstacles on the road obstacle image data using a random forest algorithm based on a Monte Carlo method to obtain information on the type of road obstacles includes:
[0138] S510: stretching the road obstacle image data to obtain one-dimensional vector data;
[0139] S520: Input the one-dimensional vector data into the random forest for training to obtain random forest training data. The random forest includes M decision trees and the feature subset used by the decision tree. From the feature set Randomly select a subset of features It is expressed as:
[0140] ;
[0141] in, Represents the feature set Random selection The operation of the features, is the number of features used by the decision tree, m = 1, 2, ..., M;
[0142] S530: Adaptively adjust the feature importance of the random forest training data to obtain feature weight data, wherein the feature weight data includes a plurality of feature importance weights, and the feature importance weights represent the degree to which the corresponding decision tree relies on the feature after the training is completed;
[0143] S540: Identify the types of road obstacles based on feature weight data and decision trees in random forests to obtain road obstacle type information, where the types of road obstacles include one or more of static obstacles, dynamic obstacles, temporary obstacles, and traffic accident obstacles.
[0144] Illustratively, through the random forest algorithm based on the Monte Carlo method, multiple decision trees are constructed and their prediction results are combined to improve the accuracy and robustness of the prediction. Each decision tree randomly selects a feature subset during the training process, which helps to increase the diversity of the model and reduce the risk of overfitting. In addition, the random forest algorithm based on the Monte Carlo method analyzes the prediction performance of each tree and adaptively adjusts the importance weights of the features, so that features that contribute more to the prediction results receive more attention in the training of subsequent trees, which not only improves the accuracy of the prediction model, but also enhances the model's ability to explain key predictive factors.
[0145] In some embodiments, in combination Figure 1 and Figure 2 The road obstacle identification method provided in the embodiment of the present application has the following specific implementation steps:
[0146] 1. Obtaining road obstacle image data;
[0147] The acquired road obstacle image data is stored in grayscale image format, and the image resolution is Pixels;
[0148] Optionally, the grayscale value of each pixel of a road obstacle image is defined as a two-dimensional matrix ,in, Indicates the image Line The grayscale value of the pixel in the column; In order to describe the road obstacle area in the image, the following formula is defined:
[0149] ;
[0150] ;
[0151] in, represents the x-coordinate of the center of mass of the road obstacle in the image, represents the y coordinate of the center of mass of the road obstacle in the image, It is Line Grayscale value of the pixel in the column;
[0152] By calculation and , the center position of the road obstacle can be obtained;
[0153] 2. Processing the road obstacle image data based on the random space projection image data enhancement algorithm of normal distribution to obtain the road obstacle image enhancement data;
[0154] In order to solve the problems of high cost of training sample collection and annotation and insufficient number of training samples in the field of autonomous driving, this application imitates the normal distribution sampling mechanism of biological visual perception and proposes a random space projection image data enhancement method based on normal distribution. Normal distribution is introduced in random space projection so that the enhanced image is output in the form of normal distribution. At the same time, the distribution range of the output image is limited, valid data is retained, and redundant data is deleted, so that the subsequent machine learning model can learn more invariant features in the transformed image and improve the generalization ability of the model.
[0155] The spatial projection method adopted in this application is a process of performing a linear transformation and a translation in a vector space to transform to another vector space. Spatial projection represents the mapping relationship between two images and has an identity mapping property. Its transformation process can effectively maintain the "flatness" and "parallelism" of the two-dimensional image. Spatial projection includes a series of sub-transformations, such as rotation, shearing, translation, and scaling. This application proposes a random spatial projection image data enhancement method based on normal distribution, which introduces normal distribution in the random spatial projection process, performs a series of normal random spatial projection operations on the images in the training set to generate new images, and adds them to the data preprocessing of the task model. The existing traditional geometric transformation image data enhancement method only performs a simple spatial structure transformation on the original image, which is relatively simple and will generate more redundant data and invalid data. The method of the present application introduces normal distribution, so that the distribution of the transformed image is close to the normal distribution sampling mechanism of visual perception, so that the transformed image is output in the form of normal distribution, and the interference data that is useless to the training process is removed, and the enhanced data with a moderate degree of transformation is selectively retained. The random space projection process is composed of four sub-transformations: rotation, translation, shearing and scaling. The transformation process is as follows Figure 3 As shown, Figure 3 A schematic diagram of a random space projection image data enhancement algorithm based on normal distribution provided in an embodiment of the present application;
[0156] Exemplarily, this application designs a normal factor , the normal random space projection is composed of the normal factors and the matrix of random space projection The matrix of random space projection is It is composed of its sub-transformation matrices, which include rotation, translation, shearing and scaling;
[0157] The rotation transformation is: rotate the original image counterclockwise around the origin by an angle , and does not change its size. Its inverse matrix exists and satisfies , the rotation matrix can be expressed as:
[0158] ;
[0159] The shearing transformation is to stretch the original image unevenly. During the shearing process, the angle of the original image changes, but its area remains unchanged. x ,sh y (sh x ,sh y represents the tilt parameter, along the x-axis and y-axis respectively) is the shear factor, that is, the distortion of the angle between the axes. The shear matrix can be expressed as:
[0160] ;
[0161] The translation transformation is: the translation of the original image is through a vector t xy To achieve (t x ,t y x-axis and y-axis translation respectively), vector Determines the distance the original image is offset. The translation matrix can be expressed as:
[0162] ;
[0163] Scaling transformation is: Scaling is a linear transformation that enlarges or reduces the original image. , , and The shrinkage factors are axis The axis contracts when s x =s y This is called (non-)uniform scaling, when s x =0(or s y =0), the formation of collinearity is achieved. The scaling matrix can be expressed as:
[0164] ;
[0165] Combining the above spatial projections to obtain a random spatial projection matrix , the random space projection matrix can be expressed as:
[0166] ;
[0167] Based on this, the matrix It contains 6 parameters, and the shape, position and size of the transformed image are determined by the values of these 6 parameters. and Determine the scaling transformation, and Decide whether to rotate or shear, and Play a translation role;
[0168] Define a normal factor , this factor can output the spatial projection in a normal distribution and limit it to a valid range, preventing the image from being over-transformed. Normal factor It can be expressed as:
[0169] ;
[0170] According to the construction form of normal factors, it can be seen that in constructing normal factors In the process, two factors need to be considered, namely the distribution form of the normal distribution and the value range of the image transformation degree. The function of the normal factor is to limit the output form and range of the transformed image, so the normal factor The six parameters of are all composed of normal distribution formulas. The purpose is to limit each parameter in the spatial projection matrix, so that the spatial projection is output in a normal distribution and is limited to a valid range. . Normal Factor With random space projection matrix Perform Hadamard product operation, that is, multiply the elements at corresponding positions to obtain the normal random space projection matrix . The expression is ,in is the Hadamard product symbol, and the specific normal random space projection matrix can be expressed as:
[0171] ;
[0172] Since the value range of each transformation parameter is limited to the normal distribution range, the image is transformed in the form of normal distribution within the effective range;
[0173] definition As the original coordinates, is the coordinate of the original image after projection into normal random space, and The normal affine relationship can be expressed as:
[0174] ;
[0175] Based on this, the algorithm of this application restricts the spatial projection range and image output form, and limits the value range of each transformation parameter to the normal distribution range. The image features after normal random spatial projection are obvious, the degree of transformation is moderate, and there will be no excessive transformation. These new image data samples and the original data form a new data set, which expands the sample size during training;
[0176] 3. Perform data preprocessing on the expanded samples;
[0177] First, the data set is normalized so that the mean value is 0 and the variance is 1. In one embodiment, given a pixel value bX, the normalization process can be expressed as:
[0178] ;
[0179] in, is the average value of all pixel values, is the standard deviation;
[0180] A filter is used to perform a denoising operation. In one embodiment, a Gaussian filter is used to perform denoising. Given a pixel value bx, its denoised value is by, and the denoising operation can be expressed as:
[0181] ;
[0182] in, is the Gaussian filter function;
[0183] To perform contrast enhancement, in one embodiment, a given pixel value dx and its maximum and minimum values are respectively and , then the pixel value after contrast enhancement is dZ, and its calculation method can be expressed as:
[0184] ;
[0185] Based on this, all preprocessed image datasets become a unified dataset bD, which can be expressed as:
[0186] ;
[0187] The preprocessed image dataset is optimized. Since the size and shape of road obstacles may vary from individual to individual, this application uses a generative adversarial network to enhance the original image to more clearly display the road obstacle area. The objective function of the generative adversarial network is defined as:
[0188]
[0189] Among them, cG is the generator, cD is the discriminator, cz is random noise, is the loss function of the generative adversarial network, is the expected loss of the discriminator, is the expected loss of the generator, is random noise, is the real sample input to the discriminator;
[0190] Considering that the road obstacle is a dark circular area, its edge is detected by the gradient of the image, and the calculation method of the edge pixel point can be expressed as:
[0191] ;
[0192] ;
[0193] in, is the input training data set, is the horizontal coordinate of the pixel point, is the vertical coordinate of the pixel, is the horizontal coordinate of the edge pixel, is the vertical coordinate of the edge pixel;
[0194] Furthermore, the direction of the gradient can be defined as:
[0195]
[0196] in, is the gradient angle, and the center point of the road obstacle is calculated as above and get;
[0197] 3. Identifying the location of the road obstacle based on the road obstacle image data set to obtain the road obstacle location information;
[0198] The capsule network is used to locate and calibrate the center of road obstacles. The calibration method can be expressed as:
[0199] ;
[0200] ;
[0201] in, is the input vector, is the weight matrix, is the coupling coefficient, is a nonlinear activation function, is the calibration value;
[0202] It is further found that in order to accurately measure the size of road obstacles, this application proposes an improved active contour model for road obstacle measurement. Specifically, the energy function is defined as:
[0203] ;
[0204] Where cC is the contour, is the internal energy, is based on the energy of the image, is a constraint. To simplify the problem, assuming that the road obstacle is approximately circular, polar coordinates can be used to represent the contour:
[0205] ;
[0206] in, is the angle, ranging from 0 to . and is the Fourier coefficient, used to represent the details of the contour;
[0207] Furthermore, by bringing the radius of the road obstacle into the energy function, it can be expressed as:
[0208] ;
[0209] in, Represents the internal energy of the contour and can be expressed as:
[0210] ;
[0211] The energy of the image representing the contour can be expressed as:
[0212] ;
[0213] in, is the brightness value of the image on the contour, is the average brightness value inside the road obstacle, and the contour constraint can be expressed as:
[0214] ;
[0215] in, is the mean radius;
[0216] Furthermore, in order to obtain the optimal outline of the road obstacle, the above energy function is minimized:
[0217] ;
[0218] Furthermore, the size of the road obstacle is calculated. Specifically, when the optimal profile is obtained When the diameter of the road obstacle It can be directly obtained by calculating the maximum and minimum diameter of the contour:
[0219]
[0220] The internal energy is designed to ensure the smoothness of the contour and avoid the formation of overly distorted or overly curved contours. The image energy is designed to ensure that the contour can be adsorbed to image features, such as edges or textures. Constraint energy is used to add additional constraints, such as prior knowledge of the size or shape of road obstacles. By minimizing the combination of these three parts, a contour that conforms to the image data, prior knowledge and constraints can be found. This contour is considered the best estimate of the road obstacle. Based on this contour, the location of the road obstacle can be identified;
[0221] 5. Road obstacle category detection;
[0222] Furthermore, after identifying the location of the road obstacle, the type of road obstacle is identified. The present application uses a random forest algorithm based on the Monte Carlo method to identify the type of road obstacle. Random forest is an integrated learning method that improves the accuracy and robustness of predictions by constructing multiple decision trees and combining their prediction results. Each decision tree randomly selects a subset of features during the training process, which helps to increase the diversity of the model and reduce the risk of overfitting. The random forest algorithm based on the Monte Carlo method used in the present application analyzes the prediction performance of each tree and adaptively adjusts the importance weights of the features, so that the features that contribute more to the prediction results receive more attention in the training of subsequent trees, which not only improves the accuracy of the prediction model, but also enhances the model's ability to explain key predictive factors;
[0223] Specifically, the original image is stretched into a one-dimensional vector and used as the input of the random forest model, which can be expressed as a feature set: ,in is the number of features, that is, the number of pixels. Further, a certain number of decision trees are initialized and a feature subset is randomly assigned to each tree. The random forest is composed of decision trees, each tree Feature subset used is from is randomly selected from, which can be expressed as:
[0224] ;
[0225] in, Represents from the set Random selection The operation of the features, is the number of features used by each tree;
[0226] Furthermore, each tree is trained independently using its corresponding feature subset and all training data. Use its feature subset And all training data are trained, the training of decision tree can be simplified as follows:
[0227]
[0228] in, is the training dataset, is the function for training decision trees;
[0229] Furthermore, adaptive feature importance adjustment is performed. After each tree is trained, its dependence on each feature is evaluated based on its performance on the validation set, and the feature importance weights are adjusted accordingly. After each tree is trained, its dependence on the feature is evaluated, and the feature importance weights are adjusted accordingly. , which can be expressed as:
[0230] ;
[0231] in, It is After round training, features The importance weight of It is a feature In the tree The importance increment in the tree During the training Determined by usage, is the learning rate;
[0232] Furthermore, the prediction results of all decision trees are summarized to obtain the final prediction result. In one embodiment, the final result is obtained by voting, which can be expressed as:
[0233] ;
[0234] in, For new samples The prediction results, It's a tree For new samples In one embodiment, the prediction categories include: static obstacles, dynamic obstacles, temporary obstacles, and traffic accident obstacles.
[0235] See also Figure 4 , Figure 4 This is a structural block diagram of a road obstacle recognition system provided in an embodiment of the present application. The road obstacle recognition system includes:
[0236] An image acquisition module 100 is used to acquire image data of road obstacles;
[0237] The normal random projection module 200 is used to process the road obstacle image data based on the normal distribution random space projection image data enhancement algorithm to obtain the road obstacle image enhancement data;
[0238] The preprocessing module 300 is used to perform data preprocessing on the road obstacle image enhancement data to obtain a road obstacle image data set;
[0239] A position module 400, used to identify the position of the road obstacle based on the road obstacle image data set and obtain the road obstacle position information;
[0240] The classification module 500 is used to identify the types of road obstacles on the road obstacle image data based on the random forest algorithm of the Monte Carlo method to obtain the road obstacle type information.
[0241] Exemplarily, the random space projection image data enhancement algorithm based on normal distribution includes a random space projection matrix and a normal factor, and the normal random module 200 is further used for:
[0242] Perform Hadamard product processing based on the random space projection matrix and the normal factor to obtain the normal random space projection matrix;
[0243] A transformation operation is performed on the road obstacle image data based on a normal random space projection matrix to obtain road obstacle image enhancement data, wherein the random space projection matrix includes one or more of a rotation matrix, a translation matrix, a shear matrix, and a scaling matrix.
[0244] Exemplarily, the preprocessing module 300 is further used to: perform one or more of standardization processing, denoising operation, and contrast enhancement operation on the road obstacle image enhancement data to obtain a road obstacle image data set.
[0245] Exemplarily, the preprocessing module 300 is further used for:
[0246] The road obstacle image dataset is enhanced by generating an adversarial network to obtain an optimized road obstacle image dataset, where the loss function of the generated adversarial network is expressed as:
[0247] ;
[0248] Among them, cG is the generator, cD is the discriminator, cz is random noise, is the loss function of the generative adversarial network, is the expected loss of the discriminator, is the expected loss of the generator, is random noise, is the real sample input to the discriminator;
[0249] The road obstacle image detection dataset is obtained by performing edge detection on the road obstacle image optimization dataset through image gradient.
[0250] Exemplarily, the location module 400 is further configured to:
[0251] The road obstacle image detection dataset is processed through capsule network positioning calibration to obtain the road obstacle center data, where the capsule network positioning calibration is expressed as:
[0252] ;
[0253] ;
[0254] in, is the input vector, is the weight matrix, is the coupling coefficient, is a nonlinear activation function, is the calibration value;
[0255] Process the road obstacle image detection dataset based on the energy function to obtain the road obstacle contour data;
[0256] The road obstacle location information is obtained based on the road obstacle center data and the road obstacle contour data.
[0257] Exemplarily, the category module 500 is further used to:
[0258] The road obstacle image data is stretched to obtain one-dimensional vector data;
[0259] Input the one-dimensional vector data into the random forest for training to obtain the random forest training data. The random forest includes M decision trees and the feature subset used by the decision tree. From the feature set Randomly select a subset of features It is expressed as:
[0260] ;
[0261] in, Represents the feature set Random selection The operation of the features, is the number of features used by the decision tree, m = 1, 2, ..., M;
[0262] Adaptively adjust the feature importance of the random forest training data to obtain feature weight data, wherein the feature weight data includes multiple feature importance weights, and the feature importance weights represent the degree to which the corresponding decision tree relies on the feature after the training is completed;
[0263] The types of road obstacles are identified based on feature weight data and decision trees in random forests to obtain information on the types of road obstacles, where the types of road obstacles include one or more of static obstacles, dynamic obstacles, temporary obstacles, and traffic accident obstacles.
[0264] It should be noted that the road obstacle recognition system provided in the embodiment of the present application is Figures 1 to 3 The method embodiments shown correspond to each other and will not be described again here to avoid repetition.
[0265] This application also provides an electronic device, see Figure 5 , Figure 5 A block diagram of an electronic device provided in an embodiment of the present application. The electronic device may include a processor 510, a communication interface 520, a memory 530, and at least one communication bus 540. The communication bus 540 is used to realize direct connection and communication between these components. The communication interface 520 of the electronic device in the embodiment of the present application is used to communicate signaling or data with other node devices. The processor 510 may be an integrated circuit chip with signal processing capabilities.
[0266] The processor 510 mentioned above can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor can be a microprocessor or the processor 510 can also be any conventional processor, etc.
[0267] The memory 530 may be, but is not limited to, a random access memory (RAM), a read only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), etc. The memory 530 stores computer-readable instructions. When the computer-readable instructions are executed by the processor 510, the electronic device may execute the above-mentioned Figures 1 to 3 The method embodiment involves various steps.
[0268] Optionally, the electronic device may further include a storage controller and an input / output unit.
[0269] The memory 530, storage controller, processor 510, peripheral interface, input and output unit components are directly or indirectly electrically connected to each other to achieve data transmission or interaction. For example, these components can be electrically connected to each other via one or more communication buses 540. The processor 510 is used to execute executable modules stored in the memory 530, such as software function modules or computer programs included in the electronic device.
[0270] The input and output unit is used to provide users with the task creation and to create a start optional time period or preset execution time for the task to realize the interaction between the user and the server. The input and output unit can be, but is not limited to, a mouse and a keyboard.
[0271] Understandably, Figure 5 The structure shown is for illustration only, and the electronic device may also include Figure 5 More or fewer components as shown, or with Figure 5 Different configurations are shown. Figure 5 Each component shown in the figure can be implemented by hardware, software or a combination thereof.
[0272] An embodiment of the present application further provides a storage medium having instructions stored thereon. When the instructions are run on a computer, the computer program is executed by a processor to implement the method described in the method embodiment. To avoid repetition, the method will not be described here.
[0273] The present application also provides a computer program product, which, when executed on a computer, enables the computer to execute the method described in the method embodiment.
[0274] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.
[0275] In addition, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
[0276] If the function is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, and other media that can store program codes.
[0277] The above description is only an embodiment of the present application and is not intended to limit the scope of protection of the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the scope of protection of the present application. It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in the subsequent drawings.
[0278] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0279] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
Claims
1. A road obstacle recognition method, characterized in that: include: Acquire road obstacle image data; Processing the road obstacle image data based on a normal distribution random space projection image data enhancement algorithm to obtain road obstacle image enhancement data; Performing data preprocessing on the road obstacle image enhancement data to obtain a road obstacle image data set; Identifying the position of the road obstacle based on the road obstacle image data set to obtain the road obstacle position information; Using a random forest algorithm based on a Monte Carlo method to identify the types of road obstacles on the road obstacle image data, and obtain information on the types of road obstacles; The random space projection image data enhancement algorithm based on normal distribution includes a random space projection matrix and a normal factor. The step of processing the road obstacle image data based on the random space projection image data enhancement algorithm to obtain road obstacle image enhancement data includes: Performing Hadamard product processing based on the random space projection matrix and the normal factor to obtain a normal random space projection matrix; Performing a transformation operation on the road obstacle image data based on the normal random space projection matrix to obtain road obstacle image enhancement data, wherein the random space projection matrix includes one or more of a rotation matrix, a translation matrix, a shear matrix, and a scaling matrix; In the step of performing Hadamard product processing based on the random space projection matrix and the normal factor to obtain a normal random space projection matrix, the random space projection matrix is expressed as: ; Among them, A r Expressed as a rotation matrix, A sh Expressed as a shear matrix, A tr Expressed as a translation matrix, A s Represented as a scaling matrix, a 11 、a 12 、a 13 、a 21 、a 22 、a 23 Indicates the changing parameters; The normal factor is expressed as: ; Among them, x 11 、x 12 、x 13 、x 21 、x 22 、x 23 represents the normal distribution parameter; The normal random space projection matrix is expressed as: 。 2. The road obstacle recognition method according to claim 1, characterized in that: The step of performing data preprocessing on the road obstacle image enhancement data to obtain a road obstacle image data set includes: One or more of normalization processing, denoising operation, and contrast enhancement operation are performed on the road obstacle image enhancement data to obtain a road obstacle image data set.
3. The road obstacle recognition method according to claim 1 or 2, characterized in that: Before the step of identifying the position of the road obstacle based on the road obstacle image data set and obtaining the road obstacle position information, the method further includes: The road obstacle image dataset is enhanced by generating an adversarial network to obtain an optimized road obstacle image dataset, wherein the loss function of the generating adversarial network is expressed as: ; Among them, cG is the generator, cD is the discriminator, cz is random noise, is the loss function of the generative adversarial network, is the expected loss of the discriminator, is the expected loss of the generator, is random noise, is the real sample input to the discriminator; The road obstacle image optimization data set is subjected to edge detection through image gradient to obtain a road obstacle image detection data set.
4. The road obstacle recognition method according to claim 3, characterized in that: The step of identifying the position of the road obstacle based on the road obstacle image data set and obtaining the road obstacle position information comprises: The road obstacle image detection dataset is processed by capsule network positioning calibration to obtain road obstacle center data, where the capsule network positioning calibration is expressed as: ; ; in, is the input vector, is the weight matrix, is the coupling coefficient, is a nonlinear activation function, is the calibration value; Processing the road obstacle image detection data set based on an energy function to obtain road obstacle contour data; The road obstacle position information is obtained according to the road obstacle center data and the road obstacle contour data.
5. The road obstacle recognition method according to claim 1, characterized in that: The step of identifying the type of road obstacles on the road obstacle image data using a random forest algorithm based on a Monte Carlo method to obtain information on the type of road obstacles includes: The road obstacle image data is stretched to obtain one-dimensional vector data; The one-dimensional vector data is input into a random forest for training to obtain random forest training data, wherein the random forest includes M decision trees, and the feature subset used by the decision tree From the feature set The feature subset is randomly selected from It is expressed as: ; in, Represents a feature set Random selection The operation of the features, is the number of features used by the decision tree, m=1, 2, ..., M; Adaptively adjusting the feature importance of the random forest training data to obtain feature weight data, wherein the feature weight data includes a plurality of feature importance weights, and the feature importance weights represent the degree of dependence of the corresponding decision tree on the feature after the training is completed; Based on the feature weight data and the decision tree in the random forest, the types of road obstacles are identified to obtain road obstacle type information, wherein the types of road obstacles include one or more of static obstacles, dynamic obstacles, temporary obstacles, and traffic accident obstacles.
6. A road obstacle recognition system, characterized in that: include: An image acquisition module, used to acquire image data of road obstacles; A normal random projection module, used for processing the road obstacle image data based on a normal distribution random space projection image data enhancement algorithm to obtain road obstacle image enhancement data; A preprocessing module, used to perform data preprocessing on the road obstacle image enhancement data to obtain a road obstacle image data set; A position module, used to identify the position of the road obstacle based on the road obstacle image data set and obtain the road obstacle position information; A classification module, used for identifying the types of road obstacles on the road obstacle image data based on a random forest algorithm of a Monte Carlo method, and obtaining road obstacle type information; The random space projection image data enhancement algorithm based on normal distribution includes a random space projection matrix and a normal factor, and the normal random projection module is also used for: Performing Hadamard product processing based on the random space projection matrix and the normal factor to obtain a normal random space projection matrix; Performing a transformation operation on the road obstacle image data based on the normal random space projection matrix to obtain road obstacle image enhancement data, wherein the random space projection matrix includes one or more of a rotation matrix, a translation matrix, a shear matrix, and a scaling matrix; The random space projection matrix is expressed as: ; Among them, A r Expressed as a rotation matrix, A sh Expressed as a shear matrix, A tr Expressed as a translation matrix, A s Represented as a scaling matrix, a 11 、a 12 、a 13 、a 21 、a 22 、a 23 Indicates the changing parameters; The normal factor is expressed as: ; Among them, x 11 、x 12 、x 13 、x 21 、x 22 、x 23 represents the normal distribution parameter; The normal random space projection matrix is expressed as: 。 7. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the road obstacle identification method as claimed in any one of claims 1 to 5 when executing the computer program.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores instructions, and when the instructions are executed on a computer, the computer executes the road obstacle identification method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Anti-robustness image feature extraction method based on variational spherical projection
CN108520202A
