CN112200884B - Lane line generation method and device - Google Patents

Lane line generation method and device Download PDF

Info

Publication number
CN112200884B
CN112200884B CN202010932366.8A CN202010932366A CN112200884B CN 112200884 B CN112200884 B CN 112200884B CN 202010932366 A CN202010932366 A CN 202010932366A CN 112200884 B CN112200884 B CN 112200884B
Authority
CN
China
Prior art keywords
point
center point
center
feature map
lane line
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010932366.8A
Other languages
Chinese (zh)
Other versions
CN112200884A (en
Inventor
郑幽娴
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Dahua Technology Co Ltd
Original Assignee
Zhejiang Dahua Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang Dahua Technology Co Ltd filed Critical Zhejiang Dahua Technology Co Ltd
Priority to CN202010932366.8A priority Critical patent/CN112200884B/en
Publication of CN112200884A publication Critical patent/CN112200884A/en
Application granted granted Critical
Publication of CN112200884B publication Critical patent/CN112200884B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/20Drawing from basic elements, e.g. lines or circles
    • G06T11/203Drawing of straight lines or curves
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • G06F18/2415Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on parametric or probabilistic models, e.g. based on likelihood ratio or false acceptance rate versus a false rejection rate
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/44Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/50Context or environment of the image
    • G06V20/56Context or environment of the image exterior to a vehicle by using sensors mounted on the vehicle
    • G06V20/588Recognition of the road, e.g. of lane markings; Recognition of the vehicle driving pattern in relation to the road

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • General Engineering & Computer Science (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Multimedia (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Mathematical Physics (AREA)
  • Computing Systems (AREA)
  • Evolutionary Biology (AREA)
  • Probability & Statistics with Applications (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Image Analysis (AREA)

Abstract

The invention discloses a lane line generating method and device, which are used for solving the problems that a method for acquiring key points of a lane line is not robust enough, the generated lane line is inaccurate, point processing calculation is complex and time consumption is high in the prior art. According to the embodiment of the invention, the type of the center point of the lane line and the position information of the center point are predicted by adopting the lane line generation model, when each pixel point in the lane line generation model prediction image is adopted as the center point, the distance and the angle between each key point and the center point on the lane line are directly output by the lane line generation model as the center point, and the distance and the angle between each key point and the center point on the lane line are directly output, so that the position information of the corresponding key point can be directly determined according to the determined position information of the target center point, the complexity of the point processing process is reduced, the target lane line can be accurately generated, and the lane line generation efficiency is effectively improved.

Description

Lane line generation method and device
Technical Field
The present invention relates to the field of image processing, and in particular, to a method and an apparatus for generating a lane line.
Background
With the continuous progress of society, the living standard is gradually improved, and vehicles are gradually increased for convenience. The current traffic service is developed rapidly, and the lane line detection is a basic module of all traffic related services, and the lane line in the detected image is output in the form of a line segment, so that the expansibility of the lane line related services is stronger. The key point detection can better detect key points such as a center point on the lane line, so that continuous lane lines which can be connected into line segments are formed.
In the prior art, the method for forming continuous lane lines by connecting through key point detection comprises the following steps:
method 1: the key points on the lane lines are obtained through a machine learning or traditional image processing feature transformation method, and slopes among the key points are stored. And clustering and matching the slopes to finally obtain all key points for lane line generation.
When the road surface image is complex and the image resolution is large, the clustering time is possibly long and the slope matching error is easy to occur, so that the method for acquiring the lane line key points is not robust enough.
Method 2: firstly, preprocessing such as shading illumination correction and filtering is carried out on an image, curve discretization processing is carried out on lane lines in the preprocessed image, all Hough straight lines in the image after the curve discretization processing are extracted, and the lane lines in the image are restored by using all Hough straight lines.
The disadvantage of this method is that the temporal and spatial complexity of restoring the lane line in the image using hough lines is high, and discontinuous line segments may be determined as continuous line segments when restoring the lane line in the image.
Method 3: regression of the target center point and the target contour point under a polar coordinate system, the regression comprising: the candidate center point and the points on the contour are sampled first, then, starting from the candidate center point, n rays are uniformly emitted onto the contour at the same angular interval Δθ (for example, n=36, Δθ=10°), and since the distance regression convolution layer has predicted the length of each ray, the target contour point can be determined from the predetermined angular interval and the predicted length of each ray.
The main disadvantage of this method is that when the key points of the lane line are obtained, the method of emitting rays from the central point to the target contour from a fixed angle interval is adopted, and emitting the outgoing lines from the same angle interval will generate too many points which have no meaning to the connection of the lane line, thus causing complex secondary processing.
Therefore, in the prior art, the lane line key point acquisition method based on the key points is not robust enough, the generated lane lines are inaccurate, and the point processing calculation is complex and time-consuming.
Disclosure of Invention
The invention provides a lane line generating method and device, which are used for solving the problems that a method for acquiring key points of a lane line is not robust enough, the generated lane line is inaccurate, point processing calculation is complex and time consumption is high in the prior art.
In a first aspect, the present invention provides a method for generating a lane line, the method comprising:
determining a first feature map of an input image through a backbone network in a lane line generation model;
Acquiring the probability that the pixel point on the image is the center point of each class and the probability that the pixel point on the image is the center point based on the first feature map through a center point branch in a lane line generation model; acquiring distances and angles between each key point and a central point when the pixel point on the image is taken as the central point based on the first feature map through a contour point regression branch in a lane line generation model;
Determining the category and position information of a target center point in an image according to the probability that the pixel point on the image is a center point of each category and the probability that the pixel point on the image is a center point, determining the distance and angle between each key point on a lane line and the target center point according to the distance and angle between each key point and the center point when the corresponding pixel point on the image is a center point, and determining the position information of each key point according to the target center point of each category and the distance and angle between each key point on the target center point and the lane line;
And determining a target lane line based on the determined position information of each key point.
The second aspect of the present invention also provides a lane line generating device, where the device includes:
The lane line generation model module is used for determining a first feature map of an input image through a main network in the lane line generation model; acquiring the probability that the pixel point on the image is the center point of each class and the probability that the pixel point on the image is the center point based on the first feature map through a center point branch in a lane line generation model; acquiring distances and angles between each key point and a central point when the pixel point on the image is taken as the central point based on the first feature map through a contour point regression branch in a lane line generation model;
the processing module is used for determining the category and the position information of the target center point in the image according to the probability that the pixel point on the image is a center point of each type and the probability that the pixel point on the image is a center point, determining the distance and the angle between each key point on the lane line and the target center point according to the distance and the angle between each key point on the lane line and the target center point when the corresponding pixel point on the image is a center point;
and the generation module is used for determining the target lane line based on the determined position information of each key point.
In a third aspect, the present invention also provides an electronic device, at least comprising a processor and a memory, the processor being configured to implement the steps of the lane line generating method according to any one of the above when executing a computer program stored in the memory.
In a fourth aspect, the present invention also provides a computer-readable storage medium storing a computer program which, when executed by a processor, implements the steps of the lane line generation method as described in any one of the above.
The invention provides a method and a device for generating lane lines, wherein the method comprises the following steps: determining a first feature map of an input image through a backbone network in a lane line generation model; acquiring the probability that the pixel point on the image is the center point of each class and the probability that the pixel point on the image is the center point based on the first feature map through a center point branch in a lane line generation model; acquiring distances and angles between each key point and a central point when the pixel point on the image is taken as the central point based on the first feature map through a contour point regression branch in a lane line generation model; determining the category and position information of a target center point in an image according to the probability that a pixel point on the image is a center point of each category and the probability that the pixel point is a center point of each category, determining the distance and angle between each key point on a lane line and the target center point according to the distance and angle between each key point on the lane line and the target center point when the corresponding pixel point on the image is the center point; and determining a target lane line based on the determined position information of each key point. According to the embodiment of the invention, the type of the center point of the lane line and the position information of the center point are predicted by adopting the lane line generation model, when each pixel point in the lane line generation model prediction image is adopted as the center point, the distance and the angle between each key point and the center point are calculated by adopting the lane line generation model, and when each pixel point is directly output as the center point, the distance and the angle between each key point and the center point are calculated by adopting the lane line generation model, so that the position information of the corresponding key point can be directly determined according to the determined position information of the target center point, the complexity of the point processing process is reduced, the target lane line can be accurately generated, and the lane line generation efficiency is effectively improved.
Drawings
In order to more clearly illustrate the technical solutions of the present invention, the drawings that are needed in the description of the embodiments will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic process diagram of a lane line generating method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of the positions of key points according to an embodiment of the present invention;
FIG. 3A is a schematic diagram illustrating a pixel as a center point according to an embodiment of the present invention;
FIG. 3B is a schematic view illustrating another pixel as a center point according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of a lane line generated according to an embodiment of the present invention;
FIG. 5 is a schematic diagram illustrating a detailed implementation process of the lane line generating method according to an embodiment of the present invention;
Fig. 6 is a schematic structural diagram of a lane line generating device according to an embodiment of the present invention;
fig. 7 is an electronic device provided in an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in further detail below with reference to the accompanying drawings, it being apparent that the described embodiments are only some, but not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
In order to improve the robustness of the generation of the key points of the lane lines, accurately generate the lane lines and enable the point processing calculation of the lane line generation method to be simple and time-consuming, the embodiment of the invention provides a lane line generation method and device.
Fig. 1 is a schematic diagram of a lane line generating process according to an embodiment of the present invention, where the process includes the following steps:
s101: and determining a first characteristic diagram of the input image through a backbone network in the lane line generation model.
The lane line generation method provided by the embodiment of the invention is applied to electronic equipment, and the electronic equipment can be intelligent equipment such as image acquisition equipment, PC or a server.
In order to accurately acquire key points on a lane line, the embodiment of the invention adopts a lane line generation model for detection. Specifically, the lane line generation model includes a backbone network, and after an image is input into the lane line generation model, the backbone network processes the image and outputs a first feature map of the image. The backbone network may use a common basic network, such as ResNet-50+fpn, but other networks are also possible.
S102: acquiring the probability that the pixel point on the image is the center point of each class and the probability that the pixel point on the image is the center point based on the first feature map through a center point branch in a lane line generation model; and acquiring the distance and angle between each key point and the central point when the corresponding pixel point on the image is taken as the central point based on the first feature map through a contour point regression branch in the lane line generation model.
In order to accurately acquire the position information of the key points contained in the image, in the embodiment of the invention, the center point in the lane line is firstly predicted, and when the center point is predicted, the category center point and the position information of the center point can be predicted, because the lane line category comprises: the class center points on the lane lines in the embodiment of the present invention refer to the center points of the lane lines of different classes, and the center points of the lane lines in the embodiment of the present invention are the center of gravity of the lane lines. In addition, since most of the pixels in the image are background pixels of the lane lines, in the embodiment of the present invention, when determining each pixel in the image, the probability that the pixel is the background pixel and is the center point of each category may be determined.
In order to more accurately predict the category center point and the position information of the center point, in the embodiment of the invention, the center point branch of the model is generated through the lane line, the corresponding feature map is obtained based on the first feature map, the probability that each pixel point in the image is the center point of each category is determined according to the feature map, and the probability that each pixel point in the image is the center point can be determined based on the feature map. Specifically, according to the feature map, the probability that each pixel point in the image is a background pixel point and the probability that each pixel point is a center point of each class can be determined. In embodiments of the present invention the center point branch comprises at least one convolution layer, and in general the center point branch may comprise a plurality of convolution layers.
In order to more accurately predict the distance and angle between each key point and the center point when the pixel point in the image is used as the center point, in the embodiment of the invention, the contour point regression branch of the model is generated through the lane line, the corresponding feature map is obtained based on the first feature map, and the distance and angle between each key point and the center point when each pixel point in the image is used as the center point are determined according to the feature map. In the embodiment of the present invention, the contour point regression branch includes at least one convolution layer, and in general, the contour point regression branch may include a plurality of convolution layers.
And S103, determining the category and position information of the target center point in the image according to the probability that the pixel point on the image is a center point of each type and the probability that the pixel point is a center point of each type, determining the distance and angle between each key point on the lane line and the target center point according to the distance and angle between each key point on the lane line and the target center point when the corresponding pixel point on the image is a center point, and determining the position information of each key point according to the target center point of each category and the distance and angle between each key point on the lane line and the target center point.
In the embodiment of the invention, in order to accurately obtain the position information of each key point, the final position information of each key point is obtained through point processing. Therefore, the lane line generation model outputs the probability that the pixel point on the image is a center point of each category or is background and the probability that the pixel point is the center point, wherein each pixel point in the image corresponds to the probability that each category of the center point and is the probability that the pixel point is background, and each pixel point also has the probability that the pixel point is the center point. The method can obtain the probability product of each pixel point in the image as the center point of each category, obtain the probability product value with the highest score of each feature point in all probability products, if the probability product value corresponds to the background pixel point, judge the pixel point in the image corresponding to the feature point as the background pixel point, if the probability product value corresponds to the category center point, determine the category center point of the lane line in the image according to the category center point corresponding to the probability product value, and determine the position information of the target center point of the lane line of the category in the image.
And according to the determined position information of the target center point in the image, when the corresponding position of the target center point of the image, which is obtained by taking the corresponding feature image obtained by the image through the contour point regression branch, represents the point as the center point, the distance and the angle between each key point and the center point are calculated, and the position information of the key point is restored according to the position information of the center point and the distance and the angle between each key point and the center point.
In the embodiment of the invention, the positions of the central point and the key points are represented based on the distance and the angle in the polar coordinate system, so that the polar coordinate system of the corresponding target can be determined because the position information of the central point in the image is determined, and the coordinates of each key point in the polar coordinate system can be determined based on the distance and the angle because the distance and the angle between each key point and the central point are also determined.
In the embodiment of the invention, the distance between each key point and the central point is the polar coordinate distance between each key point and the central point, and the angle between each key point and the central point is the polar coordinate angle between each key point and the central point. After the position information of the target center point is determined, namely the position of the polar coordinate pole is determined, and the coordinates of each key point under the Cartesian coordinate system can be determined because the polar coordinate distance and the polar coordinate angle between each key point and the target center point are known.
When predicting the distance and angle between each key point and the central point, the method is determined based on a polar coordinate system. Because the angle regression task is simpler under the polar coordinates, the target integrity learning is stronger than the Cartesian coordinates, the positioning is more accurate, the complexity of the subsequent connection key points is greatly reduced, and the lane lines of complex scenes can be better processed.
The location information of the center point is known, and the location information of the key point is determined according to the distance and the angle between each key point and the center point, which are not described herein. The conversion of the polar coordinate system into the cartesian coordinate system is prior art and will not be described in detail here.
S104: and determining a target lane line based on the determined position information of each key point.
After the position information of each key point in the image is determined, determining an auxiliary key point positioned on the central line of the lane line according to the position information of each key point, and sequentially connecting the central point positioned on the central line of the lane line with the auxiliary key point to obtain the target lane line.
According to the embodiment of the invention, the type of the center point of the lane line and the position information of the center point are predicted by adopting the lane line generation model, when each pixel point in the lane line generation model prediction image is adopted as the center point, the distance and the angle between each key point and the center point on the lane line are calculated, and when each pixel point is directly output by the lane line generation model as the center point, the distance and the angle between each key point and the center point on the lane line can be directly determined according to the determined position information of the target center point, so that the complexity of the point processing process is reduced, the target lane line can be accurately generated, and the lane line generation efficiency is effectively improved.
Example 2:
In order to generate the target lane line more accurately, in the embodiment of the present invention, the category center point includes at least one of the following:
A stop line center point, a white solid line center point, a white dashed line center point, a yellow solid line center point, a yellow dashed line center point, a road shoulder center point, a guardrail center point, and a drain line center point.
In the embodiment of the invention, each pixel point in the image can be the center point of different types of lane lines, namely, a stop line center point, a white solid line center point, a white dotted line center point, a yellow solid line center point, a yellow dotted line center point, a road shoulder center point, a guardrail center point, a guide line center point and the like, wherein the center point of a lane line refers to the center of gravity of the lane line.
In order to accurately generate the target lane line, on the basis of the above embodiment, in the embodiment of the present invention, the key points include: auxiliary key points which are equidistantly sampled on the center line of the lane line are arranged on the end points of the lane line in the image.
The embodiment of the invention optimizes the lane line key point detection task based on PolarMask frames, is similar to PolarMask, realizes the lane line key point detection task in polar coordinates, but is different from a method of transmitting rays from a central point to a target contour through a fixed angle by PolarMask, and increases the support of a curve lane by taking the four end points of the lane line as key points of regression learning and using the central point of an actual lane line and adding auxiliary key points sampled equidistantly on the central line because most of lane lines have four end points of an upper left corner, an upper right corner, a lower left corner and a lower right corner due to the fact that most of lane lines are relatively fixed in shape. The auxiliary key points are obtained by equidistant sampling on the central line, for example, 1/4 point and 3/4 point on the central line can be used as auxiliary points, and also 1/6 point, 2/6 point, 4/6 point and 5/6 point on the central line can be used as auxiliary points, the number of the auxiliary points can be increased or reduced according to the needs, and a plurality of the auxiliary points can be used as auxiliary points, so that the auxiliary points can be flexibly selected according to the needs, and the auxiliary key points are not limited.
Fig. 2 is a schematic diagram of the positions of key points provided in the embodiment of the present invention, in fig. 2, four end points of an upper left corner, an upper right corner, a lower left corner and a lower right corner are end point key points, the middle point is the center point of the lane line, that is, the center of the lane line, and in fig. 2, two points 1/4 and 3/4 on the center line are selected as auxiliary key points.
Example 3:
In order to accurately acquire the position information of the key point in the lane line, in the embodiment of the present invention, the acquiring, based on the first feature map, the probability that the pixel point on the image is the center point of each class and the probability that the pixel point is the center point of each class includes:
A central point branch head of the model is generated through a lane line, and a central point feature map is obtained based on the first feature map;
A central point classification layer of a model is generated through a lane line, and a central point classification feature map is obtained based on the central point feature map, wherein each feature point on the central point classification feature map represents the probability that the corresponding pixel point on the image is a background pixel point and the probability that the corresponding pixel point is a central point of each class;
And generating a polar center layer of the model through the lane lines, and acquiring a polar center feature map based on the center point feature map, wherein each feature point on the polar center feature map represents the probability that the corresponding pixel point on the image is the center point.
The center point branch of the lane line generation model in the embodiment of the invention comprises a center point branch head, a center point classification layer and a polar center layer. The center point classification layer and the polar center layer are respectively connected with the center point branch heads and do not interfere with each other.
In order to extract a deeper feature map suitable for a center point task, the lane line generation model includes a center point branch head, wherein the center point branch head is a convolution layer, the center point branch head is connected with a backbone network, and when the backbone network outputs a first feature map, the first feature map is transmitted to the center point branch head, the center point branch head carries out convolution processing on the first feature map, and the center point branch head outputs a deeper center point feature map suitable for the center point task.
In the embodiment of the invention, in order to more accurately predict the category center point and the position information of the center point, the center point branch head carries out convolution processing on the first feature map to obtain the center point feature map, and then the center point feature map is respectively output to the center point classification layer and the polar center layer.
The central point classification layer is also a convolution layer, after the central point classification layer receives the central point feature image, the central point feature image is subjected to convolution processing, and the central point classification feature image is output.
The polar center layer is also a convolution layer, after the polar center layer receives the central point feature map, the central point feature map is subjected to convolution processing, and the polar center feature map is output, and in the embodiment of the invention, the number of channels of the polar center feature map is 1, because the feature points on the polar center feature map correspond to the pixel points on the image, the probability that the corresponding pixel points on the image are the central points can be determined based on each feature point on the polar center feature map.
In order to accurately acquire the position information of the key points of the lane lines, in the embodiments of the present invention, when the corresponding pixel points on the image are acquired as the center points based on the first feature map by the regression branches of the contour points in the lane line generation model, the distances and angles between the key points and the center points include:
Acquiring a contour point branch feature map based on the first feature map through a contour point regression head in a lane line generation model;
Generating a distance regression layer of the model through a lane line, and acquiring a distance regression feature map based on the contour point branch feature map, wherein each feature point on the distance regression feature map represents the distance between each key point and the center point on the lane line when the corresponding pixel point on the image is the center point;
And an angle regression layer of the model is generated through the lane line, and an angle regression feature map is obtained based on the contour point classification feature map, wherein each feature point on the angle regression feature map represents the angle between each key point and the center point on the lane line when the corresponding pixel point on the image is the center point.
In the embodiment of the invention, the contour point regression branch of the lane line generation model comprises a contour point regression head, a distance regression layer and an angle regression layer. The distance regression layer and the angle regression layer are respectively connected with the contour point regression head and do not interfere with each other.
In order to extract a deeper feature map suitable for a contour point task, the lane line generation model comprises a contour point regression head, wherein the contour point regression head is a convolution layer, the connection of the contour point regression head and a main network is not interfered with a central point branch, after the main network outputs a first feature map, the first feature map is transmitted to the contour point regression head, the contour point regression head carries out convolution processing on the first feature map, and the contour point feature map suitable for the contour point task with the deeper depth is output.
In the embodiment of the invention, in order to accurately predict the distance and the angle between each key point and the center point on the lane line when the pixel point in the image is taken as the center point, the contour point regression head carries out convolution processing on the first feature map, and after the contour point feature map is obtained, the contour point feature map is respectively output to the distance regression layer and the angle regression layer.
The distance regression layer is also a convolution layer, after the distance regression layer receives the profile point feature images, the distance regression layer carries out convolution processing on the profile point feature images and outputs the distance regression feature images, and in the embodiment of the invention, the number of channels of the distance regression feature images is the same as the number of key points, because the feature points on the distance regression feature images correspond to the pixel points on the images, the distance between each key point and the center point can be determined based on each feature point on the distance regression feature images when the corresponding pixel point on the images is the center point.
The angle regression layer is also a convolution layer, after the angle regression layer receives the profile point feature map, the angle regression layer carries out convolution processing on the profile point feature map and outputs the angle regression feature map, and in the embodiment of the invention, the number of channels of the angle regression feature map is the same as the number of key points, because the feature points on the angle regression feature map correspond to the pixel points on the image, based on each feature point on the angle regression feature map, the angles between each key point and the center point can be determined when the corresponding pixel point on the image is the center point.
Example 4:
In order to accurately predict the position information of each key point on the lane line, in the above embodiments, in the embodiments of the present invention, determining the category and the position information of the target center point in the image according to the probability that the pixel point on the image is the center point of each class and the probability that the pixel point is the center point includes:
multiplying the central point classification feature map with the polar center feature map, and determining the score of each channel corresponding to each feature point in the feature map obtained after multiplication;
and determining the category and position information of each target center point in the image according to the channel with the highest score of each feature point.
In the embodiment of the invention, in order to accurately obtain the position information of each key point on the lane line, the obtained feature maps are processed by adopting point processing, the center point classification feature map output by the lane line generation model is identical to the polar center feature map in width and height, the channel number is different, the center point classification feature map is multiplied by the corresponding feature point at the same position of the polar center feature map, specifically, the channel value of each feature point in the center point classification feature map is multiplied by the channel value of the corresponding feature point in the polar center feature map, the multiplication feature map is obtained, the width and height of the multiplication feature map are identical to the center point classification feature map and the polar center feature map, the channel number of the multiplication feature map is identical to the channel number of the center point classification feature map, namely, the channel values of the multiplication feature map are the channel values of the feature points in the center point classification feature map and the channel values of the corresponding feature points in the polar center point classification feature map.
In order to accurately determine whether a pixel point in an original image is a center point and which type of center point, based on the above embodiment, determining the type and position information of each target center point in the image according to the channel with the highest score of each feature point in the embodiment of the present invention includes:
For each feature point, if the channel with the highest score of the feature point is a background channel, determining the pixel point in the image corresponding to the feature point as a background pixel point; if the channel with the highest score of the feature point is the channel with any type of center point, determining the pixel point in the image corresponding to the feature point as the target center point of the type.
When the center point and the position information of the class of the lane line are determined, according to the scores of all channels in the multiplication feature map, the channel with the highest score of each feature point is taken, if the channel corresponding to the channel with the highest score of the feature point is a background channel, the pixel point in the image corresponding to the feature point is determined to be the background pixel point, if the channel corresponding to the channel with the highest score of the feature point is a non-background class channel, the class of the target center point in the image is determined according to the channel in the class feature map of the center point corresponding to the channel of the feature point, and the position information of the target center point in the image is determined according to the position information of the feature point.
Fig. 3A and fig. 3B are schematic diagrams comparing two different pixel points provided in the embodiment of the present invention when the two different pixel points are taken as the center point, for example, when the middle-most point shown in fig. 3A is taken as the center point, four key points in the upper left corner, the upper right corner, the lower left corner and the lower right corner (the upper lower left and right shown in the figure) and the distances from the two auxiliary points closer to the center point are relatively average, and when the middle-most point in the 3B is taken as the center point, there are four key points in the upper left corner, the upper right corner, the lower left corner and the lower right corner (the upper lower left and right shown in the figure) and the distances from the two auxiliary points closer to the center point are greater, in this case, the center point in fig. 3A has the highest score channel in the corresponding feature point in the multiplication feature point as the non-background channel, and the center point in fig. 3B has the highest score in the corresponding feature point in the multiplication feature point as the background channel, namely, in this case, the pixel in this case the center point in the figure 3A pixel is determined as the background point is determined as the pixel in the class of the pixel is determined as the center point.
According to the position information of the target feature point in the multiplied feature map, the position information of the feature point corresponding to the central point classification feature map and the polar center feature map can be obtained, the values of all channels on the feature points in the distance regression feature map and the angle regression feature map corresponding to the target feature point are taken, namely, when all the pixel points corresponding to the feature point on the distance regression feature map and the angle regression convolution feature map corresponding to the target center point are taken as the center points, the distance and the angle between all the key points and the center point can be determined according to the position information of the target center point and the distance and the angle between all the key points and the center point.
The specific known positions of the center points, and the determining the position information of each key point according to the distance and the angle between each key point and the center point are the prior art, and are not described herein.
Example 5:
In order to accurately generate the target lane line, on the basis of the above embodiments, in the embodiment of the present invention, determining the target lane line based on the determined position information of each key point includes:
according to the determined position information of each key point, two pairs of key points positioned at two ends of the edge of the lane line are determined;
determining auxiliary key points on a corresponding central axis according to each pair of key points;
And sequentially connecting the determined other key points with the auxiliary key points to generate a central axis of the lane line, and determining the target lane line.
In order to accurately generate a lane line target, after determining position information of each key point in an image, the embodiment of the invention respectively takes midpoints of two pairs of key points positioned at two ends of the edge of a lane line, determines the two midpoints as auxiliary key points on a central line, sequentially connects other key points with the auxiliary key points on the central point, and generates a central axis of the lane line, thereby obtaining the target lane line.
Fig. 4 is a schematic diagram of a generated lane line according to an embodiment of the present invention. As shown in fig. 4, four end points of the upper left corner, the lower left corner, the upper right corner, the lower right corner, the middle-most center point and two auxiliary points are the positions of the key points on the finally determined lane line, and the position information of the key points of the four end points is known to determine the auxiliary key points on a corresponding central axis according to the position information of the key points of the two end points on the upper side of the lane line and the key points of the two end points on the lower side of the lane line, namely, the auxiliary key points on the corresponding central axis are determined, and the lane line is finally generated.
Example 6:
In the embodiment of the invention, in order to accurately generate the target lane line, the tasks of lane line generation are converted into four tasks of classification of the center point, the position of the center point, the distance and angle between the center point and each key point.
The lane line generating process provided by the embodiment of the invention is described in detail below with reference to a specific embodiment.
Fig. 5 is a schematic diagram of a detailed implementation process of the lane line generating method according to an embodiment of the present invention, where the process includes:
in fig. 5, the backbone network, the central point branching head, the contour point regression head, the central point classification layer, the polar center layer, the distance regression layer and the angle regression layer all belong to the lane line generation model.
Firstly, a backbone network in a model is generated through lane lines, and a first feature map of an input image is determined;
The method comprises the steps of obtaining a center point feature map through a center point branch head of a lane line generation model based on a first feature map, obtaining a center point classification layer of the lane line generation model based on the center point feature map, obtaining a center point classification feature map based on the center point feature map, wherein each feature point on the center point classification feature map represents the probability that a corresponding pixel point on an image is a background pixel point and the probability that the corresponding pixel point on the image is a center point of each class, and obtaining a polar center feature map based on the center point feature map through a polar center layer of the lane line generation model.
And acquiring a contour point feature map through a contour point regression head in a lane line generation model based on the first feature map, acquiring a distance regression layer of the lane line generation model based on the contour point feature map, and acquiring a distance regression feature map, wherein each feature point on the distance regression feature map represents the distance between each key point on the lane line and the center point when the corresponding pixel point on the image is the center point, and acquiring an angle regression feature map based on the contour point feature map by using the angle regression layer of the lane line generation model, wherein each feature point on the angle regression feature map represents the angle between each key point on the lane line and the center point when the corresponding pixel point on the image is the center point.
Multiplying the central point classification feature map with the polar center feature map, determining the scores of channels corresponding to the feature points in the feature map obtained after multiplication, wherein each channel corresponds to a class center point and a background pixel point one by one, and determining the class and position information of each target center point in the image according to the channel with the highest score of each feature point as the channel of any class center point; and according to the position of each target center point determined on the image, taking the distance and angle between each key point and the center point of the corresponding feature map obtained by the image through the regression branch of the contour point when the point is the center point, and determining the position information of the key point according to the position information of each center point and the distance and angle between each key point corresponding to each center point and the center point, so as to obtain the position information of each key point in the image.
And determining a target lane line based on the determined position information of each key point.
Example 7:
In order to accurately predict the category and position information of the center point of the lane line and the distance and angle between each key point of the lane and the center point, on the basis of the above embodiment, in the embodiment of the present invention, the training process of the lane line generation model includes:
Acquiring any sample image and sample image label in a sample training set, wherein the sample image label corresponds to a sample center point category information label, a sample center point position information label, a sample key point distance label and a sample key point distance center point angle label;
Determining a second feature map of the input image through a backbone network in the lane line generation model;
Acquiring the probability that each feature point on the second feature map is a center point of each class and the probability that each feature point on the second feature map is a center point based on the second feature map through a center point branch in the lane line generation model; acquiring the distance and angle between each key point and the center point when each feature point on the second feature map is the center point based on the second feature map through a contour point regression branch in the lane line generation model;
Determining a loss value according to the probability that each feature point on the second feature map is a center point of each class and the sample center point class information label, the probability that each feature point on the second feature map is a center point and the sample center point position information label, the distance between each key point and the center point when each feature point on the second feature map is a center point and the distance label between each sample key point and the center point, and the angles between each key point and the center point and the sample key point and the angle label between each sample key point and the center point when each feature point on the second feature map is a center point;
and training each parameter in the lane line generation model according to the loss value.
In order to realize the training of the lane line generation model, a sample training set for training is stored in the embodiment of the invention, and sample images in the sample training set comprise images of lane lines with different categories, different lengths and different complexity.
Specifically, the lane line generation model includes a backbone network, and after an image is input into the lane line generation model, the backbone network processes the image and outputs a second feature map of the image.
In the embodiment of the invention, the center point in the image is firstly predicted, when the center point is predicted, a center point branch in the model is generated through the lane line, the center point classification feature map and the polar center feature map are obtained based on the second feature map, and the probability that each pixel point in the image is a background pixel point and the probability that each pixel point is a center point of each class and the probability that each pixel point in the image is a center point are determined according to the center point classification feature map and the polar center feature map.
In order to more accurately predict the distance and angle between the center point and each key point when the pixel point in the image is used as the center point, in the embodiment of the invention, the contour point regression branch of the model is generated through the lane line, the distance regression feature map and the angle regression feature map are obtained based on the second feature map, and the distance and angle between each key point and the center point when each pixel point in the image is used as the center point are determined according to the distance regression feature map and the angle regression feature map.
The detailed descriptions of the feature diagrams have been specifically described in the above embodiments, and are not repeated herein.
When the lane line generating model is trained, when the preset condition is met, the trained lane line generating model is obtained. The preset condition may be that after a model training is generated by using a sample image in a sample training set through an original lane line, probability that each feature point on a second feature map is a center point of each class and a sample center point class information label are obtained, the probability that each feature point on the second feature map is a center point and a sample center point position information label, when each feature point on the second feature map is a center point, the distance between each key point and the center point and the distance label between each key point and the center point of the sample image are obtained, and when each feature point on the second feature map is a center point, the angle between each key point and the center point and the loss of the angle label between each key point and the center point are within an error range; or the iteration number of training the original lane line generation model reaches the set maximum iteration number. Specific embodiments of the invention are not limited in this regard.
Specifically, the probability that each feature point is a center point of each class and the sample center point class information label on the second feature map can be studied and trained through Focal loss, the probability that each feature point is a center point and the sample center point position information label on the second feature map can be studied and trained through cross entropy loss, the distance between each key point and the center point when each feature point is a center point and the distance label between each sample key point and the center point can be studied and trained through IoU loss, and the angle between each key point and the center point when each feature point is a center point and the angle label between each sample key point and the center point when each feature point is a center point on the second feature map can be studied and trained through smoth-L1 loss.
Example 8:
Fig. 6 is a schematic structural diagram of a lane line generating apparatus according to an embodiment of the present invention, where the apparatus includes:
the lane line generation model module 601 is configured to determine a first feature map of an input image through a backbone network in a lane line generation model; acquiring the probability that the pixel point on the image is the center point of each class and the probability that the pixel point on the image is the center point based on the first feature map through a center point branch in a lane line generation model; acquiring distances and angles between each key point and a central point when the pixel point on the image is taken as the central point based on the first feature map through a contour point regression branch in a lane line generation model;
The processing module 602 is configured to determine category and position information of a target center point in the image according to the probability that a pixel point on the image is a center point of each category and the probability that the pixel point is a center point, determine a distance and an angle between each key point on a lane line and the target center point according to a distance and an angle between each key point on the lane line and the target center point when the corresponding pixel point on the image is the center point, and determine position information of each key point according to the target center point of each category and the distance and the angle between each key point on the lane line and the target center point;
A generating module 603, configured to determine a target lane line based on the determined location information of each key point.
In one possible implementation manner, the lane line generating model module 601 is specifically configured to obtain a center point feature map based on the first feature map through a center point branching head of a lane line generating model; a central point classification layer of a model is generated through a lane line, and a central point classification feature map is obtained based on the central point feature map, wherein each feature point on the central point classification feature map represents the probability that a corresponding pixel point on the image is a background pixel point and the probability that the corresponding pixel point is a central point of each class; and generating a polar center layer of the model through the lane lines, and acquiring a polar center feature map based on the center point feature map, wherein each feature point on the polar center feature map represents the probability that the corresponding pixel point on the image is the center point.
In a possible implementation manner, the lane line generating model module 601 is specifically further configured to obtain a contour point feature map based on the first feature map through a contour point regression head in a lane line generating model; obtaining a distance regression feature map based on the contour point feature map by a distance regression layer of a lane line generation model, wherein each feature point on the distance regression feature map represents the distance between each key point and the center point on the lane line when the corresponding pixel point on the image is the center point; and generating an angle regression layer of the model through the lane line, and acquiring an angle regression feature map based on the contour point feature map, wherein each feature point on the angle regression feature map represents the angle between each key point and the center point on the lane line when the corresponding pixel point on the image is the center point.
In a possible implementation manner, the processing module 602 is specifically configured to multiply the central point classification feature map with the polar center feature map, and determine the score of each channel corresponding to each feature point in the feature map obtained by multiplying; and determining the category and position information of each target center point in the image according to the channel with the highest score of each feature point.
In a possible implementation manner, the processing module 602 is specifically further configured to determine, for each feature point, if a channel with a highest score of the feature point is a background channel, a pixel point in an image corresponding to the feature point as a background pixel point; if the channel with the highest score of the feature point is the channel with any type of center point, determining the pixel point in the image corresponding to the feature point as the target center point of the type.
In a possible implementation manner, the generating module 603 is specifically configured to determine two pairs of key points located at two ends of the edge of the lane line according to the determined location information of each key point; determining auxiliary key points on a corresponding central axis according to each pair of key points; and sequentially connecting the determined other key points with the auxiliary key points to generate a central axis of the lane line, and determining the target lane line.
The apparatus further comprises:
The training module is used for acquiring any sample image and sample image label in a sample training set, wherein the sample image label corresponds to a sample center point category information label, a sample center point position information label, a sample key point distance label and a sample key point distance center point angle label; determining a second feature map of the input image through a backbone network in the lane line generation model; acquiring the probability that each feature point on the second feature map is a center point of each class and the probability that each feature point on the second feature map is a center point based on the second feature map through a center point branch in the lane line generation model; acquiring the distance and angle between each key point and the center point when each feature point on the second feature map is the center point based on the second feature map through a contour point regression branch in the lane line generation model; determining a loss value according to the probability that each feature point on the second feature map is a center point of each class and the sample center point class information label, the probability that each feature point on the second feature map is a center point and the sample center point position information label, the distance between each key point and the center point when each feature point on the second feature map is a center point and the distance label between each sample key point and the center point, and the angles between each key point and the center point and the sample key point and the angle label between each sample key point and the center point when each feature point on the second feature map is a center point; and training each parameter in the lane line generation model according to the loss value.
According to the embodiment of the invention, the type of the center point of the lane line and the position information of the center point are predicted by adopting the lane line generation model, when each pixel point in the lane line generation model prediction image is adopted as the center point, the distance and the angle between each key point and the center point on the lane line are calculated, and when each pixel point is directly output by the lane line generation model as the center point, the distance and the angle between each key point and the center point on the lane line can be directly determined according to the determined position information of the target center point, the complexity of the point processing process is reduced, the lane line can be accurately generated, and the lane line generation efficiency is effectively improved.
Example 9:
On the basis of the above embodiments, the embodiment of the present invention further provides an electronic device, as shown in fig. 7, including: the device comprises a processor 701, a communication interface 702, a memory 703 and a communication bus 704, wherein the processor 701, the communication interface 702 and the memory 703 are in communication with each other through the communication bus 704.
The memory 703 has stored therein a computer program which, when executed by the processor 701, causes the processor 701 to perform the steps of:
determining a first feature map of an input image through a backbone network in a lane line generation model;
Acquiring the probability that the pixel point on the image is the center point of each class and the probability that the pixel point on the image is the center point based on the first feature map through a center point branch in a lane line generation model; acquiring distances and angles between each key point and a central point when the pixel point on the image is taken as the central point based on the first feature map through a contour point regression branch in a lane line generation model;
Determining the category and position information of a target center point in an image according to the probability that a pixel point on the image is a center point of each category and the probability that the pixel point is a center point of each category, determining the distance and angle between each key point on a lane line and the target center point according to the distance and angle between each key point on the lane line and the target center point when the corresponding pixel point on the image is the center point;
And determining a target lane line based on the determined position information of each key point.
Further, the processor 701 is further configured to generate a center point branching head of the model through a lane line, and acquire a center point feature map based on the first feature map; a central point classification layer of a model is generated through a lane line, and a central point classification feature map is obtained based on the central point feature map, wherein each feature point on the central point classification feature map represents the probability that a corresponding pixel point on the image is a background pixel point and the probability that the corresponding pixel point is a central point of each class; and generating a polar center layer of the model through the lane lines, and acquiring a polar center feature map based on the center point feature map, wherein each feature point on the polar center feature map represents the probability that the corresponding pixel point on the image is the center point.
Further, the processor 701 is further configured to generate, by using a lane line, a contour point regression head in the model, and obtain a contour point feature map based on the first feature map; obtaining a distance regression feature map based on the contour point feature map by a distance regression layer of a lane line generation model, wherein each feature point on the distance regression feature map represents the distance between each key point and the center point on the lane line when the corresponding pixel point on the image is the center point; and generating an angle regression layer of the model through the lane line, and acquiring an angle regression feature map based on the contour point feature map, wherein each feature point on the angle regression feature map represents the angle between each key point and the center point on the lane line when the corresponding pixel point on the image is the center point.
Further, the processor 701 is further configured to multiply the central point classification feature map with the polar center feature map, and determine scores of channels corresponding to feature points in the feature map obtained by multiplying the central point classification feature map with the polar center feature map; and determining the category and position information of each target center point in the image according to the channel with the highest score of each feature point.
Further, the processor 701 is further configured to determine, for each feature point, if a channel with a highest score of the feature point is a background channel, that a pixel point in an image corresponding to the feature point is a background pixel point; if the channel with the highest score of the feature point is the channel with any type of center point, determining the pixel point in the image corresponding to the feature point as the target center point of the type.
Further, the processor 701 is further configured to determine two pairs of key points located at two ends of the edge of the lane line according to the determined location information of each key point; determining auxiliary key points on a corresponding central axis according to each pair of key points; and sequentially connecting the determined other key points with the auxiliary key points to generate a central axis of the lane line, and determining the target lane line.
Further, the processor 701 is further configured to obtain any sample image and a sample image tag in the sample training set, where the sample image tag corresponds to a sample center point category information tag, a sample center point location information tag, a sample key point distance tag, and a sample key point distance center point angle tag; determining a second feature map of the input image through a backbone network in the lane line generation model; acquiring the probability that each feature point on the second feature map is a center point of each class and the probability that each feature point on the second feature map is a center point based on the second feature map through a center point branch in the lane line generation model; acquiring the distance and angle between each key point and the center point when each feature point on the second feature map is the center point based on the second feature map through a contour point regression branch in the lane line generation model; determining a loss value according to the probability that each feature point on the second feature map is a center point of each class and the sample center point class information label, the probability that each feature point on the second feature map is a center point and the sample center point position information label, the distance between each key point and the center point when each feature point on the second feature map is a center point and the distance label between each sample key point and the center point, and the angles between each key point and the center point and the sample key point and the angle label between each sample key point and the center point when each feature point on the second feature map is a center point; and training each parameter in the lane line generation model according to the loss value.
The communication bus mentioned by the server may be a peripheral component interconnect standard (PERIPHERAL COMPONENT INTERCONNECT, PCI) bus or an extended industry standard architecture (Extended Industry Standard Architecture, EISA) bus, etc. The communication bus may be classified as an address bus, a data bus, a control bus, or the like. For ease of illustration, the figures are shown with only one bold line, but not with only one bus or one type of bus.
The communication interface 702 is used for communication between the electronic device and other devices described above.
The Memory may include random access Memory (Random Access Memory, RAM) or may include Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the aforementioned processor.
The processor may be a general-purpose processor, including a central processing unit, a network processor (Network Processor, NP), etc.; but also digital instruction processors (DIGITAL SIGNAL Processing units, DSPs), application specific integrated circuits, field programmable gate arrays or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
Example 10:
On the basis of the above embodiments, the embodiments of the present invention further provide a computer readable storage medium having stored therein a computer program executable by an electronic device, which when run on the electronic device, causes the electronic device to perform the steps of:
The memory has stored therein a computer program which, when executed by the processor, causes the processor to perform the steps of:
determining a first feature map of an input image through a backbone network in a lane line generation model;
Acquiring the probability that the pixel point on the image is the center point of each class and the probability that the pixel point on the image is the center point based on the first feature map through a center point branch in a lane line generation model; acquiring distances and angles between each key point and a central point when the pixel point on the image is taken as the central point based on the first feature map through a contour point regression branch in a lane line generation model;
Determining the category and position information of a target center point in an image according to the probability that a pixel point on the image is a center point of each category and the probability that the pixel point is a center point of each category, determining the distance and angle between each key point on a lane line and the target center point according to the distance and angle between each key point on the lane line and the target center point when the corresponding pixel point on the image is the center point;
And determining a target lane line based on the determined position information of each key point.
Further, the category center point includes: a stop line center point, a white solid line center point, a white dotted line center point, a yellow solid line center point, a yellow dotted line center point, a road shoulder center point, a guardrail center point, and a guide line center point.
Further, the key points include: the end points of the lane lines, the center points of the lane lines and auxiliary key points equidistantly sampled on the center lines of the lane lines in the image.
Further, the generating the center point branch in the model through the lane line, based on the first feature map, the obtaining the probability that the pixel point on the image is the center point of each class and the probability that the pixel point is the center point includes: a central point branch head of the model is generated through a lane line, and a central point feature map is obtained based on the first feature map; a central point classification layer of a model is generated through a lane line, and a central point classification feature map is obtained based on the central point feature map, wherein each feature point on the central point classification feature map represents the probability that a corresponding pixel point on the image is a background pixel point and the probability that the corresponding pixel point is a central point of each class; and generating a polar center layer of the model through the lane lines, and acquiring a polar center feature map based on the center point feature map, wherein each feature point on the polar center feature map represents the probability that the corresponding pixel point on the image is the center point.
Further, when the contour point regression branch in the lane line generation model is based on the first feature map and a corresponding pixel point on the image is obtained as a center point, the distance and the angle between the center point and each key point include: generating a contour point regression head in the model through the lane lines, and acquiring a contour point feature map based on the first feature map; obtaining a distance regression feature map based on the contour point feature map by a distance regression layer of a lane line generation model, wherein each feature point on the distance regression feature map represents the distance between each key point and the center point on the lane line when the corresponding pixel point on the image is the center point; and generating an angle regression layer of the model through the lane line, and acquiring an angle regression feature map based on the contour point feature map, wherein each feature point on the angle regression feature map represents the angle between each key point and the center point on the lane line when the corresponding pixel point on the image is the center point.
Further, determining the category and the position information of the target center point in the image according to the probability that the pixel point on the image is the center point of each category and the probability that the pixel point is the center point comprises: multiplying the central point classification feature map with the polar center feature map, and determining the score of each channel corresponding to each feature point in the feature map obtained after multiplication; and determining the category and position information of each target center point in the image according to the channel with the highest score of each feature point.
Further, determining the category and position information of each target center point in the image according to the channel with the highest score of each feature point includes: for each feature point, if the channel with the highest score of the feature point is a background channel, determining the pixel point in the image corresponding to the feature point as a background pixel point; if the channel with the highest score of the feature point is the channel with any type of center point, determining the pixel point in the image corresponding to the feature point as the target center point of the type.
Further, the determining the target lane line based on the determined position information of each key point includes: according to the determined position information of each key point, two pairs of key points positioned at two ends of the edge of the lane line are determined; determining auxiliary key points on a corresponding central axis according to each pair of key points; and sequentially connecting the determined other key points with the auxiliary key points to generate a central axis of the lane line, and determining the target lane line.
Further, the training process of the lane line generation model includes: acquiring any sample image and sample image label in a sample training set, wherein the sample image label corresponds to a sample center point category information label, a sample center point position information label, a sample key point distance label and a sample key point distance center point angle label; determining a second feature map of the input image through a backbone network in the lane line generation model; acquiring the probability that each feature point on the second feature map is a center point of each class and the probability that each feature point on the second feature map is a center point based on the second feature map through a center point branch in the lane line generation model; acquiring the distance and angle between each key point and the center point when each feature point on the second feature map is the center point based on the second feature map through a contour point regression branch in the lane line generation model; determining a loss value according to the probability that each feature point on the second feature map is a center point of each class and the sample center point class information label, the probability that each feature point on the second feature map is a center point and the sample center point position information label, the distance between each key point and the center point when each feature point on the second feature map is a center point and the distance label between each sample key point and the center point, and the angles between each key point and the center point and the sample key point and the angle label between each sample key point and the center point when each feature point on the second feature map is a center point; and training each parameter in the lane line generation model according to the loss value.
According to the embodiment of the invention, the type of the center point of the lane line and the position information of the center point are predicted by adopting the lane line generation model, when each pixel point in the lane line generation model prediction image is adopted as the center point, the distance and the angle between each key point and the center point on the lane line are calculated, and when each pixel point is directly output by the lane line generation model as the center point, the distance and the angle between each key point and the center point on the lane line can be directly determined according to the determined position information of the target center point, so that the complexity of the point processing process is reduced, the target lane line can be accurately generated, and the lane line generation efficiency is effectively improved.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
For system/apparatus embodiments, the description is relatively simple as it is substantially similar to method embodiments, with reference to the description of method embodiments in part.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following claims be interpreted as including the preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various modifications and variations can be made to the present application without departing from the spirit or scope of the application. Thus, it is intended that the present application also include such modifications and alterations insofar as they come within the scope of the appended claims or the equivalents thereof.

Claims (9)

1. A method of lane line generation, the method comprising:
determining a first feature map of an input image through a backbone network in a lane line generation model;
A central point branch head of the model is generated through a lane line, and a central point feature map is obtained based on the first feature map; a central point classification layer of a model is generated through a lane line, and a central point classification feature map is obtained based on the central point feature map, wherein each feature point on the central point classification feature map represents the probability that a corresponding pixel point on the image is a background pixel point and the probability that the corresponding pixel point is a central point of each class; generating a polar center layer of a model through a lane line, and acquiring a polar center feature map based on the center point feature map, wherein each feature point on the polar center feature map represents the probability that a corresponding pixel point on the image is a center point; acquiring distances and angles between each key point and a central point when the pixel point on the image is taken as the central point based on the first feature map through a contour point regression branch in a lane line generation model; wherein the class center points are center points of different class lane lines; the key points are preset point positions on the lane lines;
Determining the category and position information of a target center point in an image according to the probability that a pixel point on the image is a center point of each category and the probability that the pixel point is a center point of each category, determining the distance and angle between each key point on a lane line and the target center point according to the distance and angle between each key point on the lane line and the target center point when the corresponding pixel point on the image is the center point;
And determining a target lane line based on the determined position information of each key point.
2. The method of claim 1, wherein the category center point comprises:
A stop line center point, a white solid line center point, a white dotted line center point, a yellow solid line center point, a yellow dotted line center point, a road shoulder center point, a guardrail center point, and a guide line center point.
3. The method of claim 1, wherein the keypoints comprise:
The end points of the lane lines, the center points of the lane lines and auxiliary key points equidistantly sampled on the center lines of the lane lines in the image.
4. The method of claim 1, wherein the obtaining, by the contour point regression branch in the lane line generation model and based on the first feature map, a distance and an angle between a center point and each key point when the corresponding pixel point on the image is the center point comprises:
generating a contour point regression head in the model through the lane lines, and acquiring a contour point feature map based on the first feature map;
obtaining a distance regression feature map based on the contour point feature map by a distance regression layer of a lane line generation model, wherein each feature point on the distance regression feature map represents the distance between each key point and the center point on the lane line when the corresponding pixel point on the image is the center point;
And generating an angle regression layer of the model through the lane line, and acquiring an angle regression feature map based on the contour point feature map, wherein each feature point on the angle regression feature map represents the angle between each key point and the center point on the lane line when the corresponding pixel point on the image is the center point.
5. The method of claim 4, wherein determining the class and location information of the target center point in the image based on the probability that the pixel point on the image is the center point of each class and the probability that the pixel point is the center point comprises:
Multiplying the central point classification feature map with the polar center feature map, and determining the score of each channel corresponding to each feature point in the feature map obtained after multiplication;
and determining the category and position information of each target center point in the image according to the channel with the highest score of each feature point.
6. The method of claim 5, wherein determining the category and location information of each target center point in the image according to the channel with the highest score of each feature point comprises:
For each feature point, if the channel with the highest score of the feature point is a background channel, determining the pixel point in the image corresponding to the feature point as a background pixel point; if the channel with the highest score of the feature point is the channel with any type of center point, determining the pixel point in the image corresponding to the feature point as the target center point of the type.
7. The method of claim 1, wherein determining the target lane line based on the determined location information for each keypoint comprises:
according to the determined position information of each key point, two pairs of key points positioned at two ends of the edge of the lane line are determined;
determining auxiliary key points on a corresponding central axis according to each pair of key points;
And sequentially connecting the determined other key points with the auxiliary key points to generate a central axis of the lane line, and determining the target lane line.
8. The method of claim 1, wherein the training process of the lane-line generation model comprises:
Acquiring any sample image and sample image label in a sample training set, wherein the sample image label corresponds to a sample center point category information label, a sample center point position information label, a sample key point distance label and a sample key point distance center point angle label;
Determining a second feature map of the input image through a backbone network in the lane line generation model;
Acquiring the probability that each feature point on the second feature map is a center point of each class and the probability that each feature point on the second feature map is a center point based on the second feature map through a center point branch in the lane line generation model; acquiring the distance and angle between each key point and the center point when each feature point on the second feature map is the center point based on the second feature map through a contour point regression branch in the lane line generation model;
Determining a loss value according to the probability that each feature point on the second feature map is a center point of each class and the sample center point class information label, the probability that each feature point on the second feature map is a center point and the sample center point position information label, the distance between each key point and the center point when each feature point on the second feature map is a center point and the distance label between each sample key point and the center point, and the angles between each key point and the center point and the sample key point and the angle label between each sample key point and the center point when each feature point on the second feature map is a center point;
and training each parameter in the lane line generation model according to the loss value.
9. A lane line generating apparatus, characterized by comprising:
The lane line generation model module is used for determining a first feature map of an input image through a main network in the lane line generation model; a central point branch head of the model is generated through a lane line, and a central point feature map is obtained based on the first feature map; a central point classification layer of a model is generated through a lane line, and a central point classification feature map is obtained based on the central point feature map, wherein each feature point on the central point classification feature map represents the probability that a corresponding pixel point on the image is a background pixel point and the probability that the corresponding pixel point is a central point of each class; generating a polar center layer of a model through a lane line, and acquiring a polar center feature map based on the center point feature map, wherein each feature point on the polar center feature map represents the probability that a corresponding pixel point on the image is a center point; acquiring distances and angles between each key point and a central point when the pixel point on the image is taken as the central point based on the first feature map through a contour point regression branch in a lane line generation model; wherein the class center points are center points of different class lane lines; the key points are preset point positions on the lane lines;
the processing module is used for determining the category and the position information of the target center point in the image according to the probability that the pixel point on the image is a center point of each type and the probability that the pixel point on the image is a center point, determining the distance and the angle between each key point on the lane line and the target center point according to the distance and the angle between each key point on the lane line and the target center point when the corresponding pixel point on the image is a center point;
and the generation module is used for determining the target lane line based on the determined position information of each key point.
CN202010932366.8A 2020-09-08 2020-09-08 Lane line generation method and device Active CN112200884B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010932366.8A CN112200884B (en) 2020-09-08 2020-09-08 Lane line generation method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010932366.8A CN112200884B (en) 2020-09-08 2020-09-08 Lane line generation method and device

Publications (2)

Publication Number Publication Date
CN112200884A CN112200884A (en) 2021-01-08
CN112200884B true CN112200884B (en) 2024-05-03

Family

ID=74006481

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010932366.8A Active CN112200884B (en) 2020-09-08 2020-09-08 Lane line generation method and device

Country Status (1)

Country Link
CN (1) CN112200884B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112906512B (en) * 2021-02-03 2024-06-11 北京海迩西医疗科技有限公司 Method, device and storage medium for determining joints of human body
CN113239785A (en) * 2021-05-11 2021-08-10 百安居信息技术(上海)有限公司 Method, system, storage medium and electronic device for automatically identifying house type based on convolutional neural network
CN113780069B (en) * 2021-07-30 2024-02-20 武汉中海庭数据技术有限公司 Lane line separation drawing method and device under confluence scene
CN114299113A (en) * 2021-12-27 2022-04-08 北京航空航天大学 Target tracking method and device based on twin network
CN115482478B (en) * 2022-09-14 2023-07-18 北京远度互联科技有限公司 Road identification method, device, unmanned aerial vehicle, equipment and storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110263714A (en) * 2019-06-20 2019-09-20 百度在线网络技术(北京)有限公司 Method for detecting lane lines, device, electronic equipment and storage medium
WO2020103893A1 (en) * 2018-11-21 2020-05-28 北京市商汤科技开发有限公司 Lane line property detection method, device, electronic apparatus, and readable storage medium
KR20200060194A (en) * 2018-11-21 2020-05-29 삼성전자주식회사 Method of predicting depth values of lines, method of outputting 3d lines and apparatus thereof
CN111310737A (en) * 2020-03-26 2020-06-19 深圳极视角科技有限公司 Lane line detection method and device
CN111311675A (en) * 2020-02-11 2020-06-19 腾讯科技(深圳)有限公司 Vehicle positioning method, device, equipment and storage medium
CN111368639A (en) * 2020-02-10 2020-07-03 浙江大华技术股份有限公司 Vehicle lane crossing determination method, vehicle lane crossing determination device, computer device, and storage medium
CN111460984A (en) * 2020-03-30 2020-07-28 华南理工大学 Global lane line detection method based on key point and gradient balance loss
CN111582083A (en) * 2020-04-25 2020-08-25 华南理工大学 Lane line detection method based on vanishing point estimation and semantic segmentation

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020103893A1 (en) * 2018-11-21 2020-05-28 北京市商汤科技开发有限公司 Lane line property detection method, device, electronic apparatus, and readable storage medium
KR20200060194A (en) * 2018-11-21 2020-05-29 삼성전자주식회사 Method of predicting depth values of lines, method of outputting 3d lines and apparatus thereof
CN110263714A (en) * 2019-06-20 2019-09-20 百度在线网络技术(北京)有限公司 Method for detecting lane lines, device, electronic equipment and storage medium
CN111368639A (en) * 2020-02-10 2020-07-03 浙江大华技术股份有限公司 Vehicle lane crossing determination method, vehicle lane crossing determination device, computer device, and storage medium
CN111311675A (en) * 2020-02-11 2020-06-19 腾讯科技(深圳)有限公司 Vehicle positioning method, device, equipment and storage medium
CN111310737A (en) * 2020-03-26 2020-06-19 深圳极视角科技有限公司 Lane line detection method and device
CN111460984A (en) * 2020-03-30 2020-07-28 华南理工大学 Global lane line detection method based on key point and gradient balance loss
CN111582083A (en) * 2020-04-25 2020-08-25 华南理工大学 Lane line detection method based on vanishing point estimation and semantic segmentation

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
Abrupt shot boundary detection with combined features and SVM;Youxian Zheng;《2016 2nd IEEE International Conference on Computer and Communications (ICCC). Proceedings》;第409-413页 *

Also Published As

Publication number Publication date
CN112200884A (en) 2021-01-08

Similar Documents

Publication Publication Date Title
CN112200884B (en) Lane line generation method and device
Ukhwah et al. Asphalt pavement pothole detection using deep learning method based on YOLO neural network
CN111340797B (en) Laser radar and binocular camera data fusion detection method and system
WO2022083402A1 (en) Obstacle detection method and apparatus, computer device, and storage medium
JP6802331B2 (en) Lane processing method and equipment
CN105678689B (en) High-precision map data registration relation determining method and device
CN110378297B (en) Remote sensing image target detection method and device based on deep learning and storage medium
CN108701234A (en) Licence plate recognition method and cloud system
KR102015947B1 (en) Method for extracting image of learning object for autonomous driving and apparatus thereof
CN108805016B (en) Head and shoulder area detection method and device
CN111860496A (en) License plate recognition method, device, equipment and computer readable storage medium
CN114581887B (en) Method, device, equipment and computer readable storage medium for detecting lane line
CN110751040B (en) Three-dimensional object detection method and device, electronic equipment and storage medium
CN113780200A (en) Computer vision-based pavement multi-disease area detection and positioning method
CN109523570B (en) Motion parameter calculation method and device
CN109241893B (en) Road selection method and device based on artificial intelligence technology and readable storage medium
CN112837384B (en) Vehicle marking method and device and electronic equipment
CN116229406B (en) Lane line detection method, system, electronic equipment and storage medium
CN112381034A (en) Lane line detection method, device, equipment and storage medium
CN115713750B (en) Lane line detection method and device, electronic equipment and storage medium
CN116645612A (en) Forest resource asset determination method and system
KR101391667B1 (en) A model learning and recognition method for object category recognition robust to scale changes
CN112232272B (en) Pedestrian recognition method by fusing laser and visual image sensor
CN111583341B (en) Cloud deck camera shift detection method
CN114926817A (en) Method and device for identifying parking space, electronic equipment and computer readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant