Power scene image degradation restoration method, system and device and medium

By establishing image degradation models and preset restoration algorithms for different degradation processes, combined with multi-level conditional networks and diffusion models, the universality and stability problems of existing image restoration methods are solved, and efficient restoration of various degradation types in power scenarios is achieved, generating high-quality images.

CN120807357APending Publication Date: 2025-10-17GUIZHOU POWER GRID CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510749783.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-06
Publication Date
2025-10-17

AI Technical Summary

Technical Problem

Existing image restoration methods lack versatility and are unable to cope with complex image degradation situations of multiple types and intensities without the need for task-specific fine-tuning. In addition, multi-task unified image restoration methods have problems such as poor task switching stability and weak control signal expression capabilities.

Method used

An image degradation model is established for several different degradation processes. A preset restoration algorithm is used to obtain low-level visual restoration clues. Image restoration is performed through a multi-level conditional network and a diffusion model. The main guiding image and auxiliary structural visual cues are used for encoding operations to generate control vectors to guide the diffusion model for restoration.

Benefits of technology

It achieves effective repair of various degradation problems in power scene images, improves the accuracy and stability of the repair effect, overcomes the problems of weak generalization ability and poor control stability of existing methods, and generates high-quality repaired images.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120807357A_ABST
    Figure CN120807357A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of power scene image degradation restoration, and discloses a power scene image degradation restoration method, system and device and a medium, and the method comprises the steps: building an image degradation model for a plurality of different degradation processes; presetting a restoration algorithm, and obtaining a low-level visual restoration clue of each degradation process according to the restoration algorithm; performing encoding operation on the low-level visual restoration clue to obtain a first control vector; and establishing a diffusion model, and performing power scene image degradation restoration according to the trained diffusion model, the input of the diffusion model including the first control vector. Unified modeling and repairing of various repairing tasks (such as defogging, deblurring, denoising and enhancing) in the power transmission line inspection image are achieved, and the problems that an existing image repairing method depends on single task modeling, and is weak in generalization ability, poor in control stability and the like are solved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of power scene image degradation repair, and in particular to a power scene image degradation repair method, system, device and medium. BACKGROUND

[0002] Image repair, as an important research direction in the field of computer vision, has wide application value in many practical application scenarios such as remote sensing imaging, medical imaging, security monitoring, and computational photography. It also has important significance in the remote inspection of the power system. Current inspection usually relies on unmanned aerial vehicles or fixed cameras to collect images of power transmission lines and their auxiliary equipment, but due to factors such as flight jitter, adverse weather such as rain, fog and dust, and equipment aging, the collected images often have quality degradation problems such as blurring, occlusion and noise, which seriously affect the accuracy of subsequent defect detection and intelligent analysis. Image repair technology, especially the development of diffusion models in recent years, has shown strong reconstruction capability and detail restoration effect, providing an effective means to solve the above problems.

[0003] However, most of the current mainstream image repair methods focus on specific types of degradation tasks, and the models lack universality, making it difficult to handle complex image degradation situations of multiple types and intensities without task-specific fine-tuning. In addition, multi-task unified image repair methods often face problems such as poor task switching stability and weak control signal expression ability, leading to a decline in model generalization and inference quality. On the one hand, there are significant differences between degradation tasks, and blindly sharing parameters can cause mutual interference; on the other hand, the fusion method of task guidance prompts (such as text, prior images, and auxiliary images) at different levels lacks effective modeling, resulting in insufficient control signals to accurately adjust the diffusion generation process. Therefore, how to construct a unified image degradation modeling framework that can integrate multi-source guidance information to form stable and accurate control signals and improve the image repair effect of diffusion models in multi-task has become a key problem that needs to be solved in the field of image restoration and generation. SUMMARY

[0004] In view of the above existing problems, the present application is proposed.

[0005] Therefore, the present application provides a power scene image degradation repair method, system, device and medium, which can solve the deficiencies of current mainstream image repair methods in multi-task processing and achieve effective repair of images of multiple degradation types.

[0006] To solve the above technical problems, the present application provides the following technical solutions:

[0007] In a first aspect, the present application provides a power scene image degradation repair method, comprising:

[0008] An image degradation model is established for several different degradation processes;

[0009] The several different degradation processes include defogging, deblurring, enhancement, and denoising;

[0010] A preset restoration algorithm is used to obtain low-level visual repair clues for each degradation process;

[0011] The low-level visual repair clues include a main guiding image and auxiliary structural visual cues;

[0012] An encoding operation is performed on the low-level visual repair clues to obtain a first control vector;

[0013] A diffusion model is established, and power scene image degradation repair is performed according to the trained diffusion model, wherein the input of the diffusion model includes the first control vector.

[0014] As a preferred scheme of the power scene image degradation repair method, the encoding operation on the low-level visual repair clues to obtain a first control vector includes:

[0015] A multi-level conditional network is constructed, the main guiding image is used as the input of a main branch, and multi-layer semantic features are extracted through an encoder;

[0016] Each structural visual cue is input into an auxiliary branch, and shallow guiding features are extracted using a residual block;

[0017] The multi-layer semantic features and the shallow guiding features are fused;

[0018] Different layer features of the main branch are output as a first control tensor.

[0019] This preferred scheme can effectively integrate the information of the main guiding image and the auxiliary structural visual cues, and improve the accuracy of image repair. By constructing a multi-level conditional network, key information in the image can be deeply understood and utilized, ensuring that different degradation types of features can be fully considered in the image repair process. In addition, the feature fusion step can further enhance the effect of image repair, so that the repaired image is closer to the original image, and the quality and readability of the image are improved.

[0020] As a preferred scheme of the power scene image degradation repair method, the establishment of the diffusion model includes:

[0021] The first control tensor is modulated to generate a final control signal;

[0022] The modulation is realized through a preset adapter;

[0023] The adapter comprises a weighting mechanism for adjusting each task control path.

[0024] As a preferred scheme of the power scene image degradation repair method, the preset restoration algorithm comprises the following steps:

[0025] According to the dark channel prior, transmission maps of several different degradation processes are extracted, and the transmission maps are used as main guide images of the corresponding degradation processes.

[0026] According to the edge map and the diffusion filter, edge information of the transmission maps is extracted.

[0027] An auxiliary structural guide image is generated by using color mapping.

[0028] The auxiliary structural visual cues comprise the edge information of the transmission maps and the auxiliary structural guide image.

[0029] As a preferred scheme of the power scene image degradation repair method, the establishment of the image degradation model for several different degradation processes comprises the following steps:

[0030] Several functions related to several different degradation processes except for denoising are designed respectively.

[0031] The several functions are combined to obtain a combined function.

[0032] The denoising of the several different degradation processes is realized by adding a noise term after the combined function.

[0033] As a preferred scheme of the power scene image degradation repair method, the encoding operation on the low-level visual repair cues comprises the following steps: an encoder is designed, and the encoder is constructed by an encoding function.

[0034] The multi-layer semantic features and the shallow guide features are encoded by the encoder.

[0035] The encoder comprises encoding functions corresponding to different layers.

[0036] As a preferred scheme of the power scene image degradation repair method, the multi-layer conditional network comprises a multi-layer encoding network and a residual block network.

[0037] In a second aspect, the present application provides a power scene image degradation repair system, comprising:

[0038] A model establishment module is configured to establish an image degradation model for several different degradation processes.

[0039] The several different degradation processes include defogging, deblurring, enhancement, and denoising;

[0040] An algorithm preset module is configured to preset a restoration algorithm, and low-level visual repair clues of each degradation process are obtained according to the restoration algorithm;

[0041] The low-level visual repair clues include a main guiding image and auxiliary structural visual cues;

[0042] A control vector acquisition module is configured to perform an encoding operation on the low-level visual repair clues to obtain a first control vector;

[0043] A repair module is configured to establish a diffusion model, and power scene image degradation repair is performed according to the trained diffusion model, and the input of the diffusion model includes the first control vector.

[0044] In a third aspect, the present application provides an electronic device comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method described above when executing the computer program.

[0045] In a fourth aspect, the present application provides a computer readable storage medium having a computer program stored thereon, wherein the computer program is executed by a processor to implement the steps of the method described above.

[0046] Compared with the prior art, the present application has the following beneficial effects: the present application proposes a power scene image degradation repair method, establishes an image degradation model for several different degradation processes, presets a restoration algorithm, obtains low-level visual repair clues of each degradation process according to the restoration algorithm, performs an encoding operation on the low-level visual repair clues to obtain a first control vector, establishes a diffusion model, and performs power scene image degradation repair according to the trained diffusion model, and the input of the diffusion model includes the first control vector. The present application can provide an effective repair scheme for various image degradation problems in the power scene, such as defogging, deblurring, enhancement, and denoising. By establishing an image degradation model, different degradation processes can be simulated to provide a basis for subsequent repair. The preset restoration algorithm can extract low-level visual repair clues for each degradation process, and these clues include a main guiding image and auxiliary structural visual cues, which can help to accurately guide the repair process. By performing an encoding operation on these clues, a first control vector can be obtained, which can be used as the input of the diffusion model to further guide image repair. The application of the diffusion model makes the repair process more flexible and efficient, and can generate high-quality repair images according to the guidance of the control vector. The present application realizes unified modeling and repair of various repair tasks (such as defogging, deblurring, denoising, and enhancement) in transmission line inspection images, and overcomes the problems of existing image repair methods, such as dependence on single task modeling, weak generalization ability, and poor control stability. BRIEF DESCRIPTION OF DRAWINGS

[0047] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.

[0048] Figure 1 The method flow chart of the power scene image degradation repair method provided by an embodiment of the present application.

[0049] Figure 2 The overall architecture schematic diagram of the power scene image degradation repair method provided by an embodiment of the present application.

[0050] Figure 3 The internal structure diagram of the electronic device of the power scene image degradation repair method provided by an embodiment of the present application. DETAILED DESCRIPTION

[0051] In order to make the above-mentioned purposes, features and advantages of the present application more obvious and easy to understand, the specific embodiments of the present application will be described in detail below with reference to the drawings in the specification. Obviously, the described embodiments are part of the embodiments of the present application, not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor should be within the scope of protection of the present application.

[0052] Embodiment 1, refer to Figures 1-3 For the first embodiment of the present application, the embodiment provides a power scene image degradation repair method, comprising:

[0053] In the prior art, there are some problems, for example, the traditional image repair method is often designed for a specific degradation type, and lacks unified processing ability for different degradation types. This leads to the need to use different repair models for different degradation conditions in actual application, increasing the processing complexity and cost. In addition, the existing multi-task image repair method often has poor task switching stability and weak control signal expression ability when processing different degradation tasks, which affects the repair effect and the generalization ability of the model.

[0054] The present application provides a method that can effectively solve the above-mentioned problems, and the following will be described in detail how to realize the power scene image degradation repair method by combining multiple embodiments;

[0055] Figure 1 A method flow chart of a power scene image degradation repair method is shown, comprising:

[0056] S101, establishing image degradation models for several different degradation processes;

[0057] It should be noted that in order to realize the power scene image degradation repair, it is necessary to determine the possible image degradation modes of the power scene image, analyze these degradation modes or establish a model that can simulate these degradation modes, so as to realize the reverse repair operation.

[0058] In an optional embodiment, the several different degradation processes can include but are not limited to de-fogging, de-blurring, enhancement, de-noising, and color correction, etc. These degradation processes are particularly common in power inspection images, and seriously affect the image quality and subsequent intelligent analysis. By establishing image degradation models for these degradation processes, the degradation of images in different environments can be simulated, providing a basis for subsequent repair work.

[0059] In an optional embodiment, the de-fogging degradation process can be based on an atmospheric scattering model to simulate the effect of fog on the image. The model takes into account the absorption and scattering effects of light, and can generate realistic fog images. In the training phase, a large number of power scene images with fog annotations are used as training data, and the diffusion model is optimized to learn the mapping relationship from the foggy image to the clear image. In the repair phase, when a power scene image with fog is input, the diffusion model can gradually remove the fog according to the learned mapping relationship and restore the clear image.

[0060] In an optional embodiment, the de-blurring degradation process can be based on a motion blur kernel to simulate the image blur caused by camera or object movement. This process takes into account factors such as the shape, size, and direction of the blur kernel, and can generate images with various degrees of blur. In order to train the diffusion model, a large number of blurred and clear power scene image pairs are collected, and through contrastive learning, the model can learn the conversion rule from the blurred image to the clear image. In actual application, when a blurred power scene image is input, the model can quickly restore the clear image, improving the readability of the image and the accuracy of subsequent analysis.

[0061] In an optional embodiment, the enhanced degradation process can simulate problems such as insufficient image brightness and low contrast. By establishing a suitable image enhancement model, the influence of factors such as different lighting conditions and exposure time on images can be simulated to generate images with different brightness and contrast levels. In the training phase, a large number of power scene images annotated with brightness, contrast and other attributes are used as training data to optimize the diffusion model so that it can learn the mapping relationship from low-quality images to high-quality images. In the repair phase, when a power scene image with insufficient brightness or low contrast is input, the diffusion model can enhance the image according to the learned mapping relationship to improve the brightness and contrast of the image, making it more suitable for subsequent defect detection and intelligent analysis.

[0062] In an optional embodiment, the denoising degradation process can simulate various noises such as Gaussian noise and salt and pepper noise that may be introduced during image acquisition and transmission based on a noise model. These noises can seriously affect the quality of the image and reduce the accuracy of subsequent analysis. To remove these noises, an effective denoising model needs to be established. This model can learn the mapping relationship from noisy images to clean images. In the training phase, a large number of power scene images with noise annotations are used as training data to optimize the diffusion model so that it has strong denoising ability. In practical applications, when a noisy power scene image is input, the model can accurately remove the noise and restore a clean image, providing a reliable basis for subsequent analysis.

[0063] In an optional embodiment, the color correction degradation process is a complex and critical process. In the power inspection scene, due to factors such as lighting conditions, equipment aging, and shooting environment, image colors often deviate, such as hue shift, insufficient or excessive saturation, and other problems. These problems not only affect the visual effect of the image, but also can cause difficulties for subsequent image analysis and recognition.

[0064] In an optional embodiment, to accurately simulate the color correction degradation process, the present application uses advanced color space conversion technology and color distribution statistical methods.

[0065] First, the original image is converted from the RGB color space to the Lab color space, which is more suitable for color correction. In the Lab color space, the L channel represents the brightness information of the image, and the a and b channels represent the red and yellow components of the image, respectively. This separation makes color correction more accurate and controllable.

[0066] Then, color distribution statistics are performed on the converted image to analyze the histogram distribution and color deviation of each color channel in the image. According to the statistical results, the target of color correction can be determined, that is, to adjust the color distribution of a and b channels to make the image color closer to the real scene or the preset standard color.

[0067] It should be noted that the operation of reverse repair for the degradation process of the color correction part is more complex and can be designed separately. In the embodiments of the present application, the several different degradation processes include defogging, deblurring, enhancement, and denoising.

[0068] In an optional embodiment, establishing an image degradation model for several different degradation processes can include but is not limited to the following steps:

[0069] First, analyze the characteristics of each degradation process and understand the underlying physical principles or mathematical expressions. Then, based on these principles or expressions, design corresponding functions or algorithms to simulate the impact of the degradation process on the image.

[0070] Next, combine these functions or algorithms to form a comprehensive model that can simulate multiple degradation processes.

[0071] Finally, through a large amount of experimental data and training, optimize the model to accurately simulate and generate images with different degradation characteristics. In actual application, the model can be used to simulate and repair image degradation problems in power scenarios.

[0072] In an optional embodiment, establishing an image degradation model for several different degradation processes can also include but is not limited to using deep learning techniques, especially advanced neural network architectures such as convolutional neural networks (CNN) or generative adversarial networks (GAN). These network architectures have powerful feature extraction and image generation capabilities, and can learn the complex mapping relationship between image degradation and repair. By training these networks, they can automatically adapt to different degradation types and generate high-quality repair images. In addition, to further improve the generalization ability and stability of the model, techniques such as transfer learning and data augmentation can be used to increase the diversity of the model's training data, so that it can better cope with various challenges in actual applications.

[0073] Specifically, a multi-stage deep learning framework can be designed, where the first stage is responsible for preliminary image degradation feature extraction, the second stage is based on these features to identify and classify the degradation type, and the third stage focuses on image restoration and reconstruction. Each stage can use a specific CNN or GAN variant to take full advantage of their strengths. For example, in the first stage, pre-trained convolutional layers can be used to extract low-level features of the image, such as edges, textures, etc. In the second stage, attention mechanisms or recurrent neural networks (RNN) can be introduced to capture the time series characteristics of the degradation process, so as to more accurately identify the degradation type. In the third stage, a generative adversarial network can be used to generate high-quality restored images, while a discriminative network is used to ensure that the generated images are visually consistent with the real images.

[0074] However, the above operations all have problems such as separate operation complexity, large amount of calculation, or limited generalization ability. In order to solve these problems, the present application combines the above function combination and framework establishment method, and designs the following steps.

[0075] In the embodiment of the present application, the image degradation model for several different degradation processes is established, including:

[0076] Several functions related to several different degradation processes except for denoising are designed respectively;

[0077] The several functions are combined to obtain a combined function;

[0078] The denoising of the several different degradation processes is realized by adding a noise term after the combined function.

[0079] For example, using a simplified degradation expression based on an image physical degradation model, multiple degradation processes (de-fogging, de-blurring, enhancement, denoising) are unified into an image degradation framework, where the image degradation model is defined as:

[0080] I(x,y)=H(B(D(S)))+η

[0081] Where I(x,y) is the degraded image, H(), B(), D() represent the functions of de-fogging, de-blurring, and image deepening respectively, η is the noise, and S is the original image.

[0082] It's important to note that establishing image degradation models tailored to several different degradation processes allows for unified treatment of different types of image degradation, avoiding the limitations of traditional approaches that require separate restoration models for different degradation types. Furthermore, this model can simulate multiple degradation processes, providing rich training data and a testing environment for subsequent restoration efforts, helping to improve the robustness and generalization of the restoration algorithm. In practice, model parameters can be adjusted or new degradation functions introduced to adapt to different application scenarios and requirements, thereby achieving a comprehensive solution to image degradation issues in power generation scenarios.

[0083] S102, presetting a restoration algorithm, and obtaining low-level visual restoration clues for each degradation process according to the restoration algorithm;

[0084] It's important to note that the design of a restoration algorithm is a critical step in image restoration. In this paper, the restoration algorithm is carefully designed to extract low-level visual restoration cues for each degradation process. These cues, including the primary guiding image and auxiliary structural visual cues, are crucial for the subsequent image restoration process.

[0085] In an optional embodiment, the primary guiding image provides the primary direction and structural information for restoration, while auxiliary structural visual cues further enhance the accuracy and stability of the restoration. By combining these cues, the restoration algorithm can accurately guide subsequent image restoration work, ensuring that the restored image is both visually coherent and retains important information from the original image.

[0086] In specific implementation, the restoration algorithm can adopt a variety of technologies and methods, such as deep learning-based feature extraction, image registration, structural similarity measurement, etc., to ensure that it can accurately and efficiently extract the required repair clues.

[0087] In an optional embodiment, corresponding restoration algorithms are required for different degradation processes. However, if different restoration algorithms are designed for different degradation processes, the required resources will far exceed the preset resources. Therefore, the present invention designs a universal restoration algorithm that only needs to obtain low-level visual restoration clues according to different degradation processes.

[0088] In an embodiment of the present invention, the low-level visual restoration cues include a primary guiding image and auxiliary structural visual cues;

[0089] In an embodiment of the present invention, a restoration algorithm is preset, and obtaining low-level visual restoration clues of each degradation process according to the restoration algorithm includes:

[0090] According to the dark channel prior, the transmission maps of several different degradation processes are extracted and used as the main guiding images of the corresponding degradation processes;

[0091] Edge information of the transmission map is extracted according to the edge map and diffusion filtering;

[0092] The auxiliary structural guidance map is generated using color mapping;

[0093] The auxiliary structural visual cues include the edge information of the transmission map and the auxiliary structural guidance map.

[0094] Exemplarily, for each degradation task, a main guidance image and auxiliary structural visual cues are generated, low-level visual repair clues are extracted, and three different stages are set, and the specific content of each stage is as follows (only one kind of dehazing is shown, and the other three kinds of operations are similar):

[0095] 1. The transmission map t(x) of the dehazing task is extracted using the dark channel prior, and is calculated by the following formula:

[0096] t(x) = 1 - ω·DP(I / A)

[0097] Wherein, DP is the dark channel prior operation, and A is the atmospheric light value.

[0098] 2. The edge information e(x) of the image is extracted using the edge map and diffusion filtering, and is calculated by the following formula:

[0099]

[0100] Wherein, is the gradient, Δ is the Laplacian operator, and dt is the time step.

[0101] 3. The auxiliary structural guidance map m(x) is generated using color mapping, and is calculated by the following formula:

[0102]

[0103] Wherein, x c is the normalized color channel of the image

[0104] It should be noted that the generation of the main guidance image: for the dehazing task, the transmission map t(x) can be used as the main guidance image, because it directly reflects the transmittance of different regions in the image. For other degradation tasks (such as deblurring and denoising), the corresponding main guidance image can be generated by similar methods, such as estimating the blur kernel or noise level.

[0105] It should be noted that the generation of the auxiliary structural visual cues: the edge map e(x) and the auxiliary structural guidance map m(x) provide important information about the structure and color of the image as auxiliary visual cues. These cues can help the model better understand the content of the image, especially in the presence of multiple complex degradation factors.

[0106] It should be noted that fusion forms a control vector: the main guide image and the auxiliary structural visual cues are encoded into a control vector, which includes the construction of a multi-level conditional network and information fusion. The control vector is finally input into the diffusion model to guide it to complete the degradation repair of the power scene image.

[0107] It should also be noted that a preset restoration algorithm can significantly improve the effect and efficiency of image repair by obtaining low-level visual repair clues for each degradation process according to the restoration algorithm. Through the careful design of the restoration algorithm, low-level visual repair clues for each degradation process can be accurately extracted, which provides important guidance information for subsequent image repair. The main guide image serves as the main direction and structural information source for repair, ensuring that the repaired image remains visually coherent and retains as much important information from the original image as possible. The auxiliary structural visual cues further enhance the accuracy and stability of the repair, making the repair process more reliable. In addition, this restoration method based on the restoration algorithm can adapt to different types and degrees of degradation, and has strong flexibility and adaptability. Therefore, in practical applications, presetting the restoration algorithm and obtaining low-level visual repair clues based on it is one of the key steps to achieve efficient and accurate image repair.

[0108] S103, encoding the low-level visual repair clues to obtain a first control vector;

[0109] It should be noted that the restoration algorithm is a reverse repair based on low-level visual repair clues, so a series of operations need to be performed on the obtained low-level visual repair clues to achieve the final image repair.

[0110] In an optional embodiment, the low-level visual repair clues can be encoded and then subjected to subsequent restoration operations. Specifically, the encoding operation can use feature extraction techniques in deep learning, such as convolutional neural networks (CNN) or autoencoders (Autoencoder). These techniques can automatically learn the feature representation of the image, converting complex low-level visual repair clues into compact and information-rich first control vectors. During the encoding process, the network structure, loss function, and other parameters can be adjusted to optimize the encoding effect, ensuring that the first control vector accurately reflects the key information required for image degradation repair.

[0111] In an optional embodiment, after the encoding operation is completed, the first control vector is input into the diffusion model to guide it to complete the image inpainting task. The diffusion model is an image inpainting method based on a probabilistic generative model, which realizes the inpainting of image degradation by learning the mapping relationship from a noisy image to a high-quality image. In the inpainting process, the diffusion model removes the degradation features in the image step by step according to the information provided by the first control vector, and restores a high-quality image.

[0112] In the embodiment of the present application, the encoding operation on the low-level visual inpainting clues to obtain the first control vector comprises:

[0113] A multi-level conditional network is constructed, the main guide image is taken as the main branch input, and multi-layer semantic features are extracted through an encoder;

[0114] Each structural visual cue is input into the auxiliary branch, and shallow guide features are extracted using a residual block;

[0115] The multi-layer semantic features and the shallow guide features are fused;

[0116] The features of different layers of the main branch are output as the first control tensor.

[0117] In the embodiment of the present application, the encoding operation on the low-level visual inpainting clues comprises: designing an encoder, and the encoder is constructed through an encoding function;

[0118] The multi-layer semantic features and the shallow guide features are both encoded by the encoder;

[0119] The encoder comprises encoding functions corresponding to different layers.

[0120] Specifically, a multi-level conditional network is constructed, the main guide and auxiliary guide information are encoded respectively, and are fused at different levels to form a complete control vector, and three different stages are set, and the specific content of each stage is:

[0121] 1. A multi-level conditional network is constructed, the main guide image is taken as the main branch input, and multi-layer semantic features are extracted through a deep encoder

[0122]

[0123] Wherein, represents the encoding function of the current layer.

[0124] 2. Each structural cue is input into the auxiliary branch, shallow guide features are extracted using a residual block, and the features are fused with the main branch features:

[0125]

[0126] Wherein Auxiliary guidance encoding function.

[0127] 3. The final output of the main branch L-th layer feature as a control tensor

[0128]

[0129] In an optional embodiment, the control vector is input into a shared multi-head control module, and a task-specific convolution module is used to enhance its stability and adaptability in multi-task switching, including the following two steps:

[0130] 1. The task stability unit helps to adjust the gradient from the previous learning task, and adjusts it through the following formula:

[0131]

[0132] where Conv ↓ represents a convolution operation, GN is group normalization, is a channel up layer, CAT is a channel concatenation operation, is the average value of the control vector;

[0133] 2. The control signal is further processed by the task-specific convolution module to enhance the specific performance of the task, and the process is:

[0134]

[0135] where Conv depth is a depth separable convolution, and SiLU is an activation function.

[0136] The entire framework designed by the application is shown in Figure 2 , wherein:

[0137] 1. Unified image degradation framework

[0138] Input: First, the degraded images are processed. These images can be affected by various factors, such as dehazing, deblurring, enhancement, and denoising.

[0139] Simplified degradation expression: A simplified expression based on a physical degradation model is used to describe these degradation processes and unify them into an image degradation framework.

[0140] 2. Main processing steps

[0141] 2.1 Fast blind restoration algorithm

[0142] Main guiding image and auxiliary structural visual cue generation: For each degradation task (dehazing, deblurring, enhancement, denoising), a fast blind restoration algorithm is used to generate the main guiding image and auxiliary structural visual cues. Specifically, it includes:

[0143] Transmission map extraction for the dehazing task using the dark channel prior;

[0144] Edge map and diffusion filter are used to extract edge information from the image;

[0145] Auxiliary structural guiding image generation through color mapping.

[0146] 3. Multi-level conditional network

[0147] Encoding main guiding and auxiliary guiding information: A multi-level conditional network is established to encode the main guiding image and auxiliary structural visual cues obtained in the above steps, respectively, and fuse them at different levels to form a complete control vector.

[0148] Main branch: The main guiding image is input, and multi-level semantic features are extracted through a deep encoder;

[0149] Auxiliary branch: After each structural cue is input, a residual block is used to extract shallow guiding features and fuse them with the main branch features;

[0150] Final output: The Lth layer feature of the main branch as the control tensor.

[0151] 4. Multi-head control module

[0152] Task stabilization unit: The control vector is input into the shared multi-head control module, and the gradient of the learned task is adjusted by the task stabilization unit before learning, to ensure stability and adaptability under multi-task switching.

[0153] Task-specific convolution module: Further process the control signal through depth separable convolution and activation function to enhance the expressiveness of specific tasks.

[0154] 5. Task-aware hybrid expert adapter

[0155] Joint modulation control signal: A task-aware hybrid expert adapter is used to embed and modulate the control vector and task cues jointly to generate the final control signal. The adapter adjusts each task control path through a weighting mechanism to complete the image restoration task.

[0156] 6. Diffusion model

[0157] Image inpainting: The final control signal is input into the diffusion model, achieving the inpainting of the image. This process utilizes a pre-trained diffusion model (e.g., Stable Diffusion v1.4) to restore the quality of the image through a series of optimization and adjustment operations.

[0158] The entire process starts with the input of degraded images, and through the unified image degradation framework, fast blind restoration algorithm, multi-level conditional network, multi-head control module, and task-aware hybrid expert adapter, the high-quality image inpainting is finally achieved through the diffusion model. This method not only overcomes the limitation of the lack of universality of existing image inpainting methods, but also improves the image inpainting effect and stability under multi-task.

[0159] It should be noted that the encoding operation of the low-level visual restoration clues to obtain the first control vector can significantly improve the efficiency and accuracy of the image inpainting task. The encoding operation converts complex low-level visual restoration clues into compact and information-rich first control vectors, which not only reduces the consumption of computing resources, but also enables the subsequent multi-level conditional network, multi-head control module, and diffusion model to more effectively utilize these information. By optimizing the encoding process, the first control vector can accurately reflect the key features required for image degradation restoration, thereby providing strong guidance for subsequent image inpainting. This encoding operation enhances the flexibility and adaptability of the entire restoration framework, enabling it to cope with various complex degradation conditions and achieve high-quality image inpainting.

[0160] S104, a diffusion model is established, and the power scene image degradation restoration is performed according to the trained diffusion model, and the input of the diffusion model includes the first control vector.

[0161] In an optional embodiment, the diffusion model can adopt a diffusion method based on fractional matching, which gradually recovers a clear image from noisy data through an iterative denoising process. In the training phase, the diffusion model learns how to gradually transform noisy images into high-quality images and learns the latent distribution of image data in the process. In the inference phase, the diffusion model accepts the first control vector as input and gradually removes noise from the image according to the learned data distribution, finally generating the restored power scene image. In this way, the diffusion model can capture the details and structural information in the image, achieving high-quality image inpainting.

[0162] In an optional embodiment, the diffusion model can also adopt a structure based on a variational autoencoder, which represents the distribution of image data by introducing a latent space and realizes the inpainting of images through the symmetric design of the encoder and the decoder. During the training process, the variational autoencoder learns how to map the degraded images to the latent space and sample from it to generate the inpainted images. In the inference stage, the first control vector is input to the encoder part of the variational autoencoder, and after sampling in the latent space, the decoder part generates the inpainted power scene image. This method not only restores high-quality images, but also maintains the semantic consistency of the images, making the inpainted images more natural and reasonable in vision.

[0163] In the embodiments of the present application, establishing the diffusion model comprises:

[0164] modulating the first control tensor to generate a final control signal;

[0165] The modulation is realized through a preset adapter.

[0166] The adapter comprises adjusting each task control path through a weighting mechanism.

[0167] Specifically, a task-aware hybrid expert adapter is used to jointly modulate the control vector and the task prompt embedding as the final control signal to input the diffusion model to complete image inpainting, including the following three steps:

[0168] 1. The task-aware hybrid expert adapter modulates the control vector through the following formula to generate the final control signal:

[0169]

[0170] 2. The hybrid expert adapter adjusts each task control path through a weighting mechanism, and the weighting mechanism is calculated through the following formula:

[0171]

[0172] wherein, is the task modulation convolution, SConv is the spatial convolution, and DConv is the channel convolution.

[0173] 3. The final control signal is input to the diffusion model to complete the image inpainting task.

[0174] To sum up, the present application proposes a power scene image degradation repair method, establishes an image degradation model for several different degradation processes; a restoration algorithm is preset, and low-level visual repair clues for each degradation process are obtained according to the restoration algorithm; the low-level visual repair clues are subjected to encoding operation to obtain a first control vector; a diffusion model is established, and power scene image degradation repair is carried out according to the trained diffusion model, and the input of the diffusion model includes the first control vector. It can provide an effective repair scheme for various image degradation problems in the power scene, such as defogging, deblurring, enhancement and denoising, etc. By establishing an image degradation model, different degradation processes can be simulated to provide a basis for subsequent repair. The preset restoration algorithm can extract low-level visual repair clues for each degradation process, including the main guide image and auxiliary structural visual cues, which helps to accurately guide the repair process. By encoding these clues, a first control vector can be obtained, which can be used as the input of the diffusion model to further guide the image repair. The application of the diffusion model makes the repair process more flexible and efficient, and can generate high-quality repair images according to the guidance of the control vector. The power transmission line inspection image realizes unified modeling and repair for various repair tasks (such as defogging, deblurring, denoising and enhancement), overcoming the problems of existing image repair methods, such as dependence on single task modeling, weak generalization ability and poor control stability.

[0175] In a preferred embodiment, 5,358 image samples from real power operation and maintenance environment were introduced in the experiment of the present application, combined with synthetic degradation for extended evaluation, and the degradation types included motion blur, Gaussian blur, raindrop interference and rainwater shielding, etc. Under the same condition, 400 images were collected for evaluation.

[0176] The method is based on the frozen Stable Diffusion v1.4 model, and the UNICORN is trained on a mixed dataset composed of single degradation tasks and multiple degradation tasks (with paired combinations). The training uses the AdamW optimizer with a learning rate of 1e-5, and is accelerated on 2 NVIDIA A100 40GB GPUs, with a total training time of about 120 hours until convergence. The model is implemented in the PyTorch framework, and the training efficiency is improved by gradient accumulation on 8 batches. The embedding dimension of the CLIP encoder is d=768, and remains frozen during training.

[0177] In this study, PSNR and SSIM are used to evaluate the image distortion, and LPIPS is used to evaluate the perceptual quality. In addition, for the METARESTORE benchmark set in the real scene, the present application also uses the no-reference image quality indicators NIQE and BRISQUE to achieve more robust evaluation.

[0178] The results show that the model proposed in the application can obtain more advanced results on the power test set compared with other methods, and performs excellently in the recovered image quality. The superiority of the application in universality and accuracy is proved, and the feasibility and engineering value of the application in the power industry inspection image processing are verified.

[0179] Table 1: Accuracy quantitative evaluation results on the power test set

[0180]

[0181] In this embodiment, an electric power scene image degradation repair system is also provided, comprising:

[0182] A model establishing module is configured to establish image degradation models for a plurality of different degradation processes;

[0183] The plurality of different degradation processes include defogging, deblurring, enhancement and denoising;

[0184] An algorithm presetting module is configured to preset a restoration algorithm, and obtain low-level visual repair clues for each degradation process according to the restoration algorithm;

[0185] The low-level visual repair clues include a main guide image and auxiliary structural visual cues;

[0186] A control vector obtaining module is configured to perform an encoding operation on the low-level visual repair clues to obtain a first control vector;

[0187] A repair module is configured to establish a diffusion model, and perform electric power scene image degradation repair according to the trained diffusion model, wherein the input of the diffusion model includes the first control vector.

[0188] The above-mentioned various unit modules can be embedded in or independent of the processor in the electronic device in hardware form, or can be stored in the memory in the electronic device in software form, so as to be called and executed by the processor to perform the operations corresponding to the above-mentioned various modules.

[0189] This embodiment also provides an electronic device, which can be a terminal, and the internal structure diagram thereof can be as shown in Figure 3As shown in the figure. The electronic device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. Among them, the processor of the electronic device is used to provide computing and control capability. The memory of the electronic device includes non-volatile storage medium, internal memory. The non-volatile storage medium stores the operating system and the computer program. The internal memory provides an environment for the operating system and the computer program in the non-volatile storage medium to run. The communication interface of the electronic device is used for wired or wireless communication with external terminals. Wireless mode can be achieved through WIFI, operator network, NFC (near field communication) or other technologies. The computer program is executed by the processor to implement a power scene image degradation repair method. The display screen of the electronic device can be a liquid crystal display screen or an electronic ink display screen. The input device of the electronic device can be a touch layer overlaid on the display screen, or a key, trackball or touchpad arranged on the shell of the electronic device, or an external keyboard, touchpad or mouse, etc.

[0190] The embodiment also provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the following steps:

[0191] An image degradation model is established for a plurality of different degradation processes.

[0192] The plurality of different degradation processes include defogging, deblurring, enhancement and denoising.

[0193] A preset restoration algorithm is used to obtain a low-level visual repair clue for each degradation process according to the restoration algorithm.

[0194] The low-level visual repair clue includes a main guiding image and an auxiliary structural visual prompt.

[0195] The low-level visual repair clue is encoded to obtain a first control vector.

[0196] A diffusion model is established, and the diffusion model is used to repair the power scene image degradation after training is completed. The input of the diffusion model includes the first control vector.

[0197] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present application and are not limiting. Although the present application has been described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that the technical solutions of the present application can be modified or replaced equivalently without departing from the spirit and scope of the technical solutions of the present application, which should be covered in the scope of the claims of the present application.

[0198] Those skilled in the art will appreciate that embodiments of the present application can be devised for a variety of computer-implemented processes. Accordingly, embodiments of the present application can be embodied in a variety of different forms. Therefore, the detailed description is not intended to limit the present application to the particular form set forth. Instead, it is to be understood that other embodiments can be employed, and that the detailed description is intended to encompass such other embodiments as would be within the scope of the present application. There can be many alterations made to carious embodiments without departing from the scope of the application. Therefore, other embodiments are contemplated. It is to be understood that such alterations can be made without departing from the scope of the present application. Accordingly, the drawings and descriptions are to be regarded as illustrative in nature rather than restrictive. The description and drawings are to be regarded as illustrative in nature rather than restrictive.

[0199] The present application is described in reference to the drawings using a flowchart and / or a block diagram of the method, apparatus (system) and computer program product according to embodiments of the application. It will be understood that each block of the flowchart and / or block diagram, and combinations of blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processing device or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart and / or block diagram block or blocks. Figure 1 one or more functions specified in the flowchart and / or block diagram block or blocks. Figure 1 one or more functions specified in the flowchart and / or block diagram block or blocks.

[0200] These computer program instructions can also be stored in a computer- readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instructions which implement the function specified in the flowchart and / or block diagram block or blocks. Figure 1 one or more functions specified in the flowchart and / or block diagram block or blocks. Figure 1 one or more functions specified in the flowchart and / or block diagram block or blocks.

[0201] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart and / or block diagram block or blocks. Figure 1 one or more functions specified in the flowchart and / or block diagram block or blocks. Figure 1 one or more functions specified in the flowchart and / or block diagram block or blocks.

[0202] While the preferred embodiments of the application have been described, additional variations and modifications can be employed by those skilled in the art once armed with the concepts disclosed herein. Therefore, the appended claims are intended to encompass within their scope all such alternatives, modifications and variations as falling within the scope of the present application. What is claimed is:

[0203] It will be apparent to those skilled in the art that various modifications and variations can be made to the present application without departing from the spirit or scope of the application. Thus, it is intended that the present application cover modifications and variations of this application provided they come within the scope of the appended claims and their equivalents.

Claims

1. A method for repairing degraded images in power scenes, characterized in that: include: Establish image degradation models for several different degradation processes; The several different degradation processes include dehazing, deblurring, enhancement, and denoising; A restoration algorithm is preset, and low-level visual restoration clues of each degradation process are obtained according to the restoration algorithm; The low-level visual repair cues include primary guiding images and auxiliary structural visual cues; Performing an encoding operation on the low-level visual restoration clue to obtain a first control vector; A diffusion model is established, and degradation restoration of the power scene image is performed according to the trained diffusion model, wherein the input of the diffusion model includes the first control vector.

2. The method for repairing power scene image degradation according to claim 1, characterized in that: The encoding operation on the low-level visual restoration clue to obtain a first control vector includes: Construct a multi-level conditional network, use the main guide image as the main branch input, and extract multi-layer semantic features through the encoder; The auxiliary branch inputs each structural visual cue and uses residual blocks to extract shallow guidance features; Performing feature fusion on the multi-layer semantic features and the shallow guidance features; Output the main branch different layer features as the first control tensor.

3. The method for repairing power scene image degradation according to claim 2, characterized in that: The establishment of the diffusion model comprises: modulating the first control tensor to generate a final control signal; The modulation is achieved through a preset adapter; The adapter includes adjusting each task control path through a weighting mechanism.

4. The method for repairing power scene image degradation according to claim 3, characterized in that: The preset restoration algorithm, according to which low-level visual restoration clues of each degradation process are obtained, includes: Extracting transmission maps of several different degradation processes based on the dark channel prior, and using the transmission maps as the main guiding images of the corresponding degradation processes; extracting edge information of the transmission image according to the edge image and diffusion filtering; Use color mapping to generate auxiliary structural guidance maps; The auxiliary structural visual prompt includes edge information of the transmission image and an auxiliary structural guide image.

5. The method for repairing power scene image degradation according to claim 4, characterized in that: The establishment of image degradation models for several different degradation processes includes: Design several functions for removing noise according to several different degradation processes; Combining the several functions to obtain a combined function; The denoising of the several different degradation processes is achieved by adding a noise term after the combination function.

6. The method for repairing power scene image degradation according to claim 5, characterized in that: The encoding operation of the low-level visual restoration clues includes: designing an encoder, the encoder being constructed by an encoding function; The multi-layer semantic features and the shallow guided features are encoded by the encoder; The encoder includes encoding functions corresponding to different layers.

7. The method for repairing degraded power scene images according to claim 6, characterized in that: The multi-level conditional network includes a multi-layer encoding network and a residual block network.

8. A power scene image degradation restoration system, applying the method according to any one of claims 1 to 7, characterized in that: include: A model building module is used to build image degradation models for several different degradation processes; The several different degradation processes include dehazing, deblurring, enhancement, and denoising; An algorithm preset module, used to preset a restoration algorithm and obtain low-level visual restoration clues for each degradation process according to the restoration algorithm; The low-level visual repair cues include primary guiding images and auxiliary structural visual cues; a control vector acquisition module, configured to perform an encoding operation on the low-level visual restoration clue to obtain a first control vector; The repair module is used to establish a diffusion model and perform power scene image degradation repair according to the trained diffusion model, wherein the input of the diffusion model includes the first control vector.

9. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method for repairing power scene image degradation according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of a method for repairing power scene image degradation according to any one of claims 1 to 7 are implemented.