A method for instantiation recognition of road markings based on monocular vision
Through the deep learning algorithm and HarDNet network structure, the two-classification, multi-classification and instantiation branch modules of pavement markings are constructed, which solves the problem of recognition accuracy and speed of traditional algorithms under changes in environment and lighting, and achieves higher pavement marking recognition accuracy. and robustness.
Patent Information
- Application Number
- CN202110562775.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-05-24
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2041-05-24
AI Technical Summary
Traditional image algorithms are prone to misdetection or missed detection when the environment and lighting change. They cannot effectively instantiate different types of pavement markings, such as single dotted lines and single solid lines. Moreover, the instantiation steps are complicated, the accuracy is low, and the speed is slow.
Using a method based on deep learning, the HarDNet network structure is used to construct two-classification, multi-classification and instantiation branch training modules, and model pre-training and iterative optimization are carried out through public and custom data sets to achieve instantiation recognition of pavement markings.
It improves the accuracy and speed of pavement mark recognition, enhances the robustness to environmental and lighting changes, gets rid of the limitations of artificially designed features, and can continuously optimize the model through big data to improve recognition accuracy.
Smart Images

Figure CN113569620B
Abstract
Description
Technical Field
[0001] The invention relates to the field of intelligent transportation technology, and in particular to a method for instantiating and identifying road surface markings based on monocular vision. Background Art
[0002] At present, more and more vehicles with advanced driver assistance systems have been gradually introduced to the market, which has greatly promoted the development of intelligent transportation. In the existing technology, lane departure warning system (LDW), lane keeping assist system (LKA), forward collision warning system (FCW), active cruise control system (ACC) and other systems can perform real-time road marking and drivable area detection, and provide effective and reliable road condition information for vehicle control and driving safety. However, traditional image algorithms rely on manually designed features, and different features need to be designed for different targets, which is time-consuming and laborious. When the environment, lighting, etc. change, it is easy to misdetect or miss. It is not possible to instantiate different targets well, such as single dotted line, single solid line, etc.; and the instantiation steps are complicated, the accuracy is not high, and the speed is slow. Summary of the invention
[0003] To address the above issues, this technology innovatively proposes a method for instantiated recognition of road markings based on monocular vision, using big data to promote the improvement of recognition accuracy.
[0004] Specifically, the present invention proposes a method for instantiating and identifying road markings based on monocular vision, comprising the following steps:
[0005] S1: Take the RGB image of the front camera as the model input, based on the deep learning algorithm, use the HarDNet network structure as the basic framework of the model, build a binary classification branch training module, pre-train the model on the data in the public dataset, and obtain the initial model model0 parameters;
[0006] S2: import the parameters of the initial model model0, build a multi-classification branch training module, train the data in the public data set and the custom data set, and output the model model1 parameters;
[0007] S3: import the model1 parameters, add an instantiated branch training module, train the data in the public dataset and the custom dataset, and output the model model2 parameters;
[0008] S4: Output the road marking instantiation recognition result to the vehicle perception fusion and vehicle control module for assisted driving.
[0009] Wherein, the binary classification branch training module includes:
[0010] All public data sets related to road markings are collected, and two data sets are constructed, which are subdivided into background and paint categories. A binary cross entropy loss function is used to perform binary semantic segmentation training on the public data for background or paint.
[0011] Specifically, the binary cross entropy loss function is formulated as follows:
[0012] ;
[0013] in, and The predicted probabilities corresponding to the background and paint data sets respectively; Indicates the label of sample i, the positive class is 1 and the negative class is 0; represents the probability that sample i is predicted to be positive; N is the number of samples.
[0014] The public data set at least includes cloud data covering various scenarios.
[0015] The multi-classification branch training module uses a multi-classification cross entropy loss function for data training, and the formula is:
[0016] ;
[0017] Where M is the number of categories; Indicator variable 0 or 1, if the category and sample i have the same label, it is 1, otherwise it is 0; It represents the predicted probability that the observed sample i belongs to category d.
[0018] The categories include at least one or more of lane lines, drivable areas, zebra crossings, stop lines, arrows, deceleration lines and guide lines.
[0019] The instantiated branch training module also includes:
[0020] Two prediction branches are constructed: an instance number branch and an instance feature branch. The instance number branch uses the SmoothL1 loss function; the instance feature branch uses the Discriminative loss function.
[0021] The Smooth L1 loss function is formulated as follows:
[0022] ;
[0023] in, Indicates the difference between the predicted value and the true value.
[0024] Furthermore, the Discriminative loss function is composed of three losses: variance, distance and regression. The specific formula is:
[0025] ;
[0026] ;
[0027] ;
[0028] ;
[0029] in, ; C represents the true value of the number of instances of a specific category; Indicates the number of clustering units contained in the C instance; Represents the clustering feature value of a clustering unit; The eigenvalue representing the cluster center of the C instance; represents the L2 norm; ; Indicates the distance limit between cluster units, which is used to constrain the distance between all cluster units and the cluster center to be less than this value; Represents the distance limit between each instance, i.e., the cluster center, and is used to constrain the distance between all cluster centers to be greater than 2 times of this value; A and B represent different target categories respectively; μcA represents the eigenvalue of the cluster center of the C instance of the A target category; μcB represents the eigenvalue of the cluster center of the C instance of the B target category; cA: represents the true value of the number of instances of the A target category; cB: represents the true value of the number of instances of the B target category.
[0030] Furthermore, the instantiation result is a composite image of the instantiation result model2 parameters superimposed on the original image collected during the driving process, and each target instance is marked and displayed by a different color.
[0031] In summary, the present invention provides a method for instantiation recognition of road markings based on monocular vision, by taking the RGB image of the front-view camera as the model input, based on the deep learning algorithm, using the HarDNet network structure as the basic framework of the model, to construct a deep learning model; the algorithm model constructs a binary classification branch training module, a multi-classification branch training module and an instantiation branch training module respectively; the model is first pre-trained using a public data set, and then a custom data set is added for iterative model optimization. Compared with traditional algorithms based on artificial features, it gets rid of the trouble of artificially designed features, and the algorithm has higher robustness to environmental and lighting changes; in addition, the algorithm innovatively designs a method for instantiating different targets, which greatly improves the accuracy and speed of target instantiation. Finally, after the recognition algorithm is finalized, it can also rely on big data to continuously improve the model capabilities and continuously improve the accuracy of instantiation recognition of road markings under various road conditions. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Figure 1 The present invention is a flowchart of a method for instantiating and identifying road surface markings based on monocular vision.
[0033] Figure 2 For the use of Figure 1 The synthetic image after being processed by the method described above. DETAILED DESCRIPTION
[0034] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are 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.
[0035] like Figure 1 As shown, the method for instantiating and identifying road markings based on monocular vision of the present invention comprises the following steps:
[0036] S1: Take the RGB image of the front camera as the model input, based on the deep learning algorithm, use the HarDNet network structure as the basic framework of the model, build a binary classification branch training module, pre-train the model on the data in the public dataset, and obtain the initial model model0 parameters;
[0037] S2: import the parameters of the initial model model0, build a multi-classification branch training module, train the data in the public data set and the custom data set, and output the model model1 parameters;
[0038] S3: import the model1 parameters, add an instantiated branch training module, train the data in the public dataset and the custom dataset, and output the model model2 parameters;
[0039] S4: Output the road marking instantiation recognition result to the vehicle perception fusion and vehicle control module for assisted driving.
[0040] Wherein, the binary classification branch training module further includes:
[0041] All public data sets related to road markings are collected, and two data sets are constructed, which are subdivided into background and paint categories. A binary cross entropy loss function is used to perform binary semantic segmentation training on the public data for background or paint.
[0042] The binary cross entropy loss function is formulated as follows:
[0043] ;
[0044] in, and The predicted probabilities corresponding to the background and paint data sets respectively; Indicates the label of sample i, the positive class is 1 and the negative class is 0; represents the probability that sample i is predicted to be positive; N is the number of samples.
[0045] The public data set at least includes cloud data covering various scenarios.
[0046] Furthermore, the multi-classification branch training module uses a multi-classification cross entropy loss function for data training, and the formula is:
[0047] ;
[0048] Where M is the number of categories; Indicator variable 0 or 1, if the category and sample i have the same label, it is 1, otherwise it is 0; It represents the predicted probability that the observed sample i belongs to category d.
[0049] The categories include at least one or more of lane lines, drivable areas, zebra crossings, stop lines, arrows, deceleration lines and guide lines, but are not limited thereto.
[0050] Furthermore, the instantiated branch training module further includes:
[0051] Two prediction branches are constructed: an instance number branch and an instance feature branch. The instance number branch uses the SmoothL1 loss function; the instance feature branch uses the Discriminative loss function.
[0052] Among them, the Smooth L1 loss function is formulated as follows:
[0053] ;
[0054] in, Indicates the difference between the predicted value and the true value.
[0055] Furthermore, the Discriminative loss function is composed of three losses: variance, distance and regression. The specific formula is:
[0056] ;
[0057] ;
[0058] ;
[0059] ;
[0060] in, ; C represents the true value of the number of instances of a specific category; Indicates the number of clustering units contained in the C instance; Represents the clustering feature value of a clustering unit; The eigenvalue representing the cluster center of the C instance; represents the L2 norm; ; Indicates the distance limit between cluster units, which is used to constrain the distance between all cluster units and the cluster center to be less than this value; Represents the distance limit between each instance, i.e., the cluster center, and is used to constrain the distance between all cluster centers to be greater than 2 times of this value; A and B represent different target categories respectively; μcA represents the eigenvalue of the cluster center of the C instance of the A target category; μcB represents the eigenvalue of the cluster center of the C instance of the B target category; cA: represents the true value of the number of instances of the A target category; cB: represents the true value of the number of instances of the B target category.
[0061] The final instantiation result is a composite image of the instantiation result model2 parameters superimposed on the original image collected during driving, and each target instance is marked and displayed by different colors.
[0062] As another preferred embodiment, the present invention also provides another embodiment Figure 2 As shown, 1-original image, 2-synthesized image with semantic segmentation results superimposed on the original image; 3-simple visualization of semantic segmentation results; 4-synthesized image with instance segmentation results superimposed on the original image. The instance segmentation module is used to solve the problem of instantiating different targets, greatly improving the accuracy and speed of instantiation, and the instantiated targets can be dynamically configured. In order to better facilitate the driver's viewing, different colors can also be used to represent different target categories for identification, such as green for a single dotted line and red for a single solid line. In 4, you can see ins_c in the upper left corner: 4 represents the number of instances predicted by the model is 4. Different colors represent different 4-target instances, where colors are not shown in the figure.
[0063] The above-mentioned embodiments only express several implementation methods of the present invention, and the description thereof is relatively specific and detailed, but it cannot be understood as limiting the scope of the patent of the present invention. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, which all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.
Claims
1. A method for instantiating road markings based on monocular vision, characterized in that: include: S1: Take the RGB image of the front camera as the model input, based on the deep learning algorithm, use the HarDNet network structure as the basic framework of the model, build a binary classification branch training module, pre-train the model on the data in the public data set and the custom data set, and obtain the initial model model0 parameters; S2: import the parameters of the initial model model0, build a multi-classification branch training module, train the data in the custom data set, and output the model model1 parameters; S3: import the model1 parameters, add an instantiated branch training module, train the data in the custom data set, and output the model model2 parameters; S4: outputting the instantiation recognition result of the road surface marking to the vehicle perception fusion and vehicle control module for assisted driving; in, The model pre-training includes: Collect all public datasets related to road markings, construct datasets with subdivided categories into background and paint, and use a binary cross entropy loss function to perform binary semantic segmentation training on the public datasets for background or paint; The public data set at least includes cloud data covering various scenarios; Wherein, the instantiated branch training module also includes: Construct two prediction branches: instance number branch and instance feature branch. The instance number branch uses the Smooth L1 loss function; the instance feature branch uses the Discriminative loss function. The instantiation result is a composite image of the instantiation result model2 parameters superimposed on the original image collected during driving, and each target instance is marked and displayed by different colors.
2. The method for instantiating road markings based on monocular vision according to claim 1, characterized in that: The binary cross entropy loss function is formulated as follows: Among them, p i and (1-p i ) correspond to the predicted probabilities of the background and paint data sets respectively; y i Indicates the label of sample i, the positive class is 1 and the negative class is 0; p i represents the probability that sample i is predicted to be positive; N is the number of samples.
3. The method for instantiating and identifying road markings based on monocular vision according to claim 1, characterized in that: The multi-classification cross entropy loss function is formulated as: Where M is the number of categories; y id Indicator variable 0 or 1, if the category and sample i have the same label, it is 1, otherwise it is 0; p id It represents the predicted probability that the observed sample i belongs to category d.
4. The method for instantiating road markings based on monocular vision according to claim 3, characterized in that: The categories include at least one or more of lane lines, drivable areas, zebra crossings, stop lines, arrows, deceleration lines and guide lines.
5. The method for instantiating and identifying road markings based on monocular vision according to claim 1, characterized in that: The Smooth L1 loss function is formulated as follows: Here, X indicates the difference between the predicted value and the true value.
6. The method for instantiating road markings based on monocular vision according to claim 4, characterized in that: The Discriminative loss function consists of three losses: variance, distance and regression. The specific formula is: L=α·L var +β·L dist +γ·L reg ; Among them, α = β = 2, γ = 0.002; C represents the true value of the number of instances of a specific category; N c Indicates the number of clustering units contained in the C instance; x i Represents the clustering eigenvalue of a clustering unit; μ c represents the eigenvalue of the cluster center of the C instance; ||·|| represents the L2 norm; [x] + =max(0,x);δ v Indicates the distance limit between clustering units, which is used to constrain the distance between all clustering units and the cluster center to be less than this value; δ d Represents the distance limit between each instance, i.e., the cluster center, and is used to constrain the distance between all cluster centers to be greater than 2 times of this value; A and B represent different target categories respectively; μcA represents the eigenvalue of the cluster center of the C instance of the A target category; μcB represents the eigenvalue of the cluster center of the C instance of the B target category; cA: represents the true value of the number of instances of the A target category; cB: represents the true value of the number of instances of the B target category.
Citation Information
Patent Citations
Road drivable area identification method based on binocular stereoscopic vision
CN110008848A
Twin convolutional neural network face recognition algorithm introducing a perception model
CN110414349A
Driving environment recognition method
CN110422173A
Farmland seedling ridge identification method and system based on semanteme and instance segmentation
CN110765916A
Lane line detection method and device, computer equipment and storage medium
CN111178245A
