Neural HD Map Generation from Multiple Vectorized Tiles Locally Produced by Autonomous Vehicles
Miao Fan Yi Yao Jianping Zhang Xiangbo Song Daihui Wu


 

Neural HD Map Generation from Vehicle-produced Vectorized Tiles



Fan et al.

NavInfo Co., Ltd., Beijing 100094, China

<https://en.navinfo.com/>

miao.fan@ieee.org


Neural HD Map Generation from Multiple Vectorized Tiles Locally Produced by Autonomous VehiclesThis work is supported by the National Natural Science Foundation of China under Grant No. U22A20104. 
For more details about our recent studies, please visit corresponding author's website: <https://godfanmiao.github.io/homepage-en/>.

    ,  Yi Yao, Jianping Zhang, Xiangbo Song, Daihui Wu
    September 9, 2024
===========================================================================================================================================================================================================================================================================================================================================




§ ABSTRACT 
High-definition (HD) map is a fundamental component of autonomous driving systems, as it can provide precise environmental information about driving scenes. Recent work on vectorized map generation could produce merely 65% local map elements around the ego-vehicle at runtime by one tour with onboard sensors, leaving a puzzle of how to construct a global HD map projected in the world coordinate system under high-quality standards. To address the issue, we present GNMap as an end-to-end generative neural network to automatically construct HD maps with multiple vectorized tiles which are locally produced by autonomous vehicles through several tours. It leverages a multi-layer and attention-based autoencoder as the shared network, of which parameters are learned from two different tasks (i.e., pretraining and finetuning, respectively) to ensure both the completeness of generated maps and the correctness of element categories. Abundant qualitative evaluations are conducted on a real-world dataset and experimental results show that GNMap can surpass the SOTA method by more than 5% F1 score, reaching the level of industrial usage with a small amount of manual modification. We have already deployed it at Navinfo Co., Ltd., serving as an indispensable software to automatically build HD maps for autonomous driving systems. 







§ INTRODUCTION

High-definition (HD) map <cit.> plays a pivotal role in autonomous driving <cit.>. Illustrated by Fig. <ref>, it provides high-precision vectorized elements (including pedestrian crossings, lane dividers, road boundaries, etc.) about road topologies and traffic rules, which are quite essential for the navigation of self-driving vehicles. Vectorized map elements are geometrically discretized into polylines or polygons, and conventionally produced offline by SLAM-based methods <cit.> with heavy reliance on human labor of annotation, facing both scalability and up-to-date issues.



To address the issues, recent studies <cit.> focus on developing online approaches for vectorized map construction. These methods aim at devising vehicle-mounted models that learn to generate local elements around the ego-vehicle at runtime with onboard sensors such as LiDARs <cit.> and cameras. Learning-based approaches have drawn ever-increasing attention as they can alleviate human efforts to some extent. However, even the SOTA methods <cit.> among them could merely produce 65% vehicle-around map elements by one tour, leaving a puzzle of how to construct a global HD map projected in the world coordinate system under high-quality standards. 

As the first attempt to solve the puzzle, we present GNMap in this paper. It is an end-to-end generative neural network which takes vehicle-produced vectorized tiles through multiple tours as inputs and automatically generates a globalized HD map under the world coordinates as the output.
Specifically, GNMap adopts a multi-layer and attention-based autoencoder as the shared network, of which parameters are learned from two different tasks (i.e., pretraining and finetuning, respectively). At pretraining phase, the shared autoencoder is responsible for completing the masked vectorized tiles. The pretrained parameters are further leveraged as the initial weights for finetuning, which aims at assigning each pixel of map elements to the correct category. In this way, we ensure both the completeness of generated maps and the correctness of element categories. 

Additionally, we build a real-world dataset to conduct qualitative assessments offline. Each instance of the data belongs to a vectorized tile mainly composed of three kinds of map elements, i.e., pedestrian crossings, lane dividers, and road boundaries. Besides that, a tile is passed through multiple tours by autonomous vehicles with a street view for each tour. Ablation studies demonstrate that it is vital to conduct pretraining on GNMap for the sake of achieving the best performance. Experimental results of abundant evaluations also show that it can surpass the SOTA method by more than 5% F1 score. So far, GNMap has already been deployed at Navinfo Co., Ltd. for industrial usage, serving as an indispensable software to automatically build HD maps of Mainland China for autonomous driving.




§ RELATED WORK



 §.§ SLAM-based Methods (Offline)

HD maps are conventionally annotated manually on LiDAR point clouds of the environment. These point clouds are collected from LiDAR scans of survey vehicles with GPS <cit.> and IMU <cit.>. In order to fuse LiDAR scans into an accurate and consistent point cloud, SLAM methods <cit.> are mostly used, and they generally adopt a decoupled pipeline as follows. Pairwise alignment algorithms like ICP <cit.> and NDT <cit.> are firstly employed to match LiDAR data between two nearby timestamps. And for the purpose of constructing a globally consistent map, it is critical to estimate the accurate pose of ego-vehicle by GTSAM <cit.>. Although several machine learning methods <cit.> are further devised to extract static map elements such as pedestrian crossings, lane dividers and road boundaries from fused LiDAR point clouds, it is still laborious and costly to maintain a scalable HD map since it requires timely update for autonomous driving. 
 



 §.§ Learning-based Approaches (Online)

To get rid of offline human efforts, learning-based HD map construction has attracted ever-increasing interests. These approaches <cit.> propose to build local maps at runtime based on surround-view images captured by vehicle-mounted cameras. Specifically, HDMapNet <cit.> first produces semantic map and then groups pixel-wise semantic segmentation results in the post-processing. VectorMapNet <cit.> adopts a two-stage coarse-to-fine framework and utilizes auto-regressive decoder to predict points sequentially, leading to long inference time and the ambiguity about permutation. To alleviate the problem, BeMapNet <cit.> adopts a unified piece-wise Bezier curve to describe the geometrical shape of map elements. 
InstaGraM <cit.> proposes a novel graph modeling for vectorized polylines of map elements that models geometric, semantic and instance-level information as graph representations.
MapTR <cit.> uses a fixed number of points to represent a map element, regardless of its shape complexity. PivotNet <cit.> models map elements through pivot-based representation in a set prediction framework. 
However, even the SOTA methods among them could merely produce 65% vehicle-around map elements by one tour, leaving a puzzle of how to build a global HD map projected under the world coordinates. 



§ MODEL



 §.§ Problem Formulation

The objective of GNMap is to generate a globalized HD map under the world coordinates from several vehicle-produced tiles. The vehicle-produced tiles are represented by RGB images, and we use 𝒳 to denote the set of the images as inputs. As shown by Eq. <ref>, GNMap is formulated as ℱ(𝒳; Θ) which learns to fuse the images 𝒳 and to generate a globalized HD map as the output denoted by 𝒴:

    𝒴 = ℱ(𝒳; Θ),

where Θ represents the set of best parameters that GNMap needs to explore. 



 §.§ Shared Autoencoder

To realize ℱ(Θ), we devise an autoencoder that is structured into two parts: a neural encoder E(𝒳; θ_e) and a neural decoder D(𝒵; θ_d). The relationship between the encoder and the decoder is shown by Eq. <ref> and Eq. <ref>: 

    𝒵 = E(𝒳; θ_e)

and

    𝒴 = D(𝒵; θ_d),

where E(𝒳; θ_e) takes 𝒳 as inputs to produce the intermediate feature representation 𝒵 by means of the parameters θ_e of encoder, and D(𝒵; θ_d) takes intermediate feature 𝒵 as the input to generate the output 𝒴 by means of the parameters θ_d of decoder. Both θ_e and θ_d belong to Θ:

    Θ = (θ_e, θ_d).



Illustrated by Fig. <ref>, both the encoder E(𝒳; θ_e) and the decoder D(𝒵; θ_d) are multi-layer networks mainly composed of multi-head self-attention functions. We will elaborate on them in the following paragraphs. 



  
Encoder:
E(𝒳; θ_e) is composed of M layer neural blocks with the same structure. Each block includes a multi-head self-attention (MSA <cit.>), a multi-layer perceptron (MLP), and a layer normalization (LN) module. Here we use U_i to denote the intermediate output of the block at the i-th layer of encoder, and U_i is calculated by Eq.  <ref> and Eq. <ref>:

    U_i^' = MSA ( U_i-1  )+U_i-1,    i∈{1,2,...,M}

and 

    U_i = LN (MLP (U_i^' )+U_i^'),  i∈{1,2,...,M},

where 𝒳 = U_0 and 𝒵 = U_M.



  
Decoder:
D(𝒵; θ_d) has N stacked blocks with the same structure. Each block is composed of includes a multi-head self-attention (MSA <cit.>), a multi-layer perceptron (MLP), and a layer normalization (LN) function as well. If we use V_j to denote the intermediate output of the block at the j-th layer of decoder, V_j is calculated by Eq.  <ref> and Eq. <ref>:

    V_j^' = MSA ( V_j-1  )+V_j-1,    j∈{1,2,...,N}

and 

    V_j = LN (MLP (V_j^' )+V_j^'),  j∈{1,2,...,N},

where 𝒵 = V_0 and 𝒴 = V_N.

In order to obtain the best parameters of both θ_e and θ_e, we propose to adopt the "pretraining & finetuning" manner which divides the training procedure into two phases, corresponding to different tasks and learning objectives. Details about the two phases will be elaborated by Section <ref> and Section <ref>. 



 §.§ Pretraining Phase


At the pretraining phase, the learning objective of the shared autoencoder is to complete masked vectorized tiles, and the pretrained parameters are further leveraged as the initial weights for finetuning. Illustrated by Fig. <ref>, we will elaborate pretraining phase from the perspectives of input, output, ground truth, and loss function in the following paragraphs.





  
Input:
We split the manually annotated HD maps into multiple vectorized tiles. Each of the vectorized tiles can be transferred into a gray-scaled image denoted by 𝒳∈ℝ^h × w × 1, where h and w represent the height and the width of the image respectively. In 𝒳, each pixel of any may elements is set to 255 and the background's pixel is set to 0.
Then the image is divided into non-overlapping patches with the shape of k × l. As a result, h × w/k × l patches (each p ∈ℝ^k × l) can be obtained. We sample a subset of patches and mask (i.e., remove) the remaining ones. Our strategy is straightforward: sampling random patches without replacement, following a uniform distribution with a high masking ratio (i.e., the ratio of removed patches). In this way, we have created a task that cannot be easily solved by extrapolation from visible neighboring patches.



  
Output: We expect to obtain a completed gray-scale tile as the output through the shared autoencoder which takes the masked patches as inputs. The completed image is denoted by 𝒴∈ℝ^h × w × 1, where h and w represent the height and the width of the completed image, respectively. The value of each predicted pixel y_i where i ∈{1, 2, ..., h × w} ranges from 0.0 to 1.0 since it is scaled by the softmax function. 



  
Ground Truth: Correspondingly, the ground-truth image is the unsliced one (i.e., 𝒳) used as the input. We denoted it by 𝒴̂∈ℝ^h × w × 1 since each pixel of 𝒴̂ is set by either 0 or 1 to indicate whether it belongs to the background or vectorized map elements. 



  
Loss Function: We employ the mean squared error (MSE) as the loss function (denoted by ℒ) for pretraining. 

    ℒ =1/h × w∑_i=1^h × w ( y_i-ŷ_i )^2.

As shown by Eq. <ref>, it measures the overall difference between 𝒴 and 𝒴̂, by calculating the squared errors between the predicted pixels and the ground-truth pixels at the same coordinates. 



 §.§ Finetuning Phase


At finetuning phase, the learning objective of the shared autoencoder changes to assigning each pixel of the elements of the generated map to the correct category, leveraging the pretrained parameters as initial weights. Illustrated by Fig. <ref>, we will elaborate finetuning phase from the perspectives of input, output, ground truth, and loss function in the following paragraphs.





  
Input: 
In this work, a tile is passed through T times of tours by autonomous vehicles with a street view for each tour. The original street views collected by the cameras mounted on survey vehicles are usually RGB images and learning-based approaches <cit.> generally transfer them into vectorized images where each pixel belongs to a certain category such as the background or land divider, etc.. 
As a matter of fact, we can obtain T images at the beginning of the finetuning phase. We use a shared CNN network to fetch the features from the T images and concatenate them together as the input of the shared autoencoder. 



  
Output: We expect to achieve a fused tile from GNMap as the output at the finetuning phase. The generated image is denoted by 𝒴∈ℝ^h × w × c, where h and w represent the height and the width of the image, respectively, and c stands for the kinds of map elements. Each predicted pixel y_i is represented by a c-dimensional vector where the value at each dimension ranges from 0.0 to 1.0 to indicate the probability of the predicted category and the sum of all these values is 1.0. 



  
Ground Truth: Correspondingly, the ground-truth image is denoted by 𝒴̂∈ℝ^h × w × c. In addition, each pixel of 𝒴̂ is denoted by a c-dimensional vector where only one of the values is set by 1.0 exclusively indicating that the pixel belongs to a certain category such as the background, pedestrian crossing, or etc.



  
Loss Function: We employ the cross-entropy (CE) function as the loss (denoted by ℒ') of the finetuning phase. 

    ℒ'=-1/h × w∑_i=1^h × wŷ'̂_i·log_ (y'_i ).

As shown by  Eq. <ref>, it measures the divergence between 𝒴 and 𝒴̂, by summing up the log-likelihood at ground-truth pixels.



§ EXPERIMENTS



 §.§ Dataset and Metrics



In order to conduct an offline assessment on methods of HD map generation, we build a real-world dataset that contains street views and vectorized tiles produced by autonomous vehicles through multiple tours. We randomly split the dataset into three subsets. As shown by Table <ref>, they are separately leveraged for the purpose of model training (abbr. Train), hyper-parameter tuning (abbr. Valid), and performance testing (abbr. Test). Each subset is composed of many exclusive tiles, each of which is passed through multiple tours by autonomous vehicles. For each tour, a street view is collected and a vectorized tile is produced simultaneously online by vehicle-mounted models. Following up previous work, we mainly focus on three kinds of map elements, including pedestrian crossings (abbr. as ped.), lane dividers (abbr. as div.), and road boundaries (abbr. as bou.).



For each generated tile, we use precision (P) and recall (R) to evaluate the quality of HD map reconstruction at the pixel level in one instance. Illustrated by Fig. <ref>, a predicted point is accepted as the positive pixel when it is located near a ground-truth (GT) point within the Euclidean distance of 0.5 meters and they must belong to the same category as well. More importantly, a GT point can only accept one nearest predicted point for evaluation. Assuming that the test set contains n instances, average precision (AP) and average recall (AR) are formulated by Eq. <ref> and Eq. <ref> as follows,

    AP=1/n∑P

and

    AR=1/n∑R


Then mAP and mAR represent the mean average precision and recall over all categories (i.e., pedestrian crossing, lane divider, and road boundary), which are shown by Eq. <ref> and Eq. <ref>. 

    mAP = AP_ped.+AP_div.+AP_bou./3


    mAR = AR_ped.+AR_div.+AR_bou./3

To measure the overall performance of approaches on HD map generation, we adopt F1 score, as shown by Eq. <ref>, which calculates the harmonic mean of mAP and mAR.

    F1 =  2 × mAP × mAR/mAP+mAR





 §.§ Comparison Details



We mainly compare GNMap with two groups of approaches. One group contains vehicle-mounted models (including HDMapNet <cit.>, VectorMapNet <cit.>, InstaGraM <cit.>, BeMapNet <cit.>, MapTR <cit.>, and PivotNet <cit.>) which infer vectorized tiles online from real-time street views captured by onsite cameras. The other group represents approaches (i.e., GMM <cit.> and our GNMap) on fusing the vehicle-produced tiles to construct a global HD map.
Table <ref> reports the experimental results of these two groups of methods for HD map construction. All the approaches are tested by the real-world dataset shown in Table <ref> and measured by the metrics mentioned in Section <ref>. Based on our results, MapTR and PivotNet achieve comparable performance of online map learning through only one tour. Our GNMap outperforms GMM over 10.0% F1 score. 
Even compared with the existing SOTA method of online map learning, GNMap achieves over 5.0% higher F1, demonstrating advanced performance on HD map construction.



 §.§ Ablation Study

We report ablation experiments in Table <ref>, to validate the effectiveness of employing the pretraining phase, and the robustness of using different vehicle-mounted models. We select MapTR <cit.> and PivotNet <cit.>, as the SOTA one-tour vehicle-mounted models, to produce vectorized tiles for GMM <cit.> and our GNMap. Experimental results demonstrate that GNMap achieves consistent improvements over GMM regardless of the vehicle-mounted models. Moreover, the pretrained GNMap can provide at least 8.0% higher F1 score than those without pretraining.





§ CONCLUSION

In this paper, we present GNMap as an end-to-end generative framework for HD map construction, which is distinguished from recent studies on producing vectorized tiles locally by autonomous vehicles with onboard sensors such as LiDARs and cameras. GNMap is an essential research to follow up those studies, as it first attempts to fuse multiple vehicle-produced tiles to automatically build a globalized HD map under the world coordinates. To be specific, it adopts a multi-layer autoencoder purely composed of multi-head self-attentions as the shared network, where the parameters are learned from two different tasks (i.e., pretraining and finetuning, respectively) to ensure both the completeness of map generation and the correctness of element categories. Ablation studies demonstrate that it is vital to conduct pretraining on GNMap for the sake of achieving the best performance for industrial usage. And experimental results of abundant evaluations on a real-world dataset show that GNMap can surpass the SOTA method by more than 5% F1 score. So far, it has already been deployed at Navinfo Co., Ltd., serving as an indispensable software to automatically build HD maps of Mainland China for autonomous driving. 

splncs04






















