Lane line detection model training method and system and lane line detection method and system

By using cross-similarity comparison learning and comprehensive loss function optimization methods in the lane line detection model, the problem of low accuracy in complex scenarios is solved, and the accuracy and robustness of the detection are improved.

CN119888438APending Publication Date: 2025-04-25RECONOVA TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411811322.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-10
Publication Date
2025-04-25

AI Technical Summary

Technical Problem

The existing lane line detection methods are not very accurate in complex scenarios, especially when the lane line is blocked, it is prone to missed detection.

Method used

The lane line detection model training method is adopted. By acquiring the lane line images and dividing them into multiple image blocks, a preset proportion image block is randomly selected for mask generation processing, and a lane line detection model with semantic segmentation capability is used to extract the image blocks, calculate the cross similarity and optimize the comprehensive loss function to train the model.

Benefits of technology

It improves the accuracy of lane line detection, reduces missed detection due to occlusion, and enhances the robustness and generalization ability of the model in complex scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119888438A_ABST
    Figure CN119888438A_ABST
Patent Text Reader

Abstract

The invention discloses a lane line detection model training method and system and a lane line detection method and system. The method comprises the following steps: acquiring a lane line image, and dividing the lane line image into a plurality of image blocks; randomly selecting image blocks with a preset proportion to perform mask generation processing to obtain a corresponding mask image; using a lane line detection model with semantic segmentation capability as an encoder, performing feature extraction on each image block in the lane line image to obtain a first feature map, and performing feature extraction on each image block in the mask image to obtain a second feature map; calculating the cross similarity between each image block in the second feature map and all image blocks in the first feature map; calculating a comprehensive loss function value, wherein the comprehensive loss function is specifically the sum of consistency loss, similarity loss and classification loss of an instance level; and optimizing the comprehensive loss function by using a gradient descent method to train a lane line detection model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of autonomous driving technology, and in particular to a lane line detection model training method and system, and a lane line detection method and system. Background Art

[0002] Lane lines provide information about the vehicle's position on the road and are an important basis for the decision-making of the autonomous driving system. However, in the actual road environment, lane line detection faces multiple challenges: severe weather conditions, vehicle occlusion, blurred road surface, and the slender features of the lane lines themselves, all of which increase the difficulty of accurately identifying lane lines, thus posing a threat to the accuracy and safety of autonomous driving.

[0003] The existing lane detection methods mainly include the following two methods:

[0004] 1. Traditional lane detection technologies, such as those based on Hough transform or HSI color space, mainly rely on manual feature extraction. Such methods have low detection accuracy and computational efficiency when dealing with complex scenarios such as lane lines being blocked, blurred or reflected.

[0005] 2. Lane detection based on image semantic segmentation, which uses convolutional neural networks to automatically extract key features in images and classify each pixel as a lane or non-lane area, thereby achieving efficient and relatively accurate lane detection. Although this method has shown significant advantages in dealing with the problem of blurred lanes, it may still miss detection when the lane is blocked, thus affecting the accuracy of detection.

[0006] Therefore, the existing lane line detection method has the problem of low accuracy. Summary of the invention

[0007] The main purpose of the present invention is to provide a lane line detection model training method and system and a lane line detection method and system, aiming to solve the technical problem that the existing lane line detection method has low accuracy.

[0008] To achieve the above object, the present invention provides a lane line detection model training method, which comprises the following steps:

[0009] Obtain a lane line image and divide it into multiple image blocks;

[0010] Randomly select a preset ratio of image blocks for mask generation processing to obtain the corresponding mask image;

[0011] A lane detection model with semantic segmentation capability is used as an encoder to extract features from each image block in the lane image to obtain a first feature map, and features are extracted from each image block in the mask image to obtain a second feature map.

[0012] Calculate the cross similarity between each image block in the second feature map and all image blocks in the first feature map;

[0013] Calculate the value of the comprehensive loss function, which is the sum of consistency loss, similarity loss and instance-level classification loss;

[0014] The comprehensive loss function is optimized using the gradient descent method to train the lane detection model.

[0015] Optionally, a preset proportion of image blocks are randomly selected for mask generation processing, specifically: pixel values ​​of the selected image blocks are replaced with values ​​randomly selected from a normal distribution N(1,0).

[0016] Optionally, the calculation formula of cross similarity is as follows:

[0017]

[0018] Among them, y is the first feature map, y′ p is the masked image block in the second feature map, i is the vertical index, indicating the row, j is the horizontal index, indicating the column, is the size of the masked image block, u is the row index of the image block in the second feature map, v is the column index of the image block in the second feature map, a positive value of u indicates an offset in the vertical direction, a negative value of u indicates an offset in the vertical direction, a positive value of v indicates an offset to the right in the horizontal direction, a negative value of v indicates an offset to the left in the horizontal direction, w and h are the width and height of the second feature map, respectively.

[0019] Optionally, consistency loss Λ cons Used to compare the consistency between the first feature map and the second feature map. The calculation formula is as follows:

[0020]

[0021] y ij is the pixel value corresponding to the i-th row and j-th column in the first feature map, y′ ij is the pixel value corresponding to the i-th row and j-th column in the second feature map.

[0022] Optionally, similarity loss Λσ sim It is used to identify the differences between different masked areas. The calculation formula is as follows:

[0023]

[0024] in, is the cross similarity between each image block in the first feature map y and the second feature map y', is the cross similarity between each image block in the second feature map y' and the first feature map y, and the calculation formulas for the two are as follows:

[0025]

[0026] Among them, l0,l1,...,l z represents the image block in the second feature map t', m0,m1,...,m z represents the image block in the first feature map y, and z=(w×h) / / p, where p is the width and height of each image block in the first feature map y and the second feature map y′.

[0027] Optional, instance-level classification loss Λ inst The cosine similarity is used to measure the similarity between the normalized vector of the first feature map y and the normalized vector of the second feature map y'. The calculation formula is as follows:

[0028]

[0029] in, is the normalized vector of the first feature map y, is the normalized vector of the second feature map y'.

[0030] Optionally, the preset ratio is 30%, and the first feature map and the second feature map include at least one type of feature information: edge information, texture information, shape information, and color information.

[0031] Corresponding to the lane line detection model training method, the present invention provides a lane line detection model training system, which includes:

[0032] A first image division module is used to obtain a lane line image and divide it into multiple image blocks;

[0033] A mask generation processing module is used to randomly select image blocks of a preset ratio to perform mask generation processing to obtain a corresponding mask image;

[0034] A first feature extraction module is used to use a lane detection model with semantic segmentation capability as an encoder to perform feature extraction on each image block in the lane image to obtain a first feature map, and to perform feature extraction on each image block in the mask image to obtain a second feature map;

[0035] A cross-similarity calculation module, used to calculate the cross-similarity between each image block in the second feature map and all image blocks in the first feature map;

[0036] The loss function calculation module is used to calculate the comprehensive loss function value. The comprehensive loss function is specifically the sum of consistency loss, similarity loss and instance-level classification loss;

[0037] The training module is used to optimize the comprehensive loss function using the gradient descent method to train the lane detection model.

[0038] In addition, to achieve the above object, the present invention also provides a lane line detection method, comprising the following steps:

[0039] Obtain the image to be tested and input it into the lane detection model;

[0040] Divide the image to be tested into multiple image blocks;

[0041] Perform feature extraction on each image block in the image to be tested to obtain feature information;

[0042] Based on the feature information, each pixel in the image to be tested is classified to determine whether it belongs to the lane line, and a segmentation map is generated according to the judgment result;

[0043] Post-process the segmentation map to extract lane line information;

[0044] The lane line detection model is trained based on the lane line detection model training method described above.

[0045] Corresponding to the lane line detection method, the present invention provides a lane line detection system, which includes:

[0046] An image acquisition module is used to acquire the image to be tested and input it into the lane detection model;

[0047] A second image division module, used for dividing the image to be tested into a plurality of image blocks;

[0048] The second feature extraction module is used to extract features from each image block in the image to be tested to obtain feature information;

[0049] A judgment module is used to classify each pixel in the image to be tested based on feature information, determine whether it belongs to a lane line, and generate a segmentation map according to the judgment result;

[0050] The post-processing module is used to post-process the segmentation map and extract lane line information;

[0051] The lane line detection model is trained based on the lane line detection model training method described above.

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

[0053] (1) Compared with the prior art, the present invention, based on detecting lane lines through semantic segmentation, innovatively uses cross-similarity contrast learning, which helps the lane line detection model understand the relationship between different image blocks. In particular, when the lane line is partially occluded, the occluded part of the lane line can be inferred by associating it with information from other image blocks, thereby improving the accuracy of lane line detection and reducing missed detections caused by occlusion. In addition, the cross-similarity contrast learning in the present invention can effectively learn with only a small amount of labeled data, and can also use a large amount of unlabeled data to enhance the generalization ability of the model.

[0054] (2) Compared with the prior art, the present invention optimizes the comprehensive loss function through the gradient descent method, and can gradually adjust the parameters of the lane line detection model to make it more suitable for lane line detection tasks in complex scenarios.

[0055] (3) Compared with the prior art, the present invention trains the lane line detection model to improve its robustness in the face of incomplete information through mask generation processing, which can further emphasize the lane line area, so that the lane line detection model pays more attention to these key areas during the training process, thereby improving the lane line recognition ability.

[0056] (4) Compared with the prior art, the present invention helps the model learn richer feature representations during the training process by calculating the cross-similarity between each image block in the second feature map and all image blocks in the first feature map. This rich feature representation helps the model better identify key targets such as lane lines, especially in complex or occluded scenes; therefore, the performance of the lane line detection model can be significantly improved.

[0057] (5) Compared with the prior art, the present invention compares the consistency of the first feature map and the second feature map through a consistency loss function to improve the accuracy of feature extraction.

[0058] (6) Compared with the prior art, the present invention identifies the differences between different occluded areas through similarity loss, which helps the lane detection model learn a more robust feature representation and can enhance the model's adaptability to complex scenes such as occlusion, noise, and lighting changes, thereby improving the robustness of the lane detection model.

[0059] (7) Compared with the prior art, the present invention improves the lane detection model's ability to distinguish different lane markings and its ability to adapt to changes in lane markings under different environmental conditions through instance-level classification loss. BRIEF DESCRIPTION OF THE DRAWINGS

[0060] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0061] Figure 1 A simplified flowchart of an embodiment of a lane detection model training method of the present invention;

[0062] Figure 2 A framework diagram of an embodiment of a lane detection model training system of the present invention;

[0063] Figure 3 A simplified flowchart of an embodiment of a lane line detection method of the present invention;

[0064] Figure 4 It is a framework diagram of an embodiment of a lane detection system of the present invention. DETAILED DESCRIPTION

[0065] In order to make the purpose, technical scheme and advantages of the embodiments of the present invention clearer, 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 part of the embodiments of the present invention, rather than all the embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0066] like Figure 1 As shown, the lane line detection model training method of the present invention comprises the following steps:

[0067] Obtain a lane line image and divide it into multiple image blocks;

[0068] Randomly select a preset ratio of image blocks for mask generation processing to obtain the corresponding mask image;

[0069] A lane detection model with semantic segmentation capability is used as an encoder to extract features from each image block in the lane image to obtain a first feature map, and features are extracted from each image block in the mask image to obtain a second feature map.

[0070] Calculate the cross similarity between each image block in the second feature map and all image blocks in the first feature map;

[0071] Calculate the value of the comprehensive loss function, which is the sum of consistency loss, similarity loss and instance-level classification loss;

[0072] The comprehensive loss function is optimized using the gradient descent method to train the lane detection model.

[0073] Based on detecting lane lines through semantic segmentation, the present invention innovatively uses cross-similarity contrast learning, which helps the lane line detection model understand the relationship between different image blocks. In particular, when the lane line is partially occluded, the occluded part of the lane line can be inferred by associating with information from other image blocks, so as to improve the accuracy of lane line detection and reduce missed detections due to occlusion. In addition, the cross-similarity contrast learning in the present invention can perform effective learning with only a small amount of labeled data, and can use a large amount of unlabeled data to enhance the generalization ability of the model.

[0074] The present invention optimizes the comprehensive loss function through the gradient descent method, and can gradually adjust the parameters of the lane line detection model to make it more suitable for lane line detection tasks in complex scenarios.

[0075] Preferably, a lane line image is obtained and divided into multiple image blocks, specifically: the lane line image I is divided into (H / / p)×(W / / p) image blocks to obtain image I', wherein H and W are the height and width of the lane line image I respectively, and p is the width and height of each image block.

[0076] In this embodiment, p=14, that is, the size of each image block is 14×14 pixels.

[0077] Furthermore, the preset ratio is 30%, and the first feature map and the second feature map include at least one type of feature information including edge information, texture information, shape information, and color information.

[0078] In this embodiment, a preset proportion of image blocks are randomly selected for mask generation processing, specifically: the pixel values ​​of the selected image blocks are replaced with values ​​randomly selected from the normal distribution N(1,0).

[0079] Preferably, the mask operation formula is as follows:

[0080]

[0081] M(I′) is the mask image and M is the selected image block.

[0082] The present invention trains the lane line detection model to be robust in the face of incomplete information through mask generation processing, which can further emphasize the lane line area, so that the lane line detection model pays more attention to these key areas during the training process, thereby improving the lane line recognition ability.

[0083] In this embodiment, SCNN (Spatial Convolutional Neural Network) is specifically used as an encoder. It is understandable that in a specific application process, any lane line detection model with semantic segmentation capability in the prior art can be used as an encoder, and the preferred embodiments of the present invention do not constitute an improper limitation on the present invention.

[0084] Furthermore, a lane detection model with semantic segmentation capability is used as an encoder to extract features from each image block in the lane image to obtain a first feature map, and to extract features from each image block in the mask image to obtain a second feature map; specifically:

[0085] A lane detection model with semantic segmentation capability is used as an encoder. The first encoder uses the gradient descent method to update the weights, and the second encoder uses the momentum of the first encoder to update the weights. The first encoder performs feature extraction on each image block in the lane image to obtain a first feature map. The second encoder performs feature extraction on the mask image, and performs feature extraction on each image block in the mask image to obtain a second feature map.

[0086] In this embodiment, the calculation formula of the cross similarity is as follows:

[0087]

[0088] Among them, y is the first feature map, y′ p is the masked image block in the second feature map, i is the vertical index, indicating the row, j is the horizontal index, indicating the column, is the size of the masked image block (specifically 14*14 pixels), u is the row index of the image block in the second feature map, v is the column index of the image block in the second feature map, a positive value of u indicates an offset in the vertical direction, a negative value of u indicates an offset in the vertical direction, a positive value of v indicates an offset to the right in the horizontal direction, a negative value of v indicates an offset to the left in the horizontal direction, w and h are the width and height of the second feature map, respectively.

[0089] In this embodiment, the purpose of calculating the cross-phase is to use the similarity between the features around the masked area and the relevant features in the original image (ie, the lane line image) to reveal the local features of the masked area.

[0090] The present invention helps the model learn richer feature representations during the training process by calculating the cross-similarity between each image block in the second feature map and all image blocks in the first feature map. This rich feature representation helps the model better identify key targets such as lane lines, especially in complex or occluded scenes; therefore, the performance of the lane line detection model can be significantly improved.

[0091] In this embodiment, in order for the convolutional neural network to generate more accurate features, the lane line detection model can predict the occluded area and better classify lane line pixels and non-lane line pixels, the present invention designs a consistency loss Λ cons , similarity loss Λσ sim and instance-level classification loss Λ inst The comprehensive loss function: Λ all =Λ cons +Λσ sim +Λ inst .

[0092] In this embodiment, the consistency loss Λ cons Used to compare the consistency between the first feature map and the second feature map. The calculation formula is as follows:

[0093]

[0094] y ij is the pixel value corresponding to the i-th row and j-th column in the first feature map, y′ ij is the pixel value corresponding to the i-th row and j-th column in the second feature map.

[0095] The present invention compares the consistency of the first feature map and the second feature map through a consistency loss function to improve the accuracy of feature extraction.

[0096] In this embodiment, the similarity loss Λσ sim It is used to identify the differences between different masked areas. The calculation formula is as follows:

[0097]

[0098] in, is the cross similarity between each image block in the first feature map y and the second feature map y', is the cross similarity between each image block in the second feature map y' and the first feature map y, and the calculation formulas for the two are as follows:

[0099]

[0100] Among them, l0,l1,...,l z represents the image block in the second feature map y', m0,m 11 ,...,m z represents the image block in the first feature map y, and z=(w×h) / / p, where p is the width and height of each image block in the first feature map y and the second feature map y′.

[0101] The present invention identifies the differences between different occluded areas through similarity loss, which helps the lane line detection model learn a more robust feature representation and can enhance the model's adaptability to complex scenes such as occlusion, noise, and lighting changes, thereby improving the robustness of the lane line detection model.

[0102] In this embodiment, the instance-level classification loss Λ inst The cosine similarity is used to measure the similarity between the normalized vector of the first feature map y and the normalized vector of the second feature map y'. The calculation formula is as follows:

[0103]

[0104] in, is the normalized vector of the first feature map y, is the normalized vector of the second feature map y'.

[0105] The present invention improves the ability of the lane line detection model to distinguish different lane markings and the ability to adapt to changes in lane markings under different environmental conditions through instance-level classification loss.

[0106] like Figure 2 As shown, corresponding to the lane line detection model training method, the present invention provides a lane line detection model training system, which includes:

[0107] A first image division module 110 is used to obtain a lane line image and divide it into a plurality of image blocks;

[0108] The mask generation processing module 120 is used to randomly select a preset ratio of image blocks to perform mask generation processing to obtain a corresponding mask image;

[0109] A first feature extraction module 130 is used to use a lane detection model with semantic segmentation capability as an encoder to perform feature extraction on each image block in the lane image to obtain a first feature map, and to perform feature extraction on each image block in the mask image to obtain a second feature map;

[0110] A cross-similarity calculation module 140, configured to calculate the cross-similarity between each image block in the second feature map and all image blocks in the first feature map;

[0111] A loss function calculation module 150 is used to calculate a comprehensive loss function value, where the comprehensive loss function is specifically the sum of consistency loss, similarity loss, and instance-level classification loss;

[0112] The training module 160 is used to optimize the comprehensive loss function using the gradient descent method to train the lane detection model.

[0113] like Figure 3 As shown, the present invention also provides a lane line detection method, comprising the following steps:

[0114] Obtain the image to be tested and input it into the lane detection model;

[0115] Divide the image to be tested into multiple image blocks;

[0116] Perform feature extraction on each image block in the image to be tested to obtain feature information;

[0117] Based on the feature information, each pixel in the image to be tested is classified to determine whether it belongs to the lane line, and a segmentation map is generated according to the judgment result;

[0118] Post-process the segmentation map to extract lane line information;

[0119] The lane line detection model is trained based on the lane line detection model training method described above.

[0120] like Figure 4 As shown, corresponding to the lane line detection method, the present invention provides a lane line detection system, which includes:

[0121] An image acquisition module 210 is used to acquire an image to be tested and input it into a lane detection model;

[0122] A second image division module 220 divides the image to be tested into a plurality of image blocks;

[0123] A second feature extraction module 230 is used to extract features from each image block in the image to be tested to obtain feature information;

[0124] The judgment module 240 is used to classify each pixel in the image to be tested based on the feature information, determine whether it belongs to the lane line, and generate a segmentation map according to the judgment result;

[0125] A post-processing module 250 is used to post-process the segmentation map and extract lane line information;

[0126] The lane line detection model is trained based on the lane line detection model training method described above.

[0127] It should be noted that each embodiment in this specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts between the embodiments can be referred to each other. For the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0128] Furthermore, in this document, the terms "comprises," "comprising," or any other variation thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or device that includes a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or device that includes the element.

[0129] The above description shows and describes the preferred embodiments of the present invention. It should be understood that the present invention is not limited to the form disclosed herein, and should not be regarded as excluding other embodiments, but can be used in various other combinations, modifications and environments, and can be modified within the scope of the invention, through the above teachings or the technology or knowledge of the relevant field. The changes and modifications made by those skilled in the art shall not depart from the spirit and scope of the present invention, and shall be within the scope of protection of the claims attached to the present invention.

Claims

1. A lane detection model training method, characterized in that: The following steps are involved: Obtain a lane line image and divide it into multiple image blocks; Randomly select a preset ratio of image blocks for mask generation processing to obtain the corresponding mask image; A lane detection model with semantic segmentation capability is used as an encoder to extract features from each image block in the lane image to obtain a first feature map, and features are extracted from each image block in the mask image to obtain a second feature map. Calculate the cross similarity between each image block in the second feature map and all image blocks in the first feature map; Calculate the value of the comprehensive loss function, which is the sum of consistency loss, similarity loss and instance-level classification loss; The comprehensive loss function is optimized using the gradient descent method to train the lane detection model.

2. The lane detection model training method according to claim 1, characterized in that: A preset proportion of image blocks are randomly selected for mask generation processing, specifically: the pixel values ​​of the selected image blocks are replaced with values ​​randomly selected from the normal distribution N(1,0).

3. The lane detection model training method according to claim 1, characterized in that: The calculation formula of cross similarity is as follows: Among them, y is the first feature map, y p ′ is the masked image block in the second feature map, i is the vertical index, indicating the row, j is the horizontal index, indicating the column, is the size of the masked image block, u is the row index of the image block in the second feature map, v is the column index of the image block in the second feature map, a positive value of u indicates an offset in the vertical direction, a negative value of u indicates an offset in the vertical direction, a positive value of v indicates an offset to the right in the horizontal direction, a negative value of v indicates an offset to the left in the horizontal direction, w and h are the width and height of the second feature map, respectively.

4. The lane detection model training method according to claim 3, characterized in that: Consistency loss Λ cons Used to compare the consistency between the first feature map and the second feature map. The calculation formula is as follows: y ij is the pixel value corresponding to the i-th row and j-th column in the first feature map, y′ ij is the pixel value corresponding to the i-th row and j-th column in the second feature map.

5. The lane detection model training method according to claim 1, characterized in that: Similarity loss Λσ sim It is used to identify the differences between different masked areas. The calculation formula is as follows: in, is the cross similarity between each image block in the first feature map y and the second feature map y', is the cross similarity between each image block in the second feature map y' and the first feature map y, and the calculation formulas for the two are as follows: Among them, l0,l1,...,l z represents the image block in the second feature map y', m0,m1,...,m z represents the image block in the first feature map y, and z=(w×h) / / p, where p is the width and height of each image block in the first feature map y and the second feature map y′.

6. The lane detection model training method according to claim 1, characterized in that: Instance-level classification loss Λ inst The cosine similarity is used to measure the similarity between the normalized vector of the first feature map y and the normalized vector of the second feature map y'. The calculation formula is as follows: in, is the normalized vector of the first feature map y, is the normalized vector of the second feature map y'.

7. The lane detection model training method according to claim 1, characterized in that: The preset ratio is 30%, and the first feature map and the second feature map include at least one type of feature information among edge information, texture information, shape information, and color information.

8. Lane detection model training system, characterized in that: include: A first image division module is used to obtain a lane line image and divide it into multiple image blocks; A mask generation processing module is used to randomly select image blocks of a preset ratio to perform mask generation processing to obtain a corresponding mask image; A first feature extraction module is used to use a lane detection model with semantic segmentation capability as an encoder to perform feature extraction on each image block in the lane image to obtain a first feature map, and to perform feature extraction on each image block in the mask image to obtain a second feature map; A cross-similarity calculation module, used to calculate the cross-similarity between each image block in the second feature map and all image blocks in the first feature map; The loss function calculation module is used to calculate the comprehensive loss function value. The comprehensive loss function is specifically the sum of consistency loss, similarity loss and instance-level classification loss; The training module is used to optimize the comprehensive loss function using the gradient descent method to train the lane detection model.

9. A lane line detection method, characterized in that: The following steps are involved: Obtain the image to be tested and input it into the lane detection model; Dividing the image to be tested into multiple image blocks; Perform feature extraction on each image block in the image to be tested to obtain feature information; Based on the feature information, each pixel in the image to be tested is classified to determine whether it belongs to the lane line, and a segmentation map is generated according to the judgment result; Post-process the segmentation map to extract lane line information; Wherein, the lane line detection model is trained based on the lane line detection model training method described in any one of claims 1-7.

10. The lane detection system is characterized by: include: An image acquisition module is used to acquire the image to be tested and input it into the lane detection model; A second image division module, used for dividing the image to be tested into a plurality of image blocks; The second feature extraction module is used to extract features from each image block in the image to be tested to obtain feature information; A judgment module is used to classify each pixel in the image to be tested based on feature information, determine whether it belongs to a lane line, and generate a segmentation map according to the judgment result; The post-processing module is used to post-process the segmentation map and extract lane line information; Wherein, the lane line detection model is trained based on the lane line detection model training method described in any one of claims 1-7.