A lane line recognition method and system based on drone inspection images

By integrating the SwinTransformer network with the lightweight semantic segmentation head SegFormer to build a lightweight semantic segmentation network, the real-time and accuracy problems of lane line detection during drone inspection are solved, and efficient lanes in complex environments are achieved Line recognition and detail perception meet the needs of real-time identification.

CN117593716BActive Publication Date: 2024-11-15SHANDONG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311673890.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-07
Publication Date
2024-11-15
Estimated Expiration
2043-12-07

AI Technical Summary

Technical Problem

The existing lane line detection technology cannot meet the real-time and accuracy requirements during drone inspections, especially in complex environments, the ability to identify lane line details is insufficient, and the existing models cannot be successfully moved to the drone's field of view. The inference speed cannot meet the real-time requirements.

Method used

The SwinTransformer network model is used to integrate with the lightweight semantic segmentation head SegFormer to build a lightweight semantic segmentation network. By pre-processing such as contrast enhancement and noise removal, combined with multi-head attention processing and hollow space pyramid pooling module, the non-combination is achieved. Real-time recognition and pixel-level description of lane lines in human-machine patrol images.

Benefits of technology

It improves the real-time and accuracy of lane line recognition, enhances the ability to perceive lane line details, reduces calculation expenses, reduces the probability of misunderstandings, and realizes efficient identification under different working conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117593716B_ABST
    Figure CN117593716B_ABST
Patent Text Reader

Abstract

The present invention discloses a lane line recognition method based on an unmanned aerial vehicle inspection image, comprising: S1, obtaining an unmanned aerial vehicle inspection image and preprocessing the unmanned aerial vehicle inspection image; S2, constructing a lightweight semantic segmentation network for lane line recognition, wherein the lightweight semantic segmentation network fuses a Swin Transformer network model and a lightweight semantic segmentation head SegFormer, uses the Swin Transformer as an encoder and uses the lightweight semantic segmentation head SegFormer as a decoder; S3, recognizing lane lines based on the preprocessed unmanned aerial vehicle inspection image and the lightweight semantic segmentation network for lane line recognition, and also discloses a corresponding system, an electronic device and a computer-readable storage medium, fuses the Swin Transformer network model and the lightweight semantic segmentation head, realizes real-time recognition of lane lines in the unmanned aerial vehicle inspection image (greater than 30 frames per second), and at the same time ensures recognition accuracy under different working conditions, completes pixel-level description of lane lines, and thus adapts to real complex inspection environments.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a lane line recognition method and system based on unmanned aerial vehicle inspection images. Background Art

[0002] Drones have many advantages such as small size and low cost. They can adapt to the flight requirements of different complex environments. The application of intelligent technology makes them easy to operate and reduces the consumption of human resources in various monitoring tasks. In recent years, with the rapid development of drone technology, its application has gradually spread from the military field to aerial photography, inspection and other tasks. In the field of intelligent transportation, drones can not only assist traffic management departments in grasping real-time and accurate road traffic information, realize autonomous path recognition and following according to different road information, but also adjust and optimize the flight trajectory according to the location of the detection target, with high flexibility.

[0003] However, in highway inspection tasks, the traditional method of determining the track through track points cannot meet the tracking accuracy requirements. Compared with the surrounding road environment, lane lines have obvious edge features such as gradient and grayscale, which can assist in track determination. Therefore, accurate lane line detection methods are of great significance to effectively improve road tracking accuracy and achieve large-scale and efficient road maintenance. Existing lane line detection technology originated from unmanned vehicle lane line detection, which is mainly divided into traditional vision-based and deep learning-based methods.

[0004] 1. The traditional vision-based method recognizes lane lines through the grayscale or edge gradient features of the road environment. However, the lane line detection method based on traditional vision needs to be further improved in accuracy and generalization performance. Specifically:

[0005] (1) Region segmentation algorithms represented by the Canny operator can quickly realize lane line recognition, but they are easily affected by environmental noise and cannot obtain accurate road detection results in complex environments.

[0006] (2) Although feature point matching technology can track lane lines, it requires complex model configuration and is difficult to apply in actual engineering.

[0007] (3) Lane line detection methods in special environments can detect straight line segments in the target area through the Hough transform method, and filter lane lines based on the relationship between them and the target road area, but this is limited to specific engineering environments where lane lines are obvious.

[0008] (4) Although the inverse perspective transform can obtain the lane line coordinates using the window search method from a bird's-eye view, post-processing methods are needed to further improve its generalization performance.

[0009] 2. Lane detection methods based on deep learning are gradually gaining popularity because of their high robustness, accuracy, and the fact that they do not require artificially designed features to distinguish between lane information and non-lane information.

[0010] (1) Semantic segmentation networks such as UNet can achieve pixel-level recognition of lanes and their surroundings, but they cannot be implemented on a large scale in engineering because of their high computational overhead.

[0011] (2) Although lane detection methods represented by instance point networks can overcome the influence of object occlusion, illumination changes, and shadow interference and achieve higher recognition accuracy, their real-time performance is poor.

[0012] (3) In order to overcome the problem of missing information when convolutional neural networks detect difficult samples such as road wear, shadow occlusion and curves, the semantic segmentation network based on Transformer can improve the shortcomings brought by convolutional sampling, but it still needs in-depth research to further reduce its computational complexity and ensure details while having a certain degree of real-time performance.

[0013] 3. Existing lane recognition methods generally use KITTI, CitySpaces, and Tusimple datasets for autonomous driving to train deep learning models and perform feature extraction, fusion, and classification on lanes and surrounding environments. For example, Figure 1 The left side of the middle CNN layer and Figure 2 The words "input image" in represent data input; Figure 1 The network structure in the example is based on the U-Net backbone module VGG-16, which is downsampled 4 times, with each sampling multiple being 2. Feature extraction is mainly completed by combining the spatial attention module (SRA) with the Transformer. Finally, 4 upsamplings are used to complete the recognition and segmentation of lane lines. Figure 2 The backbone network in represents the feature extraction of lane lines and their surroundings. The proposed combined cyclic feature shift aggregator module uses a convolution kernel size from top to bottom, which is opposite to the convolution kernel size from left to right. The lane line detection is completed through the prediction module and the output module. However, there are the following technical defects:

[0014] (1) The lane line images in the field of view of existing unmanned vehicles and those in the field of view of drones have significantly different features, resolution, and ground object relationships. Existing models cannot be successfully transferred to lane line recognition in drone inspection images.

[0015] (2) The lane line recognition model based on traditional semantic segmentation lacks the ability to perceive lane line details. It is difficult to accurately identify lane lines that are blocked, damaged, or broken, which in turn affects the UAV’s track confirmation and subsequent planning.

[0016] (3) Existing lane semantic segmentation models are generally complex, the model size is difficult to meet lightweight standards, and the inference speed cannot meet real-time requirements (30 frames per second). Summary of the invention

[0017] The purpose of the present invention is to provide a lane line recognition method and system based on drone inspection images, which further improves the real-time performance, robustness and accuracy to overcome the defects of the prior art. The recognition method and system innovatively integrate the SwinTransformer network model and the lightweight semantic segmentation head, which can realize the real-time recognition of lane lines in drone inspection images (greater than 30 frames per second), while ensuring the recognition accuracy under different working conditions, and completing the pixel-level description of lane lines, so as to adapt to the real complex inspection environment.

[0018] A first aspect of the present invention is to provide a lane line recognition method based on drone inspection images, comprising:

[0019] S1, obtaining drone inspection images and preprocessing the drone inspection images;

[0020] S2, constructing a lightweight semantic segmentation network for lane recognition, wherein the lightweight semantic segmentation network fuses the Swin Transformer network model and the lightweight semantic segmentation head SegFormer, using Swin Transformer as an encoder and the lightweight semantic segmentation head SegFormer as a decoder;

[0021] S3, identifying the lane line based on the preprocessed UAV inspection image and the lightweight semantic segmentation network for lane line recognition.

[0022] Preferably, the preprocessing of the drone inspection image includes: one or more preprocessing methods of increasing image contrast, removing environmental noise and reducing image size.

[0023] Preferably, the step of preprocessing the drone inspection image and increasing the image contrast includes performing an image exponential transformation to enhance the image contrast, specifically including:

[0024] (1) performing pixel normalization on the UAV inspection image to obtain a normalized UAV inspection image;

[0025] (2) performing pixel index transformation on the normalized UAV inspection image based on the formula s=c×rγ (s is the output pixel value, r is the input pixel value, c is a constant, and γ is an exponential parameter) to obtain a pixel index transformation UAV inspection image;

[0026] (3) using inverse normalization to enhance the image contrast of the pixel index transformed UAV inspection image;

[0027] The removal of environmental noise by preprocessing the UAV inspection image comprises: performing local variance adjustment on the UAV inspection image by an adaptive Wiener filter to achieve environmental noise removal of the UAV inspection image;

[0028] The reducing of the image size by preprocessing the drone inspection image includes: scaling the drone inspection image by maintaining the original ratio of the drone inspection image.

[0029] Preferably, S2 includes:

[0030] S21, build and assemble the encoder, including:

[0031] S211, constructing a Swin Transformer module in the encoder, using the Swin Transformer module as a carrier of the encoder, wherein the Swin Transformer module includes: layer normalization processing, multi-layer perceptron processing, window-based multi-head attention processing, and moving window-based multi-head attention processing;

[0032] S212, constructing an image block segmentation module, a linear embedding layer, and an image block merging module in the encoder, assembling the image block segmentation module, the linear embedding layer, and the image block merging module to obtain a feature map of the UAV inspection image;

[0033] S22, constructing a decoder based on the Segformer decoding header; the decoder based on the Segformer decoding header includes a linear layer, a concatenation layer, a fusion layer and a prediction layer.

[0034] Preferably, S3 includes:

[0035] S31, performing hierarchical feature multi-scale extraction on the lane line features in the extracted UAV inspection image based on the encoder to obtain lane line feature maps in four stages;

[0036] S32, inputting the lane feature maps of the four stages into a dilated space pyramid pooling module for feature fusion, and generating a feature vector;

[0037] S33, the feature vector is sequentially passed through the linear layer, splicing layer, fusion layer and prediction layer of the decoder based on the Segformer decoding head for mask prediction, and a plurality of the multi-layer perceptrons and convolutional layers are used to complete the fusion of lane line features, so as to obtain a lane line pixel-level prediction based on the maximum probability value.

[0038] Preferably, the atrous spatial pyramid pooling module includes five branches, namely, one 1×1 convolution, three 3×3 convolutions with atrous rates of 3, 6, and 12, and a global average pooling branch; after the atrous spatial convolution operation, the feature map is restored to four different dimensions through bilinear interpolation and a feature vector is generated.

[0039] Preferably, the mask prediction includes:

[0040] (1) The linear layer uses a multi-level function Fi to perform channel-unified operations on the lane feature maps of the four stages. The function expression is:

[0041] (2) The concatenation layer uniformly upsamples the lane feature maps of the four stages to a resolution of 0.25 times, and the function expression used is:

[0042]

[0043] The obtained feature dimensions are unified as

[0044] (3) The fusion layer fuses the cascade features of each level, and the function expression used is:

[0045]

[0046] (4) Using the prediction layer to complete mask segmentation, the feature calculation expression is:

[0047] M=Linear(C,Ncls)(F) (7).

[0048] A second aspect of the present invention is to provide a lane line recognition system based on drone inspection images, comprising:

[0049] An image acquisition module is used to acquire and pre-process the drone inspection images;

[0050] A model building module, for building a lightweight semantic segmentation network for lane recognition, wherein the lightweight semantic segmentation network fuses the Swin Transformer network model and the lightweight semantic segmentation head SegFormer, with Swin Transformer as the encoder and the lightweight semantic segmentation head SegFormer as the decoder;

[0051] A lane line recognition module is used to recognize lane lines based on the preprocessed UAV inspection image and the lightweight semantic segmentation network for lane line recognition.

[0052] A third aspect of the present invention provides an electronic device, comprising a processor and a memory, wherein the memory stores a plurality of instructions, and the processor is configured to read the instructions and execute the method described in the first aspect.

[0053] A fourth aspect of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a plurality of instructions, and the plurality of instructions can be read by a processor and execute the method described in the first aspect.

[0054] Beneficial effects of the method, system, electronic device, and readable storage medium of the present invention:

[0055] (1) It can analyze the lane line image features and ground object relationships of images acquired under UAV cruising conditions, and reduce the interference of image resolution on lane line prediction;

[0056] (2) Enhanced the ability to perceive lane line details, and improved recognition accuracy for difficult samples such as occluded, damaged, or broken lane lines;

[0057] (3) It can reduce the computational cost in the running state, determine the lane line position coordinates by the maximum probability value method, and realize the pixel-level prediction of the lane line;

[0058] (4) It avoids multi-segment processing, reduces the number of judgment steps for lane line direction attributes such as segment clustering, and reduces the probability of misidentification and misrecognition. BRIEF DESCRIPTION OF THE DRAWINGS

[0059] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the related technologies, the drawings required for use in the specific embodiments or the related technical descriptions will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0060] Figure 1 A schematic diagram of the principle of a CNN deep learning model method for lane line recognition based on the prior art;

[0061] Figure 2 A schematic diagram of the principle of a lane line recognition backbone network deep learning model method according to the prior art;

[0062] Figure 3 The present invention provides a flowchart of a lane line recognition method based on drone inspection images according to an embodiment of the present invention.

[0063] Figure 4 A schematic diagram of the structure of a semantic segmentation model based on drone inspection images provided in an embodiment of the present invention.

[0064] Figure 5 This is a structural diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0065] The technical solution of the present invention will be described clearly and completely below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0066] In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicating the orientation or positional relationship, are based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first", "second", and "third" are used for descriptive purposes only, and cannot be understood as indicating or implying relative importance.

[0067] In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0068] Explanation of terms used in this embodiment:

[0069] Inference speed: Measured by the number of frames processed per second (FPS), that is, the average number of model iterations per second, it can show the speed at which the model processes input. The higher this value, the faster the inference speed and the better the model performance.

[0070] See also Figure 3-4 This embodiment provides a lane line recognition method based on drone inspection images, including:

[0071] S1, obtaining drone inspection images and preprocessing the drone inspection images;

[0072] As a preferred implementation, the preprocessing of the drone inspection image includes: one or more preprocessing methods of increasing image contrast, removing environmental noise, and reducing image size.

[0073] As a preferred implementation, the preprocessing of the drone inspection image to increase the image contrast includes performing an image index transformation to enhance the image contrast, specifically including:

[0074] (1) performing pixel normalization on the UAV inspection image to obtain a normalized UAV inspection image;

[0075] (2) performing pixel index transformation on the normalized UAV inspection image based on the formula s=c×rγ (s is the output pixel value, r is the input pixel value, c is a constant, and γ is an exponential parameter) to obtain a pixel index transformation UAV inspection image;

[0076] (3) Using inverse normalization, the pixel index transformed UAV inspection image is subjected to image contrast enhancement.

[0077] As a preferred implementation, the removal of environmental noise by preprocessing the drone inspection image includes: performing local variance adjustment on the drone inspection image by an adaptive Wiener filter to achieve environmental noise removal of the drone inspection image.

[0078] As a preferred implementation, the reducing the image size by preprocessing the drone inspection image includes: scaling the drone inspection image by maintaining the original ratio of the drone inspection image.

[0079] S2, constructing a lightweight semantic segmentation network for lane recognition, wherein the lightweight semantic segmentation network fuses the Swin Transformer network model and the lightweight semantic segmentation head SegFormer, using Swin Transformer as an encoder and the lightweight semantic segmentation head SegFormer as a decoder;

[0080] As a preferred implementation, the lightweight semantic segmentation network assembles the encoder and the decoder based on a sequential architecture.

[0081] As a preferred embodiment, the S2 includes:

[0082] S21, build and assemble the encoder, including:

[0083] S211, constructing a Swin Transformer module in the encoder, using the Swin Transformer module as a carrier of the encoder, wherein the Swin Transformer module includes: layer normalization processing, multi-layer perceptron processing, window-based multi-head attention processing, and moving window-based multi-head attention processing;

[0084] In this embodiment, the layer normalization processing unit normalizes all neurons in the middle layer to reduce the training time cost and accelerate the network convergence speed. The purpose of adding a multi-layer perceptron is to reduce the lane line feature dimension to half of the original. In the window-based multi-head attention processing and the moving window-based multi-head attention processing, the self-attention calculation formula is formula (1):

[0085]

[0086] Among them, Q represents the query matrix, K represents the key-value matrix, V represents the value matrix, dk represents the scaling factor, and B represents the relative position deviation.

[0087] The multi-head attention calculation formula is:

[0088] MultiHead(Q,K,V)=Concat(head1,...,headn) (2);

[0089]

[0090] Here, i represents the i-th self-attention mechanism calculation.

[0091] Compared with the window-based multi-head attention processing, the moving window-based multi-head attention processing can cyclically shift the original lane feature map information and enhance the interaction of lane feature information;

[0092] S212, constructing an image block segmentation module, a linear embedding layer, and an image block merging module in the encoder, assembling the image block segmentation module, the linear embedding layer, and the image block merging module to obtain a feature map of the UAV inspection image;

[0093] In this embodiment, after passing through the image block segmentation module and the linear embedding layer, the dimension of the feature map becomes Among them, H represents the height of the drone inspection image, W represents the width of the drone inspection image, and 48 represents the feature dimension.

[0094] The image block merging module performs the image block merging operation only in the second, third and fourth stages, and after the image block merging, the dimension of the feature map of the UAV inspection image becomes Where C represents the linear projection dimension;

[0095] S22, constructing a decoder based on a Segformer decoding header; the decoder based on the Segformer decoding header includes a linear layer, a concatenation layer, a fusion layer, and a prediction layer;

[0096] S3, identifying the lane line based on the preprocessed UAV inspection image and the lightweight semantic segmentation network for lane line recognition;

[0097] As a preferred implementation, S3 includes:

[0098] S31, performing hierarchical feature multi-scale extraction on the lane line features in the extracted UAV inspection image based on the encoder to obtain lane line feature maps in four stages;

[0099] In this embodiment, the Swin Transformer Block in each stage is used to extract multi-scale features from the feature map generated in S212, and the dimensions of the extracted feature map are still as follows:

[0100] S32, inputting the lane feature maps of the four stages into a dilated space pyramid pooling module for feature fusion, and generating a feature vector;

[0101] In this embodiment, the atrous spatial pyramid pooling module includes five branches, namely, one 1×1 convolution, three 3×3 convolutions with atrous rates of 3, 6, and 12, and a global average pooling branch; after the atrous spatial convolution operation, the feature map is restored to four different dimensions through bilinear interpolation and a feature vector is generated.

[0102] S33, the feature vector is sequentially passed through the linear layer, splicing layer, fusion layer and prediction layer of the decoder based on the Segformer decoding head for mask prediction, and a plurality of the multi-layer perceptrons and convolutional layers are used to complete the fusion of lane line features, so as to obtain a lane line pixel-level prediction based on the maximum probability value.

[0103] In this embodiment, the mask prediction includes:

[0104] (1) The linear layer uses a multi-level function Fi to perform channel-unified operations on the lane feature maps of the four stages. The function expression is:

[0105] (2) The concatenation layer uniformly upsamples the lane feature maps of the four stages to a resolution of 0.25 times, and the function expression used is:

[0106]

[0107] The obtained feature dimensions are unified as

[0108] (3) The fusion layer fuses the cascade features of each level, and the function expression used is:

[0109]

[0110] (4) Using the prediction layer to complete mask segmentation, the feature calculation expression is:

[0111] M=Linear(C,Ncls)(F)(7).

[0112] A second aspect of the present invention is to provide a lane line recognition system based on drone inspection images, comprising:

[0113] An image acquisition module is used to acquire and pre-process the drone inspection images;

[0114] A model building module, for building a lightweight semantic segmentation network for lane recognition, wherein the lightweight semantic segmentation network fuses the Swin Transformer network model and the lightweight semantic segmentation head SegFormer, with Swin Transformer as the encoder and the lightweight semantic segmentation head SegFormer as the decoder;

[0115] A lane line recognition module is used to recognize lane lines based on the preprocessed UAV inspection image and the lightweight semantic segmentation network for lane line recognition.

[0116] The present invention also provides a memory storing a plurality of instructions, wherein the instructions are used to implement the method as in the first embodiment.

[0117] like Figure 5 As shown, the present invention also provides an electronic device, including a processor 301 and a memory 302 connected to the processor 301, the memory 302 stores a plurality of instructions, and the instructions can be loaded and executed by the processor so that the processor can execute the method as in the first embodiment.

[0118] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A lane line recognition method based on drone inspection images, It is characterized in that include: S1, obtaining drone inspection images and preprocessing the drone inspection images; S2, constructing a lightweight semantic segmentation network for lane recognition, wherein the lightweight semantic segmentation network fuses the Swin Transformer network model and the lightweight semantic segmentation head SegFormer, using Swin Transformer as an encoder and the lightweight semantic segmentation head SegFormer as a decoder; S3, identifying the lane line based on the preprocessed UAV inspection image and the lightweight semantic segmentation network for lane line recognition; The preprocessing of the drone inspection image includes: one or more preprocessing methods of increasing image contrast, removing environmental noise and reducing image size; The preprocessing of the drone inspection image to increase the image contrast includes performing an image index transformation to enhance the image contrast, specifically including: (1) performing pixel normalization on the UAV inspection image to obtain a normalized UAV inspection image; (2) Based on the formula ( is the output pixel value, is the input pixel value, is a constant, is an index parameter) performing pixel index transformation on the normalized UAV inspection image to obtain a pixel index transformation UAV inspection image; (3) using inverse normalization to enhance the image contrast of the pixel index transformed UAV inspection image; The removal of environmental noise by preprocessing the UAV inspection image comprises: performing local variance adjustment on the UAV inspection image by an adaptive Wiener filter to achieve environmental noise removal of the UAV inspection image; The reducing the image size of the preprocessing of the drone inspection image includes: scaling the drone inspection image by maintaining the original ratio of the drone inspection image; The S2 includes: S21, build and assemble the encoder, including: S211, constructing a Swin Transformer module in the encoder, using the Swin Transformer module as a carrier of the encoder, wherein the Swin Transformer module includes: layer normalization processing, multi-layer perceptron processing, window-based multi-head attention processing, and moving window-based multi-head attention processing; S212, constructing an image block segmentation module, a linear embedding layer, and an image block merging module in the encoder, assembling the image block segmentation module, the linear embedding layer, and the image block merging module to obtain a feature map of the UAV inspection image; After the image block segmentation module and the linear embedding layer, the dimension of the feature map becomes , where H represents the height of the UAV inspection image, W represents the width of the UAV inspection image, and 48 represents the feature dimension; The image block merging module performs the image block merging operation only in the second, third and fourth stages, and after the image block merging, the dimension of the feature map of the UAV inspection image becomes , , , where C represents the linear projection dimension; S22, constructing a decoder based on a Segformer decoding header; the decoder based on the Segformer decoding header includes a linear layer, a concatenation layer, a fusion layer, and a prediction layer; The S3 includes: S31, performing hierarchical feature multi-scale extraction on the lane line features in the extracted UAV inspection image based on the encoder to obtain lane line feature maps in four stages; The Swin Transformer Block in each stage is used to extract multi-scale features from the feature map generated in S212. The dimensions of the extracted feature map are still as follows: , , , ; S32, inputting the lane feature maps of the four stages into a dilated space pyramid pooling module for feature fusion, and generating a feature vector; S33, sequentially passing the feature vector through the linear layer, the concatenation layer, the fusion layer and the prediction layer of the decoder based on the Segformer decoding head to perform mask prediction, and using multiple multi-layer perceptrons and convolutional layers to complete the fusion of lane line features, so as to obtain a lane line pixel-level prediction based on the maximum probability value; The dilated space pyramid pooling module consists of five branches: Convolution, 3 dilation rates of 3, 6, and 12 Convolution, and a global average pooling branch; after the dilated spatial convolution operation, the feature map is restored into four different dimensions through bilinear interpolation and a feature vector is generated; The mask prediction includes: (1) The linear layer uses a multi-level function The lane feature maps of the four stages are uniformly operated on the channels, and the function expression is: (4); (2) The concatenation layer uniformly upsamples the lane feature maps of the four stages to a resolution of 0.25 times, and the function expression used is: (5); The obtained feature dimensions are unified as ; (3) The fusion layer fuses the cascade features of each level, and the function expression used is: (6); (4) The prediction layer is used to complete the mask segmentation, and the feature calculation expression is: (7)。 2. A lane line recognition system based on drone inspection images, used to implement the method of claim 1, It is characterized in that include: An image acquisition module is used to acquire and pre-process the drone inspection images; A model building module, for building a lightweight semantic segmentation network for lane recognition, wherein the lightweight semantic segmentation network fuses the Swin Transformer network model and the lightweight semantic segmentation head SegFormer, with the Swin Transformer as the encoder and the lightweight semantic segmentation head SegFormer as the decoder; A lane line recognition module is used to recognize lane lines based on the preprocessed UAV inspection image and the lightweight semantic segmentation network for lane line recognition.

3. An electronic device, It is characterized in that The method comprises a processor and a memory, wherein the memory stores a plurality of instructions, and the processor is used to read the instructions and execute the method according to claim 1.

4. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a plurality of instructions, which can be read by a processor to execute the method as claimed in claim 1 .