# LaneFormer: Real-Time Lane Execution and Detection via Transformer
## 1 Introduction
[21] built a detection model based on a stereo vision to detect lane positions in a structured environment. [PERSON] et al. [22] proposed the Spatial CNN (SCNN) network with layer-by-layer convolution in feature maps, enabling messages to pass between pixels across rows and columns. [PERSON] et al. [23] proposed a model to learn to decode the lane structure and iteratively draw any number of lanes without the computational and time complexity of a recurrent neural network. The corrugated lane line detection network proposed by [PERSON] et al. [24] used fast connections and gradient maps to effectively learn lane line features, which could solve challenging scenarios such as occluded lane lines. [PERSON] et al. [25] regarded lane line detection as a line-based selection problem of global features; selecting feature points based on rows greatly reduces the computational cost. [PERSON] et al. [26] have introduced a region proposal network (RPN), which shares full-image convolutional features with the detection network. [PERSON] et al. [27] integrated appearance information to improve SORT's (Simple Online and Realtime Tracking) performance. This model can track objects through longer occlusion time, thereby effectively reducing the number of identity switching. [PERSON] et al. [28] used a single forward pass to adapt the segmentation model to the appearance of a specific object, which greatly reduced the computational complexity. [PERSON] et al. [29] established a multi-task learning framework to segment the lane area, detect the lane boundary simultaneously, and consider two geometric constraints. Developing convolutional neural network-based methods is more mature, and it is not easy to achieve a large improvement. [PERSON] et al. [30] use a joint fully convolutional network and unsupervised training to detect lane lines. In the past few years, a Transformer network based on the Attention mechanism has rapidly developed in lane line detection [31; 32; 33]. [PERSON], [PERSON], [PERSON] et al. [31] used an attention mechanism jointly with CNN to extract features to predict key points of lane lines with an improvement in accuracy. [PERSON], [PERSON] et al. [32] used an attention mechanism to map the extracted lane line points to the 3D space for fitting, which improves the accuracy but has an unacceptable computational overhead. [PERSON], [PERSON] et al. [33] improve the accuracy by adding prior knowledge to the attention mechanism, which is effective but has too many hyperparameters, making the already hard-to-train model even harder to converge. In this work, we proposed a network based on an attention mechanism called Lane-Former; the main contributions of this work are as follows:1. We adopt multiple down-sampling and up-sampling for fusion in multiple stages to improve the ability to extract information on slender lane lines. 2. We use the correction function to visualize the ability of the network to extract features; when the correction function does not continue to decrease, it proves that the model has extracted enough features. 3. We use the attention module to detect lane lines and then the lane line model to fit the detected feature points. Finally, the fitted lanes are projected into the original image. This paper is organized as follows. Section 2 elaborates on our lane line detection algorithm. Section 3 describes the experimental results, compares them with the current mainstream algorithms, and conducts ablation experiments. Section 4 concludes our work.