A lightweight lane positioning system and method based on image centerline comparison
By adopting the CA-MobileNetV3 lightweight lane localization method, combined with depthwise separable convolution and coordinate attention mechanism, efficient lane line detection and lane determination for vehicles in complex scenarios are achieved. This solves the real-time and cost problems of lane localization in existing technologies and improves detection accuracy and robustness.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- NANJING TUNNEL & BRIDGE ADMINISTRATION CO LTD
- Filing Date
- 2026-04-28
- Publication Date
- 2026-07-31
AI Technical Summary
Existing lane positioning technologies struggle to achieve low-cost, lightweight, real-time, and high-precision lane-level positioning that does not rely on external signals in complex urban roads and tunnel/bridge scenarios. Furthermore, traditional heavy-duty network models cannot meet the resource constraints of in-vehicle embedded terminals and the real-time requirements of autonomous driving systems.
A lightweight lane localization method based on CA-MobileNetV3 is adopted, which combines depthwise separable convolution and coordinate attention mechanism. By comparing the centerline of the image, the lane line analysis parameters are directly output. This includes multi-level feature extraction, coordinate attention feature enhancement, feature pyramid fusion and layer-by-layer refinement of the detection head, to achieve end-to-end lane line detection and lane determination for the vehicle.
While ensuring detection accuracy, it significantly reduces the number of network parameters and computational complexity, achieving rapid and stable lane line positioning. It is suitable for weak signal scenarios such as tunnels and underground ramps, reducing deployment costs and improving real-time performance and detection robustness.
Smart Images

Figure CN122493410A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of intelligent driving technology, specifically relating to computer vision recognition and processing, and in particular a lightweight lane positioning system and method. Background Technology
[0002] Lane-level precise positioning is the core foundation of autonomous driving environmental perception and vehicle control. Its ability to stably, in real time and reliably determine the lane where the vehicle is located is directly related to the safety and traffic efficiency of the intelligent driving system.
[0003] Currently, mainstream lane positioning and lane line recognition technologies mainly fall into two categories, both of which have significant limitations: One type is the fusion positioning method based on high-precision maps and satellite positioning. This type of method constructs lane-level road network topology and combines GNSS, IMU, and multi-sensor fusion to achieve lane matching. However, it heavily relies on the coverage and maintenance of high-precision maps. In complex scenarios with obstructions such as tunnels, underground ramps, urban canyons, and multi-level elevated roads, satellite signals are easily lost, attenuated, or subject to multipath interference, leading to positioning failure. At the same time, the acquisition, production, and maintenance costs of high-precision maps are extremely high, making it difficult to achieve large-scale popularization and low-cost deployment.
[0004] Another category is deep learning-based lane detection methods based on vehicle vision. This method relies solely on onboard cameras to acquire road images and uses neural networks to detect lane lines, offering advantages such as low cost and independence from external signals. However, existing visual lane detection models generally employ heavy network structures, resulting in large parameter counts, high computational complexity, and slow inference speeds, failing to meet the resource constraints of embedded vehicle terminals and the high real-time requirements of autonomous driving systems. Furthermore, most algorithms only perform lane line "detection," lacking a lightweight, engineered mechanism for determining vehicle lane affiliation, making it difficult to directly output lane numbers for vehicle decision-making and control.
[0005] In summary, existing technologies struggle to simultaneously meet the comprehensive requirements of independent external signal usage, low cost, lightweight real-time capability, high precision, and lane-level positioning. For lane positioning needs in complex urban roads, tunnels, and bridges for autonomous driving, there is an urgent need for a lightweight lane positioning method that, while ensuring detection accuracy, requires minimal computation, consumes little power, can be deployed on the device side, and can directly output the vehicle's lane location. Summary of the Invention
[0006] Purpose of the Invention: The first purpose of this invention is to provide a lightweight lane positioning method based on image centerline comparison, achieving lightweight model and low computational overhead. Based on the application and implementation of this method, the second purpose of this invention is to provide a lightweight lane positioning system based on image centerline comparison, which can achieve end-to-end direct output of lane line analysis, thereby quickly determining the current lane of the vehicle.
[0007] Technical solution: A lightweight lane localization method based on image centerline comparison, comprising the following steps: S1. Real-time acquisition of raw video streams of the road using image acquisition equipment, and extraction of key image frames from the raw video stream as processing objects; S2. Scale the key image frames extracted in step S1 to a fixed resolution and normalize the image pixel values, including converting the image pixel values into floating-point numbers. S3. Construct a lane detection model based on CA-MobileNetV3, input the preprocessed image data into the lane detection model to perform multi-level feature extraction, coordinate attention feature enhancement, feature pyramid fusion and layer-by-layer refinement of the detection head, and output the analytical geometric equation parameters of the lane line. Multi-level feature extraction includes performing 1×1 pointwise convolution for dimensionality increase and 3×3 depthwise separable convolution operations; Coordinate attention feature enhancement includes applying attention weights to the feature map in the height and width directions respectively; Feature pyramid fusion combines a top-down approach with lateral connections to fuse feature maps with different semantic levels and spatial resolutions to obtain a set of enhanced multi-scale fused features. The layer-by-layer refinement detection head decodes fused features into lane line instance parameters based on the lane line representation method using line anchor points and the layer-by-layer refinement strategy. Based on the iterative prediction results of the layer-by-layer refinement detection head, the abscissa of the predicted lane line point sequence is represented as:
[0008] in It is the first The x-coordinate of each lane line point in the image. The baseline x-coordinate of the lane line at its starting position. It is the lateral offset relative to the reference point. This represents the total number of sampling points for a single lane. Perform cubic polynomial fitting on the lane line point sequence:
[0009] Among them, the fitting coefficient From the point sequence by least squares Calculated in, Image ordinate The x-coordinate function of the lane lines is the independent variable; Ultimately, each lane line The parameters of the analytical geometric equations are expressed as follows:
[0010] In the formula, Lane lines The detection confidence level, This indicates the starting ordinate of the lane line in the image. This indicates the end coordinate of the lane line in the image. Lane lines A cubic polynomial; S4, based on each lane line The analytical geometric equation parameters determine the vehicle's lane, specifically including: For the example of output lane lines, uniform sampling is performed within the vertical coordinate range of the image, and the horizontal coordinate and mean value of each sampled pixel of the lane line are calculated. , serving as a reference point for the lateral position of the lane line in the current image; The x-coordinate of the image's central axis As for the lateral position of the vehicle, It is the width of the feature map; Iterate through each lane line and convert each lane line instance to... and By comparison, the relative position of each lane line instance with respect to the current center of view is obtained. If it is less than the center axis of the image, it is recorded as the left lane line of the vehicle; otherwise, it is recorded as the right lane line of the vehicle. S5. Count the number of lane lines on the left or right side of the vehicle and determine the logical lane number where the current vehicle is located.
[0011] On the other hand, the present invention provides a lightweight lane positioning system based on image centerline comparison, the system being configured to perform the above-described lightweight lane positioning method steps based on image centerline comparison, the system comprising: The image acquisition module is used to acquire raw video streams of the road in real time through vehicle-mounted cameras and extract image frames from them; The preprocessing module is used to scale the original image to a fixed resolution and normalize the image pixel values. The detection module is used to input the preprocessed image data into the neural network model and output the analytical geometric equation parameters of the lane lines; The position determination module is used to calculate the offset distance and yaw angle of the vehicle's center relative to the current lane centerline, and to determine the lateral position of each lane line instance relative to the vehicle. The positioning output module is used to count the number of lane lines on both sides of the vehicle and, in conjunction with a filtering algorithm, determine the logical lane number where the vehicle is currently located.
[0012] Compared with the prior art, the present invention has the following outstanding substantive features and significant beneficial effects: (1) This invention adopts a lightweight backbone network based on CA-MobileNetV3, combined with depthwise separable convolution and coordinate attention mechanism. While ensuring the lane line feature extraction capability, it significantly reduces the number of network parameters and floating-point operations, and can run stably on vehicle embedded platforms with limited computing power. This solves the problem that traditional heavy deep learning models are difficult to deploy in real time on the edge.
[0013] (2) End-to-end output of lane line analytical parameters, eliminating redundant post-processing. This invention directly predicts the cubic polynomial parameters of the lane line by refining the detection head layer by layer, realizing the analytical expression of the lane line. It eliminates the need for complex post-processing processes such as point cloud clustering, curve fitting, and coordinate transformation in traditional methods, greatly shortening the inference time and improving the real-time performance and response speed of lane positioning.
[0014] (3) It does not rely on GNSS and high-precision maps and has strong adaptability to weak signal scenarios. This invention can complete lane-level positioning by relying only on the vehicle-mounted forward-looking camera, completely getting rid of the dependence on satellite signals, high-precision maps and lidar. It can still output positioning results stably in scenarios where GNSS fails or is severely blocked, such as tunnels, underground ramps, urban canyons, and multi-level elevated roads. It has a wider range of applicable scenarios and lower deployment costs.
[0015] (4) Based on the comparison of the center line of the image, the lane attribution judgment is simple and robust. This invention proposes to use the center line of the image as the reference position of the vehicle, and quickly distinguish the left and right lane lines by the mean of the horizontal coordinate of the lane lines. The logic is simple, the calculation is efficient, and the anti-interference ability is strong. It can directly and stably determine the logical lane number of the vehicle, and provide a direct and usable lane-level positioning result for autonomous driving decision-making and control.
[0016] (5) Multi-scale feature fusion combined with coordinate attention results in higher detection accuracy and stability. By fusing shallow details and deep semantic features through feature pyramid (FPN), and introducing coordinate attention to enhance the direction and position features of long lane lines, it has stronger detection robustness for lane lines that are far, curved, or occluded. The localization results are continuous, smooth, and not prone to jumps. Attached Figure Description
[0017] Figure 1 This is a flowchart of the method described in this invention; Figure 2 This is a diagram of the lane detection algorithm structure; Figure 3 This is a diagram of the Bottleneck CA structure; Figure 4 This invention provides a schematic diagram for identifying the lane where a vehicle is located based on the horizontal coordinate of the lane line. Detailed Implementation
[0018] To provide a detailed explanation of the technical solution provided by this invention, further details are provided below in conjunction with the accompanying drawings.
[0019] In general, this invention first identifies all lane lines in images captured by an in-vehicle camera using a deep learning algorithm. Then, a coordinate system is established in the image, and the vehicle's current lane is determined by comparing the horizontal coordinates of the lane lines with the horizontal coordinates of the image's central axis. The implementation process involves using a low-complexity deep learning algorithm for lane line detection and introducing an attention mechanism. This significantly reduces the computational complexity and number of parameters of the entire model while maintaining high detection accuracy, enabling it to run efficiently on resource-constrained in-vehicle embedded devices and meet real-time requirements. Since this invention is based on an end-to-end lightweight deployment solution, detecting lane lines and determining the vehicle's lane using images captured by a front-side camera, it does not rely on high-precision maps or GPS technology. Therefore, this invention needs to consider the problem of lanes being obscured by other vehicles or obstacles. Based on the collected feature maps, the lane lines need to be reconstructed to obtain the horizontal coordinates of the lane lines and the horizontal coordinates of the image's central axis, which is then used to determine the vehicle's current lane.
[0020] Combination Figure 1 As shown, the specific implementation of the present invention is as follows: (1) Image acquisition: The vehicle-mounted camera in front of the vehicle acquires the original video stream of the road during the driving process in real time, and extracts the image frames as the processing objects. The original image spatial resolution is 1280×720 and the number of channels is 3.
[0021] (2) Image preprocessing: First, the original image is scaled to a fixed resolution of 320×800 to meet the input requirements of the neural network model, while keeping the number of channels unchanged. Then, the pixel values of the image are normalized, converting them from the integer range of [0, 255] to the floating-point range of [0.0, 1.0] to improve the convergence speed and stability of the model training.
[0022] (3) Lane detection: The preprocessed three-channel image data is input into the neural network model for lane detection. It goes through four modules in sequence: multi-level feature extraction, coordinate attention feature enhancement, feature pyramid fusion, and lane prediction head based on a layer-by-layer refinement strategy, and outputs a set of structured lane instance parameters.
[0023] The structure of a neural network model is as follows Figure 2 As shown, Figure 2 The architecture of CA-MobileNetV3 is also illustrated. The specific steps for each module are as follows: This invention employs CA-MobileNetV3 as the backbone network to extract features from images. The network first obtains a feature map through a 3×3 ordinary convolution (Conv2d), and then enters multiple bottleneck stages (Bottleneck CA) with varying numbers of output channels. The Bottleneck CA structure diagram is shown below. Figure 3 As shown, the specific processing procedure is as follows: a) The input feature map is expanded by 1×1 pointwise convolution, which increases the dimension of the feature representation and provides richer information for subsequent convolution.
[0024] b) Perform 3×3 depthwise separable convolutions on each channel of the expanded features to extract deeper spatial features. The computational cost of depthwise separable convolutions is much lower than that of standard convolutions, making the complexity of CA-MobileNetV3 much lower than that of commonly used networks such as ResNet.
[0025] c) To enhance the modeling capability of lane line spatial distribution and directionality, this invention, for the first time, embeds a coordinate attention module (CA) into the network, applying attention weights to the feature map in both the height and width directions. The specific process is as follows: First, global average pooling is performed on the input feature map along both the height and width, and the resulting global context information in the two directions is represented as follows:
[0026] in, , These represent the height and width of the input feature map X, respectively. This represents the number of channels in the input feature map X. , Corresponding to the first Global feature representation of the channel in the vertical and horizontal directions; For the first Channel characteristic information, It is the width index number of feature map X. It is the height index number of feature map X. and These are feature maps X and X, respectively. Channel height and width; Secondly, the characteristics of the above two directions , To splice together, after a convolution kernel Compress the number of channels to the original number of channels. Then it goes through a batch normalization layer and a non-linear ReLU activation function. Generate intermediate features :
[0027] Here, [·,·] represents splicing operations along spatial dimensions.
[0028] Next, batch normalization and non-linear operations are used to perform feature mapping on the feature map, thereby... Independent tensors in two dimensions and Using a 1×1 convolution transformation function and Each and The transformation is performed into a tensor with the same number of channels as the input feature X. Then, each feature is activated by the Sigmoid function. The attention weights in two dimensions are obtained and represented as follows:
[0029] Finally, the generated attention weights are fused with the original features using a weighted multiplication to output an enhanced feature map with coordinate attention weights. :
[0030] d) Perform a 1×1 pointwise convolution operation to compress the attention-weighted high-dimensional features into the target number of channels, reducing the computational load.
[0031] In addition to the steps mentioned above, when the input feature map and the target feature map are of equal size, the module will use a skip connection mechanism to preserve the input features and superimpose them with the output results, thereby alleviating the gradient vanishing problem of the network.
[0032] according to Figure 2 Further, this invention, based on CA-MobileNetV3, performs a series of depthwise separable convolutions and an inverse residual structure that first increases dimensionality and then decreases it to progressively downsample the input image. Stages 2, 3, and 4 output feature maps with different semantic levels and spatial resolutions, denoted as follows: .in It belongs to shallow features, has high spatial resolution, is rich in local details such as edges and textures, and is sensitive to the fine-grained geometric structure of lane lines. It is a mid-level feature that gradually incorporates contextual semantic information from a larger receptive field. These are deep features, which, although having the lowest spatial resolution, encompass high-level semantic information such as lane line categories, overall orientation, and topological relationships with the road environment. It's worth noting that Stage 1 does not output anything; it represents the image enhancement and expansion stage. These multi-level features provide ample information support for subsequent feature fusion and lane line structure prediction.
[0033] Next, feature pyramid fusion is performed: feature pyramid networks (FPN) are used for fusion. The superficial details and deep semantics in the text, such as Figure 2 As shown in the FPN diagram, this fusion process combines a top-down path with lateral connections. First, along the top-down path, features are sequentially upsampled by a factor of 2 and added to the features of the previous layer, thus transferring high-level semantic information to low-level features. Then, at each fusion stage, shallow features from the corresponding layer are introduced and... The convolution adjusts its channel count to match the current layer, thereby supplementing rich spatial detail information. Finally, an enhanced set of multi-scale fusion features is obtained. It combines high-resolution details with rich semantic information.
[0034] After passing through the CA-MobileNetV3 and FPN networks, the feature maps are fed into the detection head. On the lowest resolution feature maps, initial coarse predicted lane lines are generated using pre-defined clustering anchors. Figure 2 In Then, the process entered a phase of gradual refinement, namely... Figure 2 In the Refinement section, the Head performs Region of Interest (RoI Gather) feature collection on the feature map fed into the FPN, collecting local features corresponding to each row anchor point. Then, the regression and classification heads are based on the prediction results of the previous layer. The local features of this layer are used to fine-tune the parameters of the lane prior, outputting refined lane line parameters, denoted as Refined. The refinement steps described above are then repeated to progressively correct the shape and position of the lane lines. The prediction results of the final layer are output as the final lane line instance representation. This stage combines a lane line representation method based on line anchors and a layer-by-layer refinement strategy to decode the fused features into lane line instance parameters. Specifically: First, a fixed set of horizontal coordinates is used, and then uniform sampling is performed within the image height range to obtain a series of uniform vertical coordinates. : , Image height, The number of sampling points represents each lane line as a sequence of two-dimensional points uniformly sampled along the vertical direction of the image. .
[0035] Cluster analysis was performed on the training dataset to obtain several typical lane line shape priors. These shape priors were then compared with... By combining these, we obtain the prior anchor for each lane line, which mainly includes four components: Lane lines or background probability This is used to determine whether the prior corresponds to the actual lane line; Lane line visible length , indicating the effective longitudinal range of the lane lines in the image; Starting coordinates The overall direction angle of the lane lines relative to the x-axis of the image Describes the starting position and global direction of the lane lines; Based on direction angle A set of lateral offsets were calculated. ,use ( The x-coordinate represents the horizontal distance between the predicted x-coordinate and the reference position at each sampling point (each lane line).
[0036] The predicted lane line point sequence is thus represented by the x-coordinate. .
[0037] To achieve a smoother lane line representation that conforms to physical constraints, a cubic polynomial fit is performed on the point sequence:
[0038] Among them, the fitting coefficient From the point sequence by least squares It was calculated in the middle. Image ordinate The x-coordinate function of the lane lines, where the independent variable is the lane line, can be used... To fix the ordinate, obtain a straight line parallel to the X-axis as a reference. This means that the X-axis itself is used to calculate and obtain the x-coordinate of the lane line relative to the already determined y-coordinate, thus solving the problem of lane line breaks and occlusions in reality.
[0039] Ultimately, the output for each lane line is: .
[0040] (4) Lane line position determination: Based on the lane line parameters obtained in the above steps, the horizontal coordinate position relative to the center line of the image is also determined. In this regard, the present invention adopts a processing method for determining the vehicle lane based on the horizontal coordinate of the lane line.
[0041] For the example of output lane lines, uniform sampling is performed within the vertical coordinate range of the image, and the horizontal coordinate and mean value of each sampled pixel of the lane line are calculated. This serves as the reference point for the lateral position of the lane line in the current image.
[0042] The x-coordinate of the image's central axis As the lateral position of the vehicle.
[0043] Iterate through each lane line and convert each lane line instance to... and By comparison, the relative position of each lane line instance with respect to the current view center is obtained. If it is less than the image center axis, it is recorded as the left lane line of the vehicle; otherwise, it is recorded as the right lane line of the vehicle. That is:
[0044] Assuming that, based on the results in (III), for a 1280×720 image, the model outputs a total of 4 lane lines, such as... Figure 4 As shown, from left to right, these are denoted as ①-④, with mean x-coordinates of 350.75, 540.32, 730.28, and 1120.43, respectively. Comparing these values with the x-coordinate of the image's central axis (640), they can be denoted as the left lane line, right lane line, and right lane line, respectively. To reduce error, this process involves continuously detecting the same driving scene 30 times and selecting the mode of the output results as the final result.
[0045] (5) Lane determination: By counting the number of lane lines on the left (right) side of the vehicle, we can determine which lane line the vehicle is currently in is the left (right) number of the current road. For example, according to the statistical results of step (4), there are 2 lane lines on the left side of the vehicle, so we can confirm that the current lane of the vehicle is the second lane from the left, i.e., lane 2.
[0046] To demonstrate the performance of the lane detection model constructed in this invention, the Tusimple dataset was used to evaluate it using accuracy, F1 score, FPS, FLOPs, and Params as metrics. The evaluation results are shown in Table 1.
[0047] Table 1. Performance comparison of different models on the Tusimple dataset
[0048] The proposed lane detection model was systematically evaluated on the Tusimple dataset and comprehensively compared with current mainstream lane detection models. Experimental results show that the lane detection model in this invention performs excellently in balancing accuracy and efficiency. In terms of detection accuracy, the lane detection model achieves an accuracy of 96.57% and an F1 score of 97.38%, significantly outperforming models such as SCNN, PolyLaneNet, LaneATT, and CondLaneNet. Compared with the current best-performing CLRNet (ResNet18), the accuracy is reduced by only 0.27 percentage points and the F1 score by only 0.51 percentage points. This slight loss in accuracy is mainly due to the limitation of feature extraction capability of the low-complexity backbone network, but good detection stability is maintained. In terms of model efficiency, the lane detection model, through the synergistic optimization of depthwise separable convolution and neural architecture search techniques, compresses the number of parameters to 2.41M, reduces the computational complexity to 2.80 GFLOPs, and achieves a real-time inference performance of 210 FPS, outperforming all compared models. These results validate the effectiveness of the synergistic work between low-complexity backbone networks and coordinate attention mechanisms: MobileNetV3 builds an efficient feature extraction foundation, while coordinate attention effectively mitigates feature degradation caused by low complexity through spatial dependency modeling. The synergistic effect of the two ultimately achieves the best balance between accuracy and efficiency.
Claims
1. A lightweight lane positioning method based on axis contrast in images, characterized by the steps of include: S1. Real-time acquisition of raw video streams of the road using image acquisition equipment, and extraction of key image frames from the raw video stream as processing objects; S2. Scale the key image frames extracted in step S1 to a fixed resolution and normalize the image pixel values, including converting the image pixel values into floating-point numbers. S3. Construct a lane detection model based on CA-MobileNetV3, input the preprocessed image data into the lane detection model to perform multi-level feature extraction, coordinate attention feature enhancement, feature pyramid fusion and layer-by-layer refinement of the detection head, and output the analytical geometric equation parameters of the lane line. Multi-level feature extraction includes performing 1×1 pointwise convolution for dimensionality increase and 3×3 depthwise separable convolution operations; Coordinate attention feature enhancement includes applying attention weights to the feature map in the height and width directions respectively; Feature pyramid fusion combines a top-down approach with lateral connections to fuse feature maps with different semantic levels and spatial resolutions to obtain a set of enhanced multi-scale fused features. The layer-by-layer refinement detection head decodes fused features into lane line instance parameters based on the lane line representation method using line anchor points and the layer-by-layer refinement strategy. In the analytical geometric equation parameters of the lane line, the abscissa of the predicted lane line point sequence is represented as: wherein is the horizontal coordinate of the th lane line point in the image, is the reference horizontal coordinate of the lane line at the start position, is the horizontal offset of the th lane line relative to the reference point, is the total number of sampling points of a single lane line; Perform cubic polynomial fitting on the lane line point sequence: where the fitting coefficients are calculated from the sequence of points by the least squares method, the lane line abscissa function with the image ordinate as the argument; Ultimately, each lane line The parameters of the analytical geometric equations are expressed as follows: In the formula, Lane lines The detection confidence level, This indicates the starting ordinate of the lane line in the image. This indicates the end coordinate of the lane line in the image. Lane lines A cubic polynomial; S4, based on each lane line The analytical geometric equation parameters determine the vehicle's lane, specifically including: For the example of output lane lines, uniform sampling is performed within the vertical coordinate range of the image, and the horizontal coordinate and mean value of each sampled pixel of the lane line are calculated. , serving as a reference point for the lateral position of the lane line in the current image; The x-coordinate of the image's central axis As for the lateral position of the vehicle, It is the width of the feature map; Iterate through each lane line and convert each lane line instance to... and By comparison, the relative position of each lane line instance with respect to the current center of view is obtained. If it is less than the center axis of the image, it is recorded as the left lane line of the vehicle; otherwise, it is recorded as the right lane line of the vehicle. S5. Count the number of lane lines on the left or right side of the vehicle and determine the logical lane number where the current vehicle is located.
2. The lightweight lane positioning method based on image centerline comparison according to claim 1, characterized in that, Step S2 according to the formula Convert the integer range of pixel values [0, 255] to the floating-point range [0.0, 1.0], where Normalized pixel values, These are the pixel values of the original image.
3. The lightweight lane positioning method based on image centerline comparison according to claim 1, characterized in that, The multi-level feature extraction process in step S3 is as follows: The input feature map is expanded by 1×1 pointwise convolution to increase the dimension of feature representation; then, the expanded features are subjected to 3×3 depthwise separable convolution for each channel to extract deeper spatial features. Based on the coordinate attention module, attention weights are applied to the feature map in the height and width directions, including global average pooling along the height and width, concatenation, dimensionality reduction and activation by 1×1 convolution, splitting into height and width paths, obtaining attention weights by 1×1 convolution and Sigmoid, and multiplying them element-wise with the input features to output enhanced features; Performing 1×1 pointwise convolutions compresses the attention-weighted high-dimensional features into the target number of channels, and skip connections are used during size matching.
4. The lightweight lane positioning method based on image centerline comparison according to claim 1, characterized in that, The coordinate attention feature enhancement in step S3 is specifically performed as follows: Global average pooling is performed on the input feature map along both the height and width to obtain global context information in two directions. Will , To splice together, after a convolution kernel Compress the number of channels in the feature map to half the original number of channels. Then, after passing through a batch normalization layer and a non-linear ReLU activation function, intermediate features are generated. ,in It is the channel compression ratio coefficient in the coordinate attention module; Batch normalization and non-linear operations are used to perform feature mapping on the feature map, transforming intermediate features... Independent tensors in two dimensions and Using a 1×1 convolution transformation function and Each and The input feature map is transformed into a tensor with the same number of channels, and then the attention weights in two dimensions are obtained by applying the sigmoid activation function. The generated attention weights are fused with the original features using a weighted multiplication to output an enhanced feature map with coordinate attention weights. .
5. The lightweight lane positioning method based on image centerline comparison according to claim 1, characterized in that, The specific steps for refining the detection head layer by layer in step S3 are as follows: By fixing a set of horizontal coordinates of the feature map and uniformly sampling within the image height range, a series of uniform vertical coordinates are obtained. ; Cluster analysis based on the training dataset yielded several typical lane line shape priors. These shape priors were then compared with the ordinate... Combined, we obtain the prior anchor for each lane line; After processing by CA-MobileNetV3 and the feature pyramid network, the feature map is fed into the detection head. On the lowest resolution feature map, an initial coarse prediction lane line is generated using a preset prior anchor. The detection head includes collecting features of interest on the feature map, collecting local features corresponding to each row anchor point, and then the regression head and classification head fine-tuning the lane prior parameters based on the prediction results of the previous layer and the local features of this layer, and outputting the refined lane line parameters. Repeat the above refinement process for the detection head, correct the shape and position of the lane lines, and output the prediction results of the last layer as the final lane line instance representation.
6. The lightweight lane positioning method based on image centerline comparison according to claim 5, characterized in that, Each lane line prior anchor includes: Lane lines or background probability This is used to determine whether the prior corresponds to the actual lane line; Lane line visible length , indicating the effective longitudinal range of the lane lines in the image; Starting coordinates The overall direction angle of the lane lines relative to the x-axis of the image Describes the starting position and global direction of the lane lines; Based on direction angle A set of lateral offsets were calculated. ,use ( ) indicates the first The lateral offset of each lane line relative to the reference point, i.e., the horizontal distance between the predicted x-coordinate and the reference position at each sampling point.
7. A lightweight lane positioning system based on image centerline comparison, the system being configured to perform the steps of the lightweight lane positioning method based on image centerline comparison as described in any one of claims 1-6, the system comprising: The image acquisition module is used to acquire raw video streams of the road in real time through vehicle-mounted cameras and extract image frames from them; The preprocessing module is used to scale the original image to a fixed resolution and normalize the image pixel values. The detection module is used to input the preprocessed image data into the neural network model and output the analytical geometric equation parameters of the lane lines; The position determination module is used to calculate the offset distance and yaw angle of the vehicle's center relative to the current lane centerline, and to determine the lateral position of each lane line instance relative to the vehicle. The positioning output module is used to count the number of lane lines on both sides of the vehicle and, in conjunction with a filtering algorithm, determine the logical lane number where the vehicle is currently located.