Image enhancement method based on rectification diffusion model

The denoising U-Net in the pre-trained diffusion model is adjusted into a path predictor through the rectified diffusion model to establish a straight path, which solves the problem of difficulty in implementing GAN and diffusion models in industrial applications and achieves fast and high-quality image generation. , which improves practicality.

CN118799208APending Publication Date: 2024-10-18TSINGHUA UNIVERSITY
View PDF 0 Cites 4 Cited by

Patent Information

Application Number
CN202410530450.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-04-29
Publication Date
2024-10-18

AI Technical Summary

Technical Problem

In the existing technology, image enhancement methods based on GAN are difficult to debug and consume large amounts of computing resources. Methods based on diffusion models are difficult to implement on a large scale in industrial applications and have weak practicability.

Method used

Using the rectified diffusion model, the denoising U-Net in the pre-trained diffusion model is adjusted as a path predictor, and a straight path is established through appropriate control conditions, reducing computational costs and inference time, and achieving fast and high-quality image generation.

Benefits of technology

It effectively solves the problems of debugging complexity and diffusion model computing resource consumption based on GAN method, achieves high-quality image enhancement in industrial applications, and improves practicality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118799208A_ABST
    Figure CN118799208A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of image enhancement, diffusion model and deep learning crossing, in particular to an image enhancement method based on a rectification diffusion model, and the method comprises the steps: carrying out the optimization of a target image based on a preset recovery network, obtaining a preliminary recovery image meeting a preset condition, and obtaining a control condition according to the preliminary recovery image; generating a rectification framework under the guidance of the target condition based on the control condition; and adjusting the de-noised U-Net in the pre-training diffusion model of the text to the image into a path predictor meeting a preset effective condition by using a rectification framework, so as to establish a linear path between the random noise and the image meeting a preset high-quality condition by using the path predictor, and obtaining an image after the diffusion model is enhanced. According to the method, the high-quality image can be quickly generated, the high calculation cost and reasoning time of diffusion sampling are reduced, and the method can be effectively applied to various real-world image enhancement tasks and is extremely high in practicability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the cross-technical field of image enhancement, diffusion model and deep learning, and in particular to an image enhancement method based on a rectification diffusion model. Background Art

[0002] In the related art, image enhancement methods can be divided into predictive methods, methods based on generative adversarial networks (GANs), and methods based on diffusion models. Predictive methods seek to explicitly model blur kernels from low-quality (LQ) images and use these predicted blur kernel parameters to restore high-quality (HQ) images. However, due to simple degradation type settings and unstable parameter estimation, their adaptability to complex conditions in the real world is still limited. In order to improve the quality of image enhancement, some methods use generative adversarial networks (GANs) to implicitly learn data distribution and degradation models. GAN-based methods have achieved successful results through GAN's image prior knowledge and high-order degradation models. In recent years, diffusion models have shown extraordinary capabilities in the field of visual generation, and some methods use the powerful generative prior knowledge of pre-trained diffusion models to achieve high-quality image restoration.

[0003] However, in related technologies, due to the complex loss function and hyperparameter settings, the debugging process of the GAN-based method is relatively difficult. The diffusion model-based method can achieve high-quality results, but it requires a lot of computing resources and a long inference time. It cannot be effectively implemented on a large scale in industrial applications, and its practicality is weak, which needs to be solved urgently. Summary of the invention

[0004] The present application provides an image enhancement method based on a rectified diffusion model to solve the problems in the related art that, due to the complex loss function and hyperparameter setting, the debugging process of the GAN-based method is relatively difficult, and the diffusion model-based method can achieve high-quality results, but requires a large amount of computing resources and a long inference time, cannot be effectively implemented on a large scale in industrial applications, and has weak practicality.

[0005] The first aspect of the present application provides an image enhancement method based on a rectification diffusion model, comprising the following steps: optimizing a target image based on a preset restoration network to obtain a preliminary restoration image that meets preset conditions, so as to obtain control conditions based on the preliminary restoration image; based on the control conditions, generating a rectification framework for use under the guidance of the target conditions; using the rectification framework to adjust the denoising U-Net in a pre-trained diffusion model of text to image into a path predictor that meets preset effective conditions, so as to use the path predictor to establish a straight line path between random noise and a picture that meets preset high-quality conditions, so as to obtain an image enhanced by the diffusion model.

[0006] Optionally, in one embodiment of the present application, the path predictor is used to establish a straight line path between random noise and a picture that meets preset high-quality conditions to obtain an image enhanced by the diffusion model, including: based on a preset mean square error loss function, linearizing the complex probability flow transfer curve trajectory of the diffusion model to control the direction of the straight line through the target condition to obtain the straight line path.

[0007] Optionally, in one embodiment of the present application, the linearizing the complex probability flow transfer curve trajectory of the diffusion model includes: based on the sample distribution of the task, finding an intermediate point on the rectification solution path, wherein the derivative direction of the intermediate point is the slope of the secant between the random noise and the high image that meets the preset high quality conditions.

[0008] Optionally, in one embodiment of the present application, the path predictor is used to establish a straight line path between random noise and a picture that meets preset high-quality conditions to obtain the image enhanced by the diffusion model, and further includes: in the prediction stage, advancing on the straight line path multiple times until reaching the middle point; and advancing directly from the initial noise to the image enhanced by the diffusion model by predicting the derivative of the middle point.

[0009] A second aspect of the present application provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the image enhancement method based on the rectification diffusion model as described in the above embodiment.

[0010] The third aspect of the present application provides a computer-readable storage medium, which stores a computer program. When the program is executed by a processor, it implements the above-mentioned image enhancement method based on the rectification diffusion model.

[0011] The fourth aspect of the present application provides a computer program product, which, when executed, is used to implement the above-mentioned image enhancement method based on the rectification diffusion model.

[0012] The embodiment of the present application can adopt a rectification framework under the guidance of appropriate control conditions, adjust the denoising U-Net in the pre-trained diffusion model into an effective path predictor, and use the predictor to establish a straight line path, and control the direction of the straight line through appropriate conditions to obtain an enhanced image. This achieves fast high-quality image generation, reduces the high computational cost and reasoning time of diffusion sampling, and can be effectively applied to various real-world image enhancement tasks. Thus, the problem that the debugging process of the GAN-based method is difficult due to the complex loss function and hyperparameter settings in the related art is solved, and the method based on the diffusion model can achieve high-quality results, but requires a lot of computing resources and a long reasoning time, cannot be effectively implemented on a large scale in industrial applications, and has weak practicality.

[0013] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:

[0015] Figure 1 A flowchart of an image enhancement method based on a rectification diffusion model provided according to an embodiment of the present application;

[0016] Figure 2 A schematic diagram of an image enhancement effect according to an embodiment of the present application;

[0017] Figure 3 This is a flowchart of an image enhancement method based on a rectification diffusion model according to an embodiment of the present application;

[0018] Figure 4 Schematic diagram of the structure of an electronic device according to an embodiment of the present application.

[0019] Reference numerals:

[0020] 401 - memory, 402 - processor and 403 - communication interface. DETAILED DESCRIPTION

[0021] Embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present application, and should not be construed as limiting the present application.

[0022] The following is a description of the image enhancement method based on the rectified diffusion model of the present application embodiment with reference to the accompanying drawings. In view of the above-mentioned background technology, due to the complex loss function and hyperparameter settings, the debugging process of the method based on GAN is relatively difficult, and the method based on the diffusion model can obtain high-quality results, but requires a large amount of computing resources and a long reasoning time, and cannot be effectively implemented on a large scale in industrial applications, and the problem of weak practicality, the present application provides an image enhancement method based on a rectified diffusion model, in which a rectified framework under the guidance of appropriate control conditions can be used to adjust the denoising U-Net (a denoising neural network) in the pre-trained diffusion model into an effective path predictor, and the predictor is used to establish a straight line path, and the direction of the straight line is solved by appropriate conditions to obtain an enhanced image. Thus, fast high-quality image generation is achieved, the high computational cost and reasoning time of diffusion sampling are reduced, and it can be effectively applied to various real-world image enhancement tasks. Thus, the related art is solved, due to the complex loss function and hyperparameter settings, the debugging process of the method based on GAN is relatively difficult, and the method based on the diffusion model can obtain high-quality results, but requires a large amount of computing resources and a long reasoning time, and cannot be effectively implemented on a large scale in industrial applications, and the problem of weak practicality.

[0023] Specifically, Figure 1 A flowchart of an image enhancement method based on a rectification diffusion model provided in an embodiment of the present application.

[0024] like Figure 1 As shown, the image enhancement method based on the rectification diffusion model includes the following steps:

[0025] In step S101, the target image is optimized based on a preset restoration network to obtain a preliminary restoration image that meets preset conditions, so as to obtain a control condition according to the preliminary restoration image.

[0026] It is understandable to those skilled in the art that constructing a rectification diffusion model for image enhancement often requires a large amount of computing resources and a long inference time, and also generates a series of expensive computing costs. To solve this problem, an embodiment of the present application proposes a control condition for subsequent control.

[0027] Specifically, a low-quality image can be input first, and then the low-quality image can be preliminarily optimized. The optimization process can be but is not limited to a lightweight restoration network, for example, a small network based on convolution, attention mechanism or GAN, etc., to obtain a preliminarily restored image. Then, the preliminarily restored image can be used as the input of the ControlNet (an open, high-speed, high-throughput real-time industrial control network) network, and accurate control conditions such as deep features of the image can be constructed from it.

[0028] Step S102: generating a rectification framework under the guidance of target conditions based on control conditions.

[0029] As a possible implementation method, rectification is a series of methods for solving transmission mapping problems, which can adjust the form of airflow, water flow or electric current. Therefore, the embodiment of the present application can generate a rectification framework (a neural network framework using a rectification diffusion model) under the guidance of target conditions based on control conditions. It should be noted that the target conditions here can also be generated by the preliminary restored image.

[0030] For example, given two observations from distributions X0~π0, X1~π1, find a transport mapping So that when X0~π0, T(X0)~π1. The diffusion model represents the transport mapping problem as a continuous-time process controlled by stochastic differential equations (SDEs), and uses neural networks to simulate the drift forces of these processes. The learned SDEs can be converted into marginal-preserving probability flow ordinary differential equations (ODEs) for faster reasoning. However, compared with one-step inference models such as GANs, the diffusion model still has the problem of long-term sampling due to the use of iterative network reasoning to solve ODE / SDE. In order to solve this problem, the rectification framework in the embodiment of the present application introduces an ODE model, which can be used to transfer π0 to π1 through a straight line path. In addition, the embodiment of the present application can also introduce control conditions to the backbone network through Control Net, thereby obtaining a rectification framework prompted (guided) by the target conditions.

[0031] Furthermore, in order to provide accurate and appropriate guidance for rectification in complex real-world scenarios, the present embodiment may also use a pre-trained preliminary recovery model τ φ To perform rough recovery. φ Works to reduce ambiguity and helps control conditions This is the key to narrowing the direction range and promoting accurate prediction. Compared with the denoising U-Net of the diffusion model, τ φ Contains far fewer parameters, so has little impact on inference speed.

[0032] Step S103, using a rectification framework to adjust the denoising U-Net in the pre-trained diffusion model of text to image to a path predictor that meets preset validity conditions, so as to use the path predictor to establish a straight line path between random noise and the image that meets preset high quality conditions, and obtain an image enhanced by the diffusion model.

[0033] In some embodiments, after obtaining an optimized rectification framework, i.e., a rectification framework guided by target conditions, the rectification can be used to adjust the denoising U-Net in the pre-trained diffusion model of text to image into a high-quality path predictor that meets the preset effective conditions. The effective conditions here can be understood as conditional information with a prompting effect, such as text or image, and in the embodiments of the present application, can be understood as a preliminarily optimized image. The path predictor can establish a straight line path between random noise and high-quality images, thereby accelerating the solution of the diffusion model.

[0034] For example, the embodiments of the present application may, but are not limited to, use a mean square error loss function (a means or method for training a path predictor, which can straighten the trajectory of the diffusion model by training using a mean square error function) to linearize the trajectory of the complex probability flow transfer curve of the diffusion model, and then adjust the denoising U-Net in the text-to-image pre-trained diffusion model into an effective path predictor through appropriate control conditions such as the rectification framework guided by the preliminary restored image in the embodiments of the present application. The path predictor can establish a straight path between the random noise distribution and the high-quality image, thereby effectively promoting the effective use and acceleration of the diffusion model.

[0035] After establishing the straight line path, in order to obtain an enhanced image, it is also necessary to solve the direction of the straight line, wherein the solution process can also be but is not limited to being solved through appropriate control conditions. For example, the image initially restored in the embodiment of the present application is used as a control condition with a prompting effect, and the rectified diffusion model can be quickly solved to obtain the final high-quality result.

[0036] The following is a further explanation of this process.

[0037] Optionally, in one embodiment of the present application, a path predictor is used to establish a straight line path between random noise and a picture that meets preset high-quality conditions to obtain an image enhanced by a diffusion model, including: based on a preset mean square error loss function, linearizing the complex probability flow transfer curve trajectory of the diffusion model to control the direction of the straight line through the target condition to obtain a straight line path.

[0038] Based on the relevant descriptions of other embodiments, it can be understood that a straight line path can be established between random noise and a picture that meets a preset high-quality condition by using a path predictor to obtain an image enhanced by a diffusion model.

[0039] Specifically, when using a path predictor to establish a straight line path between random noise and an image that meets preset high-quality conditions, the complex probability flow transfer curve trajectory of the diffusion model can be linearized based on, but not limited to, a preset mean square error loss function, that is, the complex probability transfer curve of the original diffusion model is converted into a simple straight line, which is convenient for solving when sampling high-quality images, so as to control the direction of the solution line through the target condition to obtain a straight line path.

[0040] Optionally, in one embodiment of the present application, the complex probability flow transfer curve trajectory of the diffusion model is linearized, including: based on the sample distribution of the task, finding an intermediate point on the rectification solution path, wherein the derivative direction of the intermediate point is the slope of the secant between the random noise and the image that meets the preset high-quality conditions.

[0041] In the actual execution process, a path predictor can be used to establish a straight line path between random noise and a picture that meets the preset high-quality conditions. When obtaining an image enhanced by a diffusion model, the complex probability flow transfer curve trajectory of the diffusion model needs to be linearized. Specifically, based on the sample distribution of the task, an intermediate point can be found on the rectification solution path, where the derivative direction of the intermediate point can be the secant slope between the random noise and the picture that meets the preset high-quality conditions.

[0042] It can be understood that the optimized rectification can adjust the diffusion model into a path predictor, thereby changing the transport trajectory into a nearly straight path through the input of appropriate control conditions.

[0043] For example, embodiments of the present application may, but are not limited to, utilize median sampling based on the Lagrange median theorem to improve the accuracy of direction estimation, thereby obtaining better quality and detailed, visually appealing results. Specifically, the Lagrange median theorem states that for any two points a and b on a curve, there must be a point c on the curve such that the derivative of the curve at point c is equal to the slope of the straight line connecting points a and b.

[0044] Since the rectification model can be regarded as a path or derivative predictor on a differentiable transport curve, the embodiment of the present application can use the theorem to find an intermediate point on the curve so that the derivative direction of the point is parallel to the straight line connecting the noise and the image. In order to search for the intermediate point, the embodiment of the present application can also calculate the path direction of a point set P that covers multiple discrete time points on the transport curve.

[0045] Furthermore, the embodiment of the present application can find a point k in P that can predict the most accurate direction and produce the best results. The embodiment of the present application thus selects the appropriate k for different tasks based on a large number of test data points, and ultimately k can always produce high-quality results in a specific task, such as Figure 2As shown, it is an image enhancement effect diagram of an embodiment of the present application, wherein FlowIE is the abbreviation of the image enhancement method based on the rectification diffusion model in the embodiment of the present application, and the other English words involved in the middle are the abbreviations of other comparison methods. It can be clearly seen that the quality of the image obtained by the image enhancement method based on the rectification diffusion model in the embodiment of the present application has a significant high-quality improvement.

[0046] Optionally, in one embodiment of the present application, a path predictor is used to establish a straight line path between random noise and a picture that meets preset high-quality conditions to obtain an image enhanced by a diffusion model, and further includes: in the prediction stage, moving forward on the straight line path multiple times until reaching the middle point; and moving directly from the initial noise to the image enhanced by the diffusion model by predicting the derivative of the middle point.

[0047] In the actual implementation process, after the rectification diffusion model training is completed, the predicted image can be input into the diffusion model for image quality enhancement. Among them, when predicting and enhancing the image, it can first move forward k times on the straight line path, and after reaching the midpoint, it can directly move from the initial noise to the real high-quality image by predicting the derivative of the midpoint, that is, the process requires a total of k+1 iterations.

[0048] Next, the present application is described in detail with reference to a specific embodiment.

[0049] like Figure 3 As shown, it is a flow chart of an image enhancement method based on a rectification diffusion model according to an embodiment of the present application.

[0050] First, the input low-quality image is preliminarily optimized, and a lightweight restoration network is used to obtain a preliminarily restored image, which is used as the input of the ControlNet network to build accurate conditional control.

[0051] Next, in order to achieve the learning of straight-line paths, a linear combination of high-quality images and random noise is performed through discrete-time parameters as the input of the rectification framework.

[0052] During training, we can randomly sample noise and time parameters to combine and obtain an intermediate point on the straight path. The denoising U-Net and ControlNet of the diffusion model are used to predict the derivative direction of the intermediate point, which can be supervised by the mean square error loss.

[0053] Finally, when predicting, you need to move forward k times on the path. After reaching the midpoint, you can move directly from the initial noise to the real high-quality picture by predicting the derivative of the midpoint. This process requires a total of k+1 iterations.

[0054] According to the image enhancement method based on the rectified diffusion model proposed in the embodiment of the present application, a rectified framework under the guidance of appropriate control conditions can be used to adjust the denoising U-Net in the pre-trained diffusion model into an effective path predictor, and the predictor is used to establish a straight line path, and the direction of the straight line is solved by controlling the appropriate conditions to obtain an enhanced image. This achieves fast high-quality image generation, reduces the high computational cost and reasoning time of diffusion sampling, and can be effectively applied to various real-world image enhancement tasks. As a result, the problem that the debugging process of the GAN-based method is difficult due to the complex loss function and hyperparameter settings in the related art is solved, and the method based on the diffusion model can achieve high-quality results, but requires a large amount of computing resources and a long reasoning time, cannot be effectively implemented on a large scale in industrial applications, and has weak practicality.

[0055] Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device may include:

[0056] Memory 401 , processor 402 , and a computer program stored in the memory 401 and executable on the processor 402 .

[0057] When the processor 402 executes the program, the image enhancement method based on the rectification diffusion model provided in the above embodiment is implemented.

[0058] Furthermore, the electronic device further comprises:

[0059] The communication interface 403 is used for communication between the memory 401 and the processor 402 .

[0060] The memory 401 is used to store computer programs that can be executed on the processor 402 .

[0061] The memory 401 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.

[0062] If the memory 401, the processor 402 and the communication interface 403 are implemented independently, the communication interface 403, the memory 401 and the processor 402 can be connected to each other through a bus and communicate with each other. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 4 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0063] Optionally, in a specific implementation, if the memory 401, the processor 402 and the communication interface 403 are integrated on a chip, the memory 401, the processor 402 and the communication interface 403 can communicate with each other through an internal interface.

[0064] The processor 402 may be a central processing unit (CPU), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application.

[0065] An embodiment of the present application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-mentioned image enhancement method based on the rectification diffusion model.

[0066] The embodiment of the present application also provides a computer program product, which can run computer instructions. When the computer instructions are executed by a processor, the image enhancement method based on the rectification diffusion model provided in the embodiment of the present application is implemented.

[0067] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or N embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.

[0068] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of this application, "N" means at least two, such as two, three, etc., unless otherwise clearly and specifically defined.

[0069] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, fragment or portion of code comprising one or N executable instructions for implementing the steps of a custom logical function or process, and the scope of the preferred embodiments of the present application includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present application belong.

[0070] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purpose of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or N wirings (electronic devices), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically by optically scanning the paper or other medium and then editing, interpreting or processing in other suitable ways as necessary and then storing it in a computer memory.

[0071] It should be understood that the various parts of the present application can be implemented by hardware, software, firmware or a combination thereof. In the above embodiment, the N steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. If implemented by hardware, as in another embodiment, it can be implemented by any one or a combination of multiple of the following technologies known in the art: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0072] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.

[0073] In addition, each functional unit in each embodiment of the present application may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.

[0074] The storage medium mentioned above may be a read-only memory, a magnetic disk or an optical disk, etc. Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limiting the present application. A person of ordinary skill in the art may change, modify, replace and modify the above embodiments within the scope of the present application.

Claims

1. An image enhancement method based on the rectified diffusion model, It is characterized in that The following steps are involved: Optimizing the target image based on a preset restoration network to obtain a preliminary restoration image that meets preset conditions, so as to obtain a control condition according to the preliminary restoration image; Based on the control conditions, generating a rectification framework for use under the guidance of target conditions; The rectifier framework is used to adjust the denoising U-Net in the pre-trained diffusion model of text to image into a path predictor that meets preset validity conditions, so as to use the path predictor to establish a straight line path between random noise and a picture that meets preset high-quality conditions, thereby obtaining an image enhanced by the diffusion model.

2. The method according to claim 1, It is characterized in that The step of using the path predictor to establish a straight line path between the random noise and the picture satisfying the preset high quality condition to obtain the image enhanced by the diffusion model includes: Based on a preset mean square error loss function, the complex probability flow transfer curve trajectory of the diffusion model is linearized to control the direction of the solution line through the target condition to obtain the straight line path.

3. The method according to claim 2, It is characterized in that The linearizing of the complex probability flow transfer curve trajectory of the diffusion model includes: Based on the sample distribution of the task, an intermediate point is found on the rectification solution path, wherein the derivative direction of the intermediate point is the slope of the secant between the random noise and the image that meets the preset high quality condition.

4. The method according to claim 3, It is characterized in that The method of using the path predictor to establish a straight line path between the random noise and the picture satisfying the preset high quality condition to obtain the image enhanced by the diffusion model further includes: During the prediction phase, the vehicle moves forward on the straight path for multiple times until reaching the intermediate point; By predicting the derivatives of the intermediate points, we proceed directly from the initial noise to the image enhanced by the diffusion model.

5. An electronic device, It is characterized in that include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the image enhancement method based on the rectification diffusion model as described in any one of claims 1 to 4.

6. A computer-readable storage medium having a computer program stored thereon, It is characterized in that The program is executed by a processor to implement the image enhancement method based on the rectification diffusion model as described in any one of claims 1 to 4.

7. A computer program product, It is characterized in that When the computer program is executed, it is used to implement the image enhancement method based on the rectification diffusion model as described in any one of claims 1 to 4.

Citation Information

Cited By

  • Picture generation method and device based on conditional coding fusion, equipment and medium

    CN119399304A

  • Controllable recovery method, device and equipment for low-sampling frequency spectrum situation map and medium

    CN119648581A

  • Low-dose PET image denoising reconstruction method based on flow model

    CN121639514A

  • Low dose pet image denoising reconstruction method based on flow model

    CN121639514B