Method for detecting key components and defects of overhead transmission line

By combining the balanced feature pyramid and side-sensing boundary localization methods with the Swin Transformer model, the problem of scale variation of key components and detection of small targets in overhead transmission lines was solved, achieving high-precision detection results.

CN116862828BActive Publication Date: 2026-04-28NORTH CHINA ELECTRIC POWER UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
NORTH CHINA ELECTRIC POWER UNIV
Filing Date
2023-03-30
Publication Date
2026-04-28

AI Technical Summary

Technical Problem

In overhead transmission lines, the scale of key components varies greatly and the detection accuracy of small targets is low. Existing technologies cannot effectively integrate high-level semantic features and shallow semantic features, resulting in low detection accuracy.

Method used

A balanced feature pyramid and side-aware boundary localization method is adopted, combined with the Swin Transformer model, to design the Cascade RCNN object detection framework. The balanced feature pyramid module enhances the information flow between upper and lower layers, and a multi-stage cascaded side-aware boundary regression method is used to improve the localization accuracy of small targets.

Benefits of technology

It has improved the detection accuracy of key components and defects of overhead transmission lines, especially the ability to locate small targets, and has achieved efficient detection in complex environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116862828B_ABST
    Figure CN116862828B_ABST
Patent Text Reader

Abstract

The application discloses a kind of overhead transmission line key components and the detection method of defect, select Cascade RCNN as basic model, use Swin Transformer as main network;On the basis of original feature pyramid network, design balanced feature pyramid network, balance the information flow between upper and lower layers, improve the separability of the features extracted by main network;For the features extracted by the region of interest pooling layer, a multi-stage cascaded side perception boundary regression method is used, which uses the generated side perception features to roughly estimate the barrel area of the boundary first, and then finely regress to a more accurate position. Through the two-step positioning coordinate regression method of multiple stages, the positioning ability of the model for transmission line components, defects and small targets is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image analysis technology, and in particular to a method for detecting key components and defects in overhead power transmission lines. Background Technology

[0002] The safety of power systems is based on the stable operation of overhead transmission lines. Key components of transmission lines, such as fittings and insulators, which play mechanical and electrical roles in fixing, supporting, connecting, conducting, and insulating, are susceptible to the effects of extreme temperatures, frost, ice, and other extreme weather conditions. Prolonged exposure to adverse environments often leads to defects such as corrosion, deformation, and damage. Therefore, visual inspection of overhead transmission lines is essential for timely fault detection and repair.

[0003] With the rapid development of drone aerial photography technology, inspectors with extensive experience and knowledge of power transmission lines can identify defects in aerial photographs. While this method largely saves manpower and ensures personal safety, it still relies on inspectors' familiarity with and extensive knowledge of aerial survey images of power transmission lines for screening. Therefore, efficient and intelligent identification of components and their defects within power transmission line systems is crucial.

[0004] In recent years, computer vision-based target detection technology has made great breakthroughs, and drone-based power line inspection based on target recognition technology has become the main method.

[0005] However, several challenges remain in using deep learning methods to detect key components and defects in transmission lines:

[0006] 1) The scale of key components in transmission line images varies greatly. To ensure the safe flight of drones, they can only take high-quality photos of key components of transmission lines from a distance, which leads to a wide range of shooting angles and large-scale changes in key components. Therefore, in the detection of key components and defects of overhead transmission lines, the flow and fusion between high-level semantic features and shallow semantic features is one of the powerful ways to solve the problem of large-scale changes.

[0007] 2) The problem of detecting small targets in transmission lines is very serious. In the constructed images of key components and defects of transmission lines, approximately 96.54% of the key components occupy only 1 / 25 of the original image area. Due to the large number of small targets in the transmission line dataset, the ability to locate small targets in transmission lines has become one of the key factors in evaluating the quality of the model. Summary of the Invention

[0008] Regarding the aforementioned problems, the inventors discovered that a balanced feature pyramid and side-aware boundary localization method can be used to enhance the flow of features extracted by the model between upper and lower layers and the localization ability of small targets, thereby solving the problem of detecting key components and defects in overhead transmission lines. The purpose of this invention is to provide a method for detecting key components and defects in overhead transmission lines based on a balanced feature pyramid and side-aware boundary localization method. This method addresses the problems of large scale variations in key components and inaccurate localization of small targets in transmission line dataset images. A Cascade R-CNN object detection framework with Swin Transformer as the main network is designed, a balanced pyramid network is designed to balance the information flow between upper and lower layers, and a side-aware boundary localization method is designed to further improve the model's localization accuracy.

[0009] To achieve the above objectives, the present invention provides the following solution:

[0010] A method for detecting key components and defects in overhead transmission lines, comprising:

[0011] An image dataset of key components and defects of transmission lines is constructed, which contains images of transmission line components and defects of different categories and scales;

[0012] The constructed image dataset is input into a preset detection network to obtain the detection results;

[0013] The preset detection network uses Cascade R-CNN as its basic architecture and the SwinTransformer model as its backbone network. Based on the original feature pyramid network, a balanced feature pyramid module is designed to balance the information flow between upper and lower layers, especially enhancing the flow and fusion between high-level and shallow semantic features, which helps improve the separability of features extracted by the backbone network. The Region of Interest (RoI) Pooling layer performs max pooling on the feature maps obtained by the balanced feature pyramid module to obtain fixed-size feature maps. For the fixed-size feature maps obtained by RoIPooling, a multi-stage cascaded side-aware boundary regression method is used. The generated side-aware features are used to first roughly estimate the bucket regions of the boundary, and then finely regress to a more accurate target location. A three-stage, two-step localization coordinate regression method is used to improve the model's ability to locate transmission line components, defects, and small targets.

[0014] Specifically, the selection of Cascade R-CNN as the basic architecture includes:

[0015] The selected Cascade R-CNN framework consists of four parts: a Swing Transformer as the backbone network for extracting image features; a feature pyramid network and a balanced feature pyramid module as the neck network for balancing the information flow between the upper and lower layers of the feature maps extracted by the backbone network; a Region Proposal Network for generating candidate regions for pooling operations of regions of interest; and a multi-cascade prediction head network that uses a side-aware regression localization method to regress coordinate positions and classifications.

[0016] Specifically, the adoption of the Swin Transformer model as the backbone network includes:

[0017] The Swin Transformer, which serves as the backbone network, consists of four modules: Patch Partition, Linear Embedding, Swin Transformer Block, and Patch Merging.

[0018] First, the image enters the block segmentation module, thereby transforming the original resolution into multiple smaller resolution images; then, the multiple resolution images are input into the linear embedding layer and fixed as features of a specified dimension; finally, it enters the stage consisting of block fusion and Swing Transformer blocks multiple times.

[0019] Block fusion halves the feature resolution and doubles the number of channels; the Swin Transformer block consists of two consecutive window-based multi-head self-attention mechanisms and a sliding window-based multi-head self-attention mechanism, which can ensure reduced computational complexity while preserving the long-range semantic information of the extracted features; the calculation formula for the Swin Transformer block is:

[0020]

[0021]

[0022]

[0023]

[0024] In equation (1), z l-1 This represents the input features of W-MSA in the l-th module. This represents the output characteristics of W-MSA in the l-th module; z l This represents the output feature of the multilayer perceptron in the l-th module; This represents the output characteristics of the SW-MSA in the (l+1)th module; z l+1 represents the output features of the multilayer perceptron in the (l+1)th module; W-MSA represents a window-based multi-head self-attention mechanism; SW-MSA represents a sliding window-based multi-head self-attention mechanism.

[0025] To ensure stability during model training, the attention calculation method used is the scaled cosine attention method. This method calculates the attention between pixel i and pixel j using a scaled cosine function. The specific calculation formula is as follows:

[0026] Sim(q i ,k j )=cos(q i ,k j ) / τ+B ij (2)

[0027] Among them, B ij τ is the relative positional offset between pixel i and pixel j; τ is a learnable and independent scalar; q i It is the query vector for the multi-head self-attention mechanism at pixel i; k j It is the key vector for the multi-head self-attention mechanism at pixel j.

[0028] Specifically, based on the original feature pyramid network, a balanced feature pyramid module is designed to balance the information flow between upper and lower layers, especially enhancing the flow and fusion between high-level semantic features and shallow semantic features. This helps improve the separability of features extracted by the backbone network, specifically including:

[0029] First, the multi-level features C2, C3, C4, and C5 extracted by the backbone network Swin transformer enter the feature pyramid module. After the multi-level features pass through 1x1 convolutional layers, the multi-level features are fixed to the same dimension. The higher-level features are upsampled in order from top to bottom and added to the lower-level features. After passing through 3x3 convolutional layers and downsampling, the multi-level features P2', P3', P4', P5', and P6' are obtained.

[0030] Next, the multi-level features P2', P3', P4', P5', and P6' extracted by the feature pyramid module enter the feature balancing pyramid module. The multi-level features are adjusted to a uniform medium size through a doubling upsampling and a halving downsampling. The adjusted uniform-sized features are then averaged to obtain the balanced semantic features. The specific calculation method is as follows:

[0031]

[0032] In the formula, P' lLet L represent the feature at resolution l, and L represent the number of multi-level features. min and l max These represent the indexes of the lowest resolution and the highest resolution features, respectively.

[0033] Finally, P' further refines the semantic features through nonlocal modules; after a reverse process, the features are re-featured and added to the original features to obtain balanced and refined multi-level features P2, P3, P4, P5, P6.

[0034] In this method, RoI Pooling performs max pooling on the feature map obtained from the balanced feature pyramid module to obtain a fixed-size feature map. For the fixed-size feature map obtained by RoI Pooling, a multi-stage cascaded side-aware boundary regression method is employed. This method uses the generated side-aware features to first roughly estimate the bucket region of the boundary, and then finely regresses to a more accurate target location. Through a three-stage, two-step localization coordinate regression method, the model's ability to locate transmission line components, defects, and small targets is improved. Specifically, this includes:

[0035] First, the features extracted by RoI Pooling are transformed into features F through a 3x3 convolutional layer; the features are then passed through two different 1x1 convolutional layers to obtain features M in the x-axis and y-axis directions. x and M y ; feature M x and M y Perform a self-attention operation on feature F to obtain features F in the x-axis and y-axis directions. x With F y ; feature F x With F y The left-side feature F is obtained by segmenting through 1x3 and 3x1 convolutional layers, followed by a deconvolutional layer. left The feature F on the right right The feature F above top and the feature F below down ;

[0036] Next, using the obtained lateral sensing features F left F right F top and F down The initial estimation of the proposal box is performed, and a binary classifier is used to predict the location of the boundary closest to the bucket on each edge of the proposal box. After determining the location of the bucket closest to the ground truth label boundary, the center line location of the bucket is put into the regressor to regress to the location of the ground truth label, thereby alleviating the difficulty of location prediction caused by the large regression variance.

[0037] Finally, the coordinates obtained by the side-aware boundary localization method are used as suggestion boxes and added to the next coordinate prediction. The side-aware boundary localization method is used multiple times, and the coordinate prediction result obtained in the last time is used as the final result.

[0038] This invention discloses the following technical effects: It provides a method for detecting key components and defects in overhead transmission lines. Specifically, it is a method for detecting key components and defects in overhead transmission lines based on a balanced feature pyramid and side-aware boundary localization. A dataset of images of key components and defects in overhead transmission lines is constructed. Cascade R-CNN is used as the basic detection model, and Swin Transformer is used as the backbone network, which reduces the computational load of the model and improves the interaction of global features. To address the issue of scale variation in the overhead transmission line dataset, a balanced pyramid network is designed based on the feature pyramid network to further enhance the information flow between upper and lower layers of features. To address the issue of small target detection accuracy in the detection of key components and defects in transmission lines, a multi-stage cascaded side-aware boundary localization method is designed. Side-aware features are generated, and these features are used to first roughly estimate the bucket region of the boundary, and finally, a more accurate regression is performed, thereby further improving the model's ability to locate transmission line components and defects. Attached Figure Description

[0039] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0040] Figure 1 This is a schematic flowchart of a method for detecting key components and defects of an overhead power transmission line according to an embodiment of the present invention;

[0041] Figure 2 This is a schematic diagram of the network structure of the backbone network, Swing Transformer, in an embodiment of the present invention.

[0042] Figure 3 This is a schematic diagram of the structure of the balanced pyramid network according to an embodiment of the present invention;

[0043] Figure 4 This is a schematic diagram of the overall structure of an embodiment of the present invention;

[0044] Figure 5 This is a rendering of a key component of a power transmission line according to an embodiment of the present invention. Detailed Implementation

[0045] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0046] The purpose of this invention is to provide a detection method for key components and defects of overhead transmission lines based on balanced feature pyramid and side-sensing boundary positioning, which solves the problems of low positioning accuracy of small targets and insufficient feature fusion, and achieves the goal of improving detection accuracy while meeting the requirements of real-time detection.

[0047] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0048] like Figure 1 As shown, the present invention provides a method for detecting key components and defects in overhead transmission lines, specifically a method for detecting key components and defects in overhead transmission lines based on balanced feature pyramids and side sensing boundary positioning, comprising:

[0049] An image dataset of key components and defects of transmission lines is constructed, which contains images of transmission line components and defects of different categories and scales.

[0050] The constructed image dataset is input into a preset detection network to obtain the detection results.

[0051] The preset detection network uses Cascade R-CNN as its basic architecture and the SwinTransformer model as its backbone network. Based on the original feature pyramid network, a balanced feature pyramid module is designed to balance the information flow between upper and lower layers, especially enhancing the flow and fusion between high-level and shallow semantic features, which helps improve the separability of features extracted by the backbone network. The Region of Interest (RoI) Pooling layer performs max pooling on the feature maps obtained by the balanced feature pyramid module to obtain fixed-size feature maps. For the fixed-size feature maps obtained by RoIPooling, a multi-stage cascaded side-aware boundary regression method is used. The generated side-aware features are used to first roughly estimate the bucket regions of the boundary, and then finely regress to a more accurate target location. A three-stage, two-step localization coordinate regression method is used to improve the model's ability to locate transmission line components, defects, and small targets.

[0052] Deep learning models require a large number of image samples for training. To ensure the safe flight of drones, they can only take high-quality photos of key components of power transmission lines from a distance. Therefore, samples containing key components and defects need to be screened and labeled. Thus, an image dataset of key components and defects of power transmission lines is constructed. This dataset contains images of power transmission line components and defects of different categories and scales, specifically including:

[0053] Images of key components and defects of transmission lines captured during inspections are collected, cleaned, and selected that are clear and contain key components and defects. These images are then annotated using the COCO dataset method to generate JSON annotation files. The types of images of key components and defects of transmission lines include, but are not limited to, the following categories: parallel slot clamps, bag-type suspension clamps, shielding rings, equalizing rings, wedge-shaped tension clamps, vibration dampers, hanging plates, counterweights, pre-stretched suspension clamps, U-shaped hanging rings, connecting plates, insulators, and insulator cap defects.

[0054] Considering that traditional convolutional neural network computation mechanisms can lead to model bloat, increased computational cost, and gradient vanishing, this invention employs the Swing Transformer as the backbone network to acquire features with global information. Therefore, Cascade R-CNN is selected as the basic architecture, and the Swing Transformer model is used as the backbone network, specifically including:

[0055] The Cascade R-CNN framework selected in this invention consists of four parts: a SwingTransformer as the backbone network for extracting image features; a feature pyramid network and a balanced feature pyramid module as the neck network for balancing the upper and lower layers of information flow in the feature maps extracted by the backbone network; a Region Proposal Network for generating candidate regions for pooling operations in regions of interest; and a multi-cascaded prediction head network that uses a side-aware regression localization method to regress coordinate positions and classifications.

[0056] The Swin Transformer backbone network comprises four modules: Patch Partition, Linear Embedding, Swin Transformer Block, and Patch Merging. The network structure of the Swin Transformer backbone network is as follows: Figure 2As shown. First, the image enters the block segmentation module, thus transforming the original resolution into multiple smaller resolution images. Next, these multiple resolution images are input into the linear embedding layer, where they are fixed as features of a specified dimension. Finally, the image enters multiple stages consisting of block fusion and the Swin Transformer block. Block fusion halves the feature resolution and doubles the number of channels. The Swin Transformer block consists of two consecutive window-based multi-head self-attention layers and a sliding window-based multi-head self-attention layer, which can reduce computational complexity while ensuring the long-range semantic information of the extracted features. The calculation formula for the Swin Transformer block is:

[0057]

[0058]

[0059]

[0060]

[0061] In the formula, z l-1 This represents the input features of W-MSA in the l-th module. This represents the output characteristics of W-MSA in the l-th module; z l This represents the output feature of the multilayer perceptron in the l-th module; This represents the output characteristics of the SW-MSA in the (l+1)th module; z l+1 represents the output features of the multilayer perceptron in the (l+1)th module; W-MSA represents the window-based multi-head self-attention mechanism; SW-MSA represents the sliding window-based multi-head self-attention mechanism.

[0062] To ensure stability during model training, the attention calculation method used is the scaled cosine attention method. This method calculates the attention between pixel i and pixel j using a scaled cosine function. The specific calculation formula is as follows:

[0063] Sim(q i ,k j )=cos(q i ,k j ) / τ+B ij (2)

[0064] Among them, B ij τ is the relative positional offset between pixel i and pixel j; τ is a learnable and independent scalar; q i It is the query vector for the multi-head self-attention mechanism at pixel i; k jIt is the key vector for the multi-head self-attention mechanism at pixel j.

[0065] To ensure the safe flight of drones, they can only take high-quality photos of key components of power transmission lines from a distance. This results in a wide range of shooting angles and large-scale changes in the key components. In the detection of key components and defects in overhead power lines, the flow and fusion of high-level and shallow semantic features is one of the powerful ways to solve the problem of large-scale changes. Therefore, based on the original feature pyramid network, a balanced feature pyramid module is designed to balance the information flow between upper and lower layers, especially enhancing the flow and fusion between high-level and shallow semantic features. This helps improve the separability of features extracted by the backbone network, specifically including:

[0066] First, the multi-level features C2, C3, C4, and C5 extracted by the backbone network Swin transformer are fed into the feature pyramid module. After passing through 1x1 convolutional layers, the multi-level features are fixed to the same dimension. The higher-level features are upsampled sequentially from top to bottom and added to the lower-level features. Through 3x3 convolutional layers and downsampling, the multi-level features P2', P3', P4', P5', and P6' are obtained.

[0067] Next, the multi-level features P2', P3', P4', P5', and P6' extracted by the feature pyramid module are entered into the feature balancing pyramid module. The multi-level features are adjusted to a uniform, medium-sized feature by doubling upsampling and halving downsampling; the adjusted, uniform-sized features are then averaged to obtain the balanced semantic features. The specific calculation method is as follows:

[0068]

[0069] In the formula, P' l Let L represent the feature at resolution l, and L represent the number of multi-level features. min and l max These represent the indexes of the lowest resolution features and the highest resolution features, respectively.

[0070] Finally, P' further refines the semantic features through nonlocal modules; after a reverse process, the features are re-defined and added to the original features to obtain balanced and refined multi-level features P2, P3, P4, P5, and P6. The structure of the balanced pyramid network is as follows: Figure 3 As shown.

[0071] The image dataset of key components and defects in power transmission lines contains a large number of small targets, and the ability to locate these small targets is a key factor in evaluating model performance. Therefore, RoI Pooling performs max pooling on the feature maps obtained from the balanced feature pyramid module to obtain fixed-size feature maps. For the fixed-size feature maps obtained by RoI Pooling, a multi-stage cascaded side-aware boundary regression method is employed. This method uses the generated side-aware features to first roughly estimate the bucket regions of the boundaries, and then performs a fine-grained regression to more accurate target locations. Through a three-stage, two-step localization coordinate regression method, the model's ability to locate power transmission line components, defects, and small targets is improved. Specifically, this includes:

[0072] First, the features extracted by RoI Pooling are transformed into features F through a 3x3 convolutional layer; the features are then passed through two different 1x1 convolutional layers to obtain features M in the x-axis and y-axis directions. x and M y ; feature M x and M y Perform a self-attention operation on feature F to obtain features F in the x-axis and y-axis directions. x With F y ; feature F x With F y The left-side feature F is obtained by segmenting through 1x3 and 3x1 convolutional layers, followed by a deconvolutional layer. left The feature F on the right right The feature F above top and the feature F below down .

[0073] Next, using the obtained lateral sensing features F left F right F top and F down The initial estimation of the proposal box is performed, and a binary classifier is used to predict the boundary as the position closest to the bucket on each edge of the proposal box. After determining the bucket position closest to the true label boundary, the center line position of the bucket is put into the regressor to regress to the position of the true label, thereby alleviating the difficulty of position prediction caused by the large regression variance.

[0074] Finally, the coordinates obtained by the side-aware boundary localization method are used as suggestion boxes and added to the next coordinate prediction. The side-aware boundary localization method is used multiple times, and the coordinate prediction result obtained in the last time is used as the final result.

[0075] The present invention discloses a method for detecting key components and defects in overhead transmission lines based on a balanced feature pyramid and side-sensing boundary localization. The network structure of this detection method is as follows: Figure 4 As shown.

[0076] The detection effect of the detection method described in this invention is as follows: Figure 5 As shown, this invention uses Cascade R-CNN as the basic detection model and Swing Transformer as the backbone network. This reduces the computational load of the model while improving the interaction of global features. Addressing the issue of scale variations in overhead transmission line data, a balanced pyramid network is designed based on the feature pyramid network to further enhance information flow between upper and lower layers. To address the issue of small target detection accuracy in the detection of key components and defects in transmission lines, a multi-stage cascaded side-aware boundary localization method is designed. This method generates side-aware features and uses these features to first roughly estimate the bucket regions of the boundaries, and finally performs a fine-grained regression to a more accurate location, thereby further improving the model's ability to locate transmission line components and defects. This invention effectively improves the detection performance of the Cascade R-CNN network and achieves accurate identification of key components and defects.

[0077] This document uses specific examples to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. Furthermore, those skilled in the art will recognize that, based on the ideas of the present invention, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. A method for detecting key components and defects in overhead transmission lines, characterized in that, include: An image dataset of key components and defects of transmission lines is constructed, which contains images of transmission line components and defects of different categories and scales; The constructed image dataset is input into a preset detection network to obtain the detection results; The preset detection network uses Cascade R-CNN as its basic architecture and the Swin Transformer model as its backbone network. Based on the original feature pyramid network, a balanced feature pyramid module is designed to balance the information flow between upper and lower layers, especially enhancing the flow and fusion between high-level semantic features and shallow semantic features. This helps improve the separability of features extracted by the backbone network, specifically including: First, the multi-level features C2, C3, C4, and C5 extracted by the backbone network Swin transformer enter the feature pyramid module. After the multi-level features pass through 1x1 convolutional layers, the multi-level features are fixed to the same dimension. The higher-level features are upsampled in order from top to bottom and added to the lower-level features. After passing through 3x3 convolutional layers and downsampling, the multi-level features P′2, P′3, P′4, P′5, and P′6 are obtained. Next, the multi-level features P′2, P′3, P′4, P′5, and P′6 extracted by the feature pyramid module enter the feature balancing pyramid module. These multi-level features are adjusted to a uniform, medium-sized feature by doubling upsampling and halving downsampling. The adjusted, uniformly sized features are then averaged to obtain the balanced semantic features. The specific calculation method is as follows: In the formula, P' l Let L represent the feature at resolution l, and L represent the number of multi-level features. min and l max These represent the indexes of the lowest resolution and the highest resolution features, respectively. Finally, P' further refines the semantic features through nonlocal modules; after a reverse process, the features are re-featured and added to the original features to obtain balanced and refined multi-level features P2, P3, P4, P5, P6.

2. The detection method according to claim 1, characterized in that, The method further includes: using a Region of Interest Pooling (RoIPooling) layer to perform max pooling on the feature map obtained from the balanced feature pyramid module to obtain a fixed-size feature map; employing a multi-stage cascaded side-aware boundary regression method on the fixed-size feature map obtained by RoIPooling, using the generated side-aware features to first roughly estimate the bucket region of the boundary, and then finely regress to a more accurate target location; and improving the model's ability to locate transmission line components, defects, and small targets through a three-stage, two-step localization coordinate regression method.

3. The detection method according to claim 1, characterized in that, The selection of Cascade R-CNN as the basic architecture specifically includes: The selected Cascade R-CNN framework consists of four parts: a Swing Transformer as the backbone network for extracting image features; a feature pyramid network and a balanced feature pyramid module as the neck network for balancing the information flow between the upper and lower layers of the feature maps extracted by the backbone network; a Region Proposal Network for generating candidate regions for pooling operations of regions of interest; and a multi-cascade prediction head network that uses a side-aware regression localization method to regress coordinate positions and classifications.

4. The detection method according to claim 1, characterized in that, The adoption of the Swing Transformer model as the backbone network specifically includes: The Swin Transformer, which serves as the backbone network, consists of four modules: Patch Partition, Linear Embedding, Swin Transformer Block, and Patch Merging. First, the image enters the block segmentation module, thereby transforming the original resolution into multiple smaller resolution images; then, the multiple resolution images are input into the linear embedding layer and fixed as features of a specified dimension; finally, it enters the stage consisting of block fusion and Swing Transformer blocks multiple times. Block fusion halves the feature resolution and doubles the number of channels; the Swin Transformer block consists of two consecutive window-based multi-head self-attention mechanisms and a sliding window-based multi-head self-attention mechanism, which can ensure reduced computational complexity while preserving the long-range semantic information of the extracted features; the calculation formula for the Swin Transformer block is: In equation (1), z l-1 This represents the input features of W-MSA in the l-th module. This represents the output characteristics of W-MSA in the l-th module; z l This represents the output feature of the multilayer perceptron in the l-th module; This represents the output characteristics of the SW-MSA in the (l+1)th module; z l+1 represents the output features of the multilayer perceptron in the (l+1)th module; W-MSA represents a window-based multi-head self-attention mechanism; SW-MSA represents a sliding window-based multi-head self-attention mechanism. To ensure stability during model training, the attention calculation method used is the scaled cosine attention method. This method calculates the attention between pixel i and pixel j using a scaled cosine function. The specific calculation formula is as follows: Sim(q i ,k j )=cos(q i ,k j ) / τ+B ij (2) Among them, B ij τ is the relative positional offset between pixel i and pixel j; τ is a learnable and independent scalar; q i It is the query vector for the multi-head self-attention mechanism at pixel i; k j It is the key vector for the multi-head self-attention mechanism at pixel j.

5. The detection method according to claim 1, characterized in that, RoIPooling performs max pooling on the feature maps obtained from the balanced feature pyramid module to obtain fixed-size feature maps. For these fixed-size feature maps, a multi-stage cascaded side-aware boundary regression method is employed. This method uses the generated side-aware features to first coarsely estimate the bucket regions of the boundaries, and then finely regresses to more accurate target locations. Through a three-stage, two-step localization coordinate regression method, the model's ability to locate transmission line components, defects, and small targets is improved. Specifically, this includes: First, the features extracted by RoIPooling are transformed into features F through a 3x3 convolutional layer; the features are then passed through two different 1x1 convolutional layers to obtain features M in the x-axis and y-axis directions. x and M y ; feature M x and M y Perform a self-attention operation on feature F to obtain features F in the x-axis and y-axis directions. x With F y ; feature F x With F y The left-side feature F is obtained by segmenting through 1x3 and 3x1 convolutional layers, followed by a deconvolutional layer. left The feature F on the right right The feature F above top and the feature F below down ; Next, using the obtained lateral sensing features F left F right F top and F down The initial estimation of the proposal box is performed, and a binary classifier is used to predict the location of the boundary closest to the bucket on each edge of the proposal box. After determining the location of the bucket closest to the ground truth label boundary, the center line location of the bucket is put into the regressor to regress to the location of the ground truth label, thereby alleviating the difficulty of location prediction caused by the large regression variance. Finally, the coordinates obtained by the side-aware boundary localization method are used as suggestion boxes and added to the next coordinate prediction. The side-aware boundary localization method is used multiple times, and the coordinate prediction result obtained in the last time is used as the final result.

Citation Information

Patent Citations

  • Fabric defect detection method based on Swinin-Transform and NAS-FPN

    CN114066820A

  • Hardware defect detection method and system based on Cascade R-CNN

    CN115775231A