Substation inspection image super-resolution processing method, device, equipment and medium

By combining the Swing Transformer and the diffusion model, a two-stage framework is used to recover the low-frequency and high-frequency features of substation inspection images, which solves the problems of detail blurring and computational complexity in low-resolution images, and improves image resolution and detection accuracy.

CN121169724APending Publication Date: 2025-12-19GUANGDONG POWER GRID CO LTD DONGGUAN POWER SUPPLY BUREAU
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202511353259.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-19
Publication Date
2025-12-19

AI Technical Summary

Technical Problem

Existing substation inspection images suffer from low resolution due to factors such as camera resolution and ambient lighting, which affects the accuracy and robustness of subsequent automated detection algorithms. Existing super-resolution processing methods suffer from problems such as high computational load and insufficient detail recovery capability.

Method used

A pre-trained Swing Transformer model is used to recover low-frequency texture features, and a residual diffusion module with a spatial-channel attention mechanism is used to recover high-frequency texture features. A two-stage framework is used for image super-resolution processing.

Benefits of technology

It improves the resolution and usability of substation inspection images, enhances the accuracy of equipment condition monitoring and defect identification, and reduces computational complexity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121169724A_ABST
    Figure CN121169724A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a super-resolution processing method and device for a substation inspection image, equipment and a medium, and relates to the technical field of electric power. The method comprises the following steps: acquiring a to-be-processed transformer substation inspection image, inputting the transformer substation inspection image into a preset image super-division processing model, obtaining a processed transformer substation inspection image, and outputting the processed transformer substation inspection image. Wherein the image super-division processing model comprises a pre-trained Swin Transform model and a diffusion model, the Swin Transform model is used for recovering low-frequency texture features in the substation inspection image, and the diffusion model is used for recovering high-frequency texture features in a processing result of the Swin Transform model through a residual diffusion module comprising a space-channel attention mechanism. Through the method, the resolution and availability of the original substation inspection image are improved, and a high-quality data basis is provided for tasks such as subsequent power equipment state monitoring.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of power technology, and in particular to a super-resolution processing method, apparatus, equipment and medium for substation inspection images. Background Technology

[0002] In the intelligent inspection and maintenance of substations, the substation inspection images collected by inspection robots or monitoring cameras are characterized by low resolution due to factors such as camera resolution, complex ambient lighting, and equipment aging, which seriously affects the accuracy and robustness of subsequent automated detection algorithms.

[0003] Existing image super-resolution methods combine diffusion models with Transformer models, utilizing the Vision Transformer (ViT) model to achieve rich global texture generation. However, the ViT model's large number of parameters and computational demands significantly increase memory usage and computational requirements. Furthermore, existing image super-resolution methods also alleviate computational burden by replacing the ViT model with a lightweight subspace attention mechanism; however, this method exhibits low recovery capability for fine cracks and small foreign objects over long distances.

[0004] In summary, providing a super-resolution processing method for substation inspection images to improve their usability and thus enhance the accuracy of subsequent monitoring and diagnosis is a technical problem that urgently needs to be solved. Summary of the Invention

[0005] This application provides a super-resolution processing method, apparatus, equipment, and medium for substation inspection images, which aims to improve the resolution of substation inspection images and thus enhance their usability in actual detection and analysis tasks.

[0006] In a first aspect, embodiments of this application provide a super-resolution processing method for substation inspection images, including:

[0007] Acquire substation inspection images to be processed;

[0008] The substation inspection image is input into a preset image super-resolution processing model to obtain a processed substation inspection image. The image super-resolution processing model includes a pre-trained Swin Transformer model and a diffusion model. The Swin Transformer model is used to recover the low-frequency texture features in the substation inspection image, and the diffusion model is used to recover the high-frequency texture features in the processing result of the Swin Transformer model through a residual diffusion module including a spatial-channel attention mechanism.

[0009] Output the processed substation inspection images.

[0010] In one possible implementation, the step of inputting the substation inspection image into a preset image super-resolution processing model to obtain the processed substation inspection image includes:

[0011] The substation inspection image is input into the Swing Transformer model, and the low-frequency components of the substation inspection image are recovered through a global self-attention mechanism to obtain an intermediate substation inspection image.

[0012] The intermediate substation inspection image and the noisy image of the substation inspection image are combined and the high-frequency texture features in the intermediate substation inspection image are recovered through the residual diffusion module in the diffusion model to obtain the processed substation inspection image.

[0013] In one possible implementation, the step of recovering the high-frequency texture features in the intermediate substation inspection image by using the residual diffusion module in the diffusion model to obtain the processed substation inspection image, together with the noisy image of the intermediate substation inspection image and the noisy image of the substation inspection image, includes:

[0014] The intermediate substation inspection image is processed by Fast Fourier Transform to obtain the frequency domain feature map of the intermediate substation inspection image.

[0015] Discrete wavelet transform processing is performed on the inspection images of the intermediate substation to extract multi-scale wavelet coefficients;

[0016] Based on the multi-scale wavelet coefficients and the frequency domain feature map, the intermediate feature map of the intermediate substation inspection image is obtained.

[0017] Based on the intermediate feature map, the processed substation inspection image is obtained.

[0018] In one possible implementation, obtaining the processed substation inspection image based on the intermediate feature map includes:

[0019] Global average pooling is performed on the intermediate feature map to obtain the feature vector;

[0020] The feature vector is convolved and then passed through a Sigmoid activation function layer and a Softmax activation function layer in sequence to obtain spatial attention weights;

[0021] The feature vector is fed into a multilayer perceptron layer, and then passed through the sigmoid activation function layer and the softmax activation function layer in sequence to obtain the channel attention weights;

[0022] Based on the intermediate feature map, the spatial attention weight, and the channel attention weight, the processed substation inspection image is obtained.

[0023] In one possible implementation, obtaining the processed substation inspection image based on the intermediate feature map, the spatial attention weight, and the channel attention weight includes:

[0024] The intermediate feature map, the spatial attention weight, and the channel attention weight are subjected to broadcast multiplication and convolution to obtain the query features;

[0025] The frequency domain feature map is convolved to obtain key features and value features corresponding to the key features;

[0026] Based on the query features, the key features, and the value features, the processed substation inspection image is obtained.

[0027] In one possible implementation, the loss function of the Swin Transformer model includes a first loss function based on the Fast Fourier Transform and a second loss function based on the spatial domain.

[0028] The expression for the first loss function is:

[0029]

[0030] Among them, L FFT Let M represent the first loss function. gt M represents the frequency domain representation of the substation inspection image obtained through Fast Fourier Transform. pre This represents the frequency domain representation of the substation inspection image obtained through the Swing Transformer model. Denotes mathematical expectation, ||·|| 2 Represents the square of the Euclidean norm;

[0031] The expression for the second loss function is:

[0032]

[0033] Among them, L SD Y represents the second loss function. gt M represents a substation inspection image in the spatial domain. pre This represents a substation inspection image obtained using the Swing Transformer model.

[0034] The expression for the loss function is:

[0035] L pretrain =α·LFFT +L SD ;

[0036] Among them, L pretrain Let represent the loss function, and α represent the weight used to balance the first and second loss functions.

[0037] Secondly, embodiments of this application provide a super-resolution processing device for substation inspection images, comprising:

[0038] The first processing module is used to acquire substation inspection images to be processed.

[0039] The second processing module is used to input the substation inspection image into a preset image super-resolution processing model to obtain the processed substation inspection image. The image super-resolution processing model includes a pre-trained SwinTransformer model and a diffusion model. The SwinTransformer model is used to recover the low-frequency texture features in the substation inspection image, and the diffusion model is used to recover the high-frequency texture features in the processing result of the SwinTransformer model through a residual diffusion module including a spatial-channel attention mechanism.

[0040] The third processing module is used to output the processed substation inspection images.

[0041] Thirdly, embodiments of this application provide a computer device, including: a memory and a processor;

[0042] The memory stores computer-executed instructions;

[0043] The processor executes computer execution instructions stored in the memory, causing the processor to perform the first aspect and / or various possible implementations of the first aspect as described above.

[0044] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the first aspect and / or various possible implementations of the first aspect.

[0045] Fifthly, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the first aspect and / or various possible implementations of the first aspect.

[0046] This application provides a super-resolution processing method, apparatus, device, and medium for substation inspection images. The method involves acquiring a substation inspection image to be processed and inputting it into a preset image super-resolution processing model to obtain and output the processed substation inspection image. The image super-resolution processing model includes a pre-trained SwinTransformer model and a diffusion model. The SwinTransformer model is used to recover low-frequency texture features in the substation inspection image, and the diffusion model is used to recover high-frequency texture features in the processing result of the SwinTransformer model through a residual diffusion module including a spatial-channel attention mechanism. This method improves the resolution of the original substation inspection image, providing a high-quality data foundation for subsequent power equipment condition monitoring and defect identification, thereby enhancing the accuracy and reliability of image analysis in substation operation and maintenance. Attached Figure Description

[0047] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0048] Figure 1 A flowchart illustrating a super-resolution processing method for substation inspection images provided in this application. Figure 1 ;

[0049] Figure 2 A flowchart illustrating a super-resolution processing method for substation inspection images provided in this application. Figure 2 ;

[0050] Figure 3 A schematic diagram of the diffusion model in an image super-resolution processing model provided in this application;

[0051] Figure 4 A flowchart illustrating a super-resolution processing method for substation inspection images provided in this application. Figure 3 ;

[0052] Figure 5 A schematic diagram of a spatial-channel attention mechanism provided in this application;

[0053] Figure 6 A schematic diagram of the structure of a super-resolution image processing device for substation inspection provided in this application;

[0054] Figure 7 This is a schematic diagram of the structure of a computer device provided in this application.

[0055] The accompanying drawings have illustrated specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to specific embodiments. Detailed Implementation

[0056] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0057] The application background of this application is explained as follows:

[0058] Intelligent inspection systems for substations are becoming increasingly common. These systems typically employ inspection robots or surveillance cameras to capture video of power equipment around the clock from multiple perspectives, enabling real-time detection of safety hazards such as bird nests, water damage, insulator breakage, and hanging foreign objects. However, limitations in camera resolution, transmission bandwidth, and complex environmental factors like lighting and weather conditions often result in degraded inspection images characterized by blurriness, low resolution, noise superposition, and even compression artifacts. This significantly impacts the accuracy and robustness of subsequent automated detection algorithms (such as object detection, semantic segmentation, and defect identification). To improve the usability of inspection images, Single Image Super-Resolution (SISR), also known as image super-resolution, has emerged. Its core objective is to preserve or reconstruct key high-frequency details to the greatest extent possible while restoring low-resolution (LR) images, thereby improving the accuracy of subsequent detection and diagnosis.

[0059] First-generation SISR technology, represented by neighborhood embedding, can quickly recover low-frequency structures, but its high model rigidity makes it difficult to synthesize realistic textures. With the development of deep learning technology, image super-resolution methods based on Convolutional Neural Networks (CNNs) have been widely used. Deep convolution and residual connections have significantly improved the peak signal-to-noise ratio and perceptual metrics of images. However, due to their fixed-size local receptive field, they are difficult to effectively capture long-range dependencies and global structural information in images, resulting in blurred details and structural distortion in reconstructed images. In real-world scenes, when faced with multiple degradations (noise, compression artifacts, motion blur), small targets and high-frequency details are still easily overlooked.

[0060] Generative adversarial networks (GANs) have become a popular generative method in recent years. By introducing adversarial loss and perceptual loss, they can synthesize sharper and more detailed textures in the field of image super-resolution. However, the training process is often limited by mode collapse or discriminator instability, which restricts the diversity of outputs.

[0061] Furthermore, image super-resolution methods based on the Diffusion Probalistic Model (DPM) utilize the Markov chain iterative mechanism of forward noise addition and reverse denoising to achieve diverse and high-quality reconstruction results. However, its sampling overhead of thousands of steps and slow convergence speed mean that directly modeling the entire image leads to very high training complexity and may cause unstable structural recovery, thus limiting real-time applications.

[0062] Meanwhile, the ViT model, with its global self-attention mechanism and hierarchical feature representation, has demonstrated strong global context modeling capabilities in image classification, image restoration, and super-resolution. It can not only capture large objects and cross-regional dependencies, but also achieve significant improvements in detail reconstruction of complex scenes such as tiny textures. However, integrating the Transformer into the entire image reconstruction pipeline will significantly increase the overall complexity and computational cost of the model.

[0063] Existing image super-resolution methods combine diffusion models with Transformer models, using the ViT model to replace the U-Net denoising network in the traditional diffusion model, achieving richer global texture generation effects. However, due to the large number of parameters and computational cost of the ViT model, it significantly increases memory consumption and computational power requirements in the iterative inference of the diffusion model, which is not conducive to the deployment of resource-constrained inspection equipment. In addition, existing image super-resolution methods also use a lightweight subspace attention mechanism to replace the full ViT model to alleviate the computational burden; however, this method is limited by the subspace dimension partitioning and linear mapping architecture, abandoning the advantages of the ViT model, failing to fully utilize the global self-attention's ability to capture high-frequency textures across regions, and struggling to accurately recover fine cracks and small foreign objects under long-distance dependence.

[0064] Therefore, providing an efficient and high-quality image super-resolution method to improve the usability of substation inspection images, thereby improving the accuracy of subsequent detection and diagnosis, is an urgent technical problem to be solved.

[0065] Based on the aforementioned technical problems, the inventors, in their research on how to improve the resolution of substation inspection images and thus enhance their usability in subsequent tasks such as object detection and semantic segmentation, discovered that combining the superior image detail generation capabilities of the diffusion model with the outstanding advantages of the Transformer model in long-range feature capture can effectively solve the problems of detail loss and texture blurring in traditional super-resolution methods. To this end, they proposed a novel two-stage framework called the Conditional Attention-Enhanced Diffusion Probabilistic Model (CAE-DPM). In the first stage, the inventors selected the Swin Transformer model, fully utilizing its advantage in capturing low-frequency details. A pre-trained feature extraction module based on the Swin Transformer was constructed from the original low-resolution substation inspection image. A global attention mechanism was used to capture low-frequency texture features in the original low-resolution substation inspection image, resulting in an image super-resolution by the Swin Transformer. In the second stage, the image undergoes further refined super-resolution processing through an iterative noise removal and detail generation process using a diffusion model that integrates spatial and channel attention mechanisms. Ultimately, through the synergistic effect of the two stages, the resolution and visual quality of substation inspection images can be improved, providing high-quality image data support for subsequent tasks such as accurate identification of equipment defects in target detection and clear division of equipment regions in semantic segmentation. Based on this, this application provides a super-resolution processing method, apparatus, equipment, and medium for substation inspection images.

[0066] The technical solution of this application and how it solves the above-mentioned technical problems will be described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will be described below with reference to the accompanying drawings.

[0067] Figure 1 A flowchart illustrating a super-resolution processing method for substation inspection images provided in this application. Figure 1 ,like Figure 1 As shown, the method includes:

[0068] S101: Acquire the substation inspection images to be processed.

[0069] In this step, substation inspection images refer to image data used to monitor the status of electrical equipment (such as transformers, circuit breakers, insulators, etc.) within the substation, including key information such as the appearance, nameplate, and wiring status of the electrical equipment.

[0070] Specifically, inspection robots, cameras, and other specialized equipment can be used to collect image data of power equipment in substations 24 / 7. The image data can then be transmitted to the local edge computing nodes or back-end monitoring center servers of the substation via transmission links (such as 5G or fiber optics). In some scenarios, the data can also be transmitted simultaneously to a dedicated cloud storage and processing platform for the power industry.

[0071] S102: Input the substation inspection image into the preset image super-resolution processing model to obtain the processed substation inspection image. The image super-resolution processing model includes a pre-trained Swin Transformer model and a diffusion model. The Swin Transformer model is used to recover the low-frequency texture features in the substation inspection image, and the diffusion model is used to recover the high-frequency texture features in the processing result of the Swin Transformer model through a residual diffusion module including a spatial-channel attention mechanism.

[0072] As mentioned in the background section, due to limitations in camera resolution, transmission bandwidth, and complex environmental factors such as ambient light and weather, the acquired substation inspection images suffer from low resolution, blurriness, and noise, making it difficult to clearly present the details of the power equipment's condition. Therefore, the image super-resolution processing model in this step is used to improve the resolution of substation inspection images, thereby enhancing their usability in actual detection and analysis tasks.

[0073] Low-frequency texture features refer to the basic texture information in substation inspection images that changes gradually and has a wide distribution range, such as the overall outline of substation power equipment and the continuous texture of large-area shells; high-frequency texture features refer to the local information in substation inspection images that changes dramatically, is rich in detail, and has a relatively small spatial scale, such as the detailed structure of substation power equipment, key component markings, and connection features.

[0074] As the first-stage framework of this image super-resolution processing model, the Swin Transformer model is used to recover low-frequency texture features in substation inspection images. It is responsible for restoring low-frequency structures. This model is a visual processing model based on the Transformer architecture, focusing on extracting and recovering low-frequency components (low-frequency texture features) and some high-frequency components through a sliding window mechanism and multi-scale feature extraction. Specifically, the substation inspection image to be processed is first divided into multiple non-overlapping windows. Self-attention is calculated within each window, focusing on relatively stable texture information within the window. The sliding window mechanism achieves cross-regional local feature extraction by moving the window, preserving the translation invariance of the convolutional neural network while enhancing global modeling capabilities through window sliding. This involves associating low-frequency texture features in adjacent regions to form a holistic perception of low-frequency texture features over a large area. Within each window, the Swin Transformer model contains four stages. Each stage reduces the feature map size (e.g., 4x or 8x downsampling) and doubles the number of channels through Patch Merging. The resulting multi-scale features more easily aggregate smooth changes across the global scope, filtering out subtle local fluctuations and enhancing the extraction capability of low-frequency texture features. The processing results of the Swin Transformer model are frozen and used as the conditional input for the second-stage diffusion model, thus avoiding the computational burden caused by the redundancy of Transformer parameters.

[0075] As the second stage of this image super-resolution processing model, the diffusion model is used to recover high-frequency texture features in substation inspection images, responsible for compensating for high-frequency details. The core of this model is constructing a Markov chain, a process of progressively adding noise to the data and then denoising it, mainly including two processes: 1) Forward diffusion: progressively adding noise to the original image, adding a portion of Gaussian noise to the image obtained at each time step until it becomes a pure Gaussian noise image; 2) Reverse generation: starting from a pure Gaussian noise image, progressively removing noise to obtain an image that satisfies the training distribution. For example, a discrete-time step t = 1, 2, 3, ..., T is defined, and noise is progressively added to the original image t0: x0 → x1 → x2… → x t Each step of adding noise can be represented as: Where, β t ε represents the noise figure in the t-th step of the noise addition process, with a value range of [0,1]. t The noise introduced at step t typically follows a normal probability distribution with a mean of 0 and a covariance of I: ε t ~N(0,I).

[0076] For example, the diffusion model uses the processing result of the Swin Transformer model as conditional information, and inputs it along with the information processed by the frequency domain information separator into the residual diffusion module, which integrates spatial attention and channel attention. In one specific implementation of this scheme, the core of the residual diffusion module can be a U-Net architecture, which integrates a spatial-channel attention mechanism to focus on the high-frequency residual signal between the processing result of the Swin Transformer model and the real substation inspection image. This is refined through an iterative denoising process, enabling the diffusion model to more effectively learn and predict high-frequency residual information, thereby enhancing the recovery quality of high-frequency details. Finally, based on the high-frequency residual signal and the processing result of the Swin Transformer model, the processed substation inspection image, i.e., the super-resolution image, is obtained.

[0077] S103: Output the processed substation inspection image.

[0078] Understandably, the processed substation inspection images have a higher resolution than the unprocessed substation inspection images. The details of the power equipment in the images (such as the text on the equipment nameplate, the fine texture of the insulator, and the connection status of the wiring) are clearer and sharper. High-frequency texture features that are blurred due to low resolution and noise interference are accurately restored. At the same time, the overall color of the image is more realistic and the noise is significantly reduced. Whether it is low-frequency texture features such as the overall outline of the equipment or high-frequency texture features such as local minor defects and markings, they can be presented more accurately, providing a better data foundation for subsequent tasks such as monitoring the status of power equipment and identifying defects.

[0079] The super-resolution image processing method for substation inspection provided in this application first collects substation inspection images 24 / 7 using inspection robots, cameras, and other equipment, and transmits them to edge nodes, backend servers, or industry cloud platforms via 5G or fiber optics. Then, the substation inspection images to be processed are input into an image super-resolution processing model composed of a Swing Transformer model and a diffusion model to obtain and output the processed substation inspection image. Specifically, the Swing Transformer model recovers low-frequency texture features through sliding window and multi-scale feature extraction, while the diffusion model uses U-Net as the residual diffusion module and combines a spatial-channel attention mechanism to recover high-frequency texture features from the Swing Transformer model's processing results. By employing a two-stage framework, low-frequency structure reconstruction and high-frequency detail compensation are decoupled, improving the stability of structural information reconstruction and reducing the learning difficulty of the diffusion model. By decoupling low-frequency structure reconstruction (performed by the Swing Transformer) from high-frequency detail compensation (performed by an attention-enhanced diffusion model), the stability of structural information reconstruction is enhanced. This significantly reduces the training complexity and structural recovery instability issues faced by the diffusion model when directly processing the entire image. The diffusion model can then focus solely on learning and recovering high-frequency residual details, thereby improving overall learning efficiency. This method addresses the problems of low resolution, blurriness, and noise in original inspection images caused by equipment and environment. The processed images have improved resolution, providing a high-quality data foundation for subsequent power equipment condition monitoring and defect identification, thus enhancing the accuracy and reliability of image analysis in substation operation and maintenance.

[0080] Figure 2 A flowchart illustrating a super-resolution processing method for substation inspection images provided in this application. Figure 2 ,like Figure 2 As shown, in this embodiment... Figure 1 Based on the embodiment, S102: Input the substation inspection image into a preset image super-resolution processing model to obtain the processed substation inspection image, specifically including:

[0081] S201: Input the substation inspection image into the Swing Transformer model, and recover the low-frequency and high-frequency components of the substation inspection image through the global self-attention mechanism to obtain the intermediate substation inspection image.

[0082] In this step, before using the Swin Transformer model for super-resolution processing of substation inspection images in the first stage, the Swin Transformer model is pre-trained on a large-scale substation inspection image dataset. This allows the model to learn the basic feature patterns of substation inspection images, such as the low-frequency structure and basic high-frequency details of images in different scenarios, and how to efficiently capture these features through architectural features such as sliding window mechanism and multi-scale feature extraction. This is equivalent to letting the model master the general skills of image processing first.

[0083] Specifically, the substation inspection images are first divided into multiple non-overlapping image patches. Each patch is transformed into a feature vector through linear embedding, and positional encoding is introduced to preserve spatial location information. Then, a sliding window mechanism is used to achieve global self-attention computation. First, self-attention processing is performed on local features within the initial window to capture low-frequency components (such as the overall outline of the equipment) and some basic high-frequency details (such as surface texture). Subsequently, window shifting operations allow features from adjacent windows to interact, ensuring the integration of low-frequency structural information and high-frequency detail features over a larger scope. Within each window, the model's four stages progressively downsample the feature map through Patch Merging. Each downsampling reduces the feature map size by half and doubles the number of channels, aggregating global low-frequency information on the low-resolution feature map while preserving local high-frequency details on the high-resolution feature map. This assists the subsequent second-stage diffusion model in better repairing more complex high-frequency details.

[0084] In one possible implementation, the loss function of the Swin Transformer model includes a first loss function based on the Fast Fourier Transform and a second loss function based on the spatial domain.

[0085] The expression for the first loss function is:

[0086]

[0087] Among them, L FFT Let M represent the first loss function, which is defined as M gt and M pre The mean square error between the magnitudes of the Fast Fourier Transform coefficients of the corresponding two images, M gt M represents the frequency domain representation of the substation inspection image obtained through Fast Fourier Transform. pre This represents the frequency domain representation of the substation inspection image obtained through the Swing Transformer model. Denotes mathematical expectation, ||·|| 2 This represents the square of the Euclidean norm.

[0088] The expression for the second loss function is:

[0089]

[0090] Among them, L SD Y represents the second loss function. gt M represents a substation inspection image in the spatial domain. pre This represents a substation inspection image obtained using the Swing Transformer model.

[0091] Therefore, the expression for the total loss function during the pre-training process of the Swin Transformer model is:

[0092] L pretrain =α·L FFT +L SD

[0093] Among them, L pretrain Let represent the loss function, and α represent the weight used to balance the first and second loss functions.

[0094] This dual loss function mechanism enables the intermediate substation inspection images obtained through the Swing Transformer model to maintain the accuracy of image structure and details in the spatial domain, while also capturing and recovering important frequency information in the frequency domain.

[0095] S202: The intermediate substation inspection image and the noisy substation inspection image are combined and the residual diffusion module in the diffusion model are used to recover the high-frequency texture features in the intermediate substation inspection image to obtain the processed substation inspection image.

[0096] Figure 3 A schematic diagram of the diffusion model in an image super-resolution processing model provided in this application is shown below. Figure 3 As shown, the noisy image is the one mentioned in S102, where Gaussian noise is added to the image obtained at each time step of the substation inspection image until it becomes a pure Gaussian noise image. t The residual diffusion module is a U-Net network that incorporates a spatial-channel attention mechanism.

[0097] The high-frequency texture features in intermediate substation inspection images are recovered using the residual diffusion module in the diffusion model, specifically including the following steps:

[0098] 1) Perform Fast Fourier Transform on the inspection images of the intermediate substation to obtain the frequency domain feature map of the inspection images of the intermediate substation.

[0099] The Fast Fourier Transform (FFT) is an efficient algorithm for calculating the Discrete Fourier Transform (DFT). It can transform intermediate substation inspection images from the spatial domain to the frequency domain, obtaining a frequency domain feature map. In the spatial domain, an image is represented by the spatial distribution of pixels, while the frequency domain reflects the image's frequency characteristics. Low-frequency components correspond to the overall structure of the image with gradual changes (such as the general outline of equipment), while high-frequency components correspond to the details of the image with dramatic changes (such as the texture, edges, and nameplate text of equipment). By processing intermediate substation inspection images using the FFT, the spatial information of the image can be decomposed into sine and cosine components of different frequencies, thus facilitating the analysis and processing of the image's frequency feature map.

[0100] Suppose that the intermediate substation inspection image I obtained through the first-stage Swin Transformer model can be represented as: in, Let H represent the real number field, W represent the height of the intermediate substation inspection image, and C represent the width of the intermediate substation inspection image.

[0101] In this diffusion model, the frequency domain information separator transforms the intermediate substation inspection image from the spatial domain to the frequency domain using a Fast Fourier Transform (FFT), obtaining the frequency domain feature map of the intermediate substation inspection image. The frequency domain feature map M can be represented as: M = FFT(I).

[0102] 2) Perform discrete wavelet transform processing on the inspection images of intermediate substations to extract multi-scale wavelet coefficients.

[0103] Discrete wavelet transform is a time-frequency analysis method used to decompose intermediate substation inspection images into sub-band components of different scales (corresponding to different frequency ranges) and directions. The extracted multi-scale wavelet coefficients can characterize the features of the image at different levels.

[0104] Specifically, wavelet coefficients at different levels were extracted, including as well as The wavelet coefficients of the intermediate substation inspection image are represented in the horizontal direction, reflecting the detailed features of the image in the horizontal direction, such as horizontal edges and textures. The wavelet coefficients in the vertical direction of the intermediate substation inspection image reflect the detailed features of the image in the vertical direction, such as vertical edges and lines. These represent wavelet coefficients in the diagonal direction, reflecting the detailed features of the image in the diagonal direction, such as texture and contour information.

[0105] 3) Based on the multi-scale wavelet coefficients and frequency domain feature map, the intermediate feature map of the intermediate substation inspection image is obtained.

[0106] The multi-scale wavelet coefficients extracted through discrete wavelet transform are aggregated and then fused with the frequency domain feature map obtained through fast Fourier transform to obtain the intermediate feature map of the intermediate substation inspection image. Specifically, the intermediate feature map F of the intermediate substation inspection image can be represented as:

[0107]

[0108] Discrete wavelet transform can be decomposed into multiple levels, and the wavelet transform coefficients of the above three levels can be decomposed into multiple levels. After fusing with the frequency domain feature map M of the intermediate substation inspection image (additive representation), the fineness of the spatial structure information captured by the Swing Transformer can be improved, and the feature representation is more comprehensive and robust after being combined with the frequency domain feature map of the intermediate substation inspection image.

[0109] 4) Based on the intermediate feature map, the processed substation inspection image is obtained.

[0110] The intermediate feature map not only preserves the overall frequency distribution pattern of the image in the frequency domain, but also contains local detail features at multiple scales. It can more comprehensively represent the essential attributes of intermediate substation inspection images, and provide richer and more accurate basic information for subsequent diffusion models to further capture and repair high-frequency texture features.

[0111] The super-resolution processing method for substation inspection images provided in this application first inputs the substation inspection image into a pre-trained Swing Transformer model. Through image block partitioning, global self-attention calculation using a sliding window mechanism, and multi-scale downsampling, low-frequency components and some high-frequency components are recovered to obtain an intermediate substation inspection image. The overall loss function combines frequency domain loss and spatial domain loss based on Fast Fourier Transform to balance the accuracy of frequency and spatial domain features. Then, the intermediate substation inspection image and the noisy image are input into a U-Net network containing a residual diffusion module with a spatial-channel attention mechanism. In the U-Net network, the intermediate substation inspection image undergoes Fast Fourier Transform to obtain a frequency domain feature map, and the multi-scale coefficients extracted by discrete wavelet transform are fused to obtain an intermediate feature map. Based on the intermediate feature map, the final processed substation inspection image is obtained. Using the above methods, pre-training and dual loss functions enable intermediate substation inspection images to maintain high quality in both the frequency and spatial domains. Multi-feature fusion enhances the diffusion model's ability to repair high-frequency details, resulting in processed images with higher resolution, clearer details, and less noise, providing more reliable image data for equipment condition monitoring and defect identification.

[0112] Figure 4 A flowchart illustrating a super-resolution processing method for substation inspection images provided in this application. Figure 3 , Figure 5 A schematic diagram of a spatial-channel attention mechanism provided in this application is shown below. Figure 4 and Figure 5 As shown, based on the above embodiments, the processed substation inspection image is obtained based on the intermediate feature map, specifically including:

[0113] S401: Perform global average pooling on the intermediate feature map to obtain the feature vector.

[0114] In this step, Global Average Pooling (GAP) refers to calculating the average of all elements in each channel of the intermediate feature map, transforming the two-dimensional feature map of each channel into a single numerical value. Ultimately, the intermediate feature map is converted into a one-dimensional feature vector. Global Average Pooling preserves the overall information of each channel of the intermediate feature map while significantly reducing the number of parameters.

[0115] S4021: Convolve the feature vectors and pass them through a Sigmoid activation function layer and a Softmax activation function layer in sequence to obtain spatial attention weights.

[0116] The Sigmoid activation function is a nonlinear function that maps any real number input to a value between 0 and 1. Its mathematical expression is σ(x) = 1 / (1+e^(-1 / 2)). -x The output value can be interpreted as a probability. The Softmax activation function transforms a vector containing arbitrary real numbers into a probability distribution where each element is between 0 and 1 and the sum of all elements is 1. It is calculated by taking the exponent of each element in the vector and dividing by the sum of the exponents of all elements. This clearly represents the probability proportion of the input belonging to different categories, making it easy to compare the relative importance of different elements. Thus, we can obtain the importance of a spatial location in the original feature corresponding to each weight value. The higher the weight, the greater the contribution of the feature at that spatial location to the subsequent tasks of the model.

[0117] For example, performing a 1×1 convolution on the feature vector, followed by sequentially passing it through a sigmoid activation layer σ and a softmax activation layer, yields the spatial attention weight S, which can be expressed as:

[0118] S = softmax(σ(Conv) 1×1 (GAP(F))))

[0119] S4022: The feature vector is fed into a multilayer perceptron layer, and then passed through a sigmoid activation function layer and a softmax activation function layer in sequence to obtain the channel attention weights.

[0120] A multilayer perceptron (MLP) is a neural network consisting of an input layer, hidden layers, and an output layer. Its core function is to perform nonlinear transformations and dimension adjustments on the input feature vectors. That is, through weighted calculations and activation operations of neurons within the layer, the original features are mapped to a feature space that is more suitable for subsequent processing.

[0121] Specifically, the Sigmoid activation function layer processes the features output by the multilayer perceptron using the Sigmoid function, and its output value always falls between 0 and 1. Subsequently, the Softmax activation function layer transforms the feature vector processed by the Sigmoid activation function layer into a probability distribution. That is, by calculating the exponent for each feature value and dividing it by the sum of the exponents of all feature values, all the final output values ​​are between 0 and 1 and the sum is 1. Thus, each weight value corresponds to the importance of a channel in the original features. The higher the weight, the greater the contribution of the feature of that channel to the subsequent tasks of the model.

[0122] For example, by feeding the feature vector into a multilayer perceptron layer, and then sequentially passing it through a sigmoid activation function layer σ and a softmax activation function layer, the spatial attention weight C can be expressed as:

[0123] C = softmax(σ(MLP(GAP(F))))

[0124] S403: Based on the intermediate feature map, spatial attention weight, and channel attention weight, the processed substation inspection image is obtained.

[0125] Based on the intermediate feature map F, spatial attention weight S, and channel attention C, the processed substation inspection image is obtained, specifically including the following steps:

[0126] 1) Perform broadcast multiplication and convolution on the intermediate feature map, spatial attention weights, and channel attention weights to obtain the query features.

[0127] Broadcast multiplication refers to automatically expanding the dimensions of intermediate feature maps to enable element-wise multiplication when the dimensions of spatial and channel attention weights do not match. This integrates importance information from both spatial and channel levels into the intermediate feature map, strengthening key features and suppressing secondary features. A convolutional kernel is then used to perform sliding computation on the weighted feature map, extracting the query features through the aggregation and transformation of local features.

[0128] Specifically, a broadcast multiplication operation is performed on the intermediate feature map F, the spatial attention weight S, and the channel attention weight C. Then, a 1×1 convolution process is performed to obtain the jointly modeled query feature Q, which can be expressed as:

[0129]

[0130] 2) Perform convolution processing on the frequency domain feature map to obtain the key features and the corresponding value features.

[0131] The main function of key features is identification and indexing, while value features are features that correspond to key features and contain specific information content. The two usually appear in pairs, providing a foundation for subsequent attention mechanisms or feature interaction operations.

[0132] Specifically, the frequency domain feature map M is subjected to 1×1 convolution to obtain the key feature K and the corresponding value feature V:

[0133] K = Conv 1×1 (M)

[0134] V = Conv 1×1 (M)

[0135] 3) Based on query features, key features, and value features, the processed substation inspection images are obtained.

[0136] The dot product attention mechanism measures the similarity between query feature Q and key feature K by calculating the dot product of the query feature Q and key feature K. After scaling and softmax activation, the attention weights obtained from the dot product result reflect the importance of each part of the value feature V. Specifically, the dot product of the transpose matrices of Q and K is first calculated, and then divided by a scaling factor (usually the square root of the query feature dimension) to avoid excessively large gradient values. Then, the result is converted into a probability distribution form of attention weights through the softmax activation function. These weights are then weighted and summed with the value feature V. The final output feature map is the result of fusing information from all three. In substation inspection scenarios, this process allows the model to automatically focus on the regions and features in the image that are more critical to the inspection task (such as defect detection), making the processed image more conducive to subsequent analysis and judgment.

[0137] For example, using the dot product attention mechanism, an output feature map is calculated based on the query feature Q, key feature K, and value feature V. The processed substation inspection image can be represented as:

[0138]

[0139] Where d represents the number of columns in the query feature Q matrix.

[0140] The spatial-channel attention mechanism first captures the long-range spatial dependencies between features and identifies key spatial regions through spatial attention. Then, it adaptively recalibrates the feature responses of the channel dimension through channel attention to emphasize the information-rich channels, enabling the diffusion model to learn and predict complex high-frequency residual information more effectively, thereby significantly enhancing the recovery quality of high-frequency details.

[0141] The super-resolution processing method for substation inspection images provided in this application first performs global average pooling on the intermediate feature map during processing, transforming the two-dimensional features of each channel into one-dimensional feature vectors, thus reducing the number of parameters while preserving the overall information of the channels. Then, the feature vectors are processed in two paths: one path is processed through 1×1 convolution, sigmoid, and softmax activation functions to obtain spatial attention weights, used to identify key spatial locations in the image; the other path is connected to a multilayer perceptron and subjected to the same activation operation to obtain channel attention weights, measuring the importance of different feature channels. Subsequently, the intermediate feature map is multiplied by the two types of weights and subjected to a broadcast product and a 1×1 convolution to generate query features. Simultaneously, the frequency domain feature map is convolved to obtain key and value features. Finally, through a dot product attention mechanism, the similarity between the query and key features is calculated and converted into weights, which are then weighted and summed with the value features to output the processed inspection image. Through the above method, the spatial-channel attention mechanism accurately focuses on key areas of the equipment and effective feature channels, fusing information from both spatial and channel dimensions. By capturing long-range spatial dependencies and adaptively adjusting channel weights, this mechanism enables the diffusion model to learn and predict complex high-frequency residuals more effectively, thereby significantly improving the restoration quality and visual effect of high-frequency details and addressing the shortcomings of existing methods in fine detail restoration. Combining frequency domain feature interaction to capture long-range spatial dependencies helps the diffusion model better learn high-frequency residual information, significantly improving the high-frequency detail restoration quality of inspected images.

[0142] In one specific implementation of this scheme, a substation inspection image to be processed is acquired and input into a preset image super-resolution processing model, CAE-DPM, to obtain and output the processed substation inspection image. Experimental results show that the peak signal-to-noise ratio (PSNR) of the processed substation inspection image is 38.84 dB, and the structural similarity (SSIM) is 0.87. As a comparative example, the ResDiff model based on convolutional neural networks and a diffusion model shows that the PSNR of the substation inspection image processed by the ResDiff model is 34.96 dB, and the SSIM is 0.79.

[0143] Regarding peak signal-to-noise ratio (PSNR), the image processed by the CAE-DPM super-resolution model provided in this application achieves a PSNR of 38.84 dB, which is higher than the 34.96 dB of the ResDiff model. This indicates that the pixel-level difference between the CAE-DPM processed image and the original high-resolution image is smaller, resulting in better image quality. In terms of structural similarity, CAE-DPM's score of 0.87 is also higher than the ResDiff model's 0.79, indicating that the CAE-DPM processed image is more similar to the original high-resolution image in terms of structure, brightness, and contrast. This allows for more accurate restoration of image details and structure, which is more beneficial for accurate detection and analysis of equipment defects in substation inspection scenarios.

[0144] In one possible implementation, for the Swin Transformer model in the first stage of the image super-resolution processing model, an improved version of the Vision Transformer model or a Transformer architecture specifically designed for image reconstruction can also be used as the backbone network for extracting low-frequency structures.

[0145] In one possible implementation, for the diffusion model in the second stage of the image super-resolution processing model, different diffusion model variants can be used, such as denoising diffusion probabilistic models (DDPM), denoising diffusion implicit models (DDIM), or other state-of-the-art conditional diffusion models. Low-frequency information or external guiding information (edge ​​maps, semantic segmentation maps, etc.) from the processing results of the Swin Transformer model can be used as input conditions for the diffusion model.

[0146] In another possible implementation, for the spatial-channel attention mechanism in the diffusion model of the second stage of the image super-resolution processing model, in certain application scenarios, spatial attention (such as Non-localAttention, GC-Net, etc.) or channel attention (such as SE-Net, ECA-Net, etc.) with stronger effects can also be used alone to simplify the model or optimize specific performance.

[0147] Figure 6 A schematic diagram of a super-resolution image processing device for substation inspection provided in this application is shown below. Figure 6 As shown, the super-resolution image processing device 60 for substation inspection includes:

[0148] The first processing module 601 is used to acquire substation inspection images to be processed.

[0149] The second processing module 602 is used to input the substation inspection image into a preset image super-resolution processing model to obtain the processed substation inspection image. The image super-resolution processing model includes a pre-trained Swin Transformer model and a diffusion model. The Swin Transformer model is used to recover the low-frequency texture features in the substation inspection image, and the diffusion model is used to recover the high-frequency texture features in the processing result of the Swin Transformer model through a residual diffusion module including a spatial-channel attention mechanism.

[0150] The third processing module 603 is used to output the processed substation inspection images.

[0151] In one possible implementation, the second processing module 602 is specifically used for:

[0152] The substation inspection image is input into the Swin Transformer model, and the low-frequency component of the substation inspection image is recovered through the global self-attention mechanism to obtain the intermediate substation inspection image.

[0153] The intermediate substation inspection image and the noisy substation inspection image are compared and then the high-frequency texture features in the intermediate substation inspection image are recovered through the residual diffusion module in the diffusion model to obtain the processed substation inspection image.

[0154] In one possible implementation, the second processing module 602 is specifically used for:

[0155] Fast Fourier Transform is performed on the inspection images of the intermediate substation to obtain the frequency domain feature map of the inspection images of the intermediate substation.

[0156] Discrete wavelet transform processing was performed on the inspection images of intermediate substations to extract multi-scale wavelet coefficients.

[0157] Based on multi-scale wavelet coefficients and frequency domain feature maps, intermediate feature maps of intermediate substation inspection images are obtained.

[0158] Based on the intermediate feature map, the processed substation inspection image is obtained.

[0159] In one possible implementation, the second processing module 602 is specifically used for:

[0160] Global average pooling is performed on the intermediate feature map to obtain the feature vector;

[0161] The feature vectors are convolved and then passed through a Sigmoid activation function layer and a Softmax activation function layer in sequence to obtain spatial attention weights;

[0162] The feature vectors are fed into a multilayer perceptron layer, and then passed through a sigmoid activation function layer and a softmax activation function layer in sequence to obtain the channel attention weights;

[0163] Based on the intermediate feature map, spatial attention weight, and channel attention weight, the processed substation inspection image is obtained.

[0164] In one possible implementation, the second processing module 602 is further used for:

[0165] The intermediate feature map, spatial attention weights, and channel attention weights are subjected to broadcast multiplication and convolution to obtain the query features;

[0166] Convolutional processing is performed on the frequency domain feature map to obtain key features and corresponding value features;

[0167] Based on query features, key features, and value features, the processed substation inspection images are obtained.

[0168] In one possible implementation, the loss function of the Swin Transformer model includes a first loss function based on the Fast Fourier Transform and a second loss function based on the spatial domain.

[0169] The expression for the first loss function is:

[0170]

[0171] Among them, L FFT Let M represent the first loss function. gt M represents the frequency domain representation of the substation inspection image obtained through Fast Fourier Transform. pre This represents the frequency domain representation of the substation inspection image obtained through the Swing Transformer model. Denotes mathematical expectation, ||·|| 2 Represents the square of the Euclidean norm;

[0172] The expression for the second loss function is:

[0173]

[0174] Among them, L SD Y represents the second loss function. gt M represents a substation inspection image in the spatial domain. pre This represents a substation inspection image obtained using the Swing Transformer model.

[0175] The expression for the loss function is:

[0176] L pretrain=α·L FFT +L SD ;

[0177] Among them, L pretrain Let represent the loss function, and α represent the weight used to balance the first and second loss functions.

[0178] The super-resolution image processing device for substation inspection provided in this embodiment can execute the method provided in the above-described method embodiment. Its implementation principle and technical effect are similar, and will not be described again in this embodiment.

[0179] Figure 7 A schematic diagram of the structure of a computer device provided in this application, such as... Figure 7 As shown, the computer device 70 provided in this embodiment includes at least one processor 701 and a memory 702. Optionally, the computer device 70 further includes a communication component 703. The processor 701, memory 702, and communication component 703 are connected via a bus 704.

[0180] In a specific implementation, at least one processor 701 executes computer execution instructions stored in memory 702, causing at least one processor 701 to perform the above-described method.

[0181] The specific implementation process of processor 701 can be found in the above method embodiments, and its implementation principle and technical effect are similar. It will not be repeated here.

[0182] In the above embodiments, it should be understood that the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules within the processor.

[0183] The memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage device.

[0184] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.

[0185] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method.

[0186] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the above-described method.

[0187] The aforementioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random-Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read-Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The readable storage medium can be any available medium accessible to a general-purpose or special-purpose computer.

[0188] An exemplary readable storage medium is coupled to a processor, enabling the processor to read information from and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can reside in an application-specific integrated circuit (ASIC). Alternatively, the processor and the readable storage medium can exist as discrete components in the device.

[0189] The division of units is merely a logical functional division; in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices, or units, and may be electrical, mechanical, or other forms.

[0190] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0191] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0192] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0193] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.

[0194] Finally, it should be noted that other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein, and is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of the invention is limited only by the appended claims.

Claims

1. A super-resolution processing method for substation inspection images, characterized in that, include: Acquire substation inspection images to be processed; The substation inspection image is input into a preset image super-resolution processing model to obtain a processed substation inspection image. The image super-resolution processing model includes a pre-trained Swin Transformer model and a diffusion model. The Swin Transformer model is used to recover the low-frequency texture features in the substation inspection image, and the diffusion model is used to recover the high-frequency texture features in the processing result of the Swin Transformer model through a residual diffusion module including a spatial-channel attention mechanism. Output the processed substation inspection images.

2. The method according to claim 1, characterized in that, The step of inputting the substation inspection image into a preset image super-resolution processing model to obtain the processed substation inspection image includes: The substation inspection image is input into the Swing Transformer model, and the low-frequency components of the substation inspection image are recovered through a global self-attention mechanism to obtain an intermediate substation inspection image. The intermediate substation inspection image and the noisy image of the substation inspection image are combined and the high-frequency texture features in the intermediate substation inspection image are recovered through the residual diffusion module in the diffusion model to obtain the processed substation inspection image.

3. The method according to claim 2, characterized in that, The process of recovering the high-frequency texture features in the intermediate substation inspection image by using the residual diffusion module in the diffusion model to obtain the processed substation inspection image includes: The intermediate substation inspection image is processed by Fast Fourier Transform to obtain the frequency domain feature map of the intermediate substation inspection image. Discrete wavelet transform processing is performed on the inspection images of the intermediate substation to extract multi-scale wavelet coefficients; Based on the multi-scale wavelet coefficients and the frequency domain feature map, the intermediate feature map of the intermediate substation inspection image is obtained. Based on the intermediate feature map, the processed substation inspection image is obtained.

4. The method according to claim 3, characterized in that, The process of obtaining the processed substation inspection image based on the intermediate feature map includes: Global average pooling is performed on the intermediate feature map to obtain the feature vector; The feature vector is convolved and then passed through a Sigmoid activation function layer and a Softmax activation function layer in sequence to obtain spatial attention weights; The feature vector is fed into a multilayer perceptron layer, and then passed through the sigmoid activation function layer and the softmax activation function layer in sequence to obtain the channel attention weights; Based on the intermediate feature map, the spatial attention weight, and the channel attention weight, the processed substation inspection image is obtained.

5. The method according to claim 4, characterized in that, The process of obtaining the processed substation inspection image based on the intermediate feature map, the spatial attention weight, and the channel attention weight includes: The intermediate feature map, the spatial attention weight, and the channel attention weight are subjected to broadcast multiplication and convolution to obtain the query features; The frequency domain feature map is convolved to obtain key features and value features corresponding to the key features; Based on the query features, the key features, and the value features, the processed substation inspection image is obtained.

6. The method according to any one of claims 2 to 5, characterized in that, The loss function of the Swin Transformer model includes a first loss function based on the Fast Fourier Transform and a second loss function based on the spatial domain. The expression for the first loss function is: Among them, L FFT Let M represent the first loss function. gt M represents the frequency domain representation of the substation inspection image obtained through Fast Fourier Transform. pre This represents the frequency domain representation of the substation inspection image obtained through the Swing Transformer model. Denotes mathematical expectation, ||·|| 2 Represents the square of the Euclidean norm; The expression for the second loss function is: Among them, L SD Y represents the second loss function. gt M represents a substation inspection image in the spatial domain. pre This represents a substation inspection image obtained using the SwinTransformer model. The expression for the loss function is: L pretrain =α·L FFT +L SD ; Among them, L pretrain Let represent the loss function, and α represent the weight used to balance the first and second loss functions.

7. A super-resolution processing device for substation inspection images, characterized in that, include: The first processing module is used to acquire substation inspection images to be processed. The second processing module is used to input the substation inspection image into a preset image super-resolution processing model to obtain the processed substation inspection image. The image super-resolution processing model includes a pre-trained Swin Transformer model and a diffusion model. The Swin Transformer model is used to recover the low-frequency texture features in the substation inspection image, and the diffusion model is used to recover the high-frequency texture features in the processing result of the Swin Transformer model through a residual diffusion module including a spatial-channel attention mechanism. The third processing module is used to output the processed substation inspection images.

8. A computer device, characterized in that, include: Memory, processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory, causing the processor to perform the method as described in any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1 to 6.

10. A computer program product, characterized in that, Includes a computer program that, when executed by a processor, implements the method described in any one of claims 1 to 6.

Citation Information

Cited By

  • Power inspection video diffusion super-division cooperative enhancement method for equipment defect identification

    CN121860874A

  • Power inspection video diffusion super-resolution collaborative enhancement method for equipment defect identification

    CN121860874B