Lane segmentation model training method, device, equipment and storage medium

By inputting the lane line training image into the teacher model and student model for feature extraction, and using imitation loss function and classification loss function to train the student model, the problem of low accuracy of the lightweight lane line detection model is solved, achieving higher detection accuracy and lower computing resource consumption.

CN114445684BActive Publication Date: 2025-03-14FOSS (HANGZHOU) INTELLIGENT TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210183501.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-25
Publication Date
2025-03-14
Estimated Expiration
2042-02-25

AI Technical Summary

Technical Problem

The existing lightweight lane line position detection model has limited learning ability and cannot effectively solve the problem of unbalanced distribution of positive and negative samples in lane line detection, resulting in low detection accuracy.

Method used

By obtaining the training picture of the lane line, input it into the first model (teacher model) and the second model (student model) respectively for feature extraction, the second model is trained using the imitation loss function and the classification loss function to imitate the detection ability of the first model.

Benefits of technology

The detection accuracy of the lightweight lane line position detection model is improved, while reducing the consumption of computing resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114445684B_ABST
    Figure CN114445684B_ABST
Patent Text Reader

Abstract

The present invention discloses a training method, device, equipment and storage medium for a lane line segmentation model, which relates to the field of machine learning and solves the problem of high consumption of computing resources when detecting lane line positions. The training method for the lane line segmentation model comprises: obtaining a training picture of the lane line; inputting the training picture into a first model and a second model for feature extraction respectively to obtain first feature data and second feature data, wherein the number of model layers of the first model is greater than that of the second model; obtaining an imitation loss function according to the first feature data and the second feature data; obtaining a classification loss function according to the label data and the second feature data of the training picture; and training the second model according to the imitation loss function and the classification loss function.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of machine learning, and in particular to a training method, device, equipment and storage medium for a lane line segmentation model. Background Art

[0002] With the development of science and technology, autonomous driving technology has gradually entered people's daily lives, subtly changing the way people travel. The accuracy of lane line position detection in autonomous driving technology will affect the accuracy of path planning.

[0003] In the prior art, in order to reduce resource consumption during lane line position detection, a lightweight detection model is usually used to perform lane line position detection. However, this lightweight detection model usually has limited learning ability and cannot solve the problem of serious imbalance in the distribution of positive and negative samples in lane line detection, resulting in low detection accuracy. Summary of the invention

[0004] The present application provides a training method, apparatus, device and storage medium for a lane line segmentation model, which can improve the detection accuracy of a lightweight lane line position detection model.

[0005] According to a first aspect of an embodiment of the present application, a method for training a lane line segmentation model is provided, the method comprising: obtaining a training image of the lane line; inputting the training image into a first model and a second model respectively for feature extraction to obtain first feature data and second feature data, wherein the number of model layers of the first model is greater than that of the second model; obtaining an imitation loss function according to the first feature data and the second feature data; obtaining a classification loss function according to the training image label data and the second feature data of the lane line; and training the second model according to the imitation loss function and the classification loss function.

[0006] In one embodiment, obtaining the imitation loss function according to the first feature data and the second feature data includes:

[0007] Performing feature fusion processing on the first feature data and the second feature data respectively to obtain first fused data and second fused data;

[0008] A simulation loss function is obtained according to the first fusion data and the second fusion data.

[0009] In one embodiment, obtaining the imitation loss function according to the first fused data and the second fused data includes:

[0010] Performing a difference operation on the first fused data and the second fused data to obtain a feature difference;

[0011] Inputting the first fused data and the second fused data into a preset classification network respectively to obtain first target data and second target data;

[0012] The imitation loss function is obtained according to the feature difference, the first target data and the second target data.

[0013] In one embodiment, obtaining a simulation loss function according to the feature difference, the first target data, and the second target data includes:

[0014] Performing maximum value operation on the first target data and the second target data respectively to obtain a first mask and a second mask;

[0015] A simulation loss function is obtained according to the feature difference, the first mask and the second mask.

[0016] In one embodiment, obtaining a simulation loss function according to the feature difference, the first mask and the second mask includes:

[0017] Performing an OR operation on the first mask and the second mask to obtain a simulated mask;

[0018] The imitation loss function is obtained according to the feature difference and the imitation mask.

[0019] In one embodiment, a classification loss function is obtained based on the lane line training picture label data and the second feature data, including: performing feature fusion processing on the second feature data to obtain second fused data; inputting the second fused data into a preset classification model to obtain a model classification result; obtaining the label data of the lane line training picture; and obtaining the classification loss function based on the model classification result and the label data.

[0020] In one embodiment, the second model includes a fully convolutional adaptation layer, and the method further includes:

[0021] The second model including a fully convolutional adaptation layer is used to extract features from the training images.

[0022] In a second aspect of an embodiment of the present application, a training device for a lane segmentation model is provided, wherein the device comprises:

[0023] The acquisition module is used to obtain the training images of lane lines;

[0024] An extraction module, used for inputting the training image into the first model and the second model respectively for feature extraction to obtain first feature data and second feature data, wherein the number of model layers of the first model is greater than that of the second model;

[0025] A first processing module, used for obtaining a simulation loss function according to the first feature data and the second feature data;

[0026] A second processing module is used to obtain a classification loss function according to the training image label data and the second feature data of the lane line;

[0027] The training module is used to train the second model according to the imitation loss function and the classification loss function.

[0028] According to a third aspect of an embodiment of the present application, a computer device is provided, which includes a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the training method of the lane segmentation model according to the first aspect of the embodiment of the present application is implemented.

[0029] According to a fourth aspect of an embodiment of the present application, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the training method of the lane segmentation model according to the first aspect of the embodiment of the present application is implemented.

[0030] The training method of the lane line segmentation model provided in the embodiment of the present application obtains a training image of the lane line, and inputs the training image into the first model and the second model respectively for feature extraction to obtain first feature data and second feature data, wherein the number of model layers of the first model is greater than that of the second model, and then obtains an imitation loss function according to the first feature data and the second feature data, and obtains a classification loss function according to the training image label data and the second feature data of the lane line, and finally trains the second model according to the imitation loss function and the classification loss function. In this way, by training the second model through the imitation loss function and the classification loss function, the second model is made to imitate the detection capability of the first model, which can improve the detection accuracy of the lightweight lane line position detection model and at the same time reduce the consumption of computing resources. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] Figure 1 A schematic diagram of the internal structure of a computer device provided in an embodiment of the present application;

[0032] Figure 2 A flowchart of a method for training a lane segmentation model provided in an embodiment of the present application;

[0033] Figure 3 A schematic diagram of a mask generation process simulated by an embodiment of the present application;

[0034] Figure 4 A schematic diagram of a lane segmentation model training provided in an embodiment of the present application Figure 1 ;

[0035] Figure 5 A schematic diagram of a lane segmentation model training provided in an embodiment of the present application Figure 2 ;

[0036] Figure 6 A structural diagram of a lane segmentation model training device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0037] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0038] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of the present disclosure, unless otherwise specified, "plurality" means two or more.

[0039] Additionally, the use of “based on” or “according to” is meant to be open and inclusive, as a process, step, calculation, or other action “based on” or “according to” one or more conditions or values ​​may, in practice, be based on additional conditions or beyond values.

[0040] In order to solve the problem of high consumption of computing resources during lane line position detection, an embodiment of the present application provides a training method for a lane line segmentation model, by obtaining a training image of the lane line, and inputting the training image into a first model and a second model for feature extraction, respectively, to obtain first feature data and second feature data, wherein the number of model layers of the first model is greater than that of the second model, and then obtaining an imitation loss function based on the first feature data and the second feature data, and obtaining a classification loss function based on the training image label data and the second feature data of the lane line, and finally training the second model based on the imitation loss function and the classification loss function. In this way, by training the second model through the imitation loss function and the classification loss function, the second model is made to imitate the detection capability of the first model, thereby improving the detection accuracy of the lightweight lane line position detection model and reducing the consumption of computing resources.

[0041] The executor of the training method of the lane segmentation model provided in the embodiment of the present application may be a computer device, a terminal device, or a server, wherein the terminal device may be a vehicle-mounted terminal, various personal computers, laptops, smart phones, tablet computers, and portable wearable devices, etc., and the present application does not make any specific limitation thereto.

[0042] Figure 1 The internal structure diagram of a computer device provided in an embodiment of the present application is shown in FIG. Figure 1As shown, the computer device includes a processor and a memory connected via a system bus. The processor is used to provide computing and control capabilities. The memory may include a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The computer program can be executed by the processor to implement the steps of a training method for a lane segmentation model provided in each of the above embodiments. The internal memory provides a cache operating environment for the operating system and the computer program in the non-volatile storage medium.

[0043] Those skilled in the art will understand that Figure 1 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0044] Based on the above execution subject, the present application embodiment provides a method for training a lane line segmentation model. Figure 2 As shown, the method comprises the following steps:

[0045] Step 201: Obtain a training image of lane lines.

[0046] The training images may be actual road images collected.

[0047] Step 202: Input the training image into the first model and the second model respectively for feature extraction to obtain first feature data and second feature data.

[0048] The first model has more model layers than the second model. The first model can also be called a teacher model, and the second model can also be called a student model.

[0049] Optionally, the first model may be a network model of ResNet101, and the second model may be a network model of ResNet18. This application does not limit the number of layers of the specific network model.

[0050] Step 203: Obtain a simulation loss function according to the first feature data and the second feature data.

[0051] Step 204: Obtain a classification loss function according to the label data and the second feature data of the training image of the lane line.

[0052] The label data is used to indicate the actual classification results of the lane line training images.

[0053] Step 205: Train the second model according to the imitation loss function and the classification loss function.

[0054] The training method of the lane line segmentation model provided in the embodiment of the present application obtains a training image of the lane line, and inputs the training image into the first model and the second model respectively for feature extraction to obtain first feature data and second feature data, wherein the number of model layers of the first model is greater than that of the second model, and then obtains an imitation loss function according to the first feature data and the second feature data, and obtains a classification loss function according to the training image label data and the second feature data of the lane line, and finally trains the second model according to the imitation loss function and the classification loss function. In this way, by training the second model through the imitation loss function and the classification loss function, the second model is made to imitate the detection capability of the first model, which can improve the detection accuracy of the lightweight lane line position detection model and at the same time reduce the consumption of computing resources.

[0055] In one embodiment, obtaining the imitation loss function according to the first feature data and the second feature data includes: performing feature fusion processing on the first feature data and the second feature data respectively to obtain first fused data and second fused data; obtaining the imitation loss function according to the first fused data and the second fused data.

[0056] Optionally, after performing feature extraction on the training images to obtain first feature data and second feature data, the first feature data and the second feature data may be input into a preset feature fusion network for feature fusion to obtain first fused data and second fused data, respectively.

[0057] In one embodiment, obtaining a simulation loss function according to the first fused data and the second fused data includes:

[0058] The first fused data and the second fused data are subjected to a difference operation to obtain a feature difference, and the first fused data and the second fused data are respectively input into a preset classification network to obtain first target data and second target data, and an imitation loss function is obtained according to the feature difference, the first target data and the second target data.

[0059] Optionally, obtaining a simulation loss function according to the feature difference, the first target data and the second target data includes: performing maximum value operations on the first target data and the second target data respectively to obtain a first mask and a second mask; obtaining a simulation loss function according to the feature difference, the first mask and the second mask.

[0060] In one embodiment, obtaining a simulation loss function according to the feature difference, the first mask and the second mask includes: performing an OR operation on the first mask and the second mask to obtain a simulation mask; and obtaining a simulation loss function according to the feature difference and the simulation mask.

[0061] In the specific implementation process, a prediction graph can be obtained by performing a maximum value operation on the first target graph composed of the first target data output by the teacher model, and a threshold F is calculated as Mt:

[0062]

[0063] According to the threshold F, the positions with predicted values ​​higher than F can be filtered out to obtain a first mask of W*H.

[0064] After the output of the student model is maximized, a prediction graph is obtained, which is recorded as Ms, and a threshold F is calculated:

[0065]

[0066] According to the threshold F, we can filter out those locations where the predicted value is higher than F, and get a second mask of W*H. Then, we perform an OR operation on the first mask and the second mask to get the final fine-grained estimated simulation mask. Simulation mask generation Figure 3 As shown. The numbers in the picture represent the pixel values ​​in the prediction map. After the maximum value operation, the corresponding pixel values ​​with larger values ​​are retained on the prediction map to obtain the prediction map. The prediction map is set to 1 if it is greater than the threshold 6, and 0 if it is less than or equal to 6. A mask map is obtained. Similarly, the mask map of the student model can be obtained. Then, an OR operation is performed on 4 and 8 to obtain the final fine-grained imitation mask map.

[0067] Define s as the student model feature map, t as the teacher model feature map, and for each lane line neighborhood (i, j) on the feature map, define the objective function as follows. We train the student model to minimize the objective function.

[0068]

[0069] Among them, (i, j) represents the position, c represents the channel, and fadap represents the fully convolutional adaptation layer.

[0070] The learning teacher model’s ability to extract features minimizes the distance between the feature response graphs of the student network and the teacher network at all estimated positions. The final imitation loss function is as follows:

[0071]

[0072]

[0073] Among them, W, H are the width and height of the feature map, Np is the normalized value, I ijis the mask, and the other parameters are the same as above. The total loss used to train the student network is: The weight parameter λ uses an adaptive parameter. When the imitation loss function value is large, it takes a large value; when the imitation loss function value is small, it takes a small value.

[0074] L=L gt +λL imitation

[0075] Where Lgt is the loss function for lane line classification, and the imitation loss function is the loss function for knowledge distillation. The second network is trained using the classification loss function and the imitation loss function.

[0076] In one embodiment, a classification loss function is obtained based on the lane line training picture label data and the second feature data, including: performing feature fusion processing on the second feature data to obtain second fused data; inputting the second fused data into a preset classification network to obtain a model classification result; obtaining the label data of the lane line training picture; and obtaining the classification loss function based on the model classification result and the label data.

[0077] Optional, such as Figure 4 As shown, before the first fused data and the second fused data are respectively input into the preset classification network, the first fused data and the second fused data can also be encoded respectively, and then the encoded first fused data and the second fused data are respectively input into the preset classification network.

[0078] In one embodiment, the second model includes a fully convolutional adaptation layer, and the method further includes: using the second model including the fully convolutional adaptation layer to extract features from the training image.

[0079] like Figure 5 As shown in Figure 1, by adding a fully convolutional adaptation layer after the student network, the number of channels of the feature response maps of the teacher network and the student network can be unified, and the performance can be improved, which may be helpful for feature extraction.

[0080] To facilitate understanding by those skilled in the art, the present application also provides a method for training a lane segmentation model. Specifically, the method includes:

[0081] (1) Obtain a training image of lane lines;

[0082] (2) inputting the training image into the first model and the second model respectively for feature extraction to obtain first feature data and second feature data, wherein the number of model layers of the first model is greater than that of the second model;

[0083] (3) performing feature fusion processing on the first feature data and the second feature data respectively to obtain first fused data and second fused data;

[0084] (4) performing a difference operation on the first fused data and the second fused data to obtain a feature difference;

[0085] (5) inputting the first fused data and the second fused data into a preset classification network respectively to obtain first target data and second target data;

[0086] (6) performing maximum value operation on the first target data and the second target data respectively to obtain a first mask and a second mask;

[0087] (7) performing an OR operation on the first mask and the second mask to obtain a simulation mask;

[0088] (8) The imitation loss function is obtained based on the feature difference and the imitation mask.

[0089] (9) performing feature fusion processing on the second feature data to obtain second fused data;

[0090] (10) inputting the second fused data into a preset classification model to obtain a classification result;

[0091] (11) Obtain label data of lane line training images;

[0092] (12) Obtain the classification loss function based on the model classification results and label data.

[0093] (13) The second model is trained according to the imitation loss function and the classification loss function.

[0094] The training method of the lane line segmentation model provided in the embodiment of the present application obtains a training picture of the lane line, and inputs the training picture into the first model and the second model respectively for feature extraction to obtain first feature data and second feature data, wherein the number of model layers of the first model is greater than that of the second model, and then obtains an imitation loss function according to the first feature data and the second feature data, and obtains a classification loss function according to the label data and the second feature data of the lane line, and finally trains the second model according to the imitation loss function and the classification loss function. In this way, the second model is trained by the imitation loss function and the classification loss function, so that the second model imitates the detection capability of the first model, which can improve the detection accuracy of the lightweight lane line position detection model and reduce the consumption of computing resources.

[0095] It should be noted that the training method of the lane segmentation model provided in the embodiment of the present application can be superimposed and complementary with detection head distillation, self-attention distillation, review-the-old-to-learn-the-new distillation and other solutions, and there will be no situation where superimposed applications cannot occur.

[0096] Furthermore, in order to solve the problem of imbalance between positive and negative samples in lane line detection, the training method of the lane line segmentation model provided by the present application is based on the positive samples of lane lines predicted in the teacher model and the student network as the benchmark. From the perspective of gradient continuity of the image, the area close to the positive samples of lane lines needs special attention, as this area is a pixel area that is difficult to classify. The lane lines and the surrounding areas are used to form a mask to extract the difference between the feature map of each channel of the teacher model and the corresponding feature map of the student model, so as to guide the student model to focus on learning the ability of the teacher model to extract lane line features and the area near the lane lines, rather than learning the ability of all channels of the teacher backbone feature extraction network to extract features of the entire feature map, so as to reduce the noise introduced by the background area and improve the detection accuracy.

[0097] The execution process of (1) to (13) above can be specifically referred to the description of the above embodiment. The implementation principles and technical effects are similar and will not be repeated here. It should be understood that the steps in the step flow charts in the embodiments of the training methods of the above lane line segmentation models are displayed in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise clearly stated in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, at least part of the steps in the above flowchart may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be executed in turn or alternating with other steps or at least part of the steps or stages in other steps.

[0098] The above mainly introduces the solution provided by the embodiment of the present application from the perspective of the method. In order to realize the above functions, it includes hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present application.

[0099] like Figure 6 As shown, an embodiment of the present application provides a training device for a lane segmentation model, which includes: an acquisition module 11, an extraction module 12, a first processing module 13, a second processing module 14 and a training module 15.

[0100] An acquisition module 11 is used to acquire a training image of a lane line;

[0101] An extraction module 12 is used to input the training image into the first model and the second model respectively to extract features, so as to obtain first feature data and second feature data, wherein the number of model layers of the first model is greater than that of the second model;

[0102] A first processing module 13, used to obtain a simulation loss function according to the first feature data and the second feature data;

[0103] A second processing module 14 is used to obtain a classification loss function according to the training image label data and the second feature data of the lane line;

[0104] The training module 15 is used to train the second model according to the imitation loss function and the classification loss function.

[0105] In one embodiment, the first processing module 13 is specifically used for:

[0106] Performing feature fusion processing on the first feature data and the second feature data respectively to obtain first fused data and second fused data;

[0107] A simulation loss function is obtained according to the first fusion data and the second fusion data.

[0108] In one embodiment, the first processing module 13 is specifically used for:

[0109] Performing a difference operation on the first fused data and the second fused data to obtain a feature difference;

[0110] Inputting the first fused data and the second fused data into a preset classification network respectively to obtain first target data and second target data;

[0111] The imitation loss function is obtained according to the feature difference, the first target data and the second target data.

[0112] In one embodiment, the first processing module 13 is specifically used for:

[0113] Performing maximum value operation on the first target data and the second target data respectively to obtain a first mask and a second mask;

[0114] A simulation loss function is obtained according to the feature difference, the first mask and the second mask.

[0115] In one embodiment, the first processing module 13 is specifically used for:

[0116] Performing an OR operation on the first mask and the second mask to obtain a simulated mask;

[0117] The imitation loss function is obtained according to the feature difference and the imitation mask.

[0118] In one embodiment, the second processing module 14 is specifically used for:

[0119] Performing feature fusion processing on the feature difference second feature data to obtain second fused data;

[0120] Inputting the second fused data into the preset classification model respectively to obtain the model classification result;

[0121] Get the label data of the lane line training image;

[0122] The classification loss function is obtained based on the model classification results and label data.

[0123] In one embodiment, the second model includes a full convolutional adaptation layer, and the extraction module 12 is further used to: use the second model including the full convolutional adaptation layer to extract features from the training image.

[0124] The training device for the lane line segmentation model provided in the embodiment of the present application obtains a training image of the lane line, and inputs the training image into the first model and the second model respectively for feature extraction to obtain first feature data and second feature data, wherein the number of model layers of the first model is greater than that of the second model, and then obtains an imitation loss function according to the first feature data and the second feature data, and obtains a classification loss function according to the training image label data and the second feature data of the lane line, and finally trains the second model according to the imitation loss function and the classification loss function. In this way, by training the second model through the imitation loss function and the classification loss function, the second model is made to imitate the detection capability of the first model, which can improve the detection accuracy of the lightweight lane line position detection model and at the same time reduce the consumption of computing resources.

[0125] The training device for the lane segmentation model provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effects are similar, which will not be elaborated here.

[0126] For the specific definition of the training device of the lane line segmentation model, please refer to the definition of the training method of the lane line segmentation model above, which will not be repeated here. The various modules in the above-mentioned training device of the lane line segmentation model can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the server in the form of hardware, or can be stored in the memory in the server in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0127] In another embodiment of the present application, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the steps of the training method of the lane line segmentation model in the embodiment of the present application are implemented.

[0128] In another embodiment of the present application, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the training method of the lane segmentation model in the embodiment of the present application are implemented.

[0129] In another embodiment of the present application, a computer program product is also provided. The computer program product includes computer instructions. When the computer instructions are run on a training device for a lane line segmentation model, the training device for the lane line segmentation model executes each step of the training method for the lane line segmentation model in the method flow shown in the above method embodiment.

[0130] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using a software program, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loading and executing computer execution instructions on a computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. Computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, computer instructions can be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (digital subscriber line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server, data center, etc. that contains one or more servers that can be integrated with a medium. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a DVD), or a semiconductor medium (eg, a solid state disk (SSD)).

[0131] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0132] The above embodiments only express several implementation methods of the present invention, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for those of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present invention, and these 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 training a lane segmentation model, characterized in that: The method comprises: Get the training image of lane lines; Inputting the training image into a first model and a second model respectively for feature extraction to obtain first feature data and second feature data, wherein the number of model layers of the first model is greater than that of the second model; Obtaining a simulation loss function according to the first feature data and the second feature data; Obtaining a classification loss function according to the label data of the training image of the lane line and the second feature data; Training the second model according to the imitation loss function and the classification loss function; Wherein, obtaining the imitation loss function according to the first feature data and the second feature data includes: Performing feature fusion processing on the first feature data and the second feature data respectively to obtain first fused data and second fused data; Performing a difference operation on the first fused data and the second fused data to obtain a feature difference; Inputting the first fused data and the second fused data into a preset classification network respectively to obtain first target data and second target data; The imitation loss function is obtained according to the feature difference, the first target data and the second target data.

2. The method according to claim 1, characterized in that The obtaining the imitation loss function according to the feature difference, the first target data and the second target data comprises: Performing maximum value operation on the first target data and the second target data respectively to obtain a first mask and a second mask; The imitation loss function is obtained according to the feature difference, the first mask and the second mask.

3. The method according to claim 2, characterized in that The obtaining the imitation loss function according to the feature difference, the first mask and the second mask comprises: Performing an OR operation on the first mask and the second mask to obtain a simulation mask; The imitation loss function is obtained according to the feature difference and the imitation mask.

4. The method according to claim 1, characterized in that: The obtaining of a classification loss function according to the label data of the training image of the lane line and the second feature data includes: Performing feature fusion processing on the second feature data to obtain second fused data; Inputting the second fused data into a preset classification model respectively to obtain a model classification result; Obtaining label data of the lane line training image; The classification loss function is obtained according to the model classification result and the label data.

5. The method according to claim 1, characterized in that The second model includes a fully convolutional adaptation layer, and the method further includes: Perform feature extraction on the training image using a second model including the fully convolutional adaptation layer.

6. A training device for a lane segmentation model, characterized in that: The device comprises: The acquisition module is used to obtain the training images of lane lines; An extraction module, used for inputting the training image into a first model and a second model respectively for feature extraction to obtain first feature data and second feature data, wherein the number of model layers of the first model is greater than that of the second model; A first processing module, used for obtaining a simulation loss function according to the first feature data and the second feature data; A second processing module, used to obtain a classification loss function according to the training image label data of the lane line and the second feature data; A training module, used for training the second model according to the imitation loss function and the classification loss function; Wherein, the first processing module is specifically used for: Performing feature fusion processing on the first feature data and the second feature data respectively to obtain first fused data and second fused data; Performing a difference operation on the first fused data and the second fused data to obtain a feature difference; Inputting the first fused data and the second fused data into a preset classification network respectively to obtain first target data and second target data; The imitation loss function is obtained according to the feature difference, the first target data and the second target data.

7. A computer device, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the training method of the lane line segmentation model according to any one of claims 1 to 5 is implemented.

8. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and when the computer program is executed by a processor, the training method of the lane line segmentation model described in any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Method and device for training element classification model

    CN111339302A