Transformer fault detection method based on improved YOLOv8 model

By improving the YOLOv8 model, combining the self-calibrated convolutional defogging module, GAN and multi-source data fusion network structure, the problems of poor image quality and inaccurate feature extraction in intelligent inspection of transformers are solved, and more efficient and accurate fault detection is achieved .

CN119323565APending Publication Date: 2025-01-17KUNMING UNIVERSITY

Patent Information

Application Number
CN202411863783.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-18
Publication Date
2025-01-17

AI Technical Summary

Technical Problem

The existing transformer intelligent inspection technology has problems such as poor image quality, inaccurate feature extraction and poor real-time detection capabilities, especially in environments such as dust, oil pollution, and rain and fog.

Method used

Using the improved YOLOv8 model, self-calibrated convolutional defogging module, generative adversarial network (GAN), multi-source data fusion network structure and BiFPN structure were introduced, and the ASPP module was replaced with the ASPPFCSPC module to enhance the model's feature extraction capability and real-time detection capability. , improve detection accuracy and accuracy.

Benefits of technology

It significantly improves the accuracy, accuracy and real-time detection capabilities of transformer fault detection, enhances the stability and adaptability of the model, and can accurately identify transformer faults in complex environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119323565A_ABST
    Figure CN119323565A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of image processing, and discloses a transformer fault detection method based on an improved YOLOv8 model. Aiming at the problems of inaccuracy in feature extraction, low precision, poor real-time detection capability and the like existing in fault detection of a traditional transformer fault detection method, the invention establishes a transformer fault detection model based on an improved YOLOV8 model architecture, a self-calibration convolution defogging module is introduced, a generative adversarial network (GAN) and a multi-source data fusion network structure are added, a BiFPN structure is used, an ASPP module is replaced by an ASPFCSPC module, and a YOLOV8 model architecture is improved, so that the feature extraction capability of a transformer fault detection model is enhanced, the calculation complexity of the model is reduced, and the fault detection efficiency of the transformer is improved. The transformer fault detection precision, accuracy and real-time detection capability are improved, and the stability and adaptability of the model are enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of image processing and relates to a transformer fault detection method based on an improved YOLOv8 model. Background Art

[0002] With the continuous growth of electricity demand and the expansion of the power grid, the operating status of transformers, as key equipment in the power system, is directly related to the safety and stability of the power grid. However, the traditional manual inspection method has problems such as low efficiency, high cost, and susceptibility to human factors, which makes it difficult to meet the needs of modern power grids for efficient and accurate monitoring of transformers. In recent years, with the rapid development of artificial intelligence, the Internet of Things and big data technologies, intelligent transformer inspection technology has emerged. This technology uses high-definition cameras and sensors to automatically collect image data, and uses deep learning algorithms for analysis, so as to achieve real-time monitoring of transformer status and fault warning. However, the existing intelligent transformer inspection technology still faces challenges such as poor image quality, inaccurate feature extraction, and poor real-time detection capabilities caused by factors such as dust, oil coverage, rain and fog. Summary of the invention

[0003] The purpose of the present invention is to propose a transformer fault detection method based on an improved YOLOv8 model. The method enhances the model feature extraction capability by introducing a self-calibrated convolutional defogging module, adding a generative adversarial network (GAN), a multi-source data fusion network structure, using a BiFPN structure, and replacing the ASPP module with an ASPPFCSPC module. While reducing the calculation complexity of the model, it is beneficial to improve the detection accuracy, precision and real-time detection capability, and enhance the stability and adaptability of the model.

[0004] In order to achieve the above object, the present invention adopts the following technical scheme:

[0005] A transformer fault detection method based on an improved YOLOv8 model comprises the following steps:

[0006] Step 1. First, obtain multiple groups of natural light images and infrared images of the transformer, wherein each group of natural light images and infrared images are formed into corresponding image pairs in one-to-one correspondence in time and space during acquisition;

[0007] Perform image preprocessing and annotation on the acquired natural light images and infrared images of the transformer to obtain a training data set;

[0008] Step 2. Build a transformer fault detection model based on the improved YOLOV8 model architecture, where the transformer fault detection model includes a backbone network, a neck network, and a detection head; the backbone network includes a multi-source data fusion network, a GAN module, a self-calibrated convolutional defogging module, multiple stacked convolution modules and a C2FCIB module, and an ASPPFCSPC module;

[0009] The multi-source data fusion network uses two parallel network branches, CNN and Transformer;

[0010] Among them, the CNN and Transformer branches are used to extract features from the acquired infrared images and natural light images respectively, and mid-term fusion is used to effectively fuse the feature information of the two branches to achieve cross-modal information complementarity;

[0011] The processing flow of the transformer fault detection model is as follows:

[0012] The input natural light image and infrared image first enter the multi-source data fusion network, and CNN and Transformer are used to extract and fuse the features of the transformer infrared image and natural light image respectively;

[0013] The transformer feature map fused by the multi-source data fusion network enters the GAN module and is repaired in the GAN module. The repaired transformer feature map is output to the self-calibration convolution defogging module for detail feature extraction and defogging operations;

[0014] The feature map processed by the self-calibrated convolutional dehazing module is converted into a set of high-dimensional feature maps by stacking multiple convolutional modules and C2FCIB modules and undergoing a series of convolution operations;

[0015] The high-dimensional feature map is subjected to dilated convolution and pooling operations in the ASPPFCSPC module to obtain the high-dimensional feature map of the transformer image. The high-dimensional feature map passes through the neck network, undergoes multiple convolutions and BiFPN processing, and is output through the detection head;

[0016] Step 3. Train the transformer fault detection model built in step 2 based on the training data set in step 1 to obtain a trained transformer fault detection model, and use the transformer fault detection model to detect transformer faults.

[0017] In addition, based on the above-mentioned transformer fault detection method based on the improved YOLOv8 model, the present invention also proposes a transformer fault detection system based on the improved YOLOv8 model, which adopts the following technical solutions:

[0018] A transformer fault detection system based on an improved YOLOv8 model includes a camera and a computer device, wherein the computer device includes a memory and at least one processor. The memory stores executable code. When the processor executes the executable code, it is used to implement the transformer fault detection method based on the improved YOLOv8 model as described above.

[0019] The present invention has the following advantages:

[0020] As described above, the present invention relates to a transformer fault detection method based on an improved YOLOv8 model, in which a transformer fault detection model based on an improved YOLOv8 model architecture is built. In terms of model structure, the present invention introduces a self-calibrated convolutional defogging module, adds a generative adversarial network GAN, a multi-source data fusion network structure, uses a BiFPN structure, and replaces the ASPP module with an ASPPFCSPC module to enhance the model feature extraction capability, while reducing the model calculation complexity, it is beneficial to improve the transformer fault detection accuracy, accuracy and real-time detection capability, and enhance the stability and adaptability of the model. Specifically, in terms of enhancing the model feature extraction capability, through the self-calibrated convolutional defogging module SCNet and the multi-source data fusion network structure, when the transformer is blocked by oil, dust, and water mist, the infrared image and the natural light image can be combined with each other and the detailed features of the transformer can be extracted in a smaller field of view, which improves the adaptability of the model to different scales and different contexts, and realizes the complementarity of cross-modal information. In terms of improving detection precision and accuracy, by using a multi-source data fusion network structure (combining CNN and Transformer to enhance the feature extraction capabilities of infrared images and visible light images of transformers, efficient fusion and complementarity of cross-modal information are achieved, so that the fused features contain more contextual information of the transformer, improving the detection performance of the model in multimodal scenarios. Then, the BiFPN structure and ASPPFCSPC module are used to weightedly fuse the transformer's multiple scale features, enhancing the feature expression and fusion effects. The contextual information is quickly and accurately transmitted through the shortcut links in the C2FCIB module, while keeping the spatial size of the feature map unchanged. The edges of the transformer and the overall features are extracted to the greatest extent without performing cross-channel operations, which more realistically restores the contour of the transformer and significantly improves the detection accuracy and image restoration effect of the model. In addition, in terms of reducing computational complexity and improving real-time detection capabilities, , by using jump connections multiple times in the self-calibrated convolutional dehazing module SCNet and the multi-source data fusion network structure, the characteristic information of the transformer in the upper network is quickly and completely transferred to the lower network, greatly reducing the amount of network calculations. In addition, the C2FCIB module adopts deep separable convolution and residual structure, which effectively reduces the computational complexity and parameter amount of the recognition network to meet the real-time recognition requirements of the transformer recognition model. Finally, in terms of enhancing the stability and adaptability of the model, the generative adversarial module GAN is used with the wavelet transform DWT and the frequency region attention normalization mechanism to separate the low-frequency and high-frequency information of the transformer image, and the structure restoration and texture generation are performed respectively, which significantly improves the fineness and consistency of the repaired image. Then, the FRAN mechanism is used to focus on high-frequency details, ensure the fusion and alignment of multi-frequency features, improve the authenticity of the generated transformer image, and enable the recognition model to run stably in a more complex environment. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 It is a flow chart of a transformer fault detection method based on an improved YOLOv8 model in an embodiment of the present invention;

[0022] Figure 2 A structural diagram of a transformer fault detection model constructed in an embodiment of the present invention;

[0023] Figure 3 A structural diagram of a multi-source data fusion network in an embodiment of the present invention;

[0024] Figure 4 is a structural diagram of a feature extraction module CFE in an embodiment of the present invention;

[0025] Figure 5 It is a structural diagram of a feature extraction module TFE in an embodiment of the present invention;

[0026] Figure 6 This is a structural diagram of the fusion module IRF in an embodiment of the present invention;

[0027] Figure 7 It is a structural diagram of the cross attention mechanism in an embodiment of the present invention;

[0028] Figure 8 This is a structural diagram of a generative adversarial module GAN in an embodiment of the present invention;

[0029] Fig. 9 is a structural diagram of a self-calibrated convolutional defogging module in an embodiment of the present invention;

[0030] Fig.10 A structural diagram of BiFPN in an embodiment of the present invention;

[0031] Fig.11 It is a structural diagram of the C2FCIB module in an embodiment of the present invention;

[0032] Fig.12 4 is a structural diagram of the ASPPFCSPC module in an embodiment of the present invention. DETAILED DESCRIPTION

[0033] The present invention is further described in detail below with reference to the accompanying drawings and specific embodiments:

[0034] Example 1

[0035] This embodiment describes a transformer fault detection method based on an improved YOLOv8 model to solve the problems of inaccurate feature extraction, low precision, and poor real-time detection capability in traditional transformer fault detection methods during fault detection.

[0036] like Figure 1As shown, the transformer fault detection method based on the improved YOLOv8 model in this embodiment includes the following steps:

[0037] Step 1. First, obtain multiple groups of natural light images and infrared images of the transformer, wherein each group of natural light images and infrared images are formed into corresponding image pairs in one-to-one correspondence in time and space during acquisition.

[0038] The acquired natural light images and infrared images of the transformer are preprocessed and labeled to obtain a training data set.

[0039] Specifically, before using the transformer fault detection model to detect transformer faults, a transformer image for model training is first obtained and the transformer image is preprocessed.

[0040] A visible light camera is used to obtain a natural light image of the transformer. At the same time, an infrared thermal imager is used to obtain an infrared image of the transformer. When the natural light image and the infrared image are collected, they correspond one to one in time and space to form a corresponding image pair.

[0041] In this embodiment, a self-collected database is used, and the characteristics of the database are as follows: large amount of data and diverse data.

[0042] The database contains more than 2,000 images (1,000 infrared and natural light images each) from 12 sites, covering the period from September 2020 to June 2024, and includes transformer images in multiple seasons and weather conditions.

[0043] The transformer images in the database have been manually annotated, and the annotation quality is high.

[0044] The process of preprocessing the acquired transformer image is as follows:

[0045] Step 1.1. Image reading: read the image file into memory;

[0046] Step 1.2. Image scaling: Scale the image to the 640× 640 size supported by the model;

[0047] Step 1.3. Image normalization: Use the Sobel operator to normalize the pixel values ​​of the image to the interval [0, 1];

[0048] The Sobel operator consists of two 3×3 gradient templates, one for calculating the gradient in the X direction and the other for calculating the gradient in the Y direction, in which the transformer image is transformed into a feature map that is more easily recognizable;

[0049] The specific calculation method of the Sobel operator is as follows:

[0050] Convert image grayscale values ​​to floating point numbers.

[0051] Perform convolution operation on the image, use the X-direction gradient template to calculate the gradient in the X direction, and use the Y-direction gradient template to calculate the gradient in the Y direction.

[0052] For example, the edge features of the transformer can be intuitively represented as the brightness differences between different areas in the image, and can avoid oversaturation or dimness problems caused by obtaining too high or too low pixel values ​​of the transformer image during display, thereby enhancing the adaptability of the model.

[0053] Sum the square of the gradient in the X direction and the gradient in the Y direction to get the gradient value of the image.

[0054] Color channel conversion converts the image from RGB format to CHW format, that is, channel-height-width format.

[0055] Step 2. Build a transformer fault detection model based on the improved YOLOV8 model architecture, such as Figure 2 As shown, the transformer fault detection model includes a trunk network, a neck network and a detection head.

[0056] Specifically, the backbone network includes a multi-source data fusion network, a GAN module, a self-calibrated convolutional dehazing module, stacked multiple convolution modules and a C2FCIB module, and an ASPPFCSPC module.

[0057] The multi-source data fusion network uses two parallel network branches: CNN and Transformer.

[0058] The CNN and Transformer branches are used to extract features from the acquired infrared images and natural light images respectively, and mid-term fusion is used to effectively fuse the feature information of the two branches to achieve cross-modal information complementarity.

[0059] The processing flow of the transformer fault detection model is as follows:

[0060] The input natural light image and infrared image first enter the multi-source data fusion network, and CNN and Transformer are used to extract and fuse the features of the transformer infrared image and natural light image respectively.

[0061] The transformer feature map fused by the multi-source data fusion network enters the GAN module and is repaired in the GAN module. The repaired transformer feature map is output to the self-calibration convolution defogging module for detail feature extraction and defogging operations;

[0062] The feature map processed by the self-calibrated convolutional dehazing module is stacked with multiple convolutional modules and C2FCIB modules, so that the neural network can better extract the image features of the transformer.

[0063] After a series of convolution operations, the input transformer feature map is converted into a set of high-dimensional feature maps;

[0064] The high-dimensional feature map undergoes dilated convolution and pooling operations in the ASPPFCSPC module to obtain a high-dimensional feature map of the transformer image. The high-dimensional feature map contains information such as the edge, texture, and shape of the transformer, and is the basis for subsequent detection and classification.

[0065] The high-dimensional feature map passes through the neck network, undergoes multiple convolutions and BiFPN processing, and is output through the detection head Detect.

[0066] like Figure 2 As shown, the backbone network includes four C2FCIB modules and three convolutional modules;

[0067] Four C2FCIB modules are defined as the first, second, third and fourth C2FCIB modules; three convolution modules are defined as the first, second and third convolution modules. There are two self-calibrated convolution defogging modules.

[0068] The feature maps processed by the two self-calibrated convolutional dehazing modules are sequentially passed through the first C2FCIB module, the first convolution module, the second C2FCIB module, the second convolution module, the third C2FCIB module, the third convolution module, and the fourth C2FCIB module to obtain a set of high-dimensional feature maps, which are output to the ASPPFCSPC module.

[0069] The neck network consists of three upsampling modules, six BiFPN modules, six C2FCIB modules and three convolution modules.

[0070] Three upsampling modules are defined as the first, second and third upsampling modules, six BiFPN modules are defined as the first, second, third, fourth, fifth and sixth BiFPN modules, six C2FCIB modules are defined as the fifth, sixth, seventh, eighth, ninth and tenth C2FCIB modules, and three convolution modules are defined as the fourth, fifth and sixth convolution modules.

[0071] The output feature map of the ASPPFCSPC module is upsampled by the first upsampling module, and the processed feature map arrives at the first BiFPN module and is spliced ​​with the output feature map of the third C2FCIB module in the first BiFPN module.

[0072] The output feature map of the first BiFPN module is processed by a fifth C2FCIB module.

[0073] The output feature map of the fifth C2FCIB module is upsampled by the second upsampling module, and the processed feature map arrives at the second BiFPN module and is spliced ​​with the output feature map of the second C2FCIB module in the second BiFPN module.

[0074] The output feature map of the second BiFPN module is processed by a sixth C2FCIB module.

[0075] The output feature map of the sixth C2FCIB module is upsampled by the third upsampling module, and the processed feature map arrives at the third BiFPN module and is spliced ​​with the output feature map of the first C2FCIB module in the third BiFPN module.

[0076] The output feature map of the third BiFPN module is processed by a seventh C2FCIB module.

[0077] The output feature map of the seventh C2FCIB module enters the fourth BiFPN module after passing through the fourth convolution module, and is spliced ​​with the output feature maps of the second C2FCIB module and the sixth C2FCIB module in the fourth BiFPN module.

[0078] The output feature map of the fourth BiFPN module is processed by an eighth C2FCIB module.

[0079] The output feature map of the eighth C2FCIB module enters the fifth BiFPN module after passing through the fifth convolution module, and is spliced ​​with the output feature maps of the third C2FCIB module and the fifth C2FCIB module in the fifth BiFPN module.

[0080] The output feature map of the fifth BiFPN module is processed by a ninth C2FCIB module.

[0081] The output feature map of the ninth C2FCIB module enters the sixth BiFPN module after passing through the sixth convolution module, and is spliced ​​with the output feature map of the ASPPFCSPC module in the sixth BiFPN module.

[0082] The output feature map of the sixth BiFPN module is processed by a tenth C2FCIB module.

[0083] There are four detection heads, and the seventh, eighth, ninth, and tenth C2FCIB modules are connected to one detection head respectively.

[0084] like Figure 3As shown in FIG. 1 , the multi-source data fusion network in this embodiment uses CNN and Transformer to improve the feature extraction capability of different types of transformer images (infrared images and natural light images), and adopts mid-term fusion to effectively fuse the feature information of the two branches and realize the complementarity of cross-modal information. The network structure is shown in FIG. Figure 3 shown.

[0085] The multi-source data fusion network includes two parallel network branches: infrared and visible light.

[0086] The infrared branch is composed of a CNN-based feature extraction module CFE and a convolutional layer CBS (Conv-BN-SiLU), while the visible light branch is composed of a Transformer-based feature extraction module TFE and a convolutional layer CBS.

[0087] First, the infrared image and visible light image of the transformer are input into the corresponding branches, namely the infrared branch and the visible light branch, respectively. After the convolutional layer CBS operation in the corresponding branch, the feature F is obtained. IR and F RGB .

[0088] Among them, F IR and F RGB Represents the infrared features and visible light features obtained through the corresponding branch convolutional layer CBS operation.

[0089] Then, the feature map F IR and F RGB The infrared features F of transformers at different scales are obtained through four consecutive feature extraction modules CFE and TFE of the corresponding branches. i IR and visible light feature F i RGB , i∈1,2,3,4.

[0090] Secondly, the mid-term fusion method is used to input the two modal features acquired in parallel into the infrared-visible light fusion module IRF in the three parallel layers behind the infrared branch and the visible light branch to obtain the fused feature information F j IRF , j∈1,2,3.

[0091] Take the output feature F of the second CFE module 2 IR and the output feature F of the second TFE 2 RGB For example, feature F 2 IR and feature F 2 RGBAll of them are sent to the infrared-visible light fusion module IRF for fusion to obtain the fusion feature information F of the parallel layer 1 IRF .

[0092] Similarly, the output feature F of the third CFE module 3 IR and the output feature F of the third TFE 3 RGB The fusion feature information F of the parallel layer is obtained by sending it to the infrared-visible light fusion module IRF for fusion. 2 IRF .

[0093] Similarly, the output feature F of the fourth CFE module 4 IR and the output feature F of the fourth TFE 4 RGB The fusion feature information F of the parallel layer is obtained by sending it to the infrared-visible light fusion module IRF for fusion. 3 IRF .

[0094] The transformer features after fusion in each parallel layer are added with the infrared features and visible light features of the corresponding scale respectively, and then sent back to the infrared branch and the visible light branch, and the addition results are processed in two ways.

[0095] The features after one addition are used for subsequent feature extraction and fusion; the features after the other addition are added with the features of another modality to obtain the fused feature F. j fuse , j∈1,2,3, and then sent into the C2FCIB structure and finally fused and output.

[0096] Still using the fusion feature information F of the parallel layer 1 IRF For example: Fusion feature information F 1 IRF First, the output feature F of the second CFE module 2 IR Add and fuse the feature information F 1 IRF It is also combined with the output feature F of the second TFE module 2 IR Add.

[0097] Feature F in the infrared branch 1 IRF and feature F 2 IR The result after addition is divided into two paths, one path continues to perform subsequent feature extraction and fusion, and the other path is combined with the feature F in the visible light branch.1 IRF and feature F 2 RGB The result after addition is the fusion feature F. 1 fuse .

[0098] Similarly, we get the fusion feature F 2 fuse , fusion feature F 3 fuse .

[0099] The fused feature F 1 fuse 、F 2 fuse 、F 3 fuse Enter the C2FCIB structure and finally merge the output, such as Figure 3 shown.

[0100] This module uses a two-stream feature extraction network structure to extract local features of infrared images using a convolutional neural network (CNN) and extract global context information of visible light images using a Transformer. In addition, a large number of residual links are introduced in the CFE and TFE modules, which reduces the amount of calculation while allowing the network to retain more complete feature information and transmit feature information more effectively. Finally, the extracted feature information is fused to improve the performance of target detection.

[0101] The specific structure of the feature extraction module CFE is shown in Figure 4. The processing flow of CFE is as follows:

[0102] For the input transformer infrared characteristic F IR First, after three CBS modules, three consecutive standard convolution, normalization and activation function operations are performed to capture the transformer features at different levels in the image and obtain the preliminarily processed features F IRC .

[0103] Next, the global information of the feature is obtained through the global average pooling operation to obtain the feature F IRG .

[0104] Afterwards, the feature F IRG The processing is divided into two branches, namely the first branch and the second branch.

[0105] The first branch passes through two consecutive 1×1 convolutional layers and ReLU activation functions to extract the transformer information on each channel, thereby establishing the dependency relationship between channels.

[0106] The second branch uses a 3×3 depthwise separable convolution layer and a 1×1 pointwise convolution layer to obtain the spatial information of the transformer features. The depthwise separable convolution layer can reduce the computational burden while ensuring the effectiveness of the acquired features.

[0107] After that, the feature information of the first branch and the second branch are fused, and the fused features are weighted by the Sigmoid function and combined with the feature F IRG Multiply.

[0108] After multiplication, the transformer feature information is enhanced in the channel and spatial dimensions to obtain the enhanced feature F IRE .

[0109] .

[0110] In the formula, represents the Sigmoid activation function, represents 1×1 convolution, represents the ReLU activation function, represents a 1×1 point-wise convolution, Represents a 3×3 depthwise separable convolution.

[0111] In order to reduce the loss of information during feature extraction, realize feature reuse, and avoid gradient disappearance and gradient explosion during back propagation, a residual structure is introduced into the network structure.

[0112] The infrared feature F IR After two consecutive CBS structures extract key information, the enhanced feature F IRE The splicing is performed along the channel dimension, and then the number of channels is sorted and downsampled again through the CBS structure, and finally the output infrared feature F is obtained. 1 IR .

[0113] The calculation formula is as follows:

[0114] .

[0115] In the formula, Down represents the Downsample downsampling operation, CBS represents the Conv-BatchNorm-SiLU operation, and Concat represents the channel-by-channel concatenation operation.

[0116] The visible light feature extraction network is mainly based on the visible light feature extraction module TFE of Transformer, where the specific structure of the TFE module is as follows: Figure 5 As shown, the processing flow of the feature extraction module TFE is as follows:

[0117] Input transformer visible light characteristic F RGB First, after the CBS convolution operation, the transformer features are reorganized to obtain the feature F RGBC ; Next, the extracted feature F RGBC Through convolution mapping, it is converted into three vectors: query Q, key K, and value V, so that different aspects of information can be interacted in subsequent attention calculations.

[0118] Among them, F RGBC The feature map obtained by 1×1 convolution is RGBC The multiplied value is used to calculate the value V.

[0119] For key K, 3×3 grouped convolution is used to extract its context information to enhance the representation ability of the key K vector so that it can better match the query Q vector. Subsequently, the information extracted by the 3×3 grouped convolution is concatenated with the query Q according to the channel dimension, and after two consecutive 1×1 convolutions, an attention matrix is ​​generated. In the process of generating the attention matrix, the Softmax function is introduced for weighting, and the weighted information is multiplied with the value V vector to obtain the global context information.

[0120] Afterwards, the global context information is added to the original key K through the addition operation to achieve feature reuse, and it is reorganized into features of the original size through the reshape function to ensure the integrity and coherence of the features.

[0121] .

[0122] reshape represents the reshape function, σ represents the Softmax activation function, and GConv3×3 represents a 3×3 grouped convolution.

[0123] At the same time, in order to avoid information loss, the residual structure is introduced.

[0124] The fused local information and global information F RGBT And the extracted features F RGBC The results after the CBS convolution layer are spliced ​​according to the channel dimension and passed through CBS again to achieve cross-layer transmission of information and effective fusion of features. Finally, the features are processed through downsampling operations to obtain the output visible light features. , the formula is:

[0125] .

[0126] The structure diagram of the fusion module IRF is as follows Figure 6 As shown, Figure 6As an example, the first IRF fusion module in the paper first combines the features of infrared and visible light modalities F 2 IR and F 2 RGB Splicing is performed along the channel dimension, and then cross-channel feature combination is achieved through 1×1 convolution to obtain the preliminary fusion feature F RI Then a symmetric path was designed to RI Respectively with F 2 IR And further fused through the Cross-Attention module to obtain feature F IF and F RF , thereby achieving the enhancement of single-modal information and the interaction of information between modalities. The obtained fusion feature F IF and F RF Then with F 2 IR and F 2 RGB Splice by channel dimension to capture the relationship between target features in each channel and obtain enhanced features F IIF and F RRF , while enriching the fusion features, it also realizes feature reuse. Finally, the fusion information of the two modalities is added by element-by-element addition to obtain the fusion feature F 1 IRF , the formula is as follows:

[0127] .

[0128] like Figure 7 As shown, the initial fusion feature F RI After 1×1 linear projection and global average pooling encoding, the query (Q RI ), key (K RI ) and value (V RI ) three vectors. Similarly, the visible light feature F 2 RGB After the same operation as above, the corresponding query vector (Q RGB ), key vector (K RGB ) and the value vector (V RGB). These vectors encode the relational information in the feature map in different modalities for subsequent information interaction. Later, in the feature fusion process, the key (K) and value (V) information in a single modality is retained, and the key (K) value of one modality is multiplied by the query (Q) value of another modality by element-wise multiplication. The purpose of this operation is to calculate the matching degree between the two modalities and obtain the similarity between the two modalities. Through this operation, the mutual correlation information between the modalities is introduced, so as to achieve effective interaction between the modalities in the feature fusion process. Subsequently, the Softmax function is used for weighting, and the fused correlation information is multiplied by the value (V) of the original modality, and the global correlation between the modalities is introduced in the feature representation, which further improves the information transfer and fusion effect of the cross-attention module, and the output is obtained through the reshape function.

[0129] like Figure 8 As shown in Figure 2, the generative adversarial module GAN uses wavelet transform DWT to split the transformer image into multiple frequency bands respectively, and uses a frequency region attention normalization mechanism FRAN to focus the network attention from low frequency to high frequency to align and fuse multi-frequency features. The network structure is shown in Figure 2. Figure 8 shown.

[0130] Specifically, the process of using the GAN module to repair the fused transformer feature map is as follows:

[0131] First, the input image is decomposed into multiple frequency bands through discrete wavelet transform DWT, and the decomposed frequency bands are divided into three parts, namely, the low-frequency band LowFreq, the second-level high-frequency band Lv2-HighFreq and the first-level high-frequency band Lv1-HighFreq; these three frequency bands are respectively input into the three branches of the generator for processing.

[0132] The LowFreq branch is first processed using GC ResBlk (containing gated convolution and residual connection), and then the generated features are passed to the high-frequency branch; the features from the three branches are aligned and fused through the frequency region attention normalization FRAN scheme to ensure consistency between different frequency bands.

[0133] Finally, the generated results of the three branches are converted back to the spatial domain through inverse discrete wavelet transform IDWT to complete the image restoration.

[0134] The low-frequency branch uses a convolutional network to restore the structure of the image, and uses the low-frequency loss function L1 to restore the global structure and basic information of the transformer image, namely: ;

[0135] in Refers to the low-frequency image of the transformer after final repair. is the real transformer image.

[0136] The high-frequency branch further generates fine transformer texture details. The sum of the high-frequency function losses is used to obtain the generator adversarial loss function. The high-frequency function loss is Adv_i, where i refers to the high-frequency information of different frequencies, that is:

[0137] ; Among them, D n is the discriminator of n-level high-frequency wavelet coefficients in the wave domain, It refers to the wavelet coefficient of the n-th level high-frequency transformer characteristic map predicted by the network in the wavelet domain.

[0138] Here n represents the level of wavelet decomposition, and out indicates that the wavelet coefficients are the predicted values ​​of the network output.

[0139] Adversarial loss is used to train the generator to produce realistic high-frequency details, making the generated image details difficult to be distinguished by the discriminator. This loss encourages the generator to improve the quality of the generated image, making it indistinguishable from the real image in terms of high-frequency details, thereby improving the realism of the restored image.

[0140] Then, the transformer features of different frequency bands are aligned and fused through the FRAN module, that is, the correlation between different positions is matched by the self-attention score. The calculation formula is as follows:

[0141] , ;

[0142] in represents the attention weight of position j to position i, Represents the transformer characteristic x i L and x j L The similarity score between , represents a 1×1 convolution process, which is used to convert low-frequency features into key and query space. exp is an exponential function, which is used to convert the similarity score into a non-negative value for subsequent judgment.

[0143] The feature matching loss The calculation formula is as follows:

[0144] ;

[0145] Where N is the number of features in the feature space. L is the number of layers in the discriminator. Indicates that the real image is in the nth frequency band, represents the feature activation map of the i-th layer in the discriminator for the n-th frequency band, represents the number of elements of the feature map output by the i-th layer discriminator, Indicates that the image generated by the generator is in the nth frequency band.

[0146] Finally, the inverse wavelet transform (IDWT) is used to reconstruct the processed frequency band into a spatial domain image to obtain the final restoration result.

[0147] These functions are both repair functions and training functions. The input transformer feature map is repaired by the generator through frequency division, and then judged by the FRAN module. If it is qualified, it is repaired, and if it is unqualified, it is repaired again.

[0148] This module converts the image into the wavelet domain, accurately disentangling the image into multiple frequency bands without losing spatial information. Disentanglement enables the neural network to explicitly and separately apply adversarial (or L1) losses to the high-frequency (or low-frequency) branches, which greatly alleviates the content conflict introduced by simultaneously optimizing two different objectives on entangled features in space. In addition, by adding the frequency region attention normalization FRAN module, attention is focused from low frequencies to high frequencies to align and fuse multi-frequency features. The FRAN module ensures the consistency of multiple frequency bands and helps suppress artifacts and effectively preserve texture details. Finally, the features completed separately in different frequency bands are converted back to the spatial domain by inverse discrete wavelet transform IDWT to produce the final completion.

[0149] like Fig. 9 As shown in the figure, the self-calibrated convolutional dehazing module SCNet enhances the feature extraction capability of the convolutional neural network (CNN) in a more flexible way, combines spatial and channel information, and adaptively adjusts the important parts of the transformer feature map, thereby improving the adaptability of the convolution operation to different scales and different contexts.

[0150] Specifically, the input self-calibrated convolutional dehazing module transformer features Figure X for Size, split into two Feature map of size , .

[0151] Then input the convolution kernel K, whose latitude is , where the first C represents the number of input or output channels, the second C represents the number of filters, and H and W represent the height and width of each filter respectively. The convolution kernel K is divided into 4 parts, which are respectively , whose dimensions are .

[0152] It is sent to the self-correction branch for processing to obtain the transformer characteristic Y1. It is sent to the conventional convolution transformation branch for processing to obtain the transformer feature Y2; finally, the processed transformer features Y1 and Y2 are concatenated as the output feature map Y.

[0153] In the self-correction branch, the transformer feature map is input , firstly, it is divided into k small branches through average pooling.

[0154] Among them, k 1,2,3, bottom to top.

[0155] Among them, the first branch obtains the transformer feature of the attention main branch through conventional convolution .

[0156] The second branch input Perform r-fold mean downsampling, convolution feature transformation, r-fold bilinear upsampling, and then add it to the third branch to obtain the attention feature of the spatial dimension, and then Fusion , the formula is as follows:

[0157] ;

[0158] ;

[0159] .

[0160] in, represents a downsampling operation with a sampling rate of r, Represents an upsampling operation with sampling rate r.

[0161] Finally, the features obtained above are Perform feature transformation to obtain the output of the self-correction branch .

[0162] .

[0163] In the regular convolutional transformation branch, the input transformer feature map , after normal convolution, we get Y2, the formula is as follows:

[0164] .

[0165] Among them, F i Refers to the convolution layer with different convolution kernels, K i Refers to the convolution kernels of different parts, T i Refers to transformer characteristics in different frequency bands.

[0166] Finally, the transformer features Y1 and Y2 are concatenated by dimension to obtain the dehazed transformer image Y.

[0167] In the traditional convolution module, the predefined convolution kernel size limits the receptive field of each spatial position, and there is a problem of insufficient receptive field acquisition. The self-calibrated convolution module SConv in this embodiment gives the defogging network enough receptive field to obtain more high-level semantic information, thereby improving the defogging effect of the network. This module expands the global receptive field without introducing additional parameters by splitting the standard convolution operation into multiple small convolution operations. The introduction of the self-calibrated convolution module can expand the global receptive field and improve the defogging effect of the network without introducing additional parameters. This helps to solve the problem of insufficient receptive field acquisition in traditional convolution modules and enhances the network's ability to understand high-level semantic information.

[0168] like Fig.10 As shown in the figure, the BiFPN module simultaneously weights and fuses transformer features of different scales through a bidirectional path from top to bottom and from bottom to top. The transformer feature map of each scale will not only be upsampled or downsampled, but also be given a learnable weight to optimize the effect of feature fusion. The module structure is as follows Figure 7 shown.

[0169] The transformer feature map input to the BiFPN module will first be upsampled in a top-down path, and the lower-resolution high-level transformer feature map (such as P8) will be upsampled step by step to the same resolution as the low-level transformer feature map (such as P2, P4, etc.), and then the upsampled feature map will be weighted fused with the feature map of the adjacent layer (for example, the upsampled P6 and P5 will be fused). Next, the bottom-up path starts from the lower-level features and transfers information upward step by step. Use downsampling to fuse the higher-resolution low-level feature map (such as P2) with the high-level feature map (such as P6 and P8, etc.). Finally, at each fusion node, a convolution operation is performed to further extract and fuse features to output a new transformer feature map.

[0170] Compared with the traditional feature pyramid network (FPN), the present invention adopts the BiFPN module, which can establish bidirectional connections between top-down and bottom-up paths, allowing information between features of different scales to flow and fuse more effectively, and optimize cross-scale connections by removing nodes with only one input edge, adding additional edges between input and output nodes at the same level, and treating each bidirectional path as a feature network layer and repeating it multiple times. Finally, learnable weights are added to the fusion area of ​​the structure to determine the importance of different input features, thereby improving the effect of feature fusion.

[0171] Fig.11The structure diagram of the C2FCIB module is shown. In this embodiment, the C2FCIB module is used to replace the C2F module. The C2FCIB module is a new C2F structure. By replacing the standard bottleneck structure (Bottleneck) in C2f with the CIB module, it is essentially the same as the C2F structure. The module introduces a data splitting (Split) structure to divide the transformer feature map into two parts. One part is processed by two convolutional layers and two CIB modules, and the computational complexity and parameter amount are effectively reduced through deep separable convolution (using deep convolution and point-by-point convolution). The other part is directly skipped and connected, and finally the two parts of the feature map are spliced ​​together. The use of this module enables the model to significantly improve the detection accuracy of the model while slightly increasing the amount of calculation.

[0172] like Fig.12 The structure diagram of the ASPPFCSPC module is shown. In this embodiment, the ASPPFCSPC module replaces the ASPP module.

[0173] The ASPPFCSPC module uses separable convolution and introduces an adaptive Average pooling layer in the lower branch, and extracts features in parallel with the Max pooling layer. The extracted transformer feature data is fused with the normal extraction part and scaled to form a new transformer feature map. The module structure is as follows Fig.10 As shown in the figure, the module first divides the input features into two parts, one of which is processed conventionally, and the other part is subjected to separable convolution, SPP, and average pooling operations for feature extraction. Finally, the feature data of these two parts are fused to obtain a new feature map.

[0174] Different from the traditional ASPP module, the ASPPFCSPC module performs three 5×5 maximum pooling operations on the features and obtains the output in sequence. At the same time, the receptive field passing through each maximum pooling layer is connected to its traditional convolutional features. This method effectively reduces the computational cost of the pooling scale and improves the detection speed of the model while maintaining the same receptive field before the improvement. In order to fully reflect the semantic relationship between global and local information, an adaptive average pooling layer is introduced in the lower branch and processed in parallel with the maximum pooling layer. This enables the model to easily obtain local features, surrounding context, and global background information, and realize fine-grained feature extraction, fusion, and representation at the image level, making the results smoother and more accurate.

[0175] Step 3. Train the transformer fault detection model built in step 2 based on the training data set in step 1 to obtain a trained transformer fault detection model, and use the transformer fault detection model to detect transformer faults.

[0176] The final output of the model is the category, location and confidence score of the target.

[0177] When training the built transformer fault detection model, the learning rate is set to 0.01; the model optimization algorithm adopts the RMSProp optimization algorithm; the batch size is 32, and the number of model iterations is 350.

[0178] The RMSProp optimization algorithm is an adaptive learning rate optimization algorithm that dynamically adjusts the learning rate of each parameter by performing an exponentially weighted moving average on the square of the gradient to improve the efficiency and stability of the optimization process.

[0179] The number of iterations of the model is set to 350, at which point the model performance is better and overfitting does not occur.

[0180] Define a comprehensive loss function that includes the cross entropy (CEL) loss and the Kullback-Leibler (KL) divergence.

[0181] Defining cross entropy loss The calculation formula is as follows:

[0182] ;

[0183] in is the total number of categories, is the true label, is the probability of predicting the true label.

[0184] Defining Kullback-Leibler divergence The calculation formula is as follows:

[0185] ;

[0186] in, represents the true distribution, Represents the probability distribution of the model's predictions.

[0187] The comprehensive loss function is as follows:

[0188] ;

[0189] in, is the comprehensive loss function, , is the weight coefficient.

[0190] Use the comprehensive loss function to train the model, iterate the above process multiple times, and continuously optimize the model to gradually improve its performance.

[0191] The present invention builds a transformer fault detection model based on the improved YOLOv8 model, introduces a self-calibrated convolutional defogging module, adds a generative adversarial network GAN, a multi-source data fusion network structure, uses a BiFPN structure, and replaces the ASPP module with the ASPPFCSPC module. The model feature extraction capability is greatly enhanced, while reducing the calculation complexity of the model, it is beneficial to improve the transformer fault detection precision, accuracy and real-time detection capability, and enhance the stability and adaptability of the model.

[0192] Example 2

[0193] This embodiment 2 describes a transformer fault detection system based on an improved YOLOv8 model, including a visible light camera red, an external thermal imager and a computer device. The visible light camera red, the external thermal imager is used to collect natural light images and infrared images of transformer images, respectively, and upload the collected natural light images and infrared images to the computer device.

[0194] The computer device includes a memory and at least one processor. The memory stores executable code. When the processor executes the executable code, it is used to implement the transformer fault detection method based on the improved YOLOv8 model in the above embodiment 1.

[0195] Of course, the above description is only a preferred embodiment of the present invention, and the present invention is not limited to the above embodiments. It should be noted that all equivalent substitutions and obvious deformation forms made by any technician familiar with the field under the guidance of this specification fall within the essential scope of this specification and should be protected by the present invention.

Claims

1. A transformer fault detection method based on an improved YOLOv8 model, characterized in that: The steps include: Step 1. First, obtain multiple groups of natural light images and infrared images of the transformer, wherein each group of natural light images and infrared images are formed into corresponding image pairs in one-to-one correspondence in time and space during acquisition; Perform image preprocessing and annotation on the acquired natural light images and infrared images of the transformer to obtain a training data set; Step 2. Build a transformer fault detection model based on the improved YOLOV8 model architecture. The transformer fault detection model includes a backbone network, a neck network, and a detection head. The backbone network includes a multi-source data fusion network, a GAN module, a self-calibrated convolutional dehazing module, multiple stacked convolution modules and a C2FCIB module, and an ASPPFCSPC module. The multi-source data fusion network uses two parallel network branches, CNN and Transformer; The CNN and Transformer branches are used to extract features from the acquired infrared images and natural light images respectively, and mid-term fusion is used to effectively fuse the feature information of the two branches to achieve cross-modal information complementarity; The processing flow of the transformer fault detection model is as follows: The input natural light image and infrared image first enter the multi-source data fusion network, and CNN and Transformer are used to extract and fuse the features of the transformer infrared image and natural light image respectively; The transformer feature map fused by the multi-source data fusion network enters the GAN module and is repaired in the GAN module. The repaired transformer feature map is output to the self-calibration convolution defogging module for detail feature extraction and defogging operations; The feature map processed by the self-calibrated convolutional dehazing module is converted into a set of high-dimensional feature maps by stacking multiple convolutional modules and C2FCIB modules and undergoing a series of convolution operations; The high-dimensional feature map is subjected to dilated convolution and pooling operations in the ASPPFCSPC module to obtain the high-dimensional feature map of the transformer image. The high-dimensional feature map passes through the neck network, undergoes multiple convolutions and BiFPN processing, and is output through the detection head; Step 3. Train the transformer fault detection model built in step 2 based on the training data set in step 1 to obtain a trained transformer fault detection model, and use the transformer fault detection model to detect transformer faults.

2. The transformer fault detection method based on the improved YOLOv8 model according to claim 1, characterized in that: The backbone network includes four C2FCIB modules and three convolution modules; Four C2FCIB modules are defined as the first, second, third and fourth C2FCIB modules respectively; three convolution modules are defined as the first, second and third convolution modules respectively; the feature map processed by the self-calibrated convolution dehazing module passes through the first C2FCIB module, the first convolution module, the second C2FCIB module, the second convolution module, the third C2FCIB module, the third convolution module and the fourth C2FCIB module in sequence to obtain a set of high-dimensional feature maps, which are output to the ASPPFCSPC module.

3. The transformer fault detection method based on the improved YOLOv8 model according to claim 2, characterized in that: The neck network includes three upsampling modules, six BiFPN modules, six C2FCIB modules, and three convolution modules; Define three upsampling modules as the first, second and third upsampling modules, define six BiFPN modules as the first, second, third, fourth, fifth and sixth BiFPN modules; define six C2FCIB modules as the fifth, sixth, seventh, eighth, ninth and tenth C2FCIB modules; define three convolution modules as the fourth, fifth and sixth convolution modules; The output feature map of the ASPPFCSPC module is upsampled by the first upsampling module, and the processed feature map arrives at the first BiFPN module, and is spliced ​​with the output feature map of the third C2FCIB module in the first BiFPN module; The output feature map of the first BiFPN module is processed by a fifth C2FCIB module; The output feature map of the fifth C2FCIB module is upsampled by the second upsampling module, and the processed feature map arrives at the second BiFPN module, and is spliced ​​with the output feature map of the second C2FCIB module in the second BiFPN module; The output feature map of the second BiFPN module is processed by a sixth C2FCIB module; The output feature map of the sixth C2FCIB module is upsampled by the third upsampling module, and the processed feature map arrives at the third BiFPN module, and is spliced ​​with the output feature map of the first C2FCIB module in the third BiFPN module; The output feature map of the third BiFPN module is processed by a seventh C2FCIB module; The output feature map of the seventh C2FCIB module enters the fourth BiFPN module after passing through the fourth convolution module, and is spliced ​​with the output feature maps of the second C2FCIB module and the sixth C2FCIB module in the fourth BiFPN module; The output feature map of the fourth BiFPN module is processed by an eighth C2FCIB module; The output feature map of the eighth C2FCIB module enters the fifth BiFPN module after passing through the fifth convolution module, and is spliced ​​with the output feature maps of the third C2FCIB module and the fifth C2FCIB module in the fifth BiFPN module; The output feature map of the fifth BiFPN module is processed by a ninth C2FCIB module; The output feature map of the ninth C2FCIB module enters the sixth BiFPN module after passing through the sixth convolution module, and is spliced ​​with the output feature map of the ASPPFCSPC module in the sixth BiFPN module; The output feature map of the sixth BiFPN module is processed by a tenth C2FCIB module; There are four detection heads, and the seventh, eighth, ninth, and tenth C2FCIB modules are connected to one detection head respectively.

4. The transformer fault detection method based on the improved YOLOv8 model according to claim 1, characterized in that: The multi-source data fusion network includes two parallel network branches: infrared and visible light; The infrared branch is composed of a CNN-based feature extraction module CFE and a convolutional layer CBS, while the visible light branch is composed of a Transformer-based feature extraction module TFE and a convolutional layer CBS. First, the infrared image and visible light image of the transformer are input into the corresponding branches, namely the infrared branch and the visible light branch, respectively. After the convolutional layer CBS operation in the corresponding branch, the feature F is obtained. IR and F RGB ; Among them, F IR and F RGB Represents the infrared features and visible light features obtained through the CBS operation of the corresponding branch convolution layer; Then, feature F IR and F RGB The infrared features F of transformers at different scales are obtained through four consecutive feature extraction modules CFE and TFE of the corresponding branches. i IR and visible light feature F i RGB , i∈1,2,3,4; Secondly, the mid-term fusion method is used to input the two modal features acquired in parallel into the infrared-visible light fusion module IRF in the three parallel layers behind the infrared branch and the visible light branch to obtain the fused feature information F j IRF , j∈1,2,3; After the transformer features after fusion in each parallel layer are added with the infrared features and visible light features of the corresponding scale, they are sent back to the infrared branch and the visible light branch respectively, and the addition results are processed in two ways; The features after one addition are used for subsequent feature extraction and fusion; the features after another addition are added with the features of another modality to obtain the fused feature F. j fuse , j∈1,2,3, and then sent into the C2FCIB structure and finally fused and output.

5. The transformer fault detection method based on the improved YOLOv8 model according to claim 4 is characterized in that, The processing flow of the feature extraction module CFE is as follows: For the input transformer infrared characteristic F IR First, after three CBS modules, three consecutive standard convolution, normalization and activation function operations are performed to capture the transformer features at different levels in the image and obtain the preliminarily processed feature F IRC ; Next, feature F IRC The global information of the feature is obtained through the global average pooling operation to obtain the feature F IRG ; Afterwards, the feature F IRG The processing is divided into two branches, namely the first branch and the second branch; The first branch passes through two consecutive 1×1 convolutional layers and ReLU activation functions to extract transformer information on each channel; the second branch uses a 3×3 depth-wise separable convolutional layer and a 1×1 point-by-point convolutional layer to obtain the spatial information of the transformer features; Afterwards, the feature information of the two branches is fused, and the fused features are weighted by the Sigmoid function and combined with the feature F IRG Multiply them together to enhance the transformer feature information in the channel and spatial dimensions, and obtain the enhanced feature F IRE ; The infrared feature F IR After two consecutive CBS structures extract key information, the enhanced feature F IRE The images are spliced ​​along the channel dimension, and the number of channels is reorganized and downsampled again through a CBS structure to finally obtain the output infrared features.

6. The transformer fault detection method based on the improved YOLOv8 model according to claim 4 is characterized in that, The processing flow of the feature extraction module TFE is as follows: Input transformer visible light characteristic F RGB First, the transformer features are reorganized through CBS convolution operation to obtain the feature F RGBC ; Next, the extracted feature F RGBC Through convolution mapping, it is transformed into three vectors: query Q, key K and value V; Among them, F RGBC The feature map obtained by 1×1 convolution is RGBC The value obtained by multiplication is used to calculate the value V. For the key K, a 3×3 grouped convolution is used to extract its context information to enhance the representation ability of the key K vector so that it can better match the query Q vector. Subsequently, the information extracted by the 3×3 grouped convolution is concatenated with the query Q vector according to the channel dimension, and after two consecutive 1×1 convolutions, an attention matrix is ​​generated. In the process of generating the attention matrix, the Softmax function is introduced for weighting, and the weighted information is multiplied with the value V vector to obtain the global context information. After that, the global context information is added to the original key K through the addition operation to achieve feature reuse, and it is reorganized into features of the original size through the reshape function; the fused local information and global information F RGBT With feature F RGBC The results after the CBS convolution layer are spliced ​​according to the channel dimension, and then pass through the CBS convolution layer and down-sampled again to obtain the visible light features.

7. The transformer fault detection method based on the improved YOLOv8 model according to claim 1, characterized in that: The process of the GAN module repairing the fused transformer feature map is as follows: Firstly, the input image is decomposed into multiple frequency bands by discrete wavelet transform DWT, and the decomposed frequency bands are divided into three parts, namely low frequency band, second-level high frequency band and first-level high frequency band; The low-frequency band, the second-level high-frequency band, and the first-level high-frequency band are input into the three branches of the generator for processing; The low-frequency band branch is first processed using GC ResBlk, and then the generated features are passed to the high-frequency branch; the features from the three branches are aligned and fused through the frequency region attention normalization FRAN scheme; Finally, the generated results of the three branches are converted back to the spatial domain through inverse discrete wavelet transform IDWT to complete the image restoration.

8. The transformer fault detection method based on the improved YOLOv8 model according to claim 1, characterized in that: The processing process of the self-calibrated convolution defogging module is as follows: Input the self-calibrated convolutional dehazing module transformer feature map X, split into two feature maps , ; Then input the convolution kernel K; divide the convolution kernel K into 4 parts, respectively recorded as ; It is sent to the self-correction branch for processing to obtain the transformer characteristic Y1. The process is as follows: In the self-correction branch, the transformer feature map is input , firstly, it is divided into k small branches through average pooling; Among them, k 1,2,3; Among them, the first branch obtains the transformer feature of the attention main branch through conventional convolution , the formula is as follows: ; The second branch input Perform r-fold mean downsampling, convolution feature transformation, r-fold bilinear upsampling, and then add it to the third branch to obtain the attention feature of the spatial dimension, and then Fusion , the formula is as follows: ; ; in, represents a downsampling operation with a sampling rate of r, represents an upsampling operation with a sampling rate of r; Finally, the features obtained above are Perform feature transformation to obtain the output of the self-correction branch ; ; In the regular convolutional transformation branch, the input transformer feature map , after normal convolution, we get Y2, the formula is as follows: ; where F i Refers to the convolution layer with different convolution kernels, K i Refers to the convolution kernels of different parts, T i Refers to transformer characteristics in different frequency bands; Finally, the transformer features Y1 and Y2 are concatenated by dimension to obtain the dehazed transformer image Y.

9. The transformer fault detection method based on the improved YOLOv8 model according to claim 1, characterized in that: In the step 1, before using the transformer fault detection model to detect the transformer fault, firstly obtain a transformer image for model training, and pre-process the transformer image; First, a visible light camera is used to obtain a natural light image of the transformer, and an infrared thermal imager is used to obtain an infrared image of the transformer. The natural light image and the infrared image are corresponding to each other in time and space during acquisition to form a corresponding image pair. The preprocessing process of the transformer image is as follows: Step 1.

1. Image reading: read the image file into memory; Step 1.

2. Image scaling: Scale the image to the 640× 640 size supported by the model; Step 1.

3. Image normalization: Use the Sobel operator to normalize the pixel values ​​of the image to the interval [0, 1]; The Sobel operator consists of two 3×3 gradient templates, one for calculating the gradient in the X direction and the other for calculating the gradient in the Y direction, in which the transformer image is transformed into a feature map that is more easily recognizable; The specific calculation method of the Sobel operator is as follows: Convert the image grayscale value to floating point number; perform convolution operation on the image, use the X-direction gradient template to calculate the gradient in the X direction, and use the Y-direction gradient template to calculate the gradient in the Y direction; Sum the square of the gradient in the X direction and the gradient in the Y direction to get the gradient value of the image; Color channel conversion converts the image from RGB format to CHW format, that is, channel-height-width format.

10. The transformer fault detection method based on the improved YOLOv8 model according to claim 1 is characterized in that: In step 3, when training the constructed transformer fault detection model, the learning rate is set to 0.01; the model optimization algorithm adopts the RMSProp optimization algorithm; the batch size is 32, and the number of iterations of the model is 350.

Citation Information

Patent Citations

  • Three-dimensional lidar point cloud semantic segmentation method and apparatus based on deep learning

    WO2024130776A1

Cited By

  • Substation foreign matter intrusion detection method and system based on improved YOLOv11 model

    CN119722662A

  • Substation foreign object intrusion detection method and system based on improved YOLOv11 model

    CN119722662B

  • Image restoration method and system based on semantic information guidance

    CN120107120A

  • An Image Inpainting Method and System Guided by Semantic Information

    CN120107120B

  • Transformer winding fault detection method and device, electronic equipment and storage medium

    CN120180237A