Method to detect lane segments for creating high definition maps
Disclosed herein are system, method, and computer program product embodiments for detecting lane segments in an image for creating high-definition (HD) maps. A neural network can be used to classify a pixel of an image of a location as belonging to a driving lane. If the pixel belongs to a first boundary line of the driving lane, it is labeled accordingly. Based on the labeled pixel and one or more additional labeled pixels as part of the first boundary line of the driving lane, a first line drawing of the first boundary line of the driving lane is constructed. A lane segment based on a combination of the first line drawing of the first boundary line of the driving lane and a second line drawing of a second boundary line of the driving lane can be created.
1 . A method, comprising:
classifying, by a neural network on one or more computing devices, a pixel of an image including a birds eye view (BEV) of a location as belonging to a driving lane;
assigning, based on the pixel being determined to belong to a first boundary line of the driving lane by the neural network on the one or more computing devices, a label indicating the pixel as part of the first boundary line of the driving lane;
constructing, by the one or more computing devices and based on the labeled pixel and one or more additional labeled pixels as part of the first boundary line of the driving lane, a first line drawing of the first boundary line of the driving lane;
creating, using the one or more computing devices, a lane segment based on a combination of the first line drawing of the first boundary line of the driving lane and a second line drawing of a second boundary line of the driving lane; and
determining, by a second neural network on the one or more computing devices, whether to connect the lane segment to a second lane segment in an intersection, wherein the second neural network is separated from the neural network, wherein the determining whether to connect the lane segment to the second lane segment in the intersection further includes,
generating, by the second neural network on the one or more computing devices, an existence probability for an identified potential connection between the lane segment and the second lane segment; and
verifying, by the second neural network on the one or more computing devices, the identified potential connection is a valid connection based on a comparison of the existence probability to a predetermined threshold.
2 . The method of claim 1 , further comprising:
partitioning, using the one or more computing devices, the image into a plurality of parcels, wherein each parcel of the plurality of parcels comprises a same predetermined number of pixels, wherein the pixel and the one or more additional labeled pixels are selected from a parcel of the plurality of parcels.
3 . The method of claim 1 , further comprising:
aligning, by the one or more computing devices, the first line drawing of the first boundary line and the second line drawing of the second boundary line of the driving lane with a detected lane stop.
4 . The method of claim 1 , further comprising:
predicting, by the neural network on the one or more computing devices, a coarse driving direction for each of the labeled pixel and the one or more additional labeled pixels; and
estimating, based on the predicted coarse driving directions of the labeled pixel and the one or more additional labeled pixels by the neural network on the one or more computing devices, a direction for each of the first line drawing of the first boundary line and the second line drawing of the second boundary line of the driving lane.
5 . The method of claim 4 , wherein predicting the coarse driving direction for each of the labeled pixel and the one or more additional labeled pixels further comprises:
generating, by the neural network on the one or more computing devices, probabilities for a plurality of direction bins defining a plurality of directions separated by at least one increment; and
identifying, by the neural network on the one or more computing devices, the coarse driving direction based on a comparison of two direction bins of the plurality of direction bins with the highest probabilities.
6 . The method of claim 1 , wherein the second neural network is configured to operate outside of an image space and treat lanes and roads as a graph.
7 . A non-transitory computer-readable medium storing instructions that, when executed by one or more processors, causes the one or more processors to perform operations comprising:
classifying, by a neural network, a pixel of an image including a birds eye view (BEV) of a location as belonging to a driving lane;
assigning, based on the pixel being determined to belong to a first boundary line of the driving lane by the neural network, a label indicating the pixel as part of the first boundary line of the driving lane;
constructing, based on the labeled pixel and one or more additional labeled pixels as part of the first boundary line of the driving lane, a first line drawing of the first boundary line of the driving lane;
creating a lane segment based on a combination of the first line drawing of the first boundary line of the driving lane and a second line drawing of a second boundary line of the driving lane; and
determining, by a second neural network, whether to connect the lane segment to a second lane segment in an intersection, wherein the second neural network is separated from the neural network, wherein the determining whether to connect the lane segment to the second lane segment in the intersection further includes,
generating, by the second neural network, an existence probability for an identified potential connection between the lane segment and the second lane segment; and
verifying, by the second neural network, the identified potential connection is a valid connection based on a comparison of the existence probability to a predetermined threshold.
8 . The non-transitory computer-readable medium of claim 7 , wherein the operations further comprise:
partitioning the image into a plurality of parcels, wherein each parcel of the plurality of parcels comprises a same predetermined number of pixels, wherein the pixel and the one or more additional labeled pixels are selected from a parcel of the plurality of parcels.
9 . The non-transitory computer-readable medium of claim 7 , wherein the operations further comprise:
aligning the first line drawing of the first boundary line and the second line drawing of the second boundary line of the driving lane with a detected lane stop.
10 . The non-transitory computer-readable medium of claim 7 , wherein the operations further comprise:
predicting, by the neural network, a coarse driving direction for each of the labeled pixel and the one or more additional labeled pixels; and
estimating, based on the predicted coarse driving directions of the labeled pixel and the one or more additional labeled pixels by the neural network, a direction for each of the first line drawing of the first boundary line and the second line drawing of the second boundary line of the driving lane.
11 . The non-transitory computer-readable medium of claim 10 , wherein predicting a coarse driving direction for each of the labeled pixel and the one or more additional labeled pixels further comprises:
generating, by the neural network, probabilities for a plurality of direction bins defining a plurality of directions separated by at least one increment; and
identifying, by the neural network, the coarse driving direction based on a comparison of two direction bins of the plurality of direction bins with the highest probabilities.
12 . A system, comprising:
one or more processors; and
a memory communicatively coupled to the one or more processors, wherein the memory stores instructions that, when executed by the one or more processors, cause the one or more processors to perform operations comprising:
classifying, by a neural network, a pixel of an image including a birds eye view (BEV) of a location as belonging to a driving lane,
assigning, based on the pixel being determined to belong to a first boundary line of the driving lane by the neural network, a label indicating the pixel as part of the first boundary line of the driving lane,
constructing, based on the labeled pixel and one or more additional labeled pixels as part of the first boundary line of the driving lane, a first line drawing of the first boundary line of the driving lane,
creating a lane segment based on a combination of the first line drawing of the first boundary line of the driving lane and a second line drawing of a second boundary line of the driving lane, and
determining, by a second neural network, whether to connect the lane segment to a second lane segment in an intersection, wherein the second neural network is separated from the neural network, wherein the determining whether to connect the lane segment to the second lane segment in the intersection further includes,
generating, by the second neural network, an existence probability for an identified potential connection between the lane segment and the second lane segment; and
verifying, by the second neural network, the identified potential connection is a valid connection based on a comparison of the existence probability to a predetermined threshold.
13 . The system of claim 12 , wherein the operations further comprise:
aligning the first line drawing of the first boundary line and the second line drawing of the second boundary line of the driving lane with a detected lane stop.
14 . The system of claim 12 , wherein the operations further comprise:
predicting, by the neural network, a coarse driving direction for each of the labeled pixel and the one or more additional labeled pixels; and
estimating, based on the predicted coarse driving directions of the labeled pixel and the one or more additional labeled pixels by the neural network, a direction for each of the first line drawing of the first boundary line and the second line drawing of the second boundary line of the driving lane.
15 . The system of claim 14 , wherein predicting a coarse driving direction for each of the labeled pixel and the one or more additional labeled pixels further comprises:
generating, by the neural network, probabilities for a plurality of direction bins defining a plurality of directions separated by at least one increment; and
identifying, by the neural network, the coarse driving direction based on a comparison of two direction bins of the plurality of direction bins with the highest probabilities.