A method and system for insulator defect detection based on multi-scale receptive field attention residual network
By using a multi-scale receptive field attention residual network in insulator defect detection, combined with a multi-scale receptive field and coordinate attention module, the problem of detecting complex backgrounds and small targets was solved, achieving high-precision and high-efficiency detection results.
Patent Information
- Application Number
- CN202510155672.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-12
- Publication Date
- 2026-01-06
- Estimated Expiration
- 2045-02-12
AI Technical Summary
Insulator defect detection faces challenges such as complex background interference and the difficulty of detecting small targets, and existing methods have low detection accuracy.
A multi-scale receptive field attention residual network based on the ResNet50 network framework is adopted, which combines multi-scale receptive field and coordinate attention module for feature extraction and defect detection.
It improves the precision and accuracy of insulator defect detection, enhances target positioning accuracy, and maintains computational efficiency.
Smart Images

Figure CN119991642B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power transmission line testing technology, and in particular to an insulator defect detection method and system based on a multi-scale receptive field attention residual network. Background Technology
[0002] The features extracted by the backbone network are crucial to the performance of object detection algorithms, determining their final results. The backbone network is responsible for extracting features from the image to be detected, providing the foundation for the algorithm to complete the detection task. Deeper network structures generally have stronger feature representation capabilities, but increasing the number of network layers can lead to performance degradation. Residual Networks (ResNet) avoid performance degradation while possessing powerful feature extraction capabilities by repeatedly stacking residual structures.
[0003] Compared to other detection tasks, insulator defect detection faces greater challenges. On one hand, the complex background surrounding the insulator contains various objects unrelated to the target, which may occlude the object being inspected. On the other hand, insulator defects occupy a small portion of the image area, making detection difficult. These challenges increase the complexity of the insulator defect detection task, thereby affecting the accuracy of the algorithm in detecting insulator defects. Summary of the Invention
[0004] (I) Purpose of the Invention
[0005] The purpose of this invention is to provide an insulator defect detection method and system based on a multi-scale receptive field attention residual network. By combining multiple scale receptive fields and coordinate attention in the multi-scale receptive field attention module, the model's ability to extract target features can be effectively improved, and key features can be adaptively enhanced. The coordinate attention module combines position information for attention weighting, which has low computational overhead and can effectively improve target localization accuracy. This addresses the problem of low detection accuracy in existing insulator defect detection methods and systems when facing complex detection tasks.
[0006] (II) Technical Solution
[0007] To address the aforementioned problems, a first aspect of the present invention provides an insulator defect detection method based on a multi-scale receptive field attention residual network, comprising:
[0008] Based on the ResNet50 network framework, multi-scale receptive field attention module and coordinate attention module, an overall network model based on multi-scale receptive field attention residual network is constructed.
[0009] The overall network model is used to extract features from the input insulator image to obtain a feature map;
[0010] Defect detection is performed on the feature map to obtain the detection results of insulator defects.
[0011] Furthermore, the overall network model constructed based on the ResNet50 network framework, the multi-scale receptive field attention module, and the coordinate attention module, and the multi-scale receptive field attention residual network includes:
[0012] The ResNet50 network framework is used as the basic network architecture.
[0013] The multi-scale receptive field attention module is embedded into the ResNet50 network framework;
[0014] The coordinate attention module is embedded inside the multi-scale receptive field attention module.
[0015] Furthermore, the step of using the overall network model to extract features from the input insulator image to obtain a feature map includes:
[0016] The original insulator image is input into the overall network model, and the first stage of feature extraction is performed after 7×7 2D convolution and 3×3 max pooling to obtain the output feature map of the first stage.
[0017] The output feature map of the first stage is input into the first residual structure composed of three 2D convolutions of 1×1, 3×3 and 1×1, and combined with the first multi-scale receptive field attention module to perform the second stage feature extraction to obtain the output feature map of the second stage.
[0018] The output feature map of the second stage is input into the second residual structure composed of four 2D convolutions of 1×1, 3×3 and 1×1, and combined with the second multi-scale receptive field attention module to perform the third stage feature extraction, and the output feature map of the third stage is obtained.
[0019] The output feature map of the third stage is input into the third residual structure composed of 6 2D convolutions of 1×1, 3×3 and 1×1, and combined with the third multi-scale receptive field attention module to perform the third stage feature extraction to obtain the output feature map of the fourth stage.
[0020] The output feature map of the fourth stage is input into the fourth residual structure composed of three 2D convolutions of 1×1, 3×3 and 1×1, and combined with the fourth multi-scale receptive field attention module to perform the fourth stage feature extraction, so as to obtain the output feature map of the fifth stage.
[0021] Furthermore, the output feature map of the first stage is input into three residual structures composed of 1×1, 3×3, and 1×1 2D convolutions, and combined with the first multi-scale receptive field attention module for second-stage feature extraction to obtain the output feature map of the second stage, including:
[0022] The output feature map of the first stage is input into the first residual structure composed of three 2D convolutions of 1×1, 3×3 and 1×1, and feature extraction is performed to obtain the feature map output by the first residual structure.
[0023] The feature map output by the first residual structure is input into four branches of a multi-scale receptive field attention module with different sizes.
[0024] The first branch has a receptive field size of 3×3, consisting of one 1×1 ordinary 2D convolution and one 3×3 dilated convolution with an inflation rate of 1.
[0025] The receptive field size of the second branch is 7×7, which includes one 1×1 ordinary 2D convolution and one 3×3 dilated convolution with a dilation rate of 3;
[0026] The receptive field size of the third branch is 11×11, which includes one 1×1 ordinary 2D convolution and one 3×3 dilated convolution with a dilation rate of 5.
[0027] The fourth branch is the residual branch, with a receptive field of 1×1, which includes a 1×1 ordinary 2D convolution;
[0028] The output feature maps of the first branch, the second branch, and the third branch are connected in the channel dimension, and then the number of channels is adjusted by a 1×1 ordinary 2D convolution to obtain the first stage fused feature map.
[0029] The first stage fused feature map is input into the first coordinate attention module for processing to obtain the output feature map of the first coordinate attention module;
[0030] After fusing the feature map output by the fourth branch with the output feature map of the first coordinate attention module, the second-stage output feature map is obtained by non-linear processing using the ReLU activation function.
[0031] Furthermore, the step of inputting the first-stage fused feature map into the first coordinate attention module for processing to obtain the output feature map of the first coordinate attention module includes:
[0032] The first-stage fused feature map is input into the first coordinate attention module;
[0033] The first-stage fused feature map is pooled in the vertical and horizontal directions respectively to obtain the pooled first-stage fused feature map;
[0034] The pooled first-stage fused feature maps are connected in the spatial dimension to obtain the first-stage connected feature map.
[0035] The first-stage connected feature map is processed by a 1×1 2D convolution to adjust the number of channels, resulting in the first-stage nonlinear processing feature map.
[0036] Batch normalization is performed on the first-stage compressed feature map, and non-linear processing is performed using the ReLU activation function to obtain the first-stage connected feature map.
[0037] The first-stage connection feature map is split along the spatial dimension;
[0038] After recovering the number of channels by passing each of the split first-stage connection feature maps through a 1×1 2D convolution, the first-stage attention weights carrying spatial location information are obtained by processing them through the Sigmoid function.
[0039] The first-stage fused feature map is weighted with two first-stage attention weights to obtain the output feature map of the first-stage coordinate attention.
[0040] Preferably, the formula for calculating the equivalent convolution kernel of the dilated convolution is:
[0041] k` = k + (k-1) × (r-1)
[0042] Where k represents the size of the standard convolution kernel, and r represents the dilation factor.
[0043] Preferably, the formula for calculating the size of the four branches of the multi-scale receptive field attention module with different sizes is as follows:
[0044]
[0045] Where RF(i) is the receptive field size of the i-th layer, k i S is the size of the i-th convolutional kernel; j is the stride of the j-th convolutional kernel; RF(0) = 1 is the initial value of the receptive field.
[0046] Furthermore, the step of pooling the first-stage fused feature map in both the vertical and horizontal directions to obtain the pooled first-stage fused feature map includes:
[0047] The first-stage fusion feature map after pooling includes a first-stage fusion feature map after vertical pooling and a first-stage fusion feature map after horizontal pooling.
[0048]
[0049] Where H is the vertical dimension of the first-stage fused feature map; W is the horizontal dimension of the first-stage fused feature map; This is the first-stage fusion feature map after vertical pooling of the nth channel; is the first-stage fusion feature map after horizontal pooling of the nth channel; h is the height of the nth channel; w is the width of the nth channel.
[0050] Furthermore, the 7×7 2D convolution output channel number is 64, and the stride of the 7×7 convolution kernel and the 3×3 max pooling kernel is 2.
[0051] In the first residual structure, the number of output channels for the 1×1 2D convolution is 64, the number of output channels for the 3×3 2D convolution is 64, and the number of output channels for the 1×1 2D convolution is 256.
[0052] In the second residual structure, the number of output channels for the 1×1 2D convolution is 128, the number of output channels for the 3×3 2D convolution is 128, and the number of output channels for the 1×1 2D convolution is 512.
[0053] The number of output channels for the 1×1 2D convolution in the third residual structure is 256, the number of output channels for the 3×3 2D convolution is 256, and the number of output channels for the 1×1 2D convolution is 1024.
[0054] In the fourth residual structure, the number of output channels for the 1×1 2D convolution is 512, the number of output channels for the 3×3 2D convolution is 512, and the number of output channels for the 1×1 2D convolution is 2048.
[0055] According to another aspect of the present invention, an insulator defect detection system based on a multi-scale receptive field attention residual network is provided, comprising:
[0056] Model building module: Based on the ResNet50 network framework, multi-scale receptive field attention module and coordinate attention module, an overall network model based on multi-scale receptive field attention residual network is constructed;
[0057] Feature extraction module: used to extract features from the input insulator image using the overall network model to obtain a feature map;
[0058] Defect detection module: used to perform defect detection on the feature map and obtain the detection results of insulator defects.
[0059] (III) Beneficial Effects
[0060] The above-described technical solution of the present invention has the following beneficial technical effects:
[0061] This invention provides an insulator defect detection method based on a multi-scale receptive field attention residual network, comprising: constructing an overall network model based on a multi-scale receptive field attention residual network using a ResNet50 network framework, a multi-scale receptive field attention module, and a coordinate attention module; extracting features from the input insulator image using the overall network model to obtain a feature map; and performing defect detection on the feature map to obtain the detection result of the insulator defect.
[0062] The technical solution provided by this invention, by progressively extracting feature maps at different levels and combining multi-scale receptive fields and coordinate attention, enables the final output feature map to better represent key targets in the image, thereby improving the accuracy and precision of insulator defect detection. It can address the challenges of complex insulator defect detection tasks and more effectively extract features of the target to be inspected.
[0063] With low computational overhead, the design of the coordinate attention module, through reasonable weighting of spatial location information, can efficiently improve the target localization accuracy while ensuring the real-time performance and efficiency of the overall network model. Attached Figure Description
[0064] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0065] Figure 1 This is a flowchart of the insulator defect detection method based on a multi-scale receptive field attention residual network according to the present invention;
[0066] Figure 2 This is a flowchart of the feature extraction process of the overall network model of the insulator defect detection method based on a multi-scale receptive field attention residual network of the present invention.
[0067] Figure 3 This is a flowchart illustrating the structure and feature extraction process of the multi-scale receptive field attention module in the insulator defect detection method based on a multi-scale receptive field attention residual network of the present invention.
[0068] Figure 4 This is a flowchart illustrating the structure and feature extraction process of the coordinate attention module in the insulator defect detection method based on a multi-scale receptive field attention residual network of the present invention. Detailed Implementation
[0069] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to specific embodiments and the accompanying drawings. It should be understood that these descriptions are merely exemplary and not intended to limit the scope of the invention. Furthermore, descriptions of well-known structures and techniques are omitted in the following description to avoid unnecessarily obscuring the concept of the invention.
[0070] It should be noted that, unless otherwise defined, the technical or scientific terms used in one or more embodiments of the present invention should have the ordinary meaning understood by one of ordinary skill in the art to which this invention pertains. The terms "first," "second," and similar terms used in one or more embodiments of the present invention do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Terms such as "comprising" or "including" mean that the element or object preceding the word encompasses the element or object listed following the word and its equivalents, without excluding other elements or objects. Terms such as "connected" or "linked" are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect.
[0071] The technical solution of the present invention will be described in detail below with reference to the accompanying drawings. Embodiments of the present invention provide a method for insulator defect detection based on a multi-scale receptive field attention residual network. Figure 1 The flowchart of this insulator defect detection method based on a multi-scale receptive field attention residual network is shown below. Figure 1 As shown, the method includes:
[0072] S1. Based on the ResNet50 network framework, multi-scale receptive field attention module, and coordinate attention module, construct an overall network model based on a multi-scale receptive field attention residual network, including:
[0073] S11. Use the ResNet50 network framework as the basic network architecture;
[0074] S12. Embed the multi-scale receptive field attention module into the ResNet50 network framework;
[0075] S13. Embed the coordinate attention module into the multi-scale receptive field attention module.
[0076] Combination Figure 1 and Figure 2 :
[0077] S2. Use the overall network model to extract features from the input insulator image to obtain a feature map, including:
[0078] S21. Input the original insulator image into the overall network model, and perform the first stage of feature extraction after 7×7 2D convolution and 3×3 max pooling to obtain the output feature map of the first stage.
[0079] As a preferred embodiment,
[0080] The 7×7 2D convolution has 64 output channels, and the stride of both the 7×7 convolution kernel and the 3×3 max pooling kernel is 2.
[0081] S22. Input the output feature map of the first stage into the first residual structure composed of three 2D convolutions of 1×1, 3×3, and 1×1, and combine it with the first multi-scale receptive field attention module to perform the second stage feature extraction, obtaining the output feature map of the second stage, including:
[0082] Combination Figures 1-3 :
[0083] S221. Input the output feature map of the first stage into the first residual structure composed of three 2D convolutions of 1×1, 3×3 and 1×1, and perform feature extraction to obtain the feature map output by the first residual structure.
[0084] S222. Input the feature map output by the first residual structure into four branches of the multi-scale receptive field attention module with different sizes.
[0085] The first branch has a receptive field size of 3×3, consisting of one 1×1 ordinary 2D convolution and one 3×3 dilated convolution with an inflation rate of 1.
[0086] The receptive field size of the second branch is 7×7, which includes one 1×1 ordinary 2D convolution and one 3×3 dilated convolution with a dilation rate of 3;
[0087] The receptive field size of the third branch is 11×11, which includes one 1×1 ordinary 2D convolution and one 3×3 dilated convolution with a dilation rate of 5.
[0088] The fourth branch is the residual branch, with a receptive field of 1×1, which includes a 1×1 ordinary 2D convolution;
[0089] S223. Connect the output feature maps of the first branch, the second branch, and the third branch in the channel dimension, and then adjust the number of channels through a 1×1 ordinary 2D convolution to obtain the first stage fused feature map.
[0090] S224. The first-stage fused feature map is input into the first coordinate attention module for processing to obtain the output feature map of the first coordinate attention module, including:
[0091] Combination Figures 1-4 :
[0092] S2241. Input the first-stage fused feature map into the first coordinate attention module;
[0093] S2242. Pool the first-stage fused feature map in the vertical and horizontal directions respectively to obtain the pooled first-stage fused feature map.
[0094] Preferably, the first-stage fusion feature map after pooling includes a first-stage fusion feature map after vertical pooling and a first-stage fusion feature map after horizontal pooling.
[0095]
[0096] Where H is the vertical dimension of the first-stage fused feature map; W is the horizontal dimension of the first-stage fused feature map; This is the first-stage fusion feature map after vertical pooling of the nth channel; is the first-stage fusion feature map after horizontal pooling of the nth channel; h is the height of the nth channel; w is the width of the nth channel.
[0097] S2243. Connect the pooled first-stage fused feature maps in the spatial dimension to obtain the first-stage connected feature map;
[0098] S2244. The first-stage connection feature map is processed by a 1×1 2D convolution to adjust the number of channels, thus obtaining the first-stage nonlinear processing feature map.
[0099] S2245. Batch normalize the first-stage compressed feature map and perform non-linear processing using the ReLU activation function to obtain the first-stage connected feature map.
[0100] S2246. Split the first-stage connection feature map along the spatial dimension;
[0101] S2247. After recovering the number of channels by passing each of the split first-stage connection feature maps through a 1×1 2D convolution, the first-stage attention weights carrying spatial location information are obtained by processing them through the Sigmoid function.
[0102] S2248. Weight the first-stage fused feature map with the two first-stage attention weights to obtain the output feature map of the first-stage coordinate attention.
[0103] S225. After fusing the feature map output by the fourth branch with the output feature map of the first coordinate attention module, the second stage output feature map is obtained by non-linear processing through the ReLU activation function.
[0104] As a preferred embodiment,
[0105] In the first residual structure, the number of output channels for the 1×1 2D convolution is 64, the number of output channels for the 3×3 2D convolution is 64, and the number of output channels for the 1×1 2D convolution is 256.
[0106] S23. Input the output feature map of the second stage into the second residual structure composed of four 2D convolutions of 1×1, 3×3 and 1×1, and combine it with the second multi-scale receptive field attention module to perform the third stage feature extraction to obtain the output feature map of the third stage.
[0107] As a preferred embodiment,
[0108] In the second residual structure, the number of output channels for the 1×1 2D convolution is 128, the number of output channels for the 3×3 2D convolution is 128, and the number of output channels for the 1×1 2D convolution is 512.
[0109] S24. Input the output feature map of the third stage into the third residual structure composed of 6 2D convolutions of 1×1, 3×3 and 1×1, and combine it with the third multi-scale receptive field attention module to perform the third stage feature extraction to obtain the output feature map of the fourth stage.
[0110] As a preferred embodiment,
[0111] Among them, the number of output channels of the 1×1 2D convolution in the third residual structure is 256, the number of output channels of the 3×3 2D convolution is 256, and the number of output channels of the 1×1 2D convolution is 1024.
[0112] S25. Input the output feature map of the fourth stage into the fourth residual structure composed of three 2D convolutions of 1×1, 3×3 and 1×1, and combine it with the fourth multi-scale receptive field attention module to perform the fourth stage feature extraction to obtain the output feature map of the fifth stage.
[0113] As a preferred embodiment,
[0114] Among them, the number of output channels of the 1×1 2D convolution in the fourth residual structure is 512, the number of output channels of the 3×3 2D convolution is 512, and the number of output channels of the 1×1 2D convolution is 2048.
[0115] The operation steps of S23, S24 and S25 are similar, and will not be described again here.
[0116] Preferably, the formula for calculating the equivalent convolution kernel of dilated convolution is:
[0117] k` = k + (k-1) × (r-1)
[0118] Where k represents the size of the standard convolution kernel, and r represents the dilation factor.
[0119] Preferably, the formula for calculating the size of the four branches of the multi-scale receptive field attention module with different sizes is as follows:
[0120]
[0121] Where RF(i) is the receptive field size of the i-th layer, k i S is the size of the i-th convolutional kernel; j is the stride of the j-th convolutional kernel; RF(0) = 1 is the initial value of the receptive field.
[0122] In one embodiment,
[0123] Combination Figures 1-4 ;
[0124] S222. Input the feature map output by the first residual structure with size C×H×W into four branches of the multi-scale receptive field attention module with different sizes.
[0125] In the first, second, and third branches, a 1×1 ordinary 2D convolution is used to process the feature map, reducing the number of channels to C / 4, resulting in an output feature map of size C / 4×H×W.
[0126] S223. Connect the output feature maps of the first branch, the second branch, and the third branch in the channel dimension, and then adjust the number of channels through a 1×1 ordinary 2D convolution to obtain a first-stage fused feature map with size C×H×W.
[0127] Among them, the 3×3 dilated convolution operation in the first, second and third branches does not change the spatial size of the feature map, and remains C / 4×H×W.
[0128] The fourth branch is a residual branch, which does not change the size of the input feature map.
[0129] S224. The first-stage fused feature map of size C×H×W is input into the first coordinate attention module for processing to obtain the output feature map of the first coordinate attention module, including:
[0130] S2241. Input the first-stage fused feature map of size C×H×W into the first coordinate attention module;
[0131] S2242. Pool the first-stage fusion feature map of size C×H×W in the vertical and horizontal directions respectively to obtain the pooled first-stage fusion feature map.
[0132] Combination Figure 4 In this process, the pooling kernel has a vertical dimension of H×1 and a horizontal dimension of 1×W. Vertical pooling compresses the feature map size to C×1×W. Horizontal pooling compresses the feature map size to C×H×1.
[0133] S2243. Connect the pooled first-stage fused feature maps in the spatial dimension to obtain the first-stage connected feature map;
[0134] S2244. The first-stage connection feature map is processed by a 1×1 2D convolution to adjust the number of channels, thus obtaining the first-stage nonlinear processing feature map.
[0135] Among them, the 1×1 2D convolution compresses the number of channels in the first-stage connected feature map to C / 8;
[0136] S2245. Batch normalize the first-stage compressed feature map and perform non-linear processing using the ReLU activation function to obtain the first-stage connected feature map.
[0137] S2246. Split the first-stage connection feature map along the spatial dimension;
[0138] S2247. After recovering the number of channels by passing each of the split first-stage connection feature maps through a 1×1 2D convolution, the first-stage attention weights carrying spatial location information are obtained by processing them through the Sigmoid function.
[0139] The 1×1 2D convolution restores the number of channels in the vertical and horizontal feature maps to C.
[0140] In another embodiment of the present invention, an insulator defect detection system based on a multi-scale receptive field attention residual network is also provided, comprising:
[0141] Model building module: Based on the ResNet50 network framework, multi-scale receptive field attention module and coordinate attention module, an overall network model based on multi-scale receptive field attention residual network is constructed;
[0142] Feature extraction module: Used to extract features from the input insulator image using the overall network model to obtain a feature map;
[0143] Defect detection module: Used to detect defects in feature maps and obtain the detection results of insulator defects.
[0144] In summary, the insulator defect detection method based on a multi-scale receptive field attention residual network according to the embodiments of the present invention includes: constructing an overall network model based on a multi-scale receptive field attention residual network using a ResNet50 network framework, a multi-scale receptive field attention module, and a coordinate attention module; extracting features from the input insulator image using the overall network model to obtain a feature map; and performing defect detection on the feature map to obtain the detection result of the insulator defect.
[0145] The technical solution provided in this invention improves the ResNet50 network architecture by adding a multi-scale receptive field attention module at the end of each stage except the first stage, to enhance feature extraction capabilities at each stage. Simultaneously, a coordinate attention module is embedded within the multi-scale receptive field attention module to enhance focus on important features. Through multi-stage feature extraction, the insulator image is processed and features at different levels are output, achieving accurate detection.
[0146] The technical solution provided by this invention, by progressively extracting feature maps at different levels and combining multi-scale receptive fields and coordinate attention, enables the final output feature map to better represent key targets in the image, thereby improving the accuracy and precision of insulator defect detection. It can address the challenges of complex insulator defect detection tasks and more effectively extract features of the target to be inspected.
[0147] With low computational overhead, the coordinate attention module design, through reasonable spatial location information weighting, can efficiently improve target localization accuracy while ensuring the real-time performance and efficiency of the overall network model.
[0148] It should be understood that the specific embodiments described above are merely illustrative or explanatory of the principles of the invention and do not constitute a limitation thereof. Therefore, any modifications, equivalent substitutions, improvements, etc., made without departing from the spirit and scope of the invention should be included within the protection scope of the invention. Furthermore, the appended claims are intended to cover all variations and modifications falling within the scope and boundaries of the appended claims, or equivalent forms of such scope and boundaries.
Claims
1. An insulator defect detection method based on a multi-scale receptive field attention residual network, characterized in that, The method comprises: Based on the ResNet50 network framework, the multi-scale receptive field attention module and the coordinate attention module, an overall network model based on a multi-scale receptive field attention residual network is constructed; Features of the input insulator image are extracted by using the overall network model to obtain a feature map; Defect detection is performed on the feature map to obtain a detection result of insulator defects; The feature extraction of the input insulator image by using the overall network model to obtain a feature map comprises: inputting the original insulator image into the overall network model, performing first-stage feature extraction after 7*7 2D convolution and 3*3 maximum pooling to obtain a first-stage output feature map; The first-stage output feature map is input into three first residual structures composed of 1*1, 3*3 and 1*1 2D convolution, and second-stage feature extraction is performed in combination with the first multi-scale receptive field attention module to obtain a second-stage output feature map, which comprises: inputting the first-stage output feature map into three first residual structures composed of 1*1, 3*3 and 1*1 2D convolution to perform feature extraction and obtain a feature map output by the first residual structure; the feature map output by the first residual structure is input into four branches of the multi-scale receptive field attention module with different sizes respectively; wherein the receptive field size of the first branch is 3*3, comprising one 1*1 ordinary 2D convolution and one 3*3 dilated convolution with an expansion rate of 1; the receptive field size of the second branch is 7*7, comprising one 1*1 ordinary 2D convolution and one 3*3 dilated convolution with an expansion rate of 3; the receptive field size of the third branch is 11*11, comprising one 1*1 ordinary 2D convolution and one 3*3 dilated convolution with an expansion rate of 5; the fourth branch is a residual branch, and the receptive field thereof is 1*1, comprising one 1*1 ordinary 2D convolution; the output feature maps of the first branch, the second branch and the third branch are connected in the channel dimension, and then one 1*1 ordinary 2D convolution is used to adjust the channel number to obtain a first-stage fusion feature map; the first-stage fusion feature map is input into the first coordinate attention module for processing to obtain an output feature map of the first coordinate attention module; after the feature map output by the fourth branch is fused with the output feature map of the first coordinate attention module, nonlinear processing is performed through a Relu activation function to obtain a second-stage output feature map; The second-stage output feature map is input into four second residual structures composed of 1*1, 3*3 and 1*1 2D convolution, and third-stage feature extraction is performed in combination with the second multi-scale receptive field attention module to obtain a third-stage output feature map; The third-stage output feature map is input into six third residual structures composed of 1*1, 3*3 and 1*1 2D convolution, and third-stage feature extraction is performed in combination with the third multi-scale receptive field attention module to obtain a fourth-stage output feature map; The output feature map of the fourth stage is input into three fourth residual structures composed of 1*1, 3*3 and 1*1 2D convolution, combined with the fourth multi-scale receptive field attention module to perform fourth stage feature extraction, and the output feature map of the fifth stage is obtained.
2. The method of claim 1, wherein, The ResNet50 network framework, the multi-scale receptive field attention module and the coordinate attention module are used to construct an overall network model based on the multi-scale receptive field attention residual network, which comprises: The ResNet50 network framework is used as a basic network architecture; The multi-scale receptive field attention module is embedded into the ResNet50 network framework; The coordinate attention module is embedded into the multi-scale receptive field attention module.
3. The method of claim 1, wherein, The first stage fusion feature map is input into the first coordinate attention module for processing to obtain an output feature map of the first coordinate attention module, which comprises: The first stage fusion feature map is input into the first coordinate attention module; The first stage fusion feature map is pooled in the vertical direction and the horizontal direction respectively to obtain a pooled first stage fusion feature map; The pooled first stage fusion feature map is connected in the spatial dimension to obtain a first stage connection feature map; The first stage connection feature map is adjusted in the channel number through a 1*1 2D convolution to obtain a first stage nonlinear processing feature map; The first stage compression feature map is batch normalized and nonlinearly processed by a Relu activation function to obtain a first stage connection feature map; The first stage connection feature map is split along the spatial dimension; The split first stage connection feature map is restored in the channel number through a 1*1 2D convolution and then processed by a Sigmoid function to obtain two first stage attention weights carrying spatial position information; The first stage fusion feature map is weighted with the two first stage attention weights to obtain an output feature map of the first stage coordinate attention.
4. The method of claim 1, wherein, The calculation formula of the equivalent convolution kernel of the dilated convolution is: k`=k+(k-1)×(r-1) wherein k represents the size of the convolution kernel of the standard convolution, and r represents the dilation factor.
5. The method of claim 1, wherein, The calculation formula of the size of the four branches of the multi-scale receptive field attention module with different sizes is: wherein RF(i) is the receptive field size of the i-th layer, k i is the size of the i-th layer convolution kernel; S j is the stride of the j-th layer convolution kernel; RF(0) = 1 is the initial value of the receptive field.
6. The method of claim 3, wherein, The first stage fusion feature map is pooled in the vertical direction and the horizontal direction respectively to obtain a pooled first stage fusion feature map, which comprises: The pooled first stage fusion feature map comprises a first stage fusion feature map pooled in the vertical direction and a first stage fusion feature map pooled in the horizontal direction; wherein H is the size of the first stage fused feature map in the vertical direction; and W is the size of the first stage fused feature map in the horizontal direction; is the first stage fused feature map after vertical direction pooling of the nth channel; is the first stage fused feature map after horizontal direction pooling of the nth channel; h is the height of the nth channel; and w is the width of the nth channel.
7. The method of claim 1, wherein, The output channel number of the 7*7 2D convolution is 64, and the step length of the 7*7 convolution kernel and the 3*3 maximum pooling kernel is 2; The output channel number of the 1*1 2D convolution in the first residual structure is 64, the output channel number of the 3*3 2D convolution is 64, and the output channel number of the 1*1 2D convolution is 256; The output channel number of the 1×1 2D convolution in the second residual structure is 128, the output channel number of the 3×3 2D convolution is 128, and the output channel number of the 1×1 2D convolution is 512; The output channel number of the 1×1 2D convolution in the third residual structure is 256, the output channel number of the 3×3 2D convolution is 256, and the output channel number of the 1×1 2D convolution is 1024; The output channel number of the 1×1 2D convolution in the fourth residual structure is 512, the output channel number of the 3×3 2D convolution is 512, and the output channel number of the 1×1 2D convolution is 2048.
8. An insulator defect detection system based on multi-scale receptive field attention residual network, characterized in that, The detection system comprises: A model construction module, which constructs an overall network model based on a ResNet50 network framework, a multi-scale receptive field attention module and a coordinate attention module; A feature extraction module, which is configured to extract features of an input insulator image by using the overall network model to obtain a feature map, and comprises: inputting an original insulator image into the overall network model, performing first-stage feature extraction after 7×7 2D convolution and 3×3 maximum pooling to obtain an output feature map of the first stage; inputting the output feature map of the first stage into three first residual structures composed of 1×1, 3×3 and 1×1 2D convolution, performing second-stage feature extraction in combination with a first multi-scale receptive field attention module to obtain an output feature map of the second stage, comprising: inputting the output feature map of the first stage into three first residual structures composed of 1×1, 3×3 and 1×1 2D convolution to perform feature extraction and obtain a feature map output by the first residual structure; inputting the feature map output by the first residual structure into four branches of the multi-scale receptive field attention module with different sizes respectively; wherein, the receptive field size of the first branch is 3×3, comprising one 1×1 ordinary 2D convolution and one 3×3 dilated convolution with a dilated rate of 1; the receptive field size of the second branch is 7×7, comprising one 1×1 ordinary 2D convolution and one 3×3 dilated convolution with a dilated rate of 3; the receptive field size of the third branch is 11×11, comprising one 1×1 ordinary 2D convolution and one 3×3 dilated convolution with a dilated rate of 5; the fourth branch is a residual branch, and the receptive field thereof is 1×1, comprising one 1×1 ordinary 2D convolution; the output feature maps of the first branch, the second branch and the third branch are connected in the channel dimension, and then one 1×1 ordinary 2D convolution is used to adjust the channel number to obtain a first-stage fusion feature map; the first-stage fusion feature map is input into a first coordinate attention module for processing to obtain an output feature map of the first coordinate attention module; after the feature map output by the fourth branch is fused with the output feature map of the first coordinate attention module, nonlinear processing is performed on the feature map through a Relu activation function to obtain an output feature map of the second stage; The output feature map of the second stage is input into 4 second residual structures composed of 1*1, 3*3 and 1*1 2D convolutions, combined with a second multi-scale receptive field attention module to perform third stage feature extraction, to obtain an output feature map of the third stage; The output feature map of the third stage is input into 6 third residual structures composed of 1*1, 3*3 and 1*1 2D convolutions, combined with a third multi-scale receptive field attention module to perform third stage feature extraction, to obtain an output feature map of the fourth stage; The output feature map of the fourth stage is input into 3 fourth residual structures composed of 1*1, 3*3 and 1*1 2D convolutions, combined with a fourth multi-scale receptive field attention module to perform fourth stage feature extraction, to obtain an output feature map of the fifth stage; The defect detection module is used for defect detection on the feature map to obtain a detection result of the insulator defect.
Citation Information
Patent Citations
Deep neural network segmentation method suitable for rock slice image
CN119380160A