A lane line detection method and device and a storage medium
Patent Information
- Application Number
- CN202211034737.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-26
- Publication Date
- 2026-10-13
- Estimated Expiration
- 2042-08-26
AI Technical Summary
其中,传统图像处理的方法是由人工设计车道线特征,这样得到的车道线检测模型的鲁棒性较低,使得检测结果的准确度较低
Smart Images

Figure CN115410178B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of lane line detection technology, and in particular to a lane line detection method, device and storage medium. Background Technology
[0002] Lane detection aims to identify lane lines and accurately pinpoint their location. Lane detection technology is primarily used in vehicle autonomous driving or driver assistance systems to ensure vehicle safety during lateral movements.
[0003] In related technologies, lane lines can be detected using either traditional image processing methods or deep learning segmentation methods. Traditional image processing methods involve manually designing lane line features, resulting in lane line detection models with low robustness and consequently low accuracy. Deep learning segmentation methods classify each pixel in a large feature map to obtain lane lines; however, the entire detection process is computationally intensive and inefficient. Summary of the Invention
[0004] This invention provides a method, apparatus, and storage medium for detecting lane lines, which can improve the detection efficiency and accuracy of lane lines.
[0005] To achieve the above objectives, the present invention adopts the following technical solution: In a first aspect, the present invention provides a method for detecting lane lines, the method comprising: The first feature map is subjected to four feature extractions to determine the first image, the second image, the third image and the fourth image. The first image is a single-channel second feature map, the second image and the third image are second feature maps with (2M+2) channels, and the fourth image is a second feature map with W channels. The first feature map and the second feature map include lane lines, and W and M are positive integers. Based on the pixel value of each pixel in the first image, determine N pixels containing lane line features, where each of the N pixels corresponds to a lane line; Based on the (2M+2) first channel values of the first pixel of the second image, n1 second pixels containing lane line features are determined within the first range of the second image, and based on the (2M+2) second channel values of the first pixel of the third image, n2 second pixels are determined within the second range of the third image. The first pixel is any pixel among N pixels, and n1 and n2 are integers greater than or equal to 0. The first (2M+1) first channel values and the first (2M+1) second channel values are used to indicate the probability that a pixel contains lane line features, the (2M+2)th first channel value is used to indicate the probability of expanding the first range, and the (2M+2)th second channel value is used to indicate the probability of expanding the second range. Based on the fourth image, determine W target feature points for each pixel in N pixel groups, where each pixel group includes (n1+n2) second pixels; Based on W target feature points of each pixel in N pixel groups, determine N lane lines. Each pixel group includes (n1+n2) second pixels.
[0006] Using the lane line detection method provided by this invention, after four feature extractions on the first feature map, a second feature map with different dimensions is obtained, namely, a first image, a second image, a third image, and a fourth image. The first image is a single-channel second feature map. Based on the pixel value of each pixel in the first image, all pixels in the second feature map are divided into pixels containing lane line features and pixels not containing lane line features. That is, all pixels in the second feature map are globally classified, resulting in N pixels in the second feature map that contain lane line features. Both the second and third images are second feature maps containing (2M+2) channels. Based on each pixel in the N pixels containing lane lines, the pixels within the first range of the second image are divided into pixels containing lane line features and pixels not containing lane line features. That is, based on each pixel containing lane line features, n² pixels containing lane line features are determined within the first range of the second image. Similarly, the pixels within the second range of the third image are divided into pixels containing lane line features and pixels not containing lane line features. That is, based on each pixel containing lane line features, n² pixels containing lane line features are determined within the first range of the third image. This allows us to determine the (n1+n2) pixels contained in the lane line corresponding to each of the N pixels. This results in N pixel groups, each containing (n1+n2) pixels, corresponding to N lane lines. The fourth pixel is a second feature map containing W channels. Based on the fourth image, W target feature points can be determined for each pixel in each pixel group containing (n1+n2) pixels. That is, a pixel group contains [(n1+n2)×W] target feature points. Therefore, a lane line can be determined based on [(n1+n2)×W] target feature points. As described above, this invention performs two classifications on the pixels in the second feature map, determining the pixels contained in each of the N lane lines in the second feature map. In these two classification processes, a global classification is first performed to determine the pixels containing lane line features. Then, based on each pixel containing lane line features, a group of pixels forming a lane line is determined within its local area. This method of determining the pixels forming a lane line by performing a second local classification based solely on pixels containing lane line features not only reduces computational load and improves lane line detection efficiency, but also narrows the search range through local classification, resulting in higher accuracy of the pixels forming a lane line. Furthermore, when determining target feature points, only the target feature points within a group of pixels forming a lane line need to be determined, further reducing computational load and improving lane line detection efficiency.
[0007] In one possible implementation, the aforementioned first pixel is located in the I-th row and J-th column of the second image. Based on the (2M+2) first channel values of the first pixel in the second image, n1 second pixels containing lane line features are determined, including: Starting from the (I-1)th row of the second image, determine the maximum channel value among the first (2M+1) first channel values in the (I-1)th row, and determine the second pixel of the (I-1)th row according to the channel identifier corresponding to the maximum channel value, the column number J and M of the first pixel; If the (2M+2)th first channel value in the (I-1)th row is greater than the first threshold, then the second pixel of the row above the (I-1)th row is determined.
[0008] In one possible implementation, the aforementioned first pixel is located in the I-th row and J-th column of the third image. Based on the (2M+2) second channel values of the first pixel in the third image, n2 second pixels are determined, including: Starting from the (I+1)th row of the third image, determine the maximum channel value among the first (2M+1) second channel values in the (I+1)th row, and determine the second pixel of the (I+1)th row based on the channel identifier corresponding to the maximum channel value, the column number J and M of the first pixel; If the (2M+2)th second channel value in the (I+1)th row is greater than the first threshold, then the second pixel of the previous row in the (I+1)th row is determined.
[0009] In one possible implementation, the lane line detection method described above further includes: Based on the first (2M+1) first channel values and the first (2M+1) second channel values corresponding to each pixel group, and the target feature points in each pixel group, determine L target lane lines from N lane lines.
[0010] In one possible implementation, determining L target lane lines from N lane lines based on the first (2M+1) first channel values and the first (2M+1) second channel values corresponding to each pixel group, and the target feature points in each pixel group, includes: The confidence level of the lane line corresponding to each pixel group is determined based on the first (2M+1) first channel values and the first (2M+1) second channel values corresponding to each pixel group. Based on the confidence level of the lane line corresponding to each pixel group and the target feature points in each pixel group, determine L target lane lines from the N lane lines.
[0011] In one possible implementation, determining the confidence level of the lane line corresponding to each pixel group based on the first channel value and the second channel value corresponding to each pixel group includes: The maximum value of the first (2M+1) first channel values corresponding to each of the n1 second pixels in each pixel group is determined as the first target channel value; The maximum value of the first (2M+1) second channel values corresponding to each second pixel in each pixel group is determined as the second target channel value; The confidence level of the lane line corresponding to each pixel group is determined based on the average of the n1 first target channel values and the n2 second target channel values in each pixel group.
[0012] In one possible implementation, determining L target lane lines from N lane lines based on the confidence level of the lane line corresponding to each pixel group and the target feature points in each pixel group includes: Determine the target distance between any two lane lines based on the target feature points in each pixel group; If the target distance between any two lane lines is greater than the second threshold, then any two lane lines are determined as target lane lines. If the target distance between any two lane lines is less than the second threshold, then the lane line with the higher confidence level among the two lane lines is determined as the target lane line.
[0013] In one possible implementation, the target distance between any two lane lines is determined based on the target feature points in each pixel group, including: Determine the target horizontal axis coordinates of target feature points in any two lane lines, wherein the target horizontal axis coordinates correspond to the same vertical axis coordinates. Determine the first distance between any two lane lines based on the x-axis coordinates of all targets; Determine the second distance between any two lane lines based on the starting horizontal axis coordinates of the target feature points of any two lane lines. Determine the third distance between any two lane lines based on the horizontal coordinates of the endpoints of the target feature points of any two lane lines. The maximum distance among the first, second, and third distances is determined as the target distance.
[0014] In one possible implementation, determining N pixels containing lane line features based on the pixel value of each pixel in the first image includes: When the pixel value of a pixel in the first image is greater than a third threshold, the pixel in the first image is determined to be a pixel containing lane line features.
[0015] In one possible implementation, determining W target feature points for each pixel in the N pixel group based on the fourth image includes: Based on the W initial feature points of each pixel in the N pixel group of the fourth image, and the third channel value of each initial feature point, the W target feature points of each pixel are determined. The third channel value is used to indicate the difference between the horizontal axis coordinate of the midpoint of the pixel on the target image and each initial feature point in the pixel. The first feature map is obtained by feature extraction from the target image.
[0016] In a second aspect, the present invention provides a lane line detection device, comprising: The first determining unit is used to perform four feature extractions on the acquired first feature map to determine the first image, the second image, the third image and the fourth image. The first image is a single-channel second feature map, the second image and the third image are (2M+2) channel second feature maps, and the fourth image is a W channel second feature map. The first feature map and the second feature map include lane lines, and W and M are positive integers. The second determining unit is used to determine N pixels containing lane line features based on the pixel value of each pixel in the first image, wherein each of the N pixels corresponds to a lane line. The third determining unit is used to determine n1 second pixels containing lane line features within a first range of the second image based on (2M+2) first channel values of the first pixel of the second image, and to determine n2 second pixels within a second range of the third image based on (2M+2) second channel values of the first pixel of the third image. The first pixel is any pixel among N pixels, and n1 and n2 are integers greater than or equal to 0. The first (2M+1) first channel values and the first (2M+1) second channel values are used to indicate the probability that a pixel contains lane line features, the (2M+2)th first channel value is used to indicate the probability of expanding the first range, and the (2M+2)th second channel value is used to indicate the probability of expanding the second range. The fourth determining unit is used to determine W target feature points for each pixel in N pixel groups based on the fourth image, where each pixel group includes (n1+n2) second pixels, and to determine N lane lines based on the W target feature points for each pixel in the N pixel groups.
[0017] In one possible implementation, the first pixel is located in the I-th row and J-th column of the second image. The third determining unit is specifically used for: Starting from the (I-1)th row of the second image, determine the maximum channel value among the first (2M+1) first channel values in the (I-1)th row, and determine the second pixel of the (I-1)th row according to the channel identifier corresponding to the maximum channel value, the column number J and M of the first pixel; If the (2M+2)th first channel value in the (I-1)th row is greater than the first threshold, then the second pixel of the row above the (I-1)th row is determined.
[0018] In one possible implementation, the first pixel is located in the I-th row and J-th column of the third image. The third determining unit is specifically used for: Starting from the (I+1)th row of the third image, determine the maximum channel value among the first (2M+1) second channel values in the (I+1)th row, and determine the second pixel of the (I+1)th row based on the channel identifier corresponding to the maximum channel value, the column number J and M of the first pixel; If the (2M+2)th second channel value in the (I+1)th row is greater than the first threshold, then determine the second pixel of the next row in the (I+1)th row.
[0019] In one possible implementation, the fourth determining unit is further configured to determine L target lane lines from N lane lines based on the first (2M+1) first channel values and the first (2M+1) second channel values corresponding to each pixel group, as well as the target feature points in each pixel group.
[0020] In one possible implementation, the fourth determining unit described above is specifically used for: The confidence level of the lane line corresponding to each pixel group is determined based on the first (2M+1) first channel values and the first (2M+1) second channel values corresponding to each pixel group. Based on the confidence level of the lane line corresponding to each pixel group and the target feature points in each pixel group, determine L target lane lines from the N lane lines.
[0021] In one possible implementation, the fourth determining unit described above is specifically used for: The maximum value of the first (2M+1) first channel values corresponding to each of the n1 second pixels in each pixel group is determined as the first target channel value; The maximum value of the first (2M+1) second channel values corresponding to each second pixel in each pixel group is determined as the second target channel value; The confidence level of the lane line corresponding to each pixel group is determined based on the average of the n1 first target channel values and the n2 second target channel values in each pixel group.
[0022] In one possible implementation, the fourth determining unit described above is specifically used for: Determine the target distance between any two lane lines based on the target feature points in each pixel group; If the target distance between any two lane lines is greater than the second threshold, then any two lane lines are determined as target lane lines. If the target distance between any two lane lines is less than the second threshold, then the lane line with the higher confidence level among the two lane lines is determined as the target lane line.
[0023] In one possible implementation, the fourth determining unit described above is specifically used for: Determine the target horizontal axis coordinates of target feature points in any two lane lines, where the target horizontal axis coordinates correspond to the same vertical axis coordinates. Determine the first distance between any two lane lines based on the x-axis coordinates of all targets; Determine the second distance between any two lane lines based on the starting horizontal axis coordinates of the target feature points of any two lane lines. Determine the third distance between any two lane lines based on the horizontal coordinates of the endpoints of the target feature points of any two lane lines. The maximum distance among the first, second, and third distances is determined as the target distance.
[0024] In one possible implementation, the second determining unit described above is specifically used for: Based on the W initial feature points of each pixel in the N pixel group of the fourth image, and the third channel value of each initial feature point, the W target feature points of each pixel are determined. The third channel value is used to indicate the difference between the horizontal axis coordinate of the midpoint of the pixel on the target image and each initial feature point in the pixel. The first feature map is obtained by feature extraction from the target image.
[0025] In one possible implementation, the second determining unit described above is specifically used for: When the pixel value of a pixel in the first image is greater than a third threshold, the pixel in the first image is determined to be a pixel containing lane line features.
[0026] Thirdly, the present invention provides a lane line detection device, which includes a processor and a memory. The memory stores computer program code, including computer instructions. When the processor executes the computer instructions, the lane line detection device performs a lane line detection method as described in the first aspect and any possible implementation thereof.
[0027] Fourthly, the present invention provides a computer-readable storage medium having computer instructions stored thereon, which, when executed on a lane line detection device, cause the lane line detection device to perform a lane line detection method as described in the first aspect or any of the possible implementations of the first aspect. Attached Figure Description
[0028] Figure 1 This is a schematic diagram of the lane line detection system provided in an embodiment of the present invention; Figure 2 This is one of the structural schematic diagrams of the lane line detection device provided in an embodiment of the present invention; Figure 3 This is one of the flowcharts illustrating the lane line detection method provided in an embodiment of the present invention; Figure 4 This is a schematic diagram showing the position of the first pixel in the second image according to an embodiment of the present invention; Figure 5 This is a second schematic flowchart of the lane line detection method provided in an embodiment of the present invention; Figure 6 The third schematic flowchart of the lane line detection method provided in the embodiment of the present invention; Figure 7 This is a second schematic diagram of the lane line detection device provided in an embodiment of the present invention. Detailed Implementation
[0029] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0030] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of embodiments of this disclosure, unless otherwise stated, "a plurality of" means two or more. Furthermore, the use of "based on" or "according to" implies openness and inclusiveness, because processes, steps, calculations, or other actions "based on" or "according to" one or more of the stated conditions or values may in practice be based on additional conditions or beyond the stated values.
[0031] To improve the efficiency and accuracy of lane line detection, this invention provides a lane line detection method, apparatus, and storage medium. By classifying pixels in a second feature map twice, the pixels contained in each of the N lane lines in the second feature map are determined. In these two classification processes, a global classification is first performed to identify pixels in the second feature map that contain lane line features. Then, based on each pixel containing lane line features, a group of pixels forming a lane line is determined within its local region. This method of determining the pixels forming a lane line by performing secondary local classification based solely on pixels containing lane line features not only reduces computational load and improves lane line detection efficiency, but also narrows the search range through local classification, resulting in higher accuracy for the pixels forming a lane line. Furthermore, when determining target feature points, only the target feature points within the group of pixels forming a lane line need to be identified, further reducing computational load and improving lane line detection efficiency.
[0032] The lane line detection method provided in this embodiment of the invention can be applied to lane line detection systems. Figure 1 A schematic diagram of one possible structure for the lane line detection system is shown. Figure 1 As shown, the lane line detection system may include: multiple image acquisition devices 11 and electronic devices 12, with each image acquisition device 11 and electronic device 12 connected via wired or wireless communication.
[0033] Image acquisition device 11 is used to capture images and transmit the images to electronic device 12.
[0034] In some embodiments, the object captured by the image acquisition device 11 may be a road, on which lane lines are provided.
[0035] In some embodiments, the image acquisition device 11 can be a device with a shooting function. For example, the image acquisition device 11 can be a car or drone driving on the road. When the image acquisition device 11 is a car, it can use its own dashcam to capture images of the road in front of the car during driving. By detecting the lane lines of the road included in the images captured by the image acquisition device 11, the current position of the car and its position relative to the lane can be determined. This positional relationship can be used for autonomous driving or assisted driving.
[0036] Electronic device 12 is used to perform four feature extractions on the acquired first feature map to determine a first image, a second image, a third image, and a fourth image. The first image is a single-channel second feature map, the second and third images are (2M+2)-channel second feature maps, and the fourth image is a W-channel second feature map. The first and second feature maps include lane lines, and W and M are positive integers. It is also used to determine N pixels containing lane line features based on the pixel value of each pixel in the first image, where each of the N pixels corresponds to a lane line. Furthermore, it is used to determine n1 second pixels containing lane lines within a first range of the second image based on the (2M+2) first channel values of the first pixel in the second image, and to determine the lane lines based on the first pixel of the third image. The (2M+2) second channel values are used to determine n2 second pixels within a second range of the third image. The first pixel is any pixel among the N pixels, and n1 and n2 are integers greater than or equal to 0. The first (2M+1) first channel values and the first (2M+1) second channel values are used to indicate the probability that a pixel contains lane line features. The (2M+2)th first channel value is used to indicate the probability of expanding the first range, and the (2M+2)th second channel value is used to indicate the probability of expanding the second range. It is also used to determine W target feature points for each pixel in the N pixel group based on the fourth image. Each pixel group includes (n1+n2) second pixels, and N lane lines are determined based on the W target feature points for each pixel in the N pixel group.
[0037] For example, electronic device 12 can be a terminal device or a server. The terminal device can be a smartphone, tablet, or desktop computer, etc., and is not limited thereto. Figure 1 The example shown is an electronic device 12 serving as a server.
[0038] The basic hardware structures of the image acquisition device 11 and the electronic device 12 described above are similar, both including Figure 2 The components included in the lane line detection device shown below. Figure 2 Taking the lane line detection device shown as an example, the hardware structure of the image acquisition device 11 and the electronic device 12 will be introduced.
[0039] like Figure 2 As shown, the lane line detection device may include: a processor 21, a memory 22, a communication interface 23, and a bus 24. The processor 21, the memory 22, and the communication interface 23 can be connected via the communication bus 24.
[0040] Processor 21 is the control center of the lane line detection device. It can be a single processor 21 or a collective term for multiple processing elements. For example, processor 21 can be a general-purpose central processing unit (CPU) or other general-purpose processors 21. Among them, the general-purpose processor 21 can be a microprocessor 21 or any conventional processor 21.
[0041] As one embodiment, processor 21 may include one or more CPUs, for example, Figure 2 CPU0 and CPU1 are shown.
[0042] The memory 22 may be a read-only memory 22 (ROM) or other type of static storage device that can store static information and instructions, random access memory 22 (RAM) or other type of dynamic storage device that can store information and instructions, or electrically erasable programmable read-only memory 22 (EEPROM), disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited thereto.
[0043] In one possible implementation, the memory 22 can exist independently of the processor 21. The memory 22 can be connected to the processor 21 via a bus 24 and is used to store instructions or program code. When the processor 21 calls and executes the instructions or program code stored in the memory 22, it can implement the lane line detection method provided in the following embodiments of the present invention.
[0044] In another possible implementation, the memory 22 can also be integrated with the processor 21.
[0045] Communication interface 23 is used for the lane line detection device to connect with other devices via a communication network, which may be Ethernet, radio access network (RAN), wireless local area network (WLAN), etc. Communication interface 23 may include a receiving unit for receiving data and a transmitting unit for sending data.
[0046] Bus 24 can be an Industry Standard Architecture (ISA) bus 24, a Peripheral Component Interconnect (PCI) bus 24, or an Extended Industry Standard Architecture (EISA) bus 24, etc. This bus 24 can be divided into an address bus 24, a data bus 24, a control bus 24, etc. For ease of representation, Figure 2 The bus 24 is represented by a single thick line, but this does not mean that there is only one bus 24 or only one type of bus 24.
[0047] It should be pointed out that, Figure 2 The structure shown does not constitute a limitation on the detection device for that lane line, except Figure 2 In addition to the components shown, the lane line detection device may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0048] The lane line detection method provided in this embodiment of the invention is executed by a lane line detection device. This lane line detection device can be an electronic device, a CPU within such an electronic device, a control module for detecting lane lines within such an electronic device, or a client device for detecting lane lines within such an electronic device. This embodiment of the invention uses an electronic device executing the lane line detection method as an example to illustrate the lane line detection method provided by this invention.
[0049] The lane line detection method provided by the embodiments of the present invention will now be described with reference to the accompanying drawings.
[0050] like Figure 3 As shown, the lane line detection method provided in this embodiment of the invention includes the following steps 301 to 306.
[0051] 301. Perform four feature extractions on the obtained first feature map to determine the first image, second image, third image and fourth image.
[0052] The electronic device has a pre-installed lane detection model. When lane detection is required using this model, the electronic device first receives a target image from an image acquisition device. After receiving the target image of size (h×w), the backbone network of the lane detection model performs an m-fold downsampling on the target image to obtain a high-level abstract semantic feature map, i.e., a first feature map with its size reduced to [(h / m)×(w / m)]. Then, the first feature map is input into four branch networks of the lane detection model. Each branch network performs feature extraction on the first feature map again using convolution, resulting in a first image, a second image, a third image, and a fourth image. The first image is a single-channel second feature map, the second and third images are (2M+2)-channel second feature maps, and the fourth image is a W-channel second feature map. The first and second feature maps include lane lines, and W and M are positive integers.
[0053] As mentioned above, the first, second, third, and fourth images are the same size, but their number of channels is not exactly the same. Furthermore, the first and second feature maps are the same size, and both are smaller than the target image. Detecting lane lines on smaller feature maps reduces computational resource consumption, thereby improving lane line detection efficiency.
[0054] 302. Based on the pixel value of each pixel in the first image, determine N pixels that contain lane line features.
[0055] In the first image, each of the N pixels corresponds to a lane line. The pixel value of each pixel indicates whether it contains lane line features; the larger the pixel value, the greater the probability that the pixel contains lane line features. Therefore, the pixel value of each of the [(h / m) × (w / m)] pixels in the first image can be compared with a preset third threshold K. If the pixel value of a pixel in the first image is greater than the third threshold K, then the pixel in the first image is determined to contain lane line features.
[0056] Therefore, classifying pixels in the first image that contain lane line features from those that do not—that is, performing global classification—allows for the selection of pixels containing lane line features. Subsequent lane line detection only requires processing the pixels associated with the N pixels containing lane line features, further improving the efficiency of lane line detection.
[0057] It should be noted that since the dimensions of the first, second, third, and fourth images are all [(h / m) × (w / m)], that is, each of the first, second, third, and fourth images contains [(h / m) × (w / m)] pixels, the N pixels determined from the first image are equivalent to N pixels also being determined from the other three images.
[0058] 303. Based on the (2M+2) first channel values of the first pixel of the second image, determine n1 second pixels containing lane line features within the first range of the second image.
[0059] Wherein, the first pixel is any pixel among N pixels, n1 is an integer greater than or equal to 0, the first (2M+1) first channel values are used to indicate the probability that a pixel contains lane line features, and the (2M+2)th first channel value is used to indicate the probability of expanding the first range.
[0060] Optionally, taking the first pixel located in row I and column J of the second image as an example, determining n1 second pixels can include the following steps: First, starting from row (I-1) of the second image, determine the maximum channel value among the first (2M+1) first channel values in row (I-1), and determine the second pixel (I-1) based on the channel identifier corresponding to the maximum channel value, the column number J, and M of the first pixel. Whether it is necessary to continue determining the second pixel in the row above row (I-1) depends on the (2M+2)th first channel value in row (I-1) and the size of the first threshold S. If the (2M+2)th first channel value in row (I-1) is greater than the first threshold S, it indicates that the first range can be expanded, and the determination of the second pixel continues in the row above row (I-1).
[0061] It should be noted that the first pixel is located in the I-th row, J-th column of the second image, and in the (M+1)-th channel. The process of determining the second pixel of the row above the (I-1)-th row is the same as the process of determining the second pixel of the (I-1)-th row. This process is repeated until the first row of the second image, or the (2M+2)-th value of the first channel of a certain row, is less than the first threshold S. If the I-th row is the first row of the second image, then the (I-1)-th row does not exist, that is, the above process does not need to be performed, and n1 is 0 in this case.
[0062] For example, the column number of the second pixel in row (I-1) can be determined by the following formula (1).
[0063] (1) in, This indicates the column number of the second pixel in row (I-1). This represents the channel identifier corresponding to the maximum channel value in row (I-1), and .
[0064] Figure 4 A schematic diagram showing the position of the first pixel in the second image is provided. Figure 4 As shown, the first pixel is located in the (M+1)th channel of the I-th row and J-th column. There are M channels before the first pixel and M+1 channels after the first pixel. Among the first (2M+1) first channel values in the (I-1)-th row, the first channel value of the (M-1)-th channel is the largest. Therefore, the column number of the (M-1)th channel pixel in the (I-1)th row can be represented as... .
[0065] As described above, in the second image, the pixels in the upper region of each of the N pixels are further classified, and pixels with a high probability of containing lane line features in the upper region of each of the N pixels are selected, thus classifying the pixels that make up each lane line. This method of performing local classification after global classification to determine the n1 second pixels associated with the first pixel narrows the classification range, making the accuracy of the classified pixels that make up each lane line higher.
[0066] 304. Based on the (2M+2) second channel values of the first pixel of the third image, determine n2 second pixels within the second range of the third image.
[0067] Where n2 is an integer greater than or equal to 0, the second channel value is used to indicate the probability that a pixel contains lane line features, and the (2M+2)th second channel value is used to indicate the probability of expanding the second range.
[0068] Optionally, taking the first pixel located in row I, column J of the third image as an example, determining n² second pixels can include the following steps: First, starting from row (I+1) of the third image, determine the maximum channel value among the first (2M+1) second channel values in row (I+1), and determine the second pixel in row (I+1) based on the channel identifier corresponding to the maximum channel value, the column number J, and M of the first pixel. Whether it is necessary to continue determining second pixels in the next row after row (I+1) depends on the (2M+2)th first channel value in row (I+1) and the size of the first threshold S. If the (2M+2)th second channel value in row (I+1) is greater than the first threshold S, it indicates that the second range can be expanded, and the determination of second pixels continues in the next row after row (I+1).
[0069] It should be noted that the process of determining the second pixel of the next row after row (I+1) is the same as the process of determining the second pixel of row (I+1). This process is repeated until the last row of the third image, or the (2M+2)th first channel value of a certain row is less than the first threshold S. If row I is the last row of the third image, then row (I+1) does not exist, meaning the above process does not need to be performed, and n2 is 0 in this case.
[0070] For example, the column number of the second pixel in row (I+1) can be determined by the following formula (2).
[0071] (2) in, This indicates the column number of the second pixel in row (I+1). This represents the channel identifier corresponding to the maximum channel value in row (I+1), and .
[0072] As can be seen from the above, in the third image, the pixels in the lower region of each of the N pixels are classified again, and the pixels with a high probability of containing lane line features in the lower region of each of the N pixels are selected, thus classifying another part of each lane line.
[0073] 305. Based on the fourth image, determine W target feature points for each pixel in the N pixel groups.
[0074] Optionally, each pixel of the fourth image includes W initial feature points of the lane line, and a third channel value for each initial feature point. A third channel value indicates the difference between the horizontal coordinate of the center point of a pixel mapped to the target image and the horizontal coordinate of the W initial feature points in that pixel. Based on the W initial feature points of each pixel in the fourth image and the third channel value of each initial feature point, W target feature points for each pixel are determined.
[0075] Here, the W initial feature points in a pixel refer to the W feature points located on a straight line passing through the center point of that pixel. These W initial feature points have different horizontal coordinates, but their vertical coordinates are continuous.
[0076] 306. Based on the W target feature points of each pixel in N pixel groups, determine N lane lines. Each pixel group includes (n1+n2) second pixels.
[0077] For each of the N pixels containing lane line features, n1 second pixels can be determined within the first region of the third image (i.e., the upper region of each of the N pixels), and n2 second pixels can be determined within the second region of the fourth image (i.e., the lower region of each of the N pixels). These second pixels are all pixels with a high probability of containing lane line features. Then, concatenating these (n1+n2) second pixels yields a pixel group containing lane line features. Each pixel in any pixel group includes W target feature points, and the set of (n1+n2)×W target feature points constitutes a lane line.
[0078] By classifying the pixels in the second feature map twice, the pixels contained in each of the N lane lines in the second feature map were determined. In these two classification processes, a global classification was first performed to identify pixels in the second feature map that contain lane line features. Then, based on each pixel containing lane line features, a group of pixels forming a lane line was identified within its local region. This method of determining the pixels forming a lane line by performing secondary local classification based solely on pixels containing lane line features not only reduces computational load and improves lane line detection efficiency, but also narrows the search range through local classification, resulting in higher accuracy of the pixels forming a lane line. Furthermore, when determining target feature points, only the target feature points within the group of pixels forming a lane line need to be identified, further reducing computational load and improving lane line detection efficiency. Combination Figure 3 ,like Figure 5 As shown, the lane line detection method provided in this embodiment of the invention may further include step 501.
[0079] 501. Based on the first channel value and the second channel value corresponding to each pixel group, and the target feature points in each pixel group, determine L target lane lines from N lane lines.
[0080] Among the N lane lines identified from a target image, there may be duplicate lane lines. Therefore, it is necessary to delete the duplicate lane lines from the N lane lines. The final lane lines obtained are the lane lines in the target image, which further improves the accuracy of lane line detection.
[0081] Combination Figure 5 ,like Figure 6 As shown, step 501 above may include steps 601 and 602.
[0082] 601. Determine the confidence level of the lane line corresponding to each pixel group based on the first (2M+1) first channel values and the first (2M+1) second channel values corresponding to each pixel group.
[0083] Lane line confidence indicates the reliability of the lane lines determined by a group of pixels. A higher confidence level indicates greater reliability. The confidence level for each lane line can be determined using the following procedure.
[0084] First, the maximum value of the first (2M+1) first channel values corresponding to each of the n1 second pixels in each pixel group is determined as the first target channel value. Then, the maximum value of the first (2M+1) second channel values corresponding to each of the n2 second pixels in each pixel group is determined as the second target channel value. Next, based on the average of the n1 first target channel values and the n2 second target channel values in each pixel group, the confidence level of the lane line corresponding to each pixel group is determined.
[0085] The confidence level of a lane line, determined by the average of n1 first target channel values and n2 second target channel values, utilizes information from each pixel that makes up the lane line, thus better reflecting the reliability of the lane line.
[0086] 602. Based on the confidence level of the lane line corresponding to each pixel group and the target feature points in each pixel group, determine L target lane lines from the N lane lines.
[0087] Based on the confidence level of each lane line out of N lane lines, and the target feature points that make up each lane line, it can be determined whether there are duplicate lane lines among the N lane lines. If there are no duplicate lane lines, then N=L, meaning all N lane lines are target lane lines. If there are duplicate lane lines, then N>L. In this case, it is necessary to filter out L non-duplicate target lane lines from the N lane lines. Specifically, the following steps can be used to determine whether there are duplicate lane lines among the N lane lines.
[0088] First, the target distance between any two lane lines is determined based on the target feature points in each pixel group. Then, the target distances of any two lane lines are compared. If the target distance between any two lane lines is greater than a second threshold, then these two lane lines are identified as target lane lines. If the target distance between any two lane lines is less than the second threshold, then the lane line with the higher confidence level is identified as the target lane line. In other words, if the target distance is greater than the second threshold, it indicates that these two lane lines are two different lane lines, and both can be retained. If the target distance is less than the second threshold, it indicates that these two lane lines are the same lane line, and in this case, the lane line with higher confidence (i.e., higher reliability) can be retained.
[0089] Optionally, determining the target distance between any two lane lines may include the following steps: First, determine the target horizontal axis coordinates of the target feature points in any two lane lines, where the corresponding vertical axis coordinates are the same. Second, determine the first distance between any two lane lines based on all target horizontal axis coordinates. Third, determine the second distance between any two lane lines based on the starting horizontal axis coordinates of the target feature points in any two lane lines. Fourth, determine the third distance between any two lane lines based on the ending horizontal axis coordinates of the target feature points in any two lane lines. Finally, determine the maximum distance among the first, second, and third distances as the target distance.
[0090] For example, the first distance between any two lane lines can be obtained by calculating the average distance of the set of points where the Y-axis coordinates intersect between the two lane lines. Specifically, the first distance between any two lane lines can be determined by the following formula (3).
[0091] (3) in, Indicates the first distance; These represent the sets of points where the Y values of any two lane lines intersect (i.e., have the same Y value); This indicates the number of target feature points in the intersection point set; They represent The X-axis coordinate in the diagram.
[0092] For example, the second distance can be determined by calculating the starting point x-axis coordinates of the target feature points of any two lane lines using the following formula (4). The starting point x-axis coordinates are the x-axis coordinates of the starting feature point among the multiple target feature points that make up a lane line.
[0093] (4) in, Indicates the second distance; These represent target feature points located at the starting points of any two lane lines; These represent the x-axis coordinates of the starting points of any two lane lines.
[0094] For example, the third distance can be determined by calculating the endpoint horizontal coordinates of the target feature points of any two lane lines using the following formula (5). The endpoint horizontal coordinates are the horizontal coordinates of the termination feature points among the multiple target feature points that make up a lane line.
[0095] (5) in, Indicates the third distance; These represent target feature points located at the ends of any two lane lines; These represent the horizontal coordinates of the endpoints of any two lane lines.
[0096] Optionally, the training process of the lane detection model described above may include the following steps: First, acquire a batch of sample images, each sample image including lane lines. Use an initial detection model to detect lane lines in each sample image to obtain predicted lane line data for each sample image, and obtain standard lane line data for each sample image annotated by the user. Then, compare the predicted lane line data in the sample images with the standard data, and input the comparison result into the initial detection model. Optimize and train the initial detection model through backpropagation until the accuracy of the lane lines detected by the obtained detection model reaches a preset target.
[0097] The initial detection model includes a backbone network and four branch networks. These are described below.
[0098] For example, the backbone network is used to extract features from an image and reduce its size. The sample image is input into the backbone network to obtain a target feature map, the size of which is smaller than the sample image.
[0099] For example, the first branch network is used for global classification of the target feature map. The loss function of the first branch network can be expressed by the following formula (6): (6) in, The first branch network represents the loss value; A represents the number of targets to be classified (the number of pixels); T represents the ground truth, T=1 means that the current pixel contains lane lines; C represents the predicted value, that is, the probability that the current pixel contains lane lines, and (1-C) can represent the probability that it does not contain lane lines. This indicates the probability of predicting whether the current pixel contains a lane line; It is a coefficient that balances the hard and easy samples. This represents a preset constant set by the user. For example, the second branch network is used to regress the offset of the feature point at the corresponding position in the target feature map. The loss function of the second branch network can be expressed by the following formula (7): (7) in, This represents the loss value of the second branch network; This is a preset constant.
[0100] For example, the third and fourth branch networks are both used to predict the probability that the associated location contains lane lines, that is, to perform local classification of the associated location. The loss functions of the third and fourth branch networks can be expressed by the following formula (8): (8) in, These represent the loss values of the third and fourth branch networks, respectively. This is a preset constant.
[0101] By summing the loss functions of each branch network, we can obtain the loss function of the initial detection model. The loss function of the initial detection model can be expressed by the following formula (9): (9) in, This represents the loss value of the initial detection model. These correspond to the weights of different loss functions.
[0102] Figure 7 This is a second possible schematic diagram of the lane line detection device 700 involved in the above embodiments, as shown below. Figure 7 As shown, the lane line detection device 700 may include: a first determining unit 701, a second determining unit 702, a third determining unit 703 and a fourth determining unit 704.
[0103] The first determining unit 701 is used to perform four feature extractions on the acquired first feature map to determine the first image, the second image, the third image and the fourth image. The first image is a single-channel second feature map, the second image and the third image are (2M+2) channel second feature maps, and the fourth image is a W channel second feature map. The first feature map and the second feature map include lane lines, and W and M are positive integers.
[0104] The second determining unit 702 is used to determine N pixels containing lane line features based on the pixel value of each pixel in the first image, wherein each of the N pixels corresponds to a lane line. The third determining unit 703 is used to determine n1 second pixels containing lane line features within a first range based on (2M+2) first channel values of the first pixel of the second image, and to determine n2 second pixels within a second range of the third image based on (2M+2) second channel values of the first pixel of the third image. The first pixel is any pixel among N pixels, and n1 and n2 are integers greater than or equal to 0. The first (2M+1) first channel values and the first (2M+1) second channel values are used to indicate the probability that a pixel contains lane line features, the (2M+2)th first channel value is used to indicate the probability of expanding the first range, and the (2M+2)th second channel value is used to indicate the probability of expanding the second range. The fourth determining unit 704 is used to determine W target feature points of each pixel in N pixel groups based on the fourth image, wherein each pixel group includes (n1+n2) second pixels, and to determine N lane lines based on the W target feature points of each pixel in N pixel groups.
[0105] Optionally, the first pixel is located in the I-th row and J-th column of the second image. The third determining unit 703 is specifically used for: Starting from the (I-1)th row of the second image, determine the maximum channel value among the first (2M+1) first channel values in the (I-1)th row, and determine the second pixel of the (I-1)th row according to the channel identifier corresponding to the maximum channel value, the column number J and M of the first pixel; If the (2M+2)th first channel value in the (I-1)th row is greater than the first threshold, then the second pixel of the row above the (I-1)th row is determined.
[0106] Optionally, the first pixel is located in the I-th row and J-th column of the third image. The third determining unit 703 is specifically used for: Starting from the (I+1)th row of the third image, determine the maximum channel value among the first (2M+1) second channel values in the (I+1)th row, and determine the second pixel of the (I+1)th row based on the channel identifier corresponding to the maximum channel value, the column number J and M of the first pixel; If the (2M+2)th second channel value in the (I+1)th row is greater than the first threshold, then determine the second pixel of the next row in the (I+1)th row.
[0107] Optionally, the fourth determining unit 704 is further configured to determine L target lane lines from the N lane lines based on the first channel value and the second channel value corresponding to each pixel group, and the target feature points in each pixel group.
[0108] Optionally, the fourth determining unit 704 mentioned above is specifically used for: The confidence level of the lane line corresponding to each pixel group is determined based on the first (2M+1) first channel values and the first (2M+1) second channel values corresponding to each pixel group. Based on the confidence level of the lane line corresponding to each pixel group and the target feature points in each pixel group, determine L target lane lines from the N lane lines.
[0109] Optionally, the fourth determining unit 704 mentioned above is specifically used for: The maximum value of the first (2M+1) first channel values corresponding to each of the n1 second pixels in each pixel group is determined as the first target channel value; The maximum value of the first (2M+1) second channel values corresponding to each second pixel in each pixel group is determined as the second target channel value; The confidence level of the lane line corresponding to each pixel group is determined based on the average of the n1 first target channel values and the n2 second target channel values in each pixel group.
[0110] Optionally, the fourth determining unit 704 mentioned above is specifically used for: Determine the target distance between any two lane lines based on the target feature points in each pixel group; If the target distance between any two lane lines is greater than the second threshold, then any two lane lines are determined as target lane lines. If the target distance between any two lane lines is less than the second threshold, then the lane line with the higher confidence level among the two lane lines is determined as the target lane line.
[0111] Optionally, the fourth determining unit 704 mentioned above is specifically used for: Determine the target horizontal axis coordinates of target feature points in any two lane lines, where the target horizontal axis coordinates correspond to the same vertical axis coordinates. Determine the first distance between any two lane lines based on the x-axis coordinates of all targets; Determine the second distance between any two lane lines based on the starting horizontal axis coordinates of the target feature points of any two lane lines. Determine the third distance between any two lane lines based on the horizontal coordinates of the endpoints of the target feature points of any two lane lines. The maximum distance among the first, second, and third distances is determined as the target distance.
[0112] Optionally, the second determining unit 702 described above is specifically used for: Based on the W initial feature points of each pixel in the N pixel group of the fourth image, and the third channel value of each initial feature point, the W target feature points of each pixel are determined. The third channel value is used to indicate the difference between the horizontal axis coordinate of the midpoint of the pixel on the target image and each initial feature point in the pixel. The first feature map is obtained by feature extraction from the target image.
[0113] Optionally, the second determining unit 702 described above is specifically used for: When the pixel value of a pixel in the first image is greater than a third threshold, the pixel in the first image is determined to be a pixel containing lane line features.
[0114] Of course, the lane line detection device 700 provided in this embodiment of the invention includes, but is not limited to, the modules described above.
[0115] In actual implementation, the first determining unit 701, the second determining unit 702, the third determining unit 703, and the fourth determining unit 704 can be determined by... Figure 2 The processor 21 shown calls the program code in memory 22 to implement this. For the specific execution process, please refer to... Figures 3 to 5 The description of the lane line detection method shown is omitted here.
[0116] Another embodiment of the present invention provides a computer-readable storage medium storing computer instructions that, when executed on a lane detection device, cause the lane detection device to perform the various steps of the lane detection device in the method flow shown in the above method embodiment.
[0117] Another embodiment of the present invention provides a chip system applied to a lane line detection device. The chip system includes one or more interface circuits and one or more processors 21. The interface circuits and processors 21 are interconnected via wiring. The interface circuits are used to receive signals from a memory 22 of the lane line detection device and send the signals to the processors 21, the signals including computer instructions stored in the memory 22. When the processors 21 execute the computer instructions, the lane line detection device performs the various steps of the lane line detection device as shown in the method flow of the above method embodiment.
[0118] In another embodiment of the present invention, a computer program product is also provided, the computer program product including instructions that, when executed on a lane line detection device, cause the lane line detection device to perform the various steps performed by the lane line detection device in the method flow shown in the above method embodiment.
[0119] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented using software programs, implementation can be, in whole or in part, in the form of a computer program product. This computer program product includes one or more computer instructions. When these computer instructions are loaded and executed on a computer, all or part of the flow or function according to the embodiments of the present invention is generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, computer instructions can be transmitted from one website, computer, server, or data center to another via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to a computer or a data storage device containing one or more servers, data centers, etc., that can be integrated with the medium. The available media can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid-state disks, SSDs).
[0120] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions within the technical scope disclosed in the present invention should be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A method for detecting lane lines, characterized in that, include: The first feature map is subjected to four feature extractions to determine the first image, the second image, the third image and the fourth image. The first image is a single-channel second feature map, the second image and the third image are second feature maps with 2M+2 channels, and the fourth image is a second feature map with W channels. The first feature map and the second feature map include lane lines, and W and M are positive integers. Based on the pixel value of each pixel in the first image, N pixels containing lane line features are determined, and each of the N pixels corresponds to a lane line. The first pixel is located in row I and column J of the second image. Based on the 2M+2 first channel values of the first pixel in the second image, n1 second pixels containing lane line features are determined within a first range of the second image. This includes: starting from row I-1 of the second image, determining the maximum channel value among the first 2M+1 first channel values of row I-1, and determining the second pixel of row I-1 based on the channel identifier corresponding to the maximum channel value, the column number J and M of the first pixel; if the 2M+2 first channel values of row I-1 are greater than a first threshold, then determining the second pixel of the row above row I-1; wherein, the column number of the second pixel of row I-1 can be determined by the following formula: ; This indicates the column number of the second pixel in row I-1. This represents the channel identifier corresponding to the maximum channel value in row I-1, and ; The first pixel is located in row I and column J of the third image. Based on the 2M+2 second channel values of the first pixel in the third image, n2 second pixels are determined within a second range of the third image. This includes: starting from row I+1 of the third image, determining the largest channel value among the first 2M+1 second channel values of row I+1, and determining the second pixel of row I+1 based on the channel identifier corresponding to the largest channel value, the column number J of the first pixel, and M; if the 2M+2 second channel values of row I+1 are greater than a first threshold, then determining the second pixel of the next row in row I+1; the column number of the second pixel in row I+1 can be determined by the following formula: ; This indicates the column number of the second pixel in row (I+1). This represents the channel identifier corresponding to the maximum channel value in row I+1, and The first pixel is any pixel among N pixels, n1 and n2 are integers greater than or equal to 0, the first 2M+1 first channel values and the first 2M+1 second channel values are used to indicate the probability that a pixel contains lane line features, the 2M+2 first channel values are used to indicate the probability of expanding the first range, and the 2M+2 second channel values are used to indicate the probability of expanding the second range. Based on the fourth image, W target feature points are determined for each pixel in N pixel groups, and each pixel group includes n1+n2 second pixels; N lane lines are determined based on W target feature points of each pixel in N pixel groups.
2. The lane line detection method according to claim 1, characterized in that, The lane line detection method further includes: Based on the first 2M+1 first channel values and the first 2M+1 second channel values corresponding to each pixel group, and the target feature points in each pixel group, L target lane lines are determined from the N lane lines.
3. The lane line detection method according to claim 2, characterized in that, The step of determining L target lane lines from the N lane lines based on the first 2M+1 first channel values and the first 2M+1 second channel values corresponding to each pixel group, and the target feature points in each pixel group, includes: The confidence level of the lane line corresponding to each pixel group is determined based on the first 2M+1 first channel values and the first 2M+1 second channel values of each pixel group. Based on the confidence level of the lane line corresponding to each pixel group and the target feature points in each pixel group, L target lane lines are determined from the N lane lines.
4. The lane line detection method according to claim 3, characterized in that, The step of determining the confidence level of the lane line corresponding to each pixel group based on the first 2M+1 first channel values and the first 2M+1 second channel values of each pixel group includes: The maximum value of the first 2M+1 first channel values corresponding to each of the n1 second pixels in each pixel group is determined as the first target channel value; The maximum value of the first 2M+1 second channel values corresponding to each second pixel in each pixel group is determined as the second target channel value; The confidence level of the lane line corresponding to each pixel group is determined based on the average of the n1 first target channel values and the n2 second target channel values in each pixel group.
5. The lane line detection method according to claim 3, characterized in that, The step of determining L target lane lines from the N lane lines based on the confidence level of the lane line corresponding to each pixel group and the target feature points in each pixel group includes: Determine the target distance between any two lane lines based on the target feature points in each pixel group; If the target distance between any two lane lines is greater than the second threshold, then the two lane lines are determined as the target lane lines. If the target distance between any two lane lines is less than the second threshold, then the lane line with the higher confidence level among the two lane lines is determined as the target lane line.
6. The lane line detection method according to claim 5, characterized in that, The step of determining the target distance between any two lane lines based on the target feature points in each pixel group includes: Determine the target horizontal axis coordinates of target feature points in any two lane lines, wherein the target horizontal axis coordinates correspond to the same vertical axis coordinates. Determine the first distance between any two lane lines based on the x-axis coordinates of all targets; Determine the second distance between any two lane lines based on the starting horizontal axis coordinates of the target feature points of any two lane lines. Determine the third distance between any two lane lines based on the horizontal coordinates of the endpoints of the target feature points of any two lane lines. The maximum distance among the first distance, the second distance, and the third distance is determined as the target distance.
7. The lane line detection method according to claim 1, characterized in that, The step of determining N pixels containing lane line features based on the pixel value of each pixel in the first image includes: When the pixel value of a pixel in the first image is greater than a third threshold, the pixel in the first image is determined to be a pixel containing the lane line feature.
8. The lane line detection method according to claim 1, characterized in that, The step of determining W target feature points for each pixel in N pixel groups based on the fourth image includes: Based on the W initial feature points of each pixel in the N pixel group of the fourth image, and the third channel value of each initial feature point, W target feature points of each pixel are determined. The third channel value is used to indicate the difference in the horizontal axis coordinate between the mapping point of the midpoint of the pixel on the target image and each initial feature point in the pixel. The first feature map is obtained by feature extraction from the target image.
9. A lane line detection device, characterized in that, include: The first determining unit is used to perform four feature extractions on the acquired first feature map to determine the first image, the second image, the third image and the fourth image. The first image is a single-channel second feature map, the second image and the third image are 2M+2 channel second feature maps, and the fourth image is a W channel second feature map. The first feature map and the second feature map include lane lines, and W and M are positive integers. The second determining unit is used to determine N pixels containing lane line features based on the pixel value of each pixel in the first image, wherein each of the N pixels corresponds to a lane line. The third determining unit is configured to determine n1 second pixels containing lane line features within a first range of the second image, based on the first pixel being located in the I-th row and J-th column of the second image, according to the 2M+2 first channel values of the first pixel in the second image. This includes: starting from the (I-1)-th row of the second image, determining the largest channel value among the first 2M+1 first channel values of the (I-1)-th row, and determining the second pixel in the (I-1)-th row based on the channel identifier corresponding to the largest channel value, the column number J and M of the first pixel; if the 2M+2 first channel values of the (I-1)-th row are greater than a first threshold, then determining the second pixel in the row preceding the (I-1)-th row; wherein the column number of the second pixel in the (I-1)-th row can be determined by the following formula: ; This indicates the column number of the second pixel in row I-1. This represents the channel identifier corresponding to the maximum channel value in row I-1, and The first pixel is located in row I and column J of the third image. Based on the 2M+2 second channel values of the first pixel in the third image, n2 second pixels are determined within a second range of the third image. This includes: starting from row I+1 of the third image, determining the largest channel value among the first 2M+1 second channel values of row I+1, and determining the second pixel of row I+1 based on the channel identifier corresponding to the largest channel value, the column number J of the first pixel, and M; if the 2M+2 second channel values of row I+1 are greater than a first threshold, then determining the second pixel of the next row in row I+1; the column number of the second pixel in row I+1 can be determined by the following formula: ; This indicates the column number of the second pixel in row (I+1). This represents the channel identifier corresponding to the maximum channel value in row I+1, and The first pixel is any pixel among N pixels, n1 and n2 are integers greater than or equal to 0, the first 2M+1 first channel values and the first 2M+1 second channel values are used to indicate the probability that a pixel contains lane line features, the 2M+2 first channel values are used to indicate the probability of expanding the first range, and the 2M+2 second channel values are used to indicate the probability of expanding the second range. The fourth determining unit is used to determine W target feature points for each pixel in N pixel groups based on the fourth image, wherein each pixel group includes n1+n2 second pixels, and to determine N lane lines based on the W target feature points for each pixel in the N pixel groups.
10. A lane line detection device, characterized in that, The lane line detection device includes a processor and a memory; the memory is used to store computer program code, the computer program code including computer instructions; when the processor executes the computer instructions, the lane line detection device performs the lane line detection method as described in any one of claims 1 to 8.
11. A computer-readable storage medium, characterized in that, The device includes computer instructions that, when executed on the lane line detection device, cause the lane line detection device to perform the lane line detection method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Lane line detection method and device based on deep learning
CN112287912A
Lane line identification method and device, storage medium and electronic device
CN114241444A