A method for detecting foreign objects in power transmission lines using remote sensing images based on the SAM large model
Through the remote sensing image detection method based on the SAM large model, combined with the image encoding layer and segmentation decoder, a transmission line foreign object detection network is constructed, which solves the accuracy problem of foreign object detection in transmission lines in complex environments and achieves accurate detection under a variety of conditions. and fewer false positives.
Patent Information
- Application Number
- CN202410928713.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-11
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2044-07-11
AI Technical Summary
Under complex environmental and climatic conditions, it is difficult for existing technologies to achieve high-precision foreign object detection in transmission lines, which affects the safety and operating efficiency of the power system.
The remote sensing image detection method based on the SAM large model is used to construct a foreign object detection network for transmission lines, including an image coding layer, a geometric decoder, a vertex set extraction unit and a topology decoder. Through the pre-trained image coding layer and segmentation decoder, the Transmission line prediction model and foreign object segmentation model, combining the output of both to achieve accurate detection.
Achieve accurate detection of foreign objects in transmission lines under various lighting and weather conditions, improve detection performance in complex backgrounds, reduce false alarms, and ensure the accuracy of drawing the physical connection points of each line segment.
Smart Images

Figure CN118470657B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of remote sensing image recognition, and in particular to a remote sensing image transmission line foreign body detection method based on a SAM large model. Background Art
[0002] On the one hand, the transmission line itself, as an infrastructure, serves the country's economy and people's livelihood. On the other hand, the safety of the transmission line in the nature reserve affects the ecology of the nature reserve. Therefore, improving the accuracy and effect of foreign body detection in the transmission line is of great significance for remote sensing applications and power system management. First, it can improve the safety monitoring level of power infrastructure and effectively prevent power failures and accidents. Secondly, accurate foreign body detection in the transmission line can support the planning and maintenance of power lines and improve the operating efficiency of the power system. In addition, for urban planning and disaster response, high-precision foreign body detection in the transmission line can provide important information to support relevant decision-making and emergency response.
[0003] Although some progress has been made in the foreign object detection methods for power transmission lines based on existing technologies, it is still challenging to achieve high-precision foreign object detection for power transmission lines under complex environmental and climatic conditions.
[0004] Pointwise convolution (pw convolution), also known as pointwise convolution, is a special convolution operation in which the size of the convolution kernel is 1×1. This convolution method is mainly used to change the number of channels of the feature map without changing its spatial size. The core of pointwise convolution is to use a 1×1 convolution kernel to perform a convolution operation on each position of the feature map, thereby realizing the combination or transformation of information between channels. This operation is widely used in deep learning.
[0005] ReLU (Rectified Linear Unit), also known as the corrected linear unit, is an activation function commonly used in artificial neural networks. It usually refers to a nonlinear function represented by a ramp function and its variants. Summary of the invention
[0006] The purpose of the present invention is to provide a method for detecting foreign objects in power transmission lines using remote sensing images based on the SAM large model, which can solve the above-mentioned problems and realize high-precision detection of foreign objects in power transmission lines under complex environmental and climatic conditions.
[0007] In order to achieve the above-mentioned object, the technical solution adopted by the present invention is as follows: a method for detecting foreign bodies in a power transmission line using a remote sensing image based on a SAM large model, comprising the following steps;
[0008] S1, constructing a first data set D1 and a second data set D2;
[0009] , where the zth sample (N z ,LF z ) including remote sensing images N z and N z The corresponding first label map LF z , 1≤z≤Z, Z is the total number of samples in D1, the LF z Including C class target category annotations, wherein the target categories include power transmission lines, intersections, and background;
[0010] , where the zth sample (N z ,LS z ) including N z and N z The corresponding second label graph LS z , the LS z Includes C foreign body category labels;
[0011] N z The size is H×W×3, where H is the height, W is the width, and 3 is the number of channels;
[0012] S2, constructing a transmission line foreign object detection network, including an image coding layer, a geometry decoder, a vertex set extraction unit, a topology decoder, and a segmentation decoder;
[0013] The image encoding layer is a pre-trained image encoder of the SAM model and is used to input the remote sensing image N z , after encoding, the output encoding feature map F (0) ;
[0014] The geometry decoder is used to (0) Perform 4 transposed convolutions to get a size of H×W×C class The fourth feature map F (4) , and then to F (4) Perform linear classification and get F (4) The target category probability of each pixel in F (4) The pixel F in row i and column j (4) The target category probability of (i,j) is P tri (i,j), , , , P tri The probability that the target categories in (i, j) are power lines, intersections, and background;
[0015] The vertex set extraction unit is based on the screening threshold t and non-maximum suppression method, according to Ptri (i,j) from F (4) Select pixel points as vertices to form the intersection vertex set V';
[0016] The topological decoder is used for input F (0) and V', for each vertex in V', take it as the source vertex v scr In F (0) Several vertices are determined as target vertices, and the source vertex and each target vertex are respectively formed into vertex pairs, the probability of the existence of an edge between each pair of vertices is output, and the edge is binarized to obtain the transmission network mask binary graph I ew ;
[0017] The segmentation decoder is used to input F (0) , output N z The foreign body prediction probability category of each pixel in is obtained by binarization to obtain the foreign body mask binary image I FO ;
[0018] The image coding layer, the geometry decoder, the vertex set extraction unit and the topology decoder constitute the transmission line prediction model M. 1 , the image coding layer and the segmentation decoder constitute the foreign body segmentation model M 2 ;
[0019] S3, the mask map M of foreign objects on the transmission line is obtained according to the following formula FO ;
[0020] ,
[0021] Where M FO (i,j),I ew (i,j),I FO (i,j) are M FO ,I ew ,I FO The value of the pixel at row i and column j, I ew (i,j)=1, indicating I ew There is an edge at this pixel, I FO (i,j)=1, indicating I FO The pixel is a foreign object, ⋀ is a bitwise AND operation, if M FO (i,j)=1, indicating M FO A foreign object on the transmission line is detected at the pixel point;
[0022] S4, construction M 1 The total loss L 1 , L 1 =αL ew +βL is +γL edge , where Lew is the transmission line probability loss in the geometric decoder, L is is the intersection probability loss in the geometric decoder, L edge is the topological decoder loss, α, β, and γ are L ew , L is and L edge The weight of
[0023] S5, train M with D1 1 To converge, D2 training M 2 Until convergence, and the trained M 1 and M 2 Constructing a foreign body detection network M for power transmission lines all ;
[0024] S6, obtain the remote sensing image to be detected and send it to M all , output the mask map of foreign objects on the corresponding transmission line.
[0025] Preferably, the foreign object category labels include branches, leaves, bird nests, kites, balloons, plastic bags, snow, icicles and vines.
[0026] Preferably, the geometric decoder comprises four transposed convolutional layers and a linear classification layer;
[0027] The transposed convolution kernel size of the transposed convolution layer is 3×3, the stride is 2, and the input image is upsampled by one;
[0028] Encoded feature map F (0) After four layers of transposed convolutional layers, the first feature map F is output. (1) , the second feature map F (2) , the third feature map F (3) , the fourth characteristic graph F (4) , the linear classification layer is obtained according to the following formula tri (i,j);
[0029] ,
[0030] In the formula, is the Sigmoid activation function, W tri , b tri are the weights and biases of the linear classification layer, respectively.
[0031] Preferably, the vertex set extraction unit forms an intersection vertex set V', including steps S31-S32;
[0032] S31, preset screening threshold t, for F (4) (i,j), if P triThe maximum value among (i,j) and ≥t, then extract F (4) (i,j); process F in turn (4) All pixels, all extracted pixels constitute the candidate vertex set V1;
[0033] S32, using a non-maximum suppression method to process the pixel points in V1 to obtain an intersection vertex set V'.
[0034] As a preferred embodiment: in S32, the non-maximum suppression method processes V1 specifically as follows;
[0035] Arrange the pixels in V1 in descending order according to the target category probability to obtain the descending candidate vertex set V2;
[0036] Preset radius d v , process the first pixel in V2, if its d v If there are other pixels within the range, remove them from V2;
[0037] Process the remaining pixels in V2 in turn to obtain the intersection vertex set V'.
[0038] Preferably, the topological decoder includes a local sublayer, a feature extraction layer, a projection fusion layer, a Transformer layer, a linear layer, a Sigmoid layer, and a binarization processing layer;
[0039] The local sublayer is used to generate the source vertex v scr The local subgraph of F (0) In V scr is the center of the circle, R nbr is a circular area with a radius of v, and the target vertex is the inner distance v of the local subgraph scr Most recent and at most N nbr vertices, the R nbr is the preset subgraph radius, N nbr The preset limit is the maximum number;
[0040] The feature extraction layer is used to transform v scr and a target vertex Vertex pairs , and then we can get v by the following formula: scr Upsampling features , Upsampling features , offset features of vertex pairs ;
[0041] ,
[0042] ,
[0043] ,
[0044] In the formula, It is a bilinear upsampling operation;
[0045] The projection fusion layer is used to obtain the vertex pair according to the following formula The concatenation vector and the projected vector ;
[0046] ,
[0047] ,
[0048] In the formula, is a Linear function;
[0049] The Transformer layer is used to input , capture and output long-distance dependency features ;
[0050] The linear layer and the Sigmoid layer are used to output according to the following formula and The probability of the existence of an edge ;
[0051] ,
[0052] In the formula, is the Sigmoid activation function;
[0053] The binarization layer is used to (0) Draw the edges of all vertex pairs and calculate the edges according to the preset first threshold t edge Binarize the edge. If >t edge , then the vertex pair The pixel value of the edge is 1, otherwise it is 0. After processing all vertex pairs in sequence, the power transmission network mask binary graph I is obtained. ew .
[0054] As a preference: L 1 In, L ew , L is , L edge According to the following formulas:
[0055] ,
[0056] ,
[0057] Where N is Nz The total number of pixels in y ew (i,j),y is (i,j) are LF z The transmission line label value and intersection label value of the pixel point in the i-th row and j-th column in y. If the pixel point category is a transmission line, then y ew (i,j)=1, otherwise y ew (i,j)=0, if the pixel point category is an intersection point, then y is (i,j)=1, otherwise y is (i,j)=0;
[0058] ,
[0059] In the formula, M is the total number of all vertex pairs, E is the set of all vertex pairs, For edge existence labels, if the vertex pair If there is an edge between , otherwise 0, for and The probability of the existence of an edge.
[0060] As a preference: M 2 The loss function is L 2 ;
[0061] ,
[0062] In the formula, For LS z The pixel point in row i and column j belongs to the true value of category c. is the predicted probability distribution of the pixel by the segmentation decoder.
[0063] Preferably, the segmentation decoder is formed by stacking a plurality of decoding layers, and the decoding layers include a first pw convolution layer, a batch normalization layer, a ReLU layer, a second pw convolution layer and a bilinear upsampling layer which are arranged in sequence.
[0064] The idea of the present invention is to construct a transmission line foreign body detection network, in which the image coding layer and the geometric decoder, the vertex set extraction unit and the topology decoder constitute a transmission line prediction model M 1 The image coding layer and the segmentation decoder form a foreign body segmentation model M 2 , M 1 、M 2 Shared image coding layer, during training, use D1 to train M 1 , input the sample in D1, and output the power transmission network mask binary image I ew ; Train M with D2 2, input the sample in D2, and output the foreign body mask binary image I FO ; Then integrate the two images to obtain the mask image M of the foreign objects on the transmission line FO When the remote sensing image to be detected is subjected to foreign body detection, the remote sensing image to be detected is sent to M all , by M 1 、M 2 Get the corresponding I ew ,I FO , and then integrate to get the corresponding M FO .
[0065] Compared with the prior art, the advantages of the present invention are:
[0066] The image coding layer is pre-trained, so its weight parameters are frozen in the later training, which can simplify the transmission line foreign object detection network and reduce the training complexity.
[0067] In the complex context of foreign object detection on transmission lines, a geometric decoder can effectively process and parse the linear and structural characteristics of transmission lines, and it is crucial to accurately identify the status of the line and its surroundings.
[0068] The vertex set extraction unit extracts key intersection vertex sets from the processed image data. These vertices represent the key locations where the transmission lines cross or connect. The purpose is to better understand and analyze the network structure of the transmission lines. Extracting these vertices helps optimize subsequent processing steps, such as topological analysis of network status.
[0069] The topology decoder analyzes and reconstructs the topology of the transmission line, including the connection relationship between the lines and the network composition. Its purpose is to provide a comprehensive network topology view, so that the system can effectively identify and locate foreign objects or damage on the line.
[0070] Transmission network mask binary image I obtained by the transmission line prediction model ew , ensuring that each line segment is drawn based on the actual physical connection point, thus reducing the error caused by direct segmentation image parsing errors. In general, predicting a few intersections is much simpler than the segmentation task of predicting the pixels corresponding to all transmission lines.
[0071] The foreign body segmentation model is used to obtain the foreign body mask binary image I FO , then based on I ew and I FO Get M FO ,By combining the independent mask maps of transmission lines and foreign objects, anomalies on the transmission lines can be located more accurately.,By combining the outputs of the two models, their respective deficiencies can be complemented and false alarms can be reduced.
[0072] Finally, the present invention can achieve accurate detection of foreign objects on power transmission lines under a variety of lighting and weather conditions, and improve the performance of foreign object detection on power transmission lines under complex backgrounds and adverse environments. BRIEF DESCRIPTION OF THE DRAWINGS
[0073] Figure 1 It is a flow chart of the present invention;
[0074] Figure 2 This is a network architecture diagram of the present invention;
[0075] Figure 3 It is a schematic diagram of the geometry decoder structure;
[0076] Figure 4 It is a schematic diagram of the topological decoder structure;
[0077] Figure 5 Schematic diagram of the segmentation decoder structure. DETAILED DESCRIPTION
[0078] The present invention will be further described below in conjunction with the accompanying drawings.
[0079] Example 1: See Figures 1 to 5 ,A method for detecting foreign objects in a power transmission line from remote sensing images based on the SAM large model, comprises the following steps;
[0080] S1, constructing a first data set D1 and a second data set D2;
[0081] , where the zth sample (N z ,LF z ) including remote sensing images N z and N z The corresponding first label map LF z , 1≤z≤Z, Z is the total number of samples in D1, the LF z Including C class target category annotations, wherein the target categories include power transmission lines, intersections, and background;
[0082] , where the zth sample (N z ,LS z ) including N z and N z The corresponding second label graph LS z , the LS z Includes C foreign body category labels;
[0083] N z The size is H×W×3, where H is the height, W is the width, and 3 is the number of channels;
[0084] S2, constructing a transmission line foreign object detection network, including an image coding layer, a geometry decoder, a vertex set extraction unit, a topology decoder, and a segmentation decoder;
[0085] The image encoding layer is a pre-trained image encoder of the SAM model and is used to input the remote sensing image N z , after encoding, the output encoding feature map F (0) ;
[0086] The geometry decoder is used to (0) Perform 4 transposed convolutions to get a size of H×W×C class The fourth feature map F (4) , and then to F (4) Perform linear classification and get F (4) The target category probability of each pixel in F (4) The pixel F in row i and column j (4) The target category probability of (i,j) is P tri (i,j), , , , P tri The probability that the target categories in (i, j) are power lines, intersections, and background;
[0087] The vertex set extraction unit is based on the screening threshold t and non-maximum suppression method, according to P tri (i,j) from F (4) Select pixel points as vertices to form the intersection vertex set V';
[0088] The topological decoder is used for input F (0) and V', for each vertex in V', take it as the source vertex v scr In F (0) Several vertices are determined as target vertices, and the source vertex and each target vertex are respectively formed into vertex pairs, the probability of the existence of an edge between each pair of vertices is output, and the edge is binarized to obtain the transmission network mask binary graph I ew ;
[0089] The segmentation decoder is used to input F (0) , output N z The foreign body prediction probability category of each pixel in is obtained by binarization to obtain the foreign body mask binary image I FO ;
[0090] The image coding layer, the geometry decoder, the vertex set extraction unit and the topology decoder constitute the transmission line prediction model M. 1 , the image coding layer and the segmentation decoder constitute the foreign body segmentation model M 2 ;
[0091] S3, the mask map M of foreign objects on the transmission line is obtained according to the following formula FO ;
[0092] ,
[0093] Where M FO (i,j),I ew (i,j),I FO (i,j) are M FO ,I ew ,I FO The value of the pixel at row i and column j, I ew (i,j)=1, indicating I ew There is an edge at this pixel, I FO (i,j)=1, indicating I FO The pixel is a foreign object, ⋀ is a bitwise AND operation, if M FO (i,j)=1, indicating M FO A foreign object on the transmission line is detected at the pixel point;
[0094] S4, construction M 1 The total loss L 1 , L 1 =αL ew +βL is +γL edge , where L ew is the transmission line probability loss in the geometric decoder, L is is the intersection probability loss in the geometric decoder, L edge is the topological decoder loss, α, β, and γ are L ew , L is and L edge The weight of
[0095] S5, train M with D1 1 To converge, D2 training M 2 Until convergence, and the trained M 1 and M 2 Constructing a foreign body detection network M for power transmission lines all ;
[0096] S6, obtain the remote sensing image to be detected and send it to M all , output the mask map of foreign objects on the corresponding transmission line.
[0097] Example 2: See Figures 1 to 5 Based on Example 1, the foreign object category labels include branches, leaves, bird nests, kites, balloons, plastic bags, snow, icicles and vines.
[0098] The geometric decoder includes four transposed convolutional layers and a linear classification layer;
[0099] The transposed convolution kernel size of the transposed convolution layer is 3×3, the stride is 2, and the input image is upsampled by one;
[0100] Encoded feature map F (0) After four layers of transposed convolutional layers, the first feature map F is output. (1) , the second feature map F (2) , the third feature map F (3) , the fourth characteristic graph F (4) , the linear classification layer is obtained according to the following formula tri (i,j);
[0101] ,
[0102] In the formula, is the Sigmoid activation function, W tri , b tri are the weights and biases of the linear classification layer, respectively.
[0103] The vertex set extraction unit forms an intersection vertex set V', including steps S31-S32;
[0104] S31, preset screening threshold t, for F (4) (i,j), if P tri The maximum value among (i,j) and ≥t, then extract F (4) (i,j); process F in turn (4) All pixels, all extracted pixels constitute the candidate vertex set V1;
[0105] S32, using a non-maximum suppression method to process the pixel points in V1 to obtain an intersection vertex set V', wherein the non-maximum suppression method is used to process V1 as follows;
[0106] Arrange the pixels in V1 in descending order according to the target category probability to obtain the descending candidate vertex set V2;
[0107] Preset radius d v , process the first pixel in V2, if its d v If there are other pixels within the range, remove them from V2;
[0108] Process the remaining pixels in V2 in turn to obtain the intersection vertex set V'.
[0109] The topological decoder includes a local sublayer, a feature extraction layer, a projection fusion layer, a Transformer layer, a linear layer, a Sigmoid layer, and a binarization processing layer;
[0110] The local sublayer is used to generate the source vertex v scr The local subgraph of F (0) In V scr is the center of the circle, R nbr is a circular area with a radius of v, and the target vertex is the inner distance v of the local subgraph scr Most recent and at most N nbr vertices, the R nbr is the preset subgraph radius, N nbr The preset limit is the maximum number;
[0111] The feature extraction layer is used to transform v scr and a target vertex Vertex pairs , and then we can get v by the following formula: scr Upsampling features , Upsampling features , offset features of vertex pairs ;
[0112] ,
[0113] ,
[0114] ,
[0115] In the formula, It is a bilinear upsampling operation;
[0116] The projection fusion layer is used to obtain the vertex pair according to the following formula The concatenation vector and the projected vector ;
[0117] ,
[0118] ,
[0119] In the formula, is a Linear function;
[0120] The Transformer layer is used to input , capture and output long-distance dependency features ;
[0121] The linear layer and the Sigmoid layer are used to output according to the following formula and The probability of the existence of an edge ;
[0122] ,
[0123] In the formula, is the Sigmoid activation function;
[0124] The binarization layer is used to (0) Draw the edges of all vertex pairs and calculate the edges according to the preset first threshold t edge Binarize the edge. If >t edge , then the vertex pair The pixel value of the edge is 1, otherwise it is 0. After processing all vertex pairs in sequence, the power transmission network mask binary graph I is obtained. ew .
[0125] L 1 In, L ew , L is , L edge According to the following formulas:
[0126] ,
[0127] ,
[0128] Where N is N z The total number of pixels in y ew (i,j),y is (i,j) are LF z The transmission line label value and intersection label value of the pixel point in the i-th row and j-th column in y. If the pixel point category is a transmission line, then y ew (i,j)=1, otherwise y ew (i,j)=0, if the pixel point category is an intersection point, then y is (i,j)=1, otherwise y is (i,j)=0;
[0129] ,
[0130] In the formula, M is the total number of all vertex pairs, E is the set of all vertex pairs, For edge existence labels, if the vertex pair If there is an edge between , otherwise 0, for and The probability of the existence of an edge.
[0131] M 2 The loss function is L 2 ;
[0132] ,
[0133] In the formula, For LS z The pixel point in row i and column j belongs to the true value of category c. is the predicted probability distribution of the pixel by the segmentation decoder.
[0134] The segmentation decoder is composed of a plurality of stacked decoding layers, wherein the decoding layers include a first pw convolution layer, a batch normalization layer, a ReLU layer, a second pw convolution layer and a bilinear upsampling layer which are arranged in sequence.
[0135] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for detecting foreign objects in power transmission lines using remote sensing images based on a large SAM model, characterized in that: The steps include: S1, constructing a first data set D1 and a second data set D2; , where the zth sample (N z ,LF z ) including remote sensing images N z and N z The corresponding first label map LF z , 1≤z≤Z, Z is the total number of samples in D1, the LF z Including C class target category annotations, wherein the target categories include power transmission lines, intersections, and background; , where the zth sample (N z ,LS z ) including N z and N z The corresponding second label graph LS z , the LS z Includes C foreign body category labels; N z The size is H×W×3, where H is the height, W is the width, and 3 is the number of channels; S2, constructing a transmission line foreign object detection network, including an image coding layer, a geometry decoder, a vertex set extraction unit, a topology decoder, and a segmentation decoder; The image encoding layer is a pre-trained image encoder of the SAM model and is used to input the remote sensing image N z , after encoding, the output encoding feature map F (0) ; The geometry decoder is used to (0) Perform 4 transposed convolutions to get a size of H×W×C class The fourth feature map F (4) , and then to F (4) Perform linear classification and get F (4) The target category probability of each pixel in F (4) The pixel F in row i and column j (4) The target category probability of (i,j) is P tri (i,j), , , , P tri The probability that the target categories in (i, j) are power lines, intersections, and background; The vertex set extraction unit is based on the screening threshold t and non-maximum suppression method, according to P tri (i,j) from F (4) Select pixel points as vertices to form the intersection vertex set V'; The topological decoder is used for input F (0) and V', for each vertex in V', take it as the source vertex v scr In F (0) Several vertices are determined as target vertices, and the source vertex and each target vertex are respectively formed into vertex pairs, the probability of the existence of an edge between each pair of vertices is output, and the edge is binarized to obtain the transmission network mask binary graph I ew ; The segmentation decoder is used to input F (0) , output N z The foreign body prediction probability category of each pixel in is obtained by binarization to obtain the foreign body mask binary image I FO ; The image coding layer, the geometry decoder, the vertex set extraction unit and the topology decoder constitute the power transmission line prediction model M1, and the image coding layer and the segmentation decoder constitute the foreign body segmentation model M2; S3, the mask map M of foreign objects on the transmission line is obtained according to the following formula FO ; , Where M FO (i,j),I ew (i,j),I FO (i,j) are M FO ,I ew ,I FO The value of the pixel at row i and column j, I ew (i,j)=1, indicating I ew There is an edge at this pixel, I FO (i,j)=1, indicating I FO The pixel is a foreign object, ⋀ is a bitwise AND operation, if M FO (i,j)=1, indicating M FO A foreign object on the transmission line is detected at the pixel point; S4, construct the total loss L1 of M1, L1=αL ew +βL is +γL edge , where L ew is the transmission line probability loss in the geometric decoder, L is is the intersection probability loss in the geometric decoder, L edge is the topological decoder loss, α, β, and γ are L ew , L is and L edge The weight of S5, use D1 to train M1 until convergence, use D2 to train M2 until convergence, and use the trained M1 and M2 to form a power transmission line foreign body detection network M all ; S6, obtain the remote sensing image to be detected and send it to M all , output the mask map of foreign objects on the corresponding transmission line.
2. According to claim 1, a method for detecting foreign bodies in power transmission lines using remote sensing images based on a large SAM model, characterized in that: The foreign object category labels include branches, leaves, bird nests, kites, balloons, plastic bags, snow, icicles and vines.
3. The method for detecting foreign bodies in power transmission lines using remote sensing images based on a SAM large model according to claim 1, characterized in that: The geometric decoder includes four transposed convolutional layers and a linear classification layer; The transposed convolution kernel size of the transposed convolution layer is 3×3, the stride is 2, and the input image is upsampled by one; Encoded feature map F (0) After four layers of transposed convolutional layers, the first feature map F is output. (1) , the second feature map F (2) , the third feature map F (3) , the fourth characteristic graph F (4) , the linear classification layer is obtained according to the following formula tri (i,j); , In the formula, is the Sigmoid activation function, W tri 、b tri are the weights and biases of the linear classification layer, respectively.
4. The method for detecting foreign bodies in power transmission lines using remote sensing images based on a SAM large model according to claim 1 is characterized in that: The vertex set extraction unit forms an intersection vertex set V', including steps S31-S32; S31, preset screening threshold t, for F (4) (i,j), if P tri The maximum value among (i,j) and ≥t, then extract F (4) (i,j); process F in turn (4) All pixels, all extracted pixels constitute the candidate vertex set V1; S32, using a non-maximum suppression method to process the pixel points in V1 to obtain an intersection vertex set V'.
5. The method for detecting foreign bodies in power transmission lines using remote sensing images based on a SAM large model according to claim 4 is characterized in that: In S32, the non-maximum suppression method processes V1 specifically as follows; Arrange the pixels in V1 in descending order according to the target category probability to obtain the descending candidate vertex set V2; Preset radius d v , process the first pixel in V2, if its d v If there are other pixels within the range, remove them from V2; Process the remaining pixels in V2 in turn to obtain the intersection vertex set V'.
6. The method for detecting foreign bodies in power transmission lines using remote sensing images based on a SAM large model according to claim 1, characterized in that: The topological decoder includes a local sublayer, a feature extraction layer, a projection fusion layer, a Transformer layer, a linear layer, a Sigmoid layer, and a binarization processing layer; The local sublayer is used to generate the source vertex v scr The local subgraph of F (0) In V scr is the center of the circle, R nbr is a circular area with a radius of v, and the target vertex is the inner distance v of the local subgraph scr Most recent and at most N nbr vertices, the R nbr is the preset subgraph radius, N nbr The preset limit is the maximum number; The feature extraction layer is used to transform v scr and a target vertex Vertex pairs , and then we can get v by the following formula: scr Upsampling features , Upsampling features , offset features of vertex pairs ; , , , In the formula, It is a bilinear upsampling operation; The projection fusion layer is used to obtain the vertex pair according to the following formula The concatenation vector and the projected vector ; , , In the formula, is a Linear function; The Transformer layer is used to input , capture and output long-distance dependency features ; The linear layer and the Sigmoid layer are used to output according to the following formula and The probability of the existence of an edge ; , In the formula, is the Sigmoid activation function; The binarization layer is used to (0) Draw the edges of all vertex pairs and calculate the edges according to the preset first threshold t edge Binarize the edge. If >t edge , then the vertex pair The pixel value of the edge is 1, otherwise it is 0. After processing all vertex pairs in sequence, the power transmission network mask binary graph I is obtained. ew .
7. The method for detecting foreign bodies in power transmission lines using remote sensing images based on a large SAM model according to claim 6 is characterized by: In L1, L ew , L is , L edge According to the following formulas: , , Where N is N z The total number of pixels in y ew (i,j),y is (i,j) are LF z The transmission line label value and intersection label value of the pixel point in the i-th row and j-th column in y. If the pixel point category is a transmission line, then y ew (i,j)=1, otherwise y ew (i,j)=0, if the pixel point category is an intersection point, then y is (i,j)=1, otherwise y is (i,j)=0; , In the formula, M is the total number of all vertex pairs, E is the set of all vertex pairs, There is a label for the edge if the vertex pair If there is an edge between , otherwise 0, for and The probability of the existence of an edge.
8. The method for detecting foreign bodies in power transmission lines using remote sensing images based on a large SAM model according to claim 1, characterized in that: The loss function of M2 is L2; , In the formula, For LS z The pixel point in row i and column j belongs to the true value of category c. is the predicted probability distribution of the pixel by the segmentation decoder.
9. The method for detecting foreign bodies in power transmission lines using remote sensing images based on a SAM large model according to claim 1, characterized in that: The segmentation decoder is composed of a plurality of stacked decoding layers, wherein the decoding layers include a first pw convolution layer, a batch normalization layer, a ReLU layer, a second pw convolution layer and a bilinear upsampling layer which are arranged in sequence.
