Line hardware corrosion defect detection method, system and medium based on cloud-edge collaboration

By introducing a frequency attention mechanism and a cloud-edge collaborative detection method with additional detection heads in the corrosion detection of metal tools in the transmission line, the detection difficulties caused by changing shapes and inconspicuous characteristics are solved, the detection accuracy and information retention are improved, and real-time Inspection and integrated operation and maintenance.

CN117788436BActive Publication Date: 2025-02-07STATE GRID SICHUAN ELECTRIC POWER CORP ELECTRIC POWER RES INST
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202311841086.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-27
Publication Date
2025-02-07
Estimated Expiration
2043-12-27

AI Technical Summary

Technical Problem

In the detection of corrosion defects of metal tools in transmission line, the rust is irregular and has a variety of shapes, and the characteristics are not obvious. The background of the power scene image is complex, resulting in low significance of rust. Key information is easily lost in the deep network, making it difficult to detect the network.

Method used

Using cloud-edge collaboration detection method, a frequency attention mechanism and additional detection head are introduced to supplement the detailed characteristics of the deep network through the frequency attention module. The additional detection head extracts additional features from the feature map generated by the main network to alleviate information loss , improve detection accuracy.

Benefits of technology

It improves the accuracy of metal rust detection in transmission lines, reduces information loss, realizes data interaction between smart terminals and edge computing devices, and supports real-time detection on the transmission equipment side and integrated operation and maintenance services of cloud platforms.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117788436B_ABST
    Figure CN117788436B_ABST
Patent Text Reader

Abstract

The present invention discloses a method, system and medium for detecting corrosion defects of line hardware based on cloud-edge collaboration, and specifically relates to the field of defect detection technology. The method collects hardware corrosion defect data of transmission lines, and obtains defect samples and normal samples in the hardware corrosion defect data based on a detection and recognition model; the defect samples are input into an improved YOLOv8m model to train a new detection and recognition model; the detection and recognition model is updated with the new detection and recognition model to perform line hardware corrosion defect detection; in view of the problems that the corrosion shapes are changeable, the features are not obvious, and the key information is easily lost in the deep network, a method for detecting corrosion defects of transmission line hardware is proposed in combination with cloud-edge collaboration technology, which is used to supplement the corrosion features, reduce information loss, improve the detection accuracy of corrosion, realize data interaction between intelligent terminals and edge computing devices, and realize integrated operation and maintenance services from data collection on the transmission equipment side to the cloud platform.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of defect detection technology, and in particular to a method, system and medium for detecting corrosion defects of line hardware based on cloud-edge collaboration. Background Art

[0002] Transmission line fittings are an important part of transmission lines. Their main function is to connect various devices and transmit electrical loads. Transmission line fittings are prone to rust due to long-term outdoor work due to failure of protective coating. Rust problems will directly affect the safety and stable operation of transmission lines, so it is of great significance to detect the corrosion of transmission line fittings.

[0003] Traditional monitoring technology is to process the equipment operation data collected by drones and other equipment offline, which poses huge challenges in data storage and transmission, and cannot achieve real-time interaction. With the rise of technologies such as cloud computing and artificial intelligence, cloud-edge collaborative technology can be used to complete data collection, sensor data analysis, and edge computing functions, and state assessment can be achieved directly on the transmission equipment side. The data collected by the smart terminal on the transmission equipment side is directly connected to the edge computing device, which completes data processing based on the relevant models synchronized from the cloud platform to achieve state assessment, fault diagnosis, and reasoning decisions on the edge side.

[0004] Since the shape of rust is irregular and varied, the features of rust are not obvious. Secondly, the background of power scene images is complex and the rust is of low significance. It is easy to lose key information in the downsampling process of feature fusion, which will lead to difficulties in network detection. Summary of the invention

[0005] The technical problem to be solved by the present invention is: in the process of detecting corrosion defects of transmission line fittings, the characteristics of corrosion are not obvious due to the irregular and changeable shapes of corrosion; secondly, the background of the power scene image is complex and the significance of corrosion is low, so it is easy to lose key information in the downsampling process of feature fusion, which will lead to network detection difficulties; the purpose of the present invention is to provide a method, system and medium for detecting corrosion defects of transmission line fittings. Aiming at the problems that the shapes of corrosion are changeable, the characteristics are not obvious, and the key information is easily lost in the deep network, a method for detecting corrosion defects of transmission line fittings is proposed in combination with cloud-edge collaborative technology, and a frequency attention mechanism and an additional detection head are introduced to supplement the corrosion characteristics, reduce information loss, and improve the detection accuracy of corrosion, so as to realize data interaction between smart terminals and edge computing devices. At the same time, in combination with cloud-edge collaborative technology, integrated operation and maintenance services from data collection on the transmission equipment side to the cloud platform are realized.

[0006] The present invention is achieved through the following technical solutions:

[0007] This solution provides a line hardware corrosion defect detection method based on cloud-edge collaboration, including:

[0008] Step 1: Collect the hardware corrosion defect data of the transmission line, and obtain defect samples and normal samples in the hardware corrosion defect data based on the detection and recognition model;

[0009] Step 2: Input the defect sample into the improved YOLOv8m model to train a new structure detection and recognition model; the improved YOLOv8m model includes: adding a frequency attention module at the connection between the feature extraction network and the feature fusion network of the YOLOv8m model, and adding an additional detection head in the feature fusion network;

[0010] Step 3: Update the detection and recognition model with the new detection and recognition model to perform line hardware corrosion defect detection.

[0011] A further optimization scheme is that the frequency attention module is added after the penultimate C2f module and the SPPF module in the feature extraction network, and the additional detection head is added after the first two C2f modules and the frequency attention module after the SPPF module in the feature fusion network.

[0012] A further optimization scheme is that the training method of the new structure detection and recognition model includes:

[0013] Pre-process defective samples;

[0014] The corrosion features are extracted from the pre-processed defect samples based on the feature extraction network, and the detailed features of the deep network are supplemented based on the frequency attention module, where the frequency attention module regards the channel representation problem as a compression process using frequency analysis;

[0015] The corrosion features are fused based on the feature fusion network, and additional features are extracted from the feature map generated by the main network based on the additional detection head to alleviate the information loss caused by the downsampling of the model convolutional layer. The additional detection head relaxes the constraints on the allocation of positive samples and takes more candidate boxes as positive samples.

[0016] A further optimization scheme is to fuse the corrosion features based on the feature fusion network and extract additional features from the feature map generated by the main network based on the additional detection head, including:

[0017] Guided by the prediction results of the Lead Head, hierarchical labels from coarse to fine are generated for training the additional detection head and the Lead Head respectively; the Lead Head selects the N prediction boxes with the highest weighted scores as positive samples.

[0018] The further optimization scheme is that the channel attention framework of the frequency attention module is:

[0019] ms_att=sigmoid(fc(Freq))

[0020] Among them, ms_att represents the feature map output after frequency attention adjustment, sigmoid(*) represents the activation function, fc(*) represents the fully connected layer, and Freq represents the whole compressed vector obtained by connecting the feature maps after channel weight adjustment.

[0021] A further optimization scheme is to obtain the channel attention framework of the frequency attention module, including:

[0022] The basis function of the two-dimensional discrete cosine transform is: Written as follows:

[0023]

[0024] where h∈{0,1,…,H-1}, w∈{0,1,…,W-1}, represents the spectrum of a two-dimensional discrete cosine variation, represents the spectrum obtained by performing a two-dimensional discrete cosine transformation on a feature map with a height of h and a width of w, x 2d is the input feature, Represents an input feature map with a height of i and a width of j, H is the height of the input feature map, and W is the width of the input feature map. Represents the discrete cosine transform formula;

[0025] Then there are:

[0026]

[0027] Let h and w components be 0, then we have

[0028]

[0029] in Represents the lowest frequency component of the two-dimensional discrete cosine change; gap() represents global average pooling, that is, averaging all pixel values ​​of each channel map to obtain a new 1×1 channel map.

[0030] A further optimization scheme is that the method for obtaining the channel attention framework of the frequency attention module also includes:

[0031] The frequency attention module uses multiple frequency components. The input x is first divided into n parts along the channel dimension and written as [X 0 ,X 1 ,…,X n-1 ],in i∈{0,1,…,n-1}, C is divisible by n;

[0032] For each part, the corresponding two-dimensional discrete cosine change frequency component is assigned, and the two-dimensional discrete cosine change result is used as the compression result of the channel attention, then the corresponding two-dimensional discrete cosine change frequency component is expressed as:

[0033]

[0034] Where Freq i represents the feature map after the i-th partial channel weight adjustment, Indicates that the ith channel of the input is subjected to a two-dimensional discrete cosine change; X i represents the i-channel part of the input; represents the i-channel part of the feature map input with a height of h and a width of w, Represents the two-dimensional discrete cosine change basis function of the i-th channel part of the input, i∈{0,1,…,n-1}, [u i ,v i ] corresponds to X i The index of the frequency component, after compression It becomes a C'-dimensional vector, and the compressed vector can be obtained by concatenation:

[0035] Freq=compress(X)

[0036] =cat([Freq 0 ,Freq 1 ,…,Freq n-1 ])

[0037] in is the obtained multispectral vector, Indicates the compression method;

[0038] Then the entire channel attention framework is:

[0039] ms_att=sigmoid(fc(Freq)).

[0040] This solution also provides a line hardware corrosion defect detection system based on cloud-edge collaboration, which is used to implement the above-mentioned line hardware corrosion defect detection method based on cloud-edge collaboration; including:

[0041] The collection and inspection module is used to collect the corrosion defect data of hardware of the transmission line;

[0042] A defect detection module is used to obtain defect samples and normal samples in the hardware corrosion defect data based on the detection and recognition model;

[0043] A model training module is used to input defect samples into an improved YOLOv8m model to train a new structure detection and recognition model; the improved YOLOv8m model includes: adding a frequency attention module to the feature extraction network of the YOLOv8m model, and adding an additional detection head to the feature fusion network;

[0044] Data transmission module, used to upload the detection results to the cloud server and receive the newly constructed detection model;

[0045] The defect detection module is also used to update the detection and recognition model with a new detection and recognition model to perform circuit hardware corrosion defect detection.

[0046] A further optimization scheme is that the model training module is located in the cloud server; the defect detection module is located at the edge;

[0047] The cloud server sends the newly constructed detection and identification model to the edge end, and the edge end uploads the line hardware corrosion defect detection results to the cloud server.

[0048] First, the intelligent terminal collects the image data of the rust defects of the transmission line and completes the recognition. Then the data is uploaded to the cloud, the cloud trains and updates the model, and the edge synchronizes the cloud model to realize the algorithm update.

[0049] The present solution also provides a computer-readable medium on which a computer program is stored. The computer program is executed by a processor to implement the line hardware corrosion defect detection method based on cloud-edge collaboration as described above.

[0050] Compared with the prior art, the present invention has the following advantages and beneficial effects:

[0051] 1. The purpose of the present invention is to provide a method, system and medium for detecting corrosion defects of line hardware based on cloud-edge collaboration. Aiming at the problems that the shapes of corrosion are changeable, the characteristics are not obvious, and the key information is easily lost in the deep network, a method for detecting corrosion defects of transmission line hardware is proposed in combination with cloud-edge collaboration technology to supplement the corrosion characteristics, reduce information loss, improve the detection accuracy of corrosion, realize data interaction between smart terminals and edge computing devices, and realize integrated operation and maintenance services from data collection on the transmission equipment side to the cloud platform.

[0052] 2. The purpose of the present invention is to provide a method, system and medium for detecting corrosion defects of line hardware based on cloud-edge collaboration, and to use cloud-edge collaboration technology to complete information interaction between the cloud and the edge, so as to realize real-time detection on the equipment side of the transmission line; at the same time, the cloud training model is improved according to the characteristics of corrosion, so as to realize high-precision detection of corrosion of transmission line hardware; frequency attention is introduced at the connection between the feature extraction network and the feature fusion network, and the loss of image feature information is reduced by introducing more frequency components, and the detailed features such as texture that are less affected by contour changes in the deep network are supplemented, so as to optimize the model's extraction of corrosion features; then an additional detection head is introduced to extract additional features from the feature map generated by the main network, so as to alleviate the information loss caused by the downsampling of the model convolutional layer, so that the network can learn some more complex and more refined features, enhance the network's discrimination ability, and thus realize high-precision detection of corrosion of transmission line hardware. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] In order to more clearly illustrate the technical solutions of the exemplary embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. It should be understood that the following drawings only illustrate certain embodiments of the present invention and should not be regarded as limiting the scope. For those of ordinary skill in the art, other relevant drawings can be obtained based on these drawings without creative work. In the drawings:

[0054] Figure 1 This is a flow chart of the line hardware corrosion defect detection method based on cloud-edge collaboration;

[0055] Figure 2 It is a schematic diagram of the cloud-edge collaboration workflow in the line hardware corrosion defect detection system based on cloud-edge collaboration;

[0056] Figure 3 This is a schematic diagram of the structure of the new structure detection and recognition model;

[0057] Figure 4 This is a flow chart of the frequency attention mechanism;

[0058] Figure 5 This is a schematic diagram of the additional detection head structure. DETAILED DESCRIPTION

[0059] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with embodiments and drawings. The exemplary embodiments of the present invention and their description are only used to explain the present invention and are not intended to limit the present invention.

[0060] Example 1

[0061] This embodiment provides a line hardware corrosion defect detection method based on cloud-edge collaboration, such as Figure 1 As shown, including:

[0062] Step 1: Collect the hardware corrosion defect data of the transmission line, and obtain defect samples and normal samples in the hardware corrosion defect data based on the detection and recognition model;

[0063] Step 2: Input the defect sample into the improved YOLOv8m model to train a new structure detection and recognition model; the improved YOLOv8m model includes: adding a frequency attention module at the connection between the feature extraction network and the feature fusion network of the YOLOv8m model, and adding an additional detection head in the feature fusion network;

[0064] The frequency attention module is added after the penultimate C2f module and the SPPF module in the feature extraction network, and the additional detection head is added after the first two C2f modules and the frequency attention module after the SPPF module in the feature fusion network.

[0065] The training method of the new detection and recognition model includes:

[0066] Preprocess the defect samples; after dividing the data set, the network first preprocesses the sample image data. The size of the network's input feature map is 3×640×640, where 3 is the number of input image channels and 640×640 is the length and width of the image.

[0067] The corrosion features are extracted from the pre-processed defect samples based on the feature extraction network, and the detailed features of the deep network are supplemented based on the frequency attention module, where the frequency attention module regards the channel representation problem as a compression process using frequency analysis;

[0068] The feature extraction network is used to extract rich features of the image and generate feature maps of the sample set. The 0th and 1st layers of the feature extraction network are mainly Conv layers, which are used to expand channels and reduce feature maps. The size of the feature map obtained is 128*160*160, where 128 is the number of channels and 160*160 is the image size. The second layer is a C2f module with 128 input channels. The tensor is divided (Split operation) in the channel dimension to become 64. When passing through the Bottleneck module, it passes through two convolution modules with k=3s=1p=1, where k is the convolution kernel size, s is the step size, and p is the padding. If the residual connection is set (shortcut=True) and the number of channels of the input feature is the same as the number of channels of the output feature, the input feature is added to the output feature to achieve the residual connection. Otherwise, the convolved features are directly output. At this time, the output of the Bottleneck module is 64*160*160, and then after the splicing operation, it contains the output of n Bottleneck modules and the two parts obtained by the Split operation, C / 2×(n+2)=192×160×160, and finally after a Conv layer with k=1s=1p=0, the output is 128*160*160. The 3rd to 9th layers are composed of 3 convolutional layers, 2 C2f modules and 1 SPPF module. The SPPF structure is three consecutive maximum poolings with a residual structure, and the convolution kernel is unified to 5*5. Finally, the results before and after each pooling are spliced.

[0069] like Figure 4 As shown in Figure 2, the frequency attention module is inserted after the penultimate C2f module (layer 6) and the SPPF module (layer 9) of the feature extraction network. Figure 3 , which regards the channel representation problem as a compression process using frequency analysis. Based on the frequency domain analysis, it is mathematically proved that the traditional global average pooling is a special case of eigendecomposition in the frequency domain.

[0070] The channel attention framework of the frequency attention module is:

[0071] ms_att=sigmoid(fc(Freq))

[0072] Among them, ms_att represents the feature map output after frequency attention adjustment, sigmoid() represents the activation function, fc() represents the fully connected layer, and Freq represents the entire compressed vector obtained by connecting the feature maps after channel weight adjustment.

[0073] The method for obtaining the channel attention framework of the frequency attention module includes:

[0074] The basis function of the two-dimensional discrete cosine transform is: Written as follows:

[0075]

[0076] where h∈{0,1,…,H-1}, w∈{0,1,…,W-1}, represents the spectrum of a two-dimensional discrete cosine variation, represents the spectrum obtained by performing a two-dimensional discrete cosine transformation on a feature map with a height of h and a width of w, x 2d is the input feature, Represents an input feature map with a height of i and a width of j, H is the height of the input feature map, and W is the width of the input feature map. The discrete cosine transform formula is then:

[0077]

[0078] Let h and w components be 0, then we have

[0079]

[0080] in Represents the lowest frequency component of the two-dimensional discrete cosine change; gap(*) represents global average pooling, that is, averaging all pixel values ​​of each channel map to obtain a new 1×1 channel map.

[0081] The method for obtaining the channel attention framework of the frequency attention module also includes:

[0082] The frequency attention module uses multiple frequency components. The input x is first divided into n parts along the channel dimension and written as [X 0 ,X 1 ,…,X n-1 ],in i∈{0,1,…,n-1}, C is divisible by n;

[0083] For each part, the corresponding two-dimensional discrete cosine change frequency component is assigned, and the two-dimensional discrete cosine change result is used as the compression result of the channel attention, then the corresponding two-dimensional discrete cosine change frequency component is expressed as:

[0084]

[0085] Where Freq i represents the feature map after the i-th partial channel weight adjustment, Indicates that the ith channel of the input is subjected to a two-dimensional discrete cosine change; X i represents the i-channel part of the input; represents the i-channel part of the feature map input with a height of h and a width of w. Represents the two-dimensional discrete cosine change basis function of the i-th channel part of the input, i∈{0,1,…,n-1}, [u i ,v i ] corresponds to X i The index of the frequency component, after compression It becomes a C'-dimensional vector, and the compressed vector can be obtained by concatenation:

[0086] Freq=compress(X)

[0087] =cat([Freq 0 ,Freq 1 ,…,Freq n-1 ])

[0088] in For the obtained multispectral vector, compress: Indicates the compression method;

[0089] Then the entire channel attention framework is:

[0090] ms_att=sigmoid(fc(Freq)).

[0091] The corrosion features are fused based on the feature fusion network, and additional features are extracted from the feature map generated by the main network based on the additional detection head to alleviate the information loss caused by the downsampling of the model convolutional layer. The additional detection head relaxes the constraints on the allocation of positive samples and takes more candidate boxes as positive samples.

[0092] Guided by the prediction results of the Lead Head, hierarchical labels from coarse to fine are generated for training the additional detection head and the Lead Head respectively; the Lead Head selects the N prediction boxes with the highest weighted scores as positive samples.

[0093] Extract shallow features and input them to the Additional Detection Head (AD-Head). For details, see Figure 5, the additional detection head is added after the first two C2f modules of the YOLOv8m feature fusion network and the frequency attention module after the SPPF module. Use the Lead Head prediction results as a guide to generate hierarchical labels from coarse to fine, which are used to train the additional detection head and Lead Head respectively. YOLOv8m uses the Task-Aligned Assigner dynamic label assignment strategy to select positive samples based on the weighted scores of classification and regression scores. Lead Head selects the N (default 10) prediction boxes with the highest weighted scores as positive samples. The additional detection head relaxes the constraints on the allocation of positive samples and uses more candidate boxes as positive samples. Adding additional detection heads during training improves the model's recognition ability. During inference, removing the additional detection heads does not affect the model's inference speed.

[0094] Step 3: Update the detection and recognition model with the new detection and recognition model to perform line hardware corrosion defect detection.

[0095] Example 2

[0096] This embodiment provides a line hardware corrosion defect detection system based on cloud-edge collaboration, which is used to implement the line hardware corrosion defect detection method based on cloud-edge collaboration described in Example 1; including:

[0097] The collection and inspection module is used to collect the corrosion defect data of the hardware of the transmission line; Figure 2 As shown, the acquisition and inspection module includes a network camera and an AI edge computing device at the edge, and the AI ​​edge computing device performs real-time monitoring, result storage and algorithm management;

[0098] A defect detection module is used to obtain defect samples and normal samples in the hardware corrosion defect data based on the detection and recognition model;

[0099] A model training module is used to input defect samples into an improved YOLOv8m model to train a new structure detection and recognition model; the improved YOLOv8m model includes: adding a frequency attention module to the feature extraction network of the YOLOv8m model, and adding an additional detection head to the feature fusion network;

[0100] Data transmission module, used to upload the detection results to the cloud server and receive the newly constructed detection model;

[0101] The defect detection module is also used to update the detection and recognition model with a new detection and recognition model to perform circuit hardware corrosion defect detection.

[0102] The model training module is located in the cloud server; the defect detection module is located at the edge;

[0103] The cloud server sends the newly constructed detection and identification model to the edge end, and the edge end uploads the line hardware corrosion defect detection results to the cloud server.

[0104] The corrosion defect data of transmission line hardware is collected through smart terminal equipment and transmitted to the AI ​​edge computing device.

[0105] The edge uses the corresponding algorithm to perform real-time detection and identification of data, save the detection results, and transmit the detection results to the cloud server through the network.

[0106] The cloud server processes the results transmitted from the edge, sends the defective samples and normal samples to the corresponding sample libraries respectively, and transmits the defective samples to the training platform.

[0107] The improved YOLOv8m model is used to retrain the defective samples to generate a new model, and the model is sent to the AI ​​edge computing device through the network. The improvement process of the YOLOv8m model: insert the frequency attention module (FcaNet) after the penultimate C2f module and the SPPF module of the YOLOv8m backbone feature extraction network, supplement the frequency information, and then input it into the feature fusion network; extract the shallow features and input them to the additional detection head (AD-Head), which is added to the first two C2f modules of the YOLOv8m feature fusion network and the frequency attention module after the SPPF module.

[0108] Example 3

[0109] This embodiment provides a computer-readable medium on which a computer program is stored. The computer program is executed by a processor to implement the line hardware corrosion defect detection method based on cloud-edge collaboration as described in Example 1.

[0110] The above embodiments solve the problem of network identification difficulties caused by unclear corrosion features and easy loss of key information in the deep network, and realize real-time detection of the transmission line equipment side. By using cloud-edge collaborative technology to complete data collection, database construction, cloud training, and edge computing functions, state assessment is achieved directly on the transmission equipment side; the network's detection accuracy of corrosion is improved, and by introducing frequency attention, more frequency information is supplemented, which reduces the problem of weakening high-frequency information in the deep network and optimizes the model's extraction of corrosion features; the introduction of an additional detection head alleviates the loss of key corrosion information caused by downsampling of the model's convolutional layer.

[0111] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A line hardware corrosion defect detection method based on cloud-edge collaboration is characterized by: include: Step 1: Collect the hardware corrosion defect data of the transmission line, and obtain defect samples and normal samples in the hardware corrosion defect data based on the detection and recognition model; Step 2: Input the defect sample into the improved YOLOv8m model to train a new detection and recognition model; the improved YOLOv8m model includes: adding a frequency attention module at the connection between the feature extraction network and the feature fusion network of the YOLOv8m model, and adding an additional detection head in the feature fusion network; the frequency attention module is added after the C2f module and the SPPF module in the feature extraction network, and the additional detection head is added after the C2f module and the SPPF module in the feature fusion network; The channel attention framework of the frequency attention module is: ms_att=sigmoid(fc(Freq)) Among them, ms_att represents the feature map output after frequency attention adjustment, sigmoid() represents the activation function, fc() represents the fully connected layer, and Freq represents the whole compressed vector obtained by connecting the feature map after channel weight adjustment; The method for obtaining the channel attention framework of the frequency attention module includes: The basis function of the two-dimensional discrete cosine transform is: Written as follows: where h∈{0,1,…,H-1}, w∈{0,1,…,W-1}, represents the spectrum of a two-dimensional discrete cosine variation, The spectrum obtained by performing a two-dimensional discrete cosine transformation on a feature map with a height of h and a width of w, x 2d is the input feature, represents an input feature map with a height of i and a width of j, H is the height of the input feature map, and W is the width of the input feature map. Represents the discrete cosine transform formula; Then there are: Let h and w components be 0, then we have in Represents the lowest frequency component of the two-dimensional discrete cosine change; gap(*) represents global average pooling; The method for obtaining the channel attention framework of the frequency attention module also includes: The frequency attention module uses multiple frequency components. The input x is first divided into n parts along the channel dimension and written as [X 0 ,X 1 ,…,X n-1 ],in C is divisible by n; For each part, the corresponding two-dimensional discrete cosine change frequency component is assigned, and the two-dimensional discrete cosine change result is used as the compression result of the channel attention, then the corresponding two-dimensional discrete cosine change frequency component is expressed as: Where Freq i represents the feature map after the i-th partial channel weight adjustment, Indicates that the ith channel of the input is subjected to a two-dimensional discrete cosine change; X i represents the i-channel part of the input; represents the i-channel part of the feature map input with a height of h and a width of w, Represents the two-dimensional discrete cosine change basis function of the i-th channel part of the input, i∈{0,1,…,n-1}, [u i ,v i ] corresponds to X i The index of the frequency component, after compression It becomes a C'-dimensional vector, and the compressed vector can be obtained by concatenation: Freq=compress(X) =cat([Freq 0 ,Freq 1 ,…,Freq n-1 ]) in is the obtained multispectral vector, Indicates the compression method; Then the entire channel attention framework is: ms_att = sigmoid(fc(Freq)); Step 3: Update the detection and recognition model with the new detection and recognition model to perform line hardware corrosion defect detection; The training method of the novel detection and recognition model comprises: Pre-process defective samples; The corrosion features are extracted from the pre-processed defect samples based on the feature extraction network, and the detailed features of the deep network are supplemented based on the frequency attention module, where the frequency attention module regards the channel representation problem as a compression process using frequency analysis; The corrosion features are fused based on the feature fusion network, and additional features are extracted from the feature map generated by the main network based on the additional detection head; the additional detection head takes more candidate boxes as positive samples by relaxing the constraints on the allocation of positive samples.

2. The line hardware corrosion defect detection method based on cloud-edge collaboration according to claim 1 is characterized in that: The corrosion features are fused based on the feature fusion network, and additional features are extracted from the feature map generated by the main network based on the additional detection head, including: Guided by the prediction results of the Lead Head, hierarchical labels from coarse to fine are generated for training the additional detection head and the Lead Head respectively; the Lead Head selects the N prediction boxes with the highest weighted scores as positive samples.

3. The line hardware corrosion defect detection system based on cloud-edge collaboration is characterized by: Used to implement the line hardware corrosion defect detection method based on cloud-edge collaboration as described in claim 1 or 2; comprising: The collection and inspection module is used to collect the corrosion defect data of hardware of the transmission line; A defect detection module is used to obtain defect samples and normal samples in the hardware corrosion defect data based on the detection and recognition model; A model training module is used to input defect samples into an improved YOLOv8m model to train a new structure detection and recognition model; the improved YOLOv8m model includes: adding a frequency attention module to the feature extraction network of the YOLOv8m model, and adding an additional detection head to the feature fusion network; Data transmission module, used to upload the detection results to the cloud server and receive the newly constructed detection model; The defect detection module is also used to update the detection and recognition model with a new detection and recognition model to perform circuit hardware corrosion defect detection.

4. The line hardware corrosion defect detection system based on cloud-edge collaboration according to claim 3 is characterized in that: The model training module is located in the cloud server; the defect detection module is located at the edge; The cloud server sends the newly constructed detection and identification model to the edge end, and the edge end uploads the line hardware corrosion defect detection results to the cloud server.

5. A computer readable medium having a computer program stored thereon, characterized in that: The computer program is executed by a processor to implement the line hardware corrosion defect detection method based on cloud-edge collaboration as described in claim 1 or 2.

Citation Information

Patent Citations

  • Steel surface defect detection method based on improved YOLOv5s

    CN115829991A

  • Method and system for detecting corrosion defect of shockproof hammer of power transmission line

    CN116229278A

  • Ship optical image wake detection method based on improved YOLOv7

    CN116597313A