Search

CN-116246237-B - Method, system, device and storage medium for detecting lane lines in image

CN116246237BCN 116246237 BCN116246237 BCN 116246237BCN-116246237-B

Abstract

The embodiment of the invention discloses a method, a system, a device and a storage medium for detecting lane lines in an image, which belong to the technical field of image detection. The pixel point information of the detection result of the preceding lane line can represent the information of the lane line in the road image, and when the pixel point information does not accord with the fitting condition, the pixel point information is combined with the detection result of the preceding lane line, rather than the detection of the lane line by using the information in the currently processed road image, thereby being beneficial to improving the detection precision of the lane line.

Inventors

  • LI SHENG

Assignees

  • 珠海亿智电子科技有限公司

Dates

Publication Date
20260512
Application Date
20230210

Claims (9)

  1. 1. A method for detecting a lane line in an image, comprising: Acquiring a road image; identifying the road image by using the trained lane line detection model to obtain pixel point information corresponding to the lane line in the road image; When the pixel point information does not accord with the fitting condition, processing the pixel point information according to the previous lane line detection result of the previous road image to obtain a lane line detection result; the processing the pixel point information according to the previous lane line detection result of the road image to obtain a lane line detection result comprises the following steps: When the detection result of the preceding lane line is empty, storing, deleting or ignoring the pixel point information and obtaining the detection result of the lane line which does not contain the lane line; When the detection result of the preceding lane line is not empty, calculating to obtain distance information by using the pixel point information and the detection result of the preceding lane line; and when the distance information is matched with a preset distance threshold value, fitting the pixel point information to obtain a corresponding lane line detection result.
  2. 2. The method for detecting a lane line in an image according to claim 1, wherein fitting the pixel information to obtain the corresponding lane line detection result comprises: acquiring the image height and the image width of the road image; Obtaining a lane line curve function taking height as an abscissa and width as an ordinate according to the operation relation among the image height, the image width and the pixel point information; fitting the lane line curve function by using a quadratic function to obtain fitting parameters; fitting the pixel point information and the fitting parameters by using a least square method to obtain a fitting formula; And calculating the fitting parameter with the minimum residual function according to the fitting formula to obtain the lane line detection result of the lane line fitting curve.
  3. 3. The method for lane-line detection in an image according to claim 1, wherein before said identifying said road image using said trained lane-line detection model, said method further comprises: the method comprises the steps of obtaining a marked training image, wherein the marked training image is marked with azimuth information and type information of a lane line; Identifying the marked training image by using the lane line detection model to be trained which is initialized by the completion parameters to obtain a lane line segmentation result, wherein the lane line segmentation result comprises the direction and the type of a lane line; updating model parameters of the lane line detection model to be trained according to the lane line segmentation result, and judging that the lane line detection model to be trained is trained when the lane line detection model to be trained meets a preset cut-off condition.
  4. 4. The method for detecting a lane line in an image according to claim 3, wherein updating model parameters of the lane line detection model to be trained based on the lane line segmentation result comprises: According to the lane line segmentation result, calculating a loss value by using a cross entropy loss function; and updating the model parameters of the trained lane line detection model according to the loss value by using an adaptive momentum random optimization model.
  5. 5. The method for detecting lane lines in an image according to claim 3 or 4, wherein the lane line detection model comprises a convolution layer, a pooling layer and an upsampling layer; The lane line detection model is divided into an image sampling part, a global feature extraction fusion part and a classification part.
  6. 6. The method for lane-line detection in an image according to claim 1, wherein before said identifying said road image using said trained lane-line detection model, said method further comprises: cutting the road image to obtain an interested area image aiming at the lane line; and carrying out resolution adjustment on the region-of-interest image to obtain the updated road image.
  7. 7. The lane line detection system in the image is characterized by comprising an acquisition module, a detection module and a detection module, wherein the acquisition module is used for acquiring a road image; the model module is used for identifying the road image by using the trained lane line detection model to obtain pixel point information corresponding to the lane line in the road image; The detection module is used for processing the pixel point information according to the previous lane line detection result of the previous road image to obtain a lane line detection result when the pixel point information does not accord with the fitting condition; The detection module processes the pixel point information according to the previous lane line detection result of the previous road image to obtain a lane line detection result, and comprises the following steps: When the detection result of the preceding lane line is empty, storing, deleting or ignoring the pixel point information and obtaining the detection result of the lane line which does not contain the lane line; When the detection result of the preceding lane line is not empty, calculating to obtain distance information by using the pixel point information and the detection result of the preceding lane line; and when the distance information is matched with a preset distance threshold value, fitting the pixel point information to obtain a corresponding lane line detection result.
  8. 8. An in-image lane line detection apparatus comprising a memory and a processor, wherein the memory stores an in-image lane line detection method, and the processor is configured to employ the in-image lane line detection method of any one of claims 1-6 when executing the in-image lane line detection method.
  9. 9. A storage medium storing a computer program capable of being loaded by a processor and executing the method according to any one of claims 1-6.

Description

Method, system, device and storage medium for detecting lane lines in image Technical Field The present invention relates to the field of image detection technologies, and in particular, to a method, a system, a device, and a storage medium for detecting lane lines in an image. Background Unmanned vehicles gradually become a hot spot in society, and in the unmanned technology, a sensor is generally relied on to detect the lane line of a current lane so as to ensure that the running of vehicles accords with traffic regulations and improve traffic safety. In the prior art, color information and boundary information in an image are acquired by means of an image acquired by a sensor by means of a traditional edge detection algorithm, and lane line information is extracted. But is interfered by illumination change, road pollution, object shielding and the like, so that the detection accuracy of the lane lines is seriously affected by noise in the image. Disclosure of Invention In view of the above, the present invention provides a method, a system, a device and a storage medium for detecting lane lines in an image, which are used for solving the problem of poor lane line detection precision in the prior art. To achieve one or a part or all of the above or other objects, the present invention provides a method, a system, a device and a storage medium for detecting a lane line in an image, in which: a lane line detection method in an image comprises the following steps: Acquiring a road image; identifying the road image by using the trained lane line detection model to obtain pixel point information corresponding to the lane line in the road image; And when the pixel point information does not accord with the fitting condition, processing the pixel point information according to the previous lane line detection result of the previous road image to obtain a lane line detection result. Preferably, the processing the pixel point information according to the previous lane line detection result of the previous road image to obtain a lane line detection result includes: When the detection result of the preceding lane line is empty, storing, deleting or ignoring the pixel point information and obtaining the detection result of the lane line which does not contain the lane line; When the detection result of the preceding lane line is not empty, calculating to obtain distance information by using the pixel point information and the detection result of the preceding lane line; and when the distance information is matched with a preset distance threshold value, fitting the pixel point information to obtain a corresponding lane line detection result. Preferably, fitting the pixel point information to obtain the corresponding lane line detection result includes: acquiring the image height and the image width of the road image; Obtaining a lane line curve function taking height as an abscissa and width as an ordinate according to the operation relation among the image height, the image width and the pixel point information; fitting the lane line curve function by using a quadratic function to obtain fitting parameters; fitting the pixel point information and the fitting parameters by using a least square method to obtain a fitting formula; And calculating the fitting parameter with the minimum residual function according to the fitting formula to obtain the lane line detection result of the lane line fitting curve. Preferably, before the identifying the road image using the trained lane line detection model, the method further comprises: the method comprises the steps of obtaining a marked training image, wherein the marked training image is marked with azimuth information and type information of a lane line; Identifying the marked training image by using the lane line detection model to be trained which is initialized by the completion parameters to obtain a lane line segmentation result, wherein the lane line segmentation result comprises the direction and the type of a lane line; updating model parameters of the lane line detection model to be trained according to the lane line segmentation result, and judging that the lane line detection model to be trained is trained when the lane line detection model to be trained meets a preset cut-off condition. Preferably, the updating the model parameters of the lane line detection model to be trained according to the lane line segmentation result includes: According to the lane line segmentation result, calculating a loss value by using a cross entropy loss function; and updating the model parameters of the trained lane line detection model according to the loss value by using an adaptive momentum random optimization model. Preferably, the lane line detection model comprises a convolution layer, a pooling layer and an up-sampling layer; The lane line detection model is divided into an image sampling part, a global feature extraction fusion part and a classification part. Preferably,