Image processing model training method and apparatus

By using a diffusion generative model to add noise and perform inverse diffusion processing on image samples during image processing model training, the problem of instability in adversarial generative network training is solved, thereby improving the model's stability and prediction accuracy.

CN115424088BActive Publication Date: 2026-06-19ALIBABA (CHINA) CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
ALIBABA (CHINA) CO LTD
Filing Date
2022-08-23
Publication Date
2026-06-19

AI Technical Summary

Technical Problem

Existing image processing model training methods based on adversarial generative networks suffer from problems such as training instability and low prediction accuracy.

Method used

A diffusion generation model is used to process image sample pairs. A noisy image is generated by adding noise to the target image, and a restored image is generated by using the inverse diffusion process. The initial image processing model is trained by combining the noisy image and the initial image until a target image processing model that meets the training conditions is obtained.

Benefits of technology

This improves the stability of model training and the accuracy of prediction, meeting users' actual image processing needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115424088B_ABST
    Figure CN115424088B_ABST
Patent Text Reader

Abstract

This specification provides an image processing model training method and apparatus. The image processing model training method includes: adding noise to a target image in an image sample pair to obtain a noisy image; inputting the original image in the image sample pair into an initial image processing model for processing to obtain an initial image; generating a restored image based on the noisy image and the initial image, wherein the original image and the restored image have the same attribute features; training the initial image processing model based on the restored image and the noisy image until a target image processing model that meets the training conditions is obtained, wherein the target image processing model is a machine learning model. When training the initial image processing model based on the restored image and the noisy image, the initial image processing model can gradually incorporate image features of different noisy images during the training process, which can effectively improve the stability of model training, improve the prediction accuracy of the model, and meet the actual image processing needs of users.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments in this specification relate to the field of computer technology, and in particular to a method for training an image processing model. Background Technology

[0002] With the development of internet technology, deep learning has been increasingly widely applied in computer vision and image processing, achieving remarkable success in computer vision. For many such image processing tasks, deep learning methods outperform other manual methods and even human experts. Current technologies typically use generative adversarial networks (GANs) for image processing. However, this model training method only inputs image samples into a pre-built model, and can only be trained based on pre-prepared image sample pairs containing the processing results. This means the model can only learn image features from the image sample pairs used for model training. Therefore, even after model training is complete, in practical applications, the model's prediction performance is often unsatisfactory, with low prediction accuracy. Therefore, an effective solution is urgently needed to address these problems. Summary of the Invention

[0003] In view of this, embodiments of this specification provide an image processing model training method. One or more embodiments of this specification also relate to an image processing model training apparatus, a text processing method, a text processing apparatus, a computing device, a computer-readable storage medium, and a computer program, to address the technical deficiencies existing in the prior art.

[0004] According to a first aspect of the embodiments of this specification, an image processing model training method is provided, comprising:

[0005] Noise is added to the target image in an image sample pair to obtain a noisy image;

[0006] The original image from the image sample pair is input into the initial image processing model for processing to obtain the initial image;

[0007] A restored image is generated based on the noisy image and the initial image, wherein the original image and the restored image have the same attribute characteristics;

[0008] The initial image processing model is trained based on the restored image and the noisy image until a target image processing model that meets the training conditions is obtained, wherein the target image processing model is a machine learning model.

[0009] According to a second aspect of the embodiments of this specification, an image processing model training apparatus is provided, comprising:

[0010] The noise-adding module is configured to add noise to the target image in an image sample pair to obtain a noisy image;

[0011] The processing module is configured to input the original image from the image sample pair into the initial image processing model for processing to obtain the initial image;

[0012] The generation module is configured to generate a restored image based on the noisy image and the initial image, wherein the original image and the restored image have the same attribute characteristics;

[0013] The training module is configured to train the initial image processing model based on the restored image and the noisy image until a target image processing model that meets the training conditions is obtained, wherein the target image processing model is a machine learning model.

[0014] According to a third aspect of the embodiments of this specification, an image processing model training method is provided, comprising:

[0015] Receive model training requests submitted by users;

[0016] According to the model training request, the target image in the image sample pair is subjected to noise processing to obtain a noisy image;

[0017] The original image from the image sample pair is input into the initial image processing model for processing to obtain the initial image;

[0018] A restored image is generated based on the noisy image and the initial image, wherein the original image and the restored image have the same attribute characteristics;

[0019] The initial image processing model is trained based on the restored image and the noisy image until a target image processing model that meets the training conditions is obtained, and then sent to the user.

[0020] According to a fourth aspect of the embodiments of this specification, an image processing model training apparatus is provided, comprising:

[0021] The request receiving module is configured to receive model training requests submitted by users.

[0022] The noise processing module is configured to perform noise processing on the target image in the image sample pair according to the model training request to obtain a noisy image;

[0023] The model processing module is configured to input the original image from the image sample pair into the initial image processing model for processing to obtain the initial image;

[0024] The restoration processing module is configured to generate a restored image based on the noisy image and the initial image, wherein the original image and the restored image have the same attribute characteristics;

[0025] The model training module is configured to train the initial image processing model based on the restored image and the noisy image until a target image processing model that meets the training conditions is obtained, and then send it to the user.

[0026] According to a fifth aspect of the embodiments of this specification, an image processing model training method is provided, comprising:

[0027] Receive image sample pairs uploaded by users for model training tasks through the model training interactive interface;

[0028] The target image in the image sample pair is subjected to noise processing to obtain a noisy image;

[0029] The original image from the image sample pair is input into the initial image processing model for processing to obtain the initial image;

[0030] A restored image is generated based on the noisy image and the initial image, wherein the original image and the restored image have the same attribute characteristics;

[0031] The initial image processing model is trained based on the restored image and the noisy image until a target image processing model that meets the training conditions is obtained, and the training results are displayed through the model training interactive interface.

[0032] According to a sixth aspect of the embodiments of this specification, an image processing model training apparatus is provided, comprising:

[0033] The image upload module is configured to receive image sample pairs uploaded by users through the model training interactive interface for model training tasks;

[0034] An image noise-adding module is configured to add noise to the target image in the image sample pair to obtain a noisy image;

[0035] The image input module is configured to input the original image from the image sample pair into the initial image processing model for processing to obtain the initial image;

[0036] An image restoration module is configured to generate a restored image based on the noisy image and the initial image, wherein the original image and the restored image have the same attribute characteristics;

[0037] The results display module is configured to train the initial image processing model based on the restored image and the noisy image until a target image processing model that meets the training conditions is obtained, and to display the training results through the model training interactive interface.

[0038] According to a seventh aspect of the embodiments of this specification, an image processing method is provided, comprising:

[0039] Obtain the image to be processed;

[0040] The image to be processed is input into the target image processing model to obtain the image processing result corresponding to the image to be processed output by the target image processing model.

[0041] According to an eighth aspect of the embodiments of this specification, an image processing apparatus is provided, comprising:

[0042] The image acquisition module is configured to acquire the image to be processed.

[0043] The model output module is configured to input the image to be processed into the target image processing model and obtain the image processing result output by the target image processing model corresponding to the image to be processed.

[0044] According to a ninth aspect of the embodiments of this specification, a computing device is provided, comprising:

[0045] Memory and processor;

[0046] The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions. When the computer-executable instructions are executed by the processor, they implement the steps of the above-described image processing model training method.

[0047] According to a tenth aspect of the embodiments of this specification, a computer-readable storage medium is provided that stores computer-executable instructions, which, when executed by a processor, implement the steps of the image processing model training method described above.

[0048] According to an eleventh aspect of the embodiments of this specification, a computer program is provided, wherein when the computer program is executed in a computer, it causes the computer to perform the steps of the above-described image processing model training method.

[0049] One embodiment of this specification involves obtaining a noisy image by adding noise to the target image in an image sample pair; inputting the original image from the image sample pair into an initial image processing model for processing to obtain an initial image; generating a restored image based on the noisy image and the initial image, wherein the original image and the restored image have the same attribute features; training the initial image processing model based on the restored image and the noisy image until a target image processing model that meets the training conditions is obtained, wherein the target image processing model is a machine learning model. The restored image is indirectly obtained through the processing of the initial image processing model, while the noisy image is obtained by adding noise to the target image. When training the initial image processing model based on the restored image and the noisy image, the initial image processing model can learn new image features related to the noisy image. This allows the initial image processing model to gradually introduce image features from different noisy images during the training process, effectively improving the stability of model training, increasing the prediction accuracy of the model, and meeting the user's actual image processing needs. Attached Figure Description

[0050] Figure 1 This is a schematic diagram of an image processing model training method provided in one embodiment of this specification;

[0051] Figure 2 This is a flowchart of a first image processing model training method provided in one embodiment of this specification;

[0052] Figure 3 This is a schematic diagram of an image processing method for training an image processing model according to one embodiment of this specification;

[0053] Figure 4 This is a flowchart illustrating the processing procedure of an image processing model training method provided in one embodiment of this specification.

[0054] Figure 5 This is a schematic diagram of the structure of a first image processing model training device provided in one embodiment of this specification;

[0055] Figure 6 This is a flowchart of a second image processing model training method provided in one embodiment of this specification;

[0056] Figure 7 This is a schematic diagram of the structure of a second image processing model training device provided in one embodiment of this specification;

[0057] Figure 8 This is a flowchart of a third image processing model training method provided in one embodiment of this specification;

[0058] Figure 9This is a schematic diagram of the structure of a third image processing model training device provided in one embodiment of this specification;

[0059] Figure 10 This is a flowchart illustrating an image processing method provided in one embodiment of this specification;

[0060] Figure 11 This is a schematic diagram of the structure of an image processing apparatus provided in one embodiment of this specification;

[0061] Figure 12 This is a structural block diagram of a computing device provided in one embodiment of this specification. Detailed Implementation

[0062] Many specific details are set forth in the following description to provide a full understanding of this specification. However, this specification can be implemented in many other ways than those described herein, and those skilled in the art can make similar extensions without departing from the spirit of this specification. Therefore, this specification is not limited to the specific implementations disclosed below.

[0063] The terminology used in one or more embodiments of this specification is for the purpose of describing particular embodiments only and is not intended to be limiting of the one or more embodiments of this specification. The singular forms “a,” “described,” and “the” as used in one or more embodiments of this specification and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used in one or more embodiments of this specification refers to and includes any or all possible combinations of one or more associated listed items.

[0064] It should be understood that although the terms first, second, etc., may be used to describe various information in one or more embodiments of this specification, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, first may also be referred to as second without departing from the scope of one or more embodiments of this specification, and similarly, second may also be referred to as first. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to a determination."

[0065] First, the terms and concepts used in one or more embodiments of this specification will be explained.

[0066] Diffusion generative model: A generative model that transforms a complex real distribution into a simple prior distribution by gradually adding noise, and then generates a real distribution from the simple prior distribution by gradually removing noise.

[0067] Loss function: A function that measures the distance between the generated result and the true result.

[0068] Generative Adversarial Networks (GANs) are deep learning models that learn to produce better outputs through a game-like learning process between (at least) two modules in the framework: a generative model and a discriminative model.

[0069] This specification provides an image processing model training method, and also relates to an image processing model training device, a text processing method, a text processing device, a computing device, a computer-readable storage medium, and a computer program, which will be described in detail in the following embodiments.

[0070] With the continuous development of deep learning, diffusion models have demonstrated superior performance in various generative tasks, achieving or even surpassing the performance of generative adversarial networks (GANs) in image generation, and are becoming a current research hotspot. Most existing image processing models are based on GANs and diffusion models. It is well known that GANs can be incorporated as a loss term into other generative tasks such as super-resolution, significantly enhancing image generation performance. However, training image processing models based on GANs is unstable due to the inherent characteristics of GANs. Therefore, one embodiment of this application proposes a method to incorporate a diffusion model as a loss function into other generative tasks, replacing the GAN loss term. This effectively improves the stability of model training, enhances prediction accuracy, and meets users' actual image processing needs.

[0071] During model training, image sample pairs are processed based on the diffusion generation model, and model training is completed based on the processing results. The image processing model training method provided in this embodiment can be found in [reference needed]. Figure 1The schematic diagram shown includes a server 102 and a terminal 104. Specifically, during model training, the server 102 processes the original image and target image in the image sample pair after acquiring them; while the terminal 104 serves as a medium for providing the user with input image sample pairs. In practice, when the user inputs an image sample pair through the terminal 104, the server 102 processes the image sample pair to complete model training. For the target image in the image sample pair, noise is added to the target image based on the noise addition method provided by the diffusion generation model to obtain a noise image corresponding to the target image; the original image is then input into the initial image processing model to obtain the initial image. The initial image and the noise image are restored using the inverse diffusion process provided by the diffusion generation model to obtain the restored image; the model is then trained based on the restored image and the noise image to obtain the trained image processing model, i.e., the target image processing model. Furthermore, after the model training is completed and the target image processing model is obtained, to facilitate the user's understanding of the training results, the server can use the target image processing model as the training result and feed the training result back to the user through the terminal 104.

[0072] In other words, during model training on server 102, the original image from the image sample pair is input into the initial image processing model for prediction to obtain the initial image. Based on the diffusion idea in the diffusion generation model, noise is added to the target image corresponding to the original image. A noisy image sequence is obtained by progressively adding noise. Then, based on the inverse diffusion idea in the diffusion generation model, denoising is performed on the noisy image and the initial image predicted by the initial image processing model, resulting in an image with some or all noise removed. Any noisy image in the noisy image sequence can map the degree of noise addition. Based on any two adjacent noisy images, the image features corresponding to the noise added during the denoising process can be determined. Therefore, when training the model based on the restored image and the noisy image, the initial image processing model can learn the changes in image features and which noises can be removed sequentially during denoising. This allows the initial image processing model to learn the noise changes in the image, thereby improving the stability of model training and the accuracy of model prediction.

[0073] The following is an implementation method for the first image processing model training method provided in this embodiment, and is described in detail below:

[0074] See Figure 2 , Figure 2 A flowchart of a first image processing model training method according to an embodiment of this specification is shown, which specifically includes the following steps.

[0075] Step S202: Add noise to the target image in the image sample pair to obtain a noisy image.

[0076] Specifically, an image sample pair includes an original image and a target image. An original image and its corresponding target image constitute an image sample pair. There is an image correlation between the original and target images: when the original image is a low-resolution image, the target image is its corresponding high-resolution image; when the original image is a grayscale image, the target image is its corresponding RGB image; when the original image is a small-sized image, the target image is its corresponding large-sized image; when the original image is a sitting image of an animal, the target image could be a standing or lying image of the animal. Noise addition refers to adding Gaussian noise to an image. Adding Gaussian noise to the target image yields a noisy image. It should be noted that the intensity of noise addition to the target image varies, resulting in different noisy images. For example, when adding noise to an image of the character "S", a low level of noise addition results in a noisy image with a blurred "S" outline; a high level of noise addition results in a noisy image where the "S" outline is indistinguishable.

[0077] Therefore, to improve the accuracy of image processing, a certain number of image sample pairs for model training need to be determined in advance according to the image processing requirements before training the image processing model. During the training of the image processing model, Gaussian noise is added to the target image in the image sample pair, that is, the target image is subjected to noise processing, and the noise image corresponding to the target image is determined based on the noise processing result.

[0078] Furthermore, when adding noise to the target image, considering the different intensities of noise addition, multiple noisy images with varying degrees of noise will be obtained. That is, as the noise addition intensity increases, the noise level of the target image also continuously increases. Adding noise to the target image can obtain a sequence of noisy images with continuously increasing noise levels. To avoid the randomness of model training, noisy images can be randomly selected from the noisy image sequence. The specific implementation is as follows:

[0079] The target image in the image sample pair is denoised according to a preset denoising strategy to obtain a noisy image sequence; the first and second noisy images with an adjacent relationship are selected from the noisy image sequence as the noisy images.

[0080] Specifically, the noise-adding strategy refers to different noise-adding methods used for different target images in different image processing scenarios. In scenarios where noise-adding processing is performed on a high-resolution image to obtain a low-resolution image, the purpose of noise-adding is to reduce the image resolution. In scenarios where noise-adding processing is performed on an RGB image to obtain a grayscale image, the purpose of noise-adding is to perform grayscale processing on the RGB image. Correspondingly, the noise image sequence is an image sequence composed of multiple noise images obtained by noise-adding processing on the target image. In the noise image sequence, the noise images are arranged according to the degree of noise addition. Accordingly, the first noise image and the second noise image are any two adjacent noise images in the noise image sequence. That is, the first noise image is any noise image in the noise image sequence, and the second noise image sequence is the noise image that is adjacent to the first noise image. If the first noise image is the t-th noise image in the noise image sequence, then the second noise image is the (t+1)-th noise image.

[0081] Based on this, denoising the target image in an image sample pair according to a preset denoising strategy can be achieved in several ways. When denoising the target image, it can be done by performing denoising once to obtain a denoised result, and then performing denoising again based on the denoised result, thus sequentially denoising the target image to obtain a noise image sequence. Alternatively, multiple denoising operations can be performed on the target image, with each denoising operation yielding a denoised image, resulting in a noise image sequence. Each noise image in the noise image sequence corresponds to a different denoising intensity. The multiple noise images obtained form the noise image sequence, arranged sequentially according to the degree of noise addition. That is, the order of the noise images in the noise image sequence represents the denoising intensity of the noise images. In the noise image sequence, a first noise image and a second noise image with an adjacent relationship are selected as the noise images. When selecting noise images, any noise image in the noise image sequence can be chosen as the first noise image, and then the noise image adjacent to the first noise image in the noise image sequence is determined as the second noise image. Here, "adjacent" can mean either left or right adjacent to the first noise image.

[0082] In practical applications, when adding noise to a target image, the types of noise added include, but are not limited to, Gaussian noise, salt-and-pepper noise, and Poisson noise. The specific type of noise to add depends on the actual needs. Gaussian noise adds noise that follows a Gaussian distribution, and the degree of noise can be controlled by adjusting the standard deviation of the Gaussian distribution. Salt-and-pepper noise adds black and white noise points to the image; the "pepper" refers to black noise points (0,0,0) and the "salt" refers to white noise points (255,255,255). The proportion of noise added is controlled by setting parameter values; higher values ​​add more noise and cause more severe image damage. Methods for adding noise include, but are not limited to, using built-in functions provided by OpenCV and methods from MATLAB, and the choice depends on the specific requirements.

[0083] For example, in a scenario where characters composed of dots are generated from a raster image, pre-prepared image sample pairs are used for model training, such as... Figure 3 As shown in (a), the target image "S" is composed of multiple "points," while the original image corresponding to the target image is an irregularly arranged set of "points." An image sample pair consists of a target image and an original image. Using a set number of image sample pairs as training samples, an image processing model is trained, enabling the model to generate the target image "S" after the original image is input. Therefore, after obtaining the image sample pair, the target image is first denoised based on the diffusion process in the diffusion generation model. When denoising the target image "S" according to the denoising strategy, denoising can be applied to each point that makes up the target image "S," resulting in an image sample pair. Figure 3 As shown in Figure (b), the noise image sequence exhibits varying degrees of noise addition in each image. With increasing noise, the outline of the "S" becomes increasingly blurred until it becomes completely indistinguishable. Two adjacent images are randomly selected from the noise image sequence as noise images. In this embodiment, the third image generated based on the target image is chosen as the first noise image, and its adjacent image is the second noise image. The first and second noise images together form the noise image corresponding to the target image "S".

[0084] In practical applications, noise addition strategies are used to add redundant features to images within a given application scenario. This involves gradually transforming the original image data corresponding to the target image into Gaussian-distributed image data by incorporating redundant features. When the noise addition strategy adjusts the image resolution, it can add noise to a high-resolution image to obtain a lower-resolution image; or when the strategy adjusts the image color, it can add noise to an RGB image to obtain a grayscale image. After obtaining a noisy image sequence, it is used to select noisy images from the sequence for further processing.

[0085] In summary, by arbitrarily selecting two adjacent first and second noisy images from a noisy image sequence as the noise images, and then using these noise images for subsequent model training, the randomness of model training is avoided, and the richness of the training samples is improved.

[0086] Furthermore, when adding noise to the target image, considering that different levels of noise will result in different noise images, the number of noise addition processes can be preset. Each noise addition process is based on the noise image obtained in the previous process, thus obtaining a noise image sequence. The specific implementation is as follows:

[0087] The number of noise addition processes n is determined according to the preset noise addition strategy; the target image in the image sample pair is subjected to the i-th noise addition process to obtain the i-th noise image, where i starts from 1 and i and n are both positive integers; it is determined whether i is equal to n; if not, i is incremented by 1, the i-th noise image is used as the target image, and the step of performing the i-th noise addition process on the target image in the image sample pair to obtain the i-th noise image is executed; if yes, the n noise images obtained by the n noise addition processes are composed of a noise image sequence.

[0088] Specifically, the number of noise addition processes refers to the preset number of times noise is added to the target image. Each noise addition process yields a noisy image. After performing noise addition processing on the target object once to obtain a noisy image, the obtained noisy image is used as the target image to continue noise addition processing, and so on, until the preset number of noise addition processes is reached. Each noise addition process yields a noisy image. After completing n noise addition processes, a sequence of n noisy images is obtained.

[0089] Based on this, when adding noise to a target image, in scenarios where noise needs to be added to the target image first, and then the next noise addition is performed based on the noise addition result—that is, in a scenario where noise is added sequentially to the target image to determine the noise image sequence—the preset noise addition strategy can be determined as adding noise to the target image sequentially. The number of noise addition operations, n, is then determined according to this strategy. The i-th noise addition operation is performed on the target image in the image sample pair to obtain the i-th noise image, where i starts from 1, and both i and n are positive integers. After obtaining the i-th noise image, it is determined whether i equals n, that is, whether the i-th noise image is the noise image obtained from the n-th noise addition operation. If the i-th noise image is not the noise image obtained from the n-th noise addition operation, i is incremented by 1, and the i-th noise image is used as the target image for the next noise addition operation. If the i-th noise image is the noise image obtained from the n-th noise addition operation, the noise addition operation is completed, and the n noise images obtained from the n noise addition operations form a noise image sequence.

[0090] In practical applications, besides setting the number of noise addition cycles and using an iterative noise addition method to add noise to the target image, one can also perform multiple noise addition cycles on the target image by changing the parameter values ​​corresponding to the noise addition level to obtain a noisy image sequence. By adjusting the noise parameters, the noise addition level can be gradually increased, thereby obtaining a noisy image sequence.

[0091] Continuing with the previous example, after adding noise to the target image "S", we obtain the following: Figure 3 In the process of the noise image sequence shown in (b), the number of times noise is added to the target image "S" can be preset. When the number of noise additions is 18, the number of noise addition processes n is 18. The first noise addition process is performed on the image sample "S" to obtain the first noise image. It is determined that the number of noise addition processes 1 is not equal to 18, so the number of noise addition processes is increased by one, that is, the second noise addition process is performed on the target image "S". At this time, the object of noise addition is the first noise image obtained by the first noise addition process. And so on. When the number of noise addition processes is equal to 18, it means that the noise addition process of the target image "S" has been completed. All the noise-added images obtained are arranged in the order of noise addition to form a noise image sequence.

[0092] In summary, by pre-setting the number of noise addition processes and using an iterative noise addition method to complete the noise addition process on the target image, n noise images corresponding to the pre-set number of noise addition processes n are obtained. The n noise images form a noise image sequence, which realizes the ability to pre-set the number of noise addition processes according to the needs of the noise image sequence, thereby improving the flexibility of the length of the noise image sequence.

[0093] Furthermore, considering that different training samples will result in different target image processing models, training samples can be selected according to actual image processing needs to complete model training. The specific implementation is as follows:

[0094] Determine the training task associated with the initial image processing model; select at least one initial image sample pair from a preset image sample set according to the training task; select an initial image sample pair that satisfies a preset image alignment relationship from the at least one initial image sample pair as the image sample pair.

[0095] Specifically, the training task refers to the model training task determined according to the prediction requirements of the model. The target image processing model obtained through model training can be used to predict the RGB image corresponding to the grayscale image based on the grayscale image, generate a higher resolution image based on a lower resolution image, and generate a person pose image of other poses related to the current person pose based on a specific person pose image. This embodiment does not exhaustively list the training tasks. The image sample set includes, but is not limited to, the image sample pairs corresponding to the above training tasks, i.e., grayscale image-RGB image, lower resolution image-higher resolution image, etc. The initial image sample pair refers to the image sample pair corresponding to the training task. In the initial image sample pair, the initial image sample pair that satisfies the preset image alignment relationship is selected as the image sample pair, that is, the original image and the target image with similar features are selected as an image sample pair.

[0096] Based on this, before adding noise to the target image in the image sample pair to obtain a noisy image, a training task associated with the initial image processing model is determined according to the usage requirements of the target image processing model. At least one initial image sample pair is selected from the pre-prepared image sample set according to the determined training task. After determining at least one initial image sample pair, the initial image sample pairs are screened, and initial image sample pairs that satisfy a preset image alignment relationship are selected as image sample pairs for model training.

[0097] In practical applications, considering the need to train target image processing models with different image processing capabilities in different scenarios, the selection of image sample pairs also requires choosing the appropriate pair for model training based on the application scenario of the target image processing model. Therefore, when the training task is to predict RGB images from grayscale images, the image sample pairs should be selected where the original image is grayscale and the target image is RGB. These image sample pairs satisfy the alignment relationship. However, if the original image in an image sample pair is grayscale and the target image has R = 1 and G and B = 0, then the alignment relationship is not satisfied. In other words, the alignment relationship of image sample pairs can be a feature contrast relationship between the original and target images, where the feature contrast is more obvious. That is, at least one initial image sample pair with high feature contrast should be selected as the image sample pair that satisfies the alignment relationship for subsequent model training.

[0098] Continuing with the previous example, when the training task is to generate an "S" image, to improve the accuracy of the trained model, suitable training samples are needed. The pre-prepared image sample set includes various types of image samples: samples for predicting the corresponding RGB image based on a grayscale image, samples for generating a higher-resolution image from a lower-resolution image, and samples for generating other poses related to a specific person's pose from a given pose image. Therefore, when selecting training samples, image sample pairs used for predicting arbitrary character images composed of noise images should be chosen as the initial image samples. In the scenario of generating the character "F", image samples related to the character "F" should be selected from the determined initial image samples as image sample pairs for model training, thereby improving the quality of the samples and the accuracy of the model's predictions.

[0099] In summary, before training the model, image samples are selected from the image sample set according to the determined training task, thereby improving the sample quality and thus improving the prediction accuracy of the model.

[0100] Step S204: Input the original image from the image sample pair into the initial image processing model for processing to obtain the initial image.

[0101] Specifically, after adding noise to the target image in the image sample pair to obtain a noise image corresponding to the target image, the restored image can be generated based on the noise image and the initial image obtained by inputting the original image into the initial image processing model. Here, the original image is the image corresponding to the target image in the image sample pair; the initial image processing model refers to an untrained deep learning model used to process images. Correspondingly, the initial image is the predicted image corresponding to the original image obtained by inputting the original image into the initial image processing model.

[0102] Based on this, the target image in the image sample pair is denoised to obtain a noise image corresponding to the target image. The original image corresponding to the target image in the image sample pair is input into an untrained initial image processing model for prediction to obtain an initial image corresponding to the original image. This facilitates the subsequent combination of the image features of the noise image and the image features of the initial image to generate a restored image based on the noise image and the initial image.

[0103] Following the previous example, as follows Figure 3In the image sample pair shown in (a), the original image consisting of "points" corresponding to the target image "S" is input into an untrained initial image processing model for prediction. Since the initial image processing model has not been trained, the character contours in the predicted initial image may be the character "O", the character "B", or it may be impossible to identify whether the predicted image is a character. This is to facilitate subsequent training of the initial image processing model based on the predicted initial image and the noisy image.

[0104] Step S206: Generate a restored image based on the noisy image and the initial image, wherein the original image and the restored image have the same attribute characteristics.

[0105] Specifically, in the above-mentioned image sample pair, the target image is denoised to obtain a noise image corresponding to the target image. The original image in the image sample pair is input into the initial image processing model for processing to obtain the initial image. Since the target image is denoised to obtain a noise image, and the original image is input into the initial image processing model to obtain the initial image, restoration processing can be performed based on the noise image and the initial image to restore the noise and obtain the restored image. The restored image and the original image have the same attribute characteristics.

[0106] In practical applications, attribute features include, but are not limited to, image color, sharpness, resolution, and size. When the original image is a grayscale image and the target image is an RGB image corresponding to the grayscale image, noise is added to the RGB image to obtain a noisy image. The noisy image still retains some RGB features. When the grayscale image is input into the initial image processing model for prediction, the obtained initial image is the prediction result of the initial image processing model. This prediction result usually differs significantly from the RGB image. Therefore, by denoising the noisy image and the initial image, a restored image with the same RGB features as the RGB image can be obtained.

[0107] Based on this, noise processing is performed on the target image in the image sample pair to obtain a noise image corresponding to the target image. The original image in the image sample pair is then input into the initial image processing model for processing. After obtaining the initial image, in order to train the initial image processing model based on the noise image and improve the accuracy of the model prediction, restoration processing can be performed based on the noise image and the initial image to restore the noise and obtain a restored image with the same attribute features as the original image. This facilitates subsequent training of the initial image processing model based on the restored image and the noise image, thereby obtaining a trained image processing model.

[0108] Following the previous example, after adding noise to the target image "S" to obtain a noisy image sequence, selecting a noisy image from the noisy image sequence, and using the initial image processing model to predict the original image to obtain the initial image, the selected noisy image and the initial image can be reverse-diffused according to the reverse diffusion process in the diffusion generation model. That is, the image containing noise is denoised to obtain a denoised image, making the denoised image closer to the noisy image.

[0109] Furthermore, after obtaining the noise image corresponding to the target image and generating the initial image based on the initial image processing model, the noise image and the initial image can be restored to obtain the restored image. The specific implementation is as follows:

[0110] In the noisy image sequence, the location information corresponding to the first noisy image is determined, and a noise parameter is determined based on the location information, wherein the noise parameter represents the degree of noise added to the first noisy image; the second noisy image and the initial image are restored based on the noise parameter to obtain a restored image.

[0111] Specifically, in a noisy image sequence, each noisy image corresponds to a sequence position in the noisy image sequence, and each noisy image corresponds to a positional information. Therefore, after determining the first noisy image, the positional information corresponding to the first noisy image can be determined according to the noisy image sequence. Correspondingly, the positional information of the first noisy image can represent the sequence position of the first noisy image in the noisy image sequence, and the sequence position is the noise parameter. Since the noisy images in the noisy image sequence are arranged according to the degree of noise addition, the noise parameter corresponding to the first noisy image can be determined after determining the first noisy image.

[0112] Based on this, after determining the noisy image, the first noisy image, the second noisy image, and the initial image, the positional information of the first noisy image in the noise image sequence can be determined according to its sequence position. Based on this positional information, noise parameters representing the degree of noise addition to the first noisy image can be determined. The second noisy image and the initial image are then restored using the noise parameters to obtain the restored image. This restoration process can employ the inverse diffusion concept from the diffusion generation model, allowing inverse diffusion processing based on the noise parameters to achieve the restored image.

[0113] Following the previous example, noise is added to the target image "S" with 18 noise additions, resulting in a sequence of 18 noise images. When the third image in the noise image sequence is selected as the first noise image, the position "3" of the first noise image in the noise image sequence is the noise parameter, which represents the degree of noise addition to the target image "S". Then, based on the determined noise parameter 3, the image at position "4" in the noise image sequence and the initial image obtained by the initial image processing model are used to restore the original image.

[0114] In summary, the noise parameter is used to represent the degree of noise added to the first noisy image. After determining the noise parameter, the second noisy image, and the initial image, the restoration process is performed using the degree of noise added to the image as a parameter. This can obtain a restored image that is similar to the features of the target image, thereby improving the similarity between the restored image and the target image.

[0115] Furthermore, when performing restoration processing on the second noisy image and the initial image based on noise parameters to obtain the restored image, considering that the initial image and the second noisy image have different image noise characteristics, when performing restoration processing on the second noisy image and the initial image based on noise parameters to obtain the restored image, the initial image can be denoised based on the image noise characteristics to obtain the restored image. The specific implementation is as follows:

[0116] Based on the second noisy image and the noise parameters, determine the image noise features corresponding to the second noisy image; perform denoising processing on the initial image based on the image noise features to obtain the restored image.

[0117] Specifically, image noise features include, but are not limited to, the type of noise and the degree of noise addition. Since the second noisy image is a noisy image in the sequence of noisy images obtained after adding noise to the target image, when adding noise to the color of the target image, the image noise features corresponding to the second noisy image can represent the color noise features corresponding to the second noisy image; when adding noise to the resolution of the target image, the image noise features corresponding to the second noisy image can represent the resolution noise features corresponding to the second noisy image.

[0118] Based on this, the image noise features corresponding to the second noise image are determined according to the second noise image and the noise parameters determined according to the position information corresponding to the first noise image. The initial image is then denoised using the image noise features corresponding to the second noise image to obtain the restored image. When determining the restored image, using the image noise features corresponding to the second noise image as a reference factor can improve the similarity between the generated restored image and the target image, thereby enabling better training of the initial image processing model. The denoising process can be achieved using the following formula (1):

[0119] Pθ(X t-1 |X t )=N(X t-1 ;uθ(X t ,t),∑(X t ,t)) (1)

[0120] Among them, X t Let X represent any noisy image in a sequence of noisy images. t-1 Indicates with X t Adjacent noisy images, Pθ(X) t-1 |X t N(X) represents an approximate function of the reverse diffusion process. t-1 ;uθ(X t ,t),∑θ(X t ,t)) represents a random Gaussian distribution.

[0121] In practical applications, corresponding to noise reduction processing, in this embodiment, when denoising the initial image, the image denoising methods include, but are not limited to, mean filtering, median filtering, and Gaussian filtering. Mean filtering involves applying a template to the target pixel in the image, which includes its surrounding neighboring pixels (eight pixels surrounding the target pixel constitute a filtering template, including the target pixel itself), and then replacing the original pixel value with the average value of all pixels in the template. Median filtering uses a specified sliding window shape centered on the pixel as its neighborhood, sorts the pixels within the neighborhood, and assigns the median result to the pixels in that neighborhood. Gaussian filtering can use a two-dimensional discrete Gaussian function to remove noise, preserving more edge details. The specific denoising method chosen can be determined according to actual needs; this embodiment does not limit this selection.

[0122] Following the previous example, after determining the noise parameter 3 based on the position of the first noisy image in the noisy image sequence, the second noisy image adjacent to the first noisy image can be used for denoising, such as... Figure 3 As shown in (b), the first and second noise images obtained by adding noise to the target image "S" still retain noise features related to the contour of "S". By denoising the predicted image of the initial image processing model based on the noise features, an image more similar to the noise features of the target image can be obtained, thus achieving further denoising of the initial image.

[0123] In summary, using the image noise features corresponding to the second noisy image as a reference factor when determining the restored image can improve the similarity between the generated restored image and the target image, thereby enabling better training of the initial image processing model.

[0124] Step S208: Train the initial image processing model based on the restored image and the noisy image until a target image processing model that meets the training conditions is obtained, wherein the target image processing model is a machine learning model.

[0125] Specifically, after generating a restored image with the same attribute features as the original image based on the noisy image and the initial image, the parameters of the initial image processing model can be tuned based on the restored image and the noisy image to obtain an intermediate image processing model. Then, the intermediate image processing model is trained based on other image sample pairs in the image sample set until the training stopping condition is met, and the trained image processing model is obtained. The target image processing model is the trained image processing model. The target image processing model can be used to predict the image to be processed. The image processing model is a machine learning model that can generate images. This embodiment does not impose any limitations on the image processing model.

[0126] Based on this, after generating a restored image with the same attribute features as the original image from the noisy image and the initial image, the parameters of the initial image processing model can be tuned based on the restored image and the noisy image to obtain an intermediate image processing model. Then, the intermediate image processing model is trained based on other image sample pairs in the image sample set until the training stopping condition is met, and the trained image processing model is obtained, that is, the target image processing model that can meet the user's image processing needs.

[0127] Furthermore, when training the initial image processing model based on the restored image and the noisy image, considering that the restored image is obtained by restoring the initial image and the noisy image is obtained by adding noise to the target image, the distance between the noisy image and the restored image can be used as the loss value to train the initial image processing model. The specific implementation is as follows:

[0128] Calculate an initial loss value based on the first noisy image and the restored image; determine whether the initial loss value is greater than a loss value threshold; if so, adjust the parameters of the initial image processing model based on the initial loss value to obtain an intermediate image processing model, use the intermediate image processing model as the initial image processing model, select image sample pairs for the next model training cycle from the image sample set, and perform noise processing on the target image in the image sample pair to obtain a noisy image; if not, use the initial image processing model as the target image processing model that meets the training conditions.

[0129] Specifically, in this embodiment, the initial loss value refers to the difference between the first noisy image and the restored image. The initial loss value is used to represent the degree of difference or similarity between the first noisy image and the restored image. The loss value threshold is a pre-determined critical value for the calculated loss value. When the calculated initial loss value is greater than the loss value threshold, the closer the initial loss value is to the loss value threshold, the higher the similarity between the first noisy image and the restored image, that is, the lower the degree of difference. Conversely, the closer the initial loss value is to the loss value threshold, the lower the similarity between the first noisy image and the restored image, that is, the higher the degree of difference.

[0130] Based on this, after determining the first noisy image and the restored image, an initial loss value is calculated based on the first noisy image and the restored image. It is then determined whether the calculated initial loss value is greater than a loss value threshold. If the calculated initial loss value is greater than the loss value threshold, it indicates that the image processing capability of the initial image processing model does not meet the model's usage requirements. In this case, the initial image processing model is tuned based on the initial loss value to obtain an intermediate image processing model, which is then used as the initial image processing model. Image sample pairs for the next model training cycle are selected from the image sample set, and noise processing is continued on the target image in the image sample pair to obtain a noisy image. This process continues until the loss value calculated in one model training cycle is less than the loss value threshold. The image processing model corresponding to the loss value in this model training cycle is then the target image processing model. If the calculated initial loss value is less than or equal to the loss value threshold, it indicates that the image processing capability of the initial image processing model meets the model's usage requirements, and the initial image processing model is used as the target image processing model that meets the training conditions.

[0131] In practical applications, when training an initial image processing model, besides determining whether model training is complete by checking if the initial loss value exceeds a threshold, model training can also be performed by setting a pre-defined iteration count. A threshold for the number of iterations is set beforehand, and training ends when this threshold is reached. Alternatively, a validation method can be used to determine whether training can be terminated. Image sample pairs for model validation are prepared in advance, and the model's prediction accuracy is verified using the validation set during training. Training ends when the accuracy meets the model's requirements. Another method is to preset a training time; training is complete when the preset time is reached.

[0132] Following the previous example, after identifying the first noisy image in the noisy image sequence and further denoising the initial image to obtain an image similar to the "S" contour, the loss value is calculated based on the restored image similar to the "S" contour and the first noisy image. That is, the similarity between the restored image similar to the "S" contour and the first noisy image is judged. When the calculated loss value is 6, which is greater than the preset loss value "4", the initial image processing model is further tuned based on the calculated loss value of 6 to obtain the tuned image processing model. Then, image sample pairs are selected from the image sample set for the next training cycle, and the original image and target image in the image sample pairs are processed. The loss value calculated for this training cycle is calculated again, and the loss value is compared with the loss value threshold to determine whether further tuning is needed. When the calculated loss value is 3, which is less than the preset loss value threshold "4", the initial image processing model is the trained image processing model.

[0133] In summary, an initial loss value is calculated based on the first noisy image and the restored image. Then, if the initial loss value is greater than the loss value threshold, the parameters of the initial image processing model are tuned based on the initial loss value to complete the model training, thereby improving the robustness of the model.

[0134] Furthermore, when calculating the initial loss value based on the first noisy image and the restored image, since both the first noisy image and the restored image can be represented by image matrices, the initial loss value can be calculated by calculating the distance matrix between the first noisy image matrix corresponding to the first noisy image and the noise image matrix corresponding to the noise image. The specific implementation is as follows:

[0135] Determine the first noise image matrix corresponding to the first noise image, and determine the restored image matrix corresponding to the restored image; calculate the distance matrix between the first noise image matrix and the restored image matrix, and use the distance matrix as the initial loss value.

[0136] Specifically, the first noisy image matrix is ​​the representation of the first noisy image in the computer. In the computer, graphics are represented in the form of matrices or vectors. Correspondingly, the restored image matrix is ​​the matrix representation of the restored image in the computer. The distance matrix is ​​the matrix obtained by calculating the Euclidean distance between the first noisy image matrix and the restored image matrix, and is used to represent the Euclidean distance between the first noisy image matrix and the restored image matrix.

[0137] Therefore, when calculating the initial loss value based on the first noisy image and the restored image, since both the first noisy image and the restored image can be represented by image matrices, the initial loss value can be calculated by calculating the distance matrix between the first noisy image matrix corresponding to the first noisy image and the restored image matrix corresponding to the restored image. After determining the first noisy image and the restored image, the first noisy image matrix corresponding to the first noisy image and the restored image matrix corresponding to the first noisy image are determined. The distance matrix between the first noisy image matrix and the restored image matrix is ​​calculated, and this distance matrix is ​​used as the initial loss value. This facilitates subsequent training of the initial image processing model based on the initial loss value.

[0138] Following the previous example, when calculating the loss value based on the first noisy image and the restored image, the loss value corresponding to the first noisy image and the restored image is calculated by calculating the distance between the matrices corresponding to the images. The first noisy image is represented in the form of a 3x4 matrix, and the restored image is also represented in the form of a 3x4 matrix. The Euclidean distance between the matrix of the restored image and the matrix of the first noisy image is calculated to obtain the distance matrix representing the loss value. The initial image processing model is trained using the distance matrix as the loss value.

[0139] In summary, by representing all images in matrix form, it is easier to calculate the distance matrix between the first noisy image matrix and the noisy image matrix, and then determine the initial loss value based on the distance matrix.

[0140] Furthermore, after obtaining the target image processing model that meets the training conditions, in order to test the prediction accuracy of the target image processing model and determine whether the prediction effect of the target image processing model meets expectations, an image validation set can be pre-defined. Based on the validation image sample pairs in the image validation set, the image prediction effect of the target image processing model can be tested. The specific implementation is as follows:

[0141] Extract verification image sample pairs from the image verification set; input the original verification image from the verification image sample pair into the target image processing model for processing to obtain the prediction image; compare the target verification image from the verification image sample pair with the prediction image, and determine the prediction accuracy information of the target image processing model based on the comparison result.

[0142] Specifically, the image validation set refers to a sample set consisting of image sample pairs used to verify the prediction accuracy of the model and to test the prediction effect of the model. The image validation set includes multiple validation image sample pairs, each of which includes an original validation image and a target validation image. There is a correspondence between the original validation image and the target validation image, that is, when the target validation image is an RGB image, the original validation image is a grayscale image corresponding to the RGB image. The prediction image is the prediction image obtained by inputting the original validation image into the target image processing model. Correspondingly, the prediction accuracy information can be determined by calculating the similarity between the prediction image and the target validation image.

[0143] Based on this, after training the initial image processing model to obtain the target image processing model, the prediction accuracy of the target image processing model can be tested based on an image validation set to determine whether the prediction effect of the target image processing model meets expectations. Validation image sample pairs for model validation are extracted from the image validation set. The original validation images from the validation image sample pairs are then input into the target image processing model for processing to obtain the predicted images. The target verification image and the predicted image in the verification image sample pair are compared to calculate the similarity or matrix distance between them. Based on the calculated comparison results, the prediction accuracy information of the target image processing model is determined. The prediction accuracy information reflects the prediction accuracy of the target image processing model for the image to be processed at the current stage. When the prediction accuracy of the target image processing model does not meet the prediction accuracy requirements, it indicates that the current model training stage has high requirements for the prediction accuracy of the target image processing model. Therefore, further parameter tuning and training of the target image processing model are needed so that the trained model can meet the prediction accuracy requirements and thus provide image prediction services. Therefore, in the next model training cycle, the target image processing model can be further tuned and trained with new image sample pairs until the calculated prediction accuracy meets the accuracy requirements. The image processing model obtained at this time is the image processing model that meets the user's prediction task requirements.

[0144] In practical applications, considering the richness of application scenarios, the prediction task complexity of image processing models gradually increases over time. Therefore, image processing models trained in the initial model training phase may not meet the needs of complex image prediction scenarios. Thus, the image processing model can be validated at fixed intervals using an image validation set to monitor its prediction accuracy. Then, when the prediction accuracy of the image processing model decreases, new image sample pairs are selected to continue training the model to meet complex image prediction requirements.

[0145] Following the previous example, after obtaining the trained target image processing model, before putting the model into use, in order to test the prediction performance of the trained model, a validation set of images is prepared in advance for model validation, such as... Figure 3 As described in section (c), the bitmap image is used as the input to the model to obtain the model's output. The target image processing model performs predictions step-by-step on the input bitmap image, ultimately obtaining a prediction result corresponding to the input bitmap image. The model's prediction result is compared with the corresponding target image in the image validation set to calculate the similarity. Based on the similarity, the prediction accuracy of the target image processing model is determined, thereby judging whether the target image processing model can be used.

[0146] In summary, a noisy image is obtained by adding noise to the target image in an image sample pair; the original image in the image sample pair is then input into an initial image processing model for processing to obtain an initial image; a restored image is generated based on the noisy image and the initial image, where the original and restored images have the same attribute features; the initial image processing model is trained using the restored image and the noisy image until a target image processing model that meets the training conditions is obtained. The restored image is indirectly obtained through the processing of the initial image processing model, while the noisy image is obtained by adding noise to the target image. When the initial image processing model is trained using the restored image and the noisy image, it can learn new image features related to the noisy image. This allows the initial image processing model to gradually incorporate image features from different noisy images during the training process, effectively improving the stability of model training, increasing the prediction accuracy of the model, and meeting the actual image processing needs of users.

[0147] The following is in conjunction with the appendix Figure 4 Taking the image processing model training method provided in this specification as an example in image generation, the image processing model training method will be further explained. Among other things, Figure 4 The present specification illustrates a flowchart of an image processing model training method according to an embodiment, which includes the following steps.

[0148] Step S402: Determine the training task associated with the initial image processing model.

[0149] An initial image processing model is constructed based on the requirements for image processing. When the initial image processing model is used to predict RGB images (color images) based on grayscale images, the training task is to make predictions based on grayscale images and their corresponding RGB images, so that the prediction results are close to the RGB images corresponding to the grayscale images.

[0150] Step S404: Select image sample pairs from the preset image sample set according to the training task.

[0151] Based on the training task of predicting the RGB images corresponding to the grayscale images, image sample pairs are selected from a pre-prepared image sample set. Each image sample pair contains an original image and a target image. The original image is a grayscale image, and the corresponding target image is an RGB image. The original image in the image sample pair can be a grayscale image of an object, and the corresponding target image is the RGB image of the object corresponding to its grayscale image. The objects in the images include, but are not limited to, people, objects, landscapes, and irregular shapes.

[0152] Step S406: Add noise to the target image in the image sample pair to obtain a noisy image sequence.

[0153] Based on the diffusion process in the diffusion generation model, noise is added to the selected RGB image of an animal, resulting in a noisy image sequence consisting of n images with added Gaussian noise. The degree of noise added to each image in the noisy image sequence varies. The noisy images are arranged in ascending order of noise level. As noise is gradually added, the outline of the animal becomes blurred, and its color gradually becomes grayscale.

[0154] Step S408: Select the first and second noise images with an adjacent relationship from the noise image sequence as noise images.

[0155] In a sequence of n noisy images, the t-th noisy image is selected as the first noisy image, and the (t+1)-th noisy image is selected as the second noisy image. The first and second noisy images are adjacent to each other. The first and second noisy images are used as the noise images corresponding to the target image "animal".

[0156] Step S410: Input the original image from the image sample pair into the initial image processing model for processing to obtain the initial image.

[0157] Using an initial image processing model to predict the color of an animal in a grayscale image may result in inaccurate color predictions in the initial image, leading to color prediction errors.

[0158] Step S412: Determine the location information corresponding to the first noise image in the noise image sequence, and determine the noise parameters based on the location information.

[0159] The noise parameter "t" is determined based on the t-th noise image in the noise image sequence. The noise parameter represents the degree of noise added to the first noise image.

[0160] Step S414: Perform restoration processing on the second noisy image and the initial image according to the noise parameters to obtain the restored image.

[0161] The second noisy image and the initial image are denoised based on the inverse diffusion process in the diffusion generation model. That is, the second noisy image and the initial image are processed according to the inverse diffusion idea to obtain the denoised restored image. The restored image has the same color features as the original "animal" image.

[0162] Step S416: Calculate the initial loss value based on the first noisy image and the restored image.

[0163] The matrix representation of the first noisy image and the matrix representation of the restored image are determined based on the first noisy image. The Euclidean distance between the matrix representations of the first noisy image and the restored image is calculated. The calculated Euclidean distance is used as the loss value and substituted into the initial image processing model to train the model.

[0164] Step S418: Determine whether the initial loss value is greater than the loss value threshold. If yes, proceed to step S420; otherwise, proceed to step S422.

[0165] A preset loss threshold is used. After calculating the loss value between the first noisy image and the restored image, it is determined whether the calculated loss value is greater than the preset loss threshold. If the calculated loss value is greater than the preset loss threshold, it means that the similarity between the RGB image of the "animal" predicted by the initial image processing model and the RGB image in the image sample pair is low, and the initial image processing model needs to be trained again. If the calculated loss value is less than or equal to the preset loss threshold, it means that the similarity between the RGB image of the "animal" predicted by the initial image processing model and the RGB image in the image sample pair is high, the prediction ability of the initial image processing model meets the requirements, and it can be used for actual image processing.

[0166] Step S420: Adjust the parameters of the initial image processing model based on the initial loss value to obtain an intermediate image processing model. Use the intermediate image processing model as the initial image processing model. Select image sample pairs for the next model training cycle from the image sample set and execute step S406.

[0167] The parameters in the initial image processing model are adjusted based on the calculated loss value to obtain an intermediate image processing model with adjusted parameters. Image sample pairs corresponding to the training cycle of this model are selected from the image sample set, that is, other "animal" images or "plant" images are selected as training samples for model training.

[0168] Step S422: Use the initial image processing model as the target image processing model that meets the training conditions.

[0169] Step S424: Obtain the image to be processed.

[0170] Once the target image processing model for generating RGB images corresponding to grayscale images has been trained, it can be put into use, or it can be tested first before being put into use. Prepare an "animal" image as the image to be processed and input it into the target image processing model.

[0171] Step S426: Input the image to be processed into the target image processing model to obtain the image processing result output by the target image processing model corresponding to the image to be processed.

[0172] The image to be processed is input into the target image processing model for prediction, and the RGB image predicted by the model is obtained. Based on the predicted RGB image, it is determined whether the processing capability of the target image processing model meets the prediction requirements.

[0173] In summary, a noisy image is obtained by adding noise to the target image in an image sample pair; the original image in the image sample pair is then input into an initial image processing model for processing to obtain an initial image; a restored image is generated based on the noisy image and the initial image, where the original and restored images have the same attribute features; the initial image processing model is trained using the restored image and the noisy image until a target image processing model that meets the training conditions is obtained. The restored image is indirectly obtained through the processing of the initial image processing model, while the noisy image is obtained by adding noise to the target image. When the initial image processing model is trained using the restored image and the noisy image, it can learn new image features related to the noisy image. This allows the initial image processing model to gradually incorporate image features from different noisy images during the training process, effectively improving the stability of model training, increasing the prediction accuracy of the model, and meeting the actual image processing needs of users.

[0174] Corresponding to the above method embodiments, this specification also provides embodiments of an image processing model training device. Figure 5 A schematic diagram of an image processing model training apparatus according to one embodiment of this specification is shown. Figure 5 As shown, the device includes:

[0175] The noise-adding module 502 is configured to add noise to the target image in the image sample pair to obtain a noisy image;

[0176] Processing module 504 is configured to input the original image from the image sample pair into an initial image processing model for processing to obtain an initial image;

[0177] The generation module 506 is configured to generate a restored image based on the noisy image and the initial image, wherein the original image and the restored image have the same attribute characteristics;

[0178] The training module 508 is configured to train the initial image processing model based on the restored image and the noisy image until a target image processing model that meets the training conditions is obtained, wherein the target image processing model is a machine learning model.

[0179] In an optional embodiment, the noise-adding module 502 is further configured to:

[0180] The target image in the image sample pair is denoised according to a preset denoising strategy to obtain a noisy image sequence; the first and second noisy images with an adjacent relationship are selected from the noisy image sequence as the noisy images.

[0181] In an optional embodiment, the noise-adding module 502 is further configured to:

[0182] The number of noise addition processes n is determined according to the preset noise addition strategy; the target image in the image sample pair is subjected to the i-th noise addition process to obtain the i-th noise image, where i starts from 1 and i and n are both positive integers; it is determined whether i is equal to n; if not, i is incremented by 1, the i-th noise image is used as the target image, and the step of performing the i-th noise addition process on the target image in the image sample pair to obtain the i-th noise image is executed; if yes, the n noise images obtained by the n noise addition processes are composed of a noise image sequence.

[0183] In an optional embodiment, the generation module 506 is further configured to:

[0184] In the noisy image sequence, the location information corresponding to the first noisy image is determined, and a noise parameter is determined based on the location information, wherein the noise parameter represents the degree of noise added to the first noisy image; the second noisy image and the initial image are restored based on the noise parameter to obtain a restored image.

[0185] In an optional embodiment, the generation module 506 is further configured to:

[0186] Based on the second noisy image and the noise parameters, determine the image noise features corresponding to the second noisy image; perform denoising processing on the initial image based on the image noise features to obtain the restored image.

[0187] In an optional embodiment, the training module 508 is further configured to:

[0188] Calculate an initial loss value based on the first noisy image and the restored image; determine whether the initial loss value is greater than a loss value threshold; if so, adjust the parameters of the initial image processing model based on the initial loss value to obtain an intermediate image processing model, use the intermediate image processing model as the initial image processing model, select image sample pairs for the next model training cycle from the image sample set, and perform noise processing on the target image in the image sample pair to obtain a noisy image; if not, use the initial image processing model as the target image processing model that meets the training conditions.

[0189] In an optional embodiment, the training module 508 is further configured to:

[0190] Determine the first noise image matrix corresponding to the first noise image, and determine the restored image matrix corresponding to the restored image; calculate the distance matrix between the first noise image matrix and the restored image matrix, and use the distance matrix as the initial loss value.

[0191] In an optional embodiment, the noise-adding module 502 is further configured to:

[0192] Determine the training task associated with the initial image processing model; select at least one initial image sample pair from a preset image sample set according to the training task; select an initial image sample pair that satisfies a preset image alignment relationship from the at least one initial image sample pair as the image sample pair.

[0193] In an optional embodiment, the training module 508 is further configured to:

[0194] Extract verification image sample pairs from the image verification set; input the original verification image from the verification image sample pair into the target image processing model for processing to obtain the prediction image; compare the target verification image from the verification image sample pair with the prediction image, and determine the prediction accuracy information of the target image processing model based on the comparison result.

[0195] This specification provides an image processing model training apparatus in one embodiment. The apparatus obtains a noisy image by adding noise to the target image in an image sample pair; it then inputs the original image from the image sample pair into an initial image processing model for processing to obtain an initial image; a restored image is generated based on the noisy image and the initial image, wherein the original image and the restored image have the same attribute features; the initial image processing model is trained based on the restored image and the noisy image until a target image processing model that meets the training conditions is obtained. The restored image is indirectly obtained through the processing of the initial image processing model, while the noisy image is obtained by adding noise to the target image. When the initial image processing model is trained based on the restored image and the noisy image, it learns new image features related to the noisy image. This allows the initial image processing model to gradually incorporate image features from different noisy images during training, effectively improving the stability of model training, increasing the model's prediction accuracy, and meeting the user's actual image processing needs.

[0196] See Figure 6 , Figure 6 A flowchart of an image processing model training method according to an embodiment of this specification is shown, which specifically includes the following steps.

[0197] Step S602: Receive the model training request submitted by the user;

[0198] Step S604: According to the model training request, the target image in the image sample pair is subjected to noise processing to obtain a noisy image;

[0199] Step S606: Input the original image from the image sample pair into the initial image processing model for processing to obtain the initial image;

[0200] Step S608: Generate a restored image based on the noisy image and the initial image, wherein the original image and the restored image have the same attribute characteristics;

[0201] Step S610: Train the initial image processing model based on the restored image and the noisy image until a target image processing model that meets the training conditions is obtained, and send it to the user.

[0202] When a user requests model training, they submit a training request to the server. This request includes information about the model's purpose and prediction accuracy. During training, the server receives the request and determines image sample pairs for training based on a pre-stored image sample set and the user's training requirements. The server then processes the original and target images in each pair. For the target image, a noise-adding method based on a diffusion generation model is used to add noise, resulting in a corresponding noise image. The original image is then input into an initial image processing model to obtain the initial image. The initial and noise images are then restored using a reverse diffusion process provided by the diffusion generation model. The restored image is then trained using the restored and noise images to obtain the trained image processing model, i.e., the target image processing model. This target image processing model is the training result, which is then fed back to the user. The training result can be the model parameters or a link to the target image processing model's storage address, allowing the user to access the model by clicking the link.

[0203] In other words, during model training, the original image from the image sample pair is input into the initial image processing model for prediction to obtain the initial image. Noise is added to the target image corresponding to the original image based on the diffusion idea in the diffusion generation model. Noise is added to the image based on the inverse diffusion idea in the diffusion generation model. The initial image predicted by the initial image processing model is restored to obtain the restored image. The model is then trained based on the restored image and the noisy image, so that the initial image processing model can learn the noise changes in the image and improve the accuracy of model training.

[0204] The image processing model training method provided in this specification involves: First, adding noise to the target image in an image sample pair to obtain a noisy image. Then, inputting the original image from the image sample pair into an initial image processing model to obtain an initial image. Next, generating a restored image based on the noisy image and the initial image, where the original and restored images share the same attribute features. Finally, training the initial image processing model using the restored image and the noisy image continues until a target image processing model that meets the training conditions is obtained. The restored image is indirectly obtained through the processing of the initial image processing model, while the noisy image is obtained by adding noise to the target image. Training the initial image processing model using the restored image and the noisy image allows the model to learn new image features related to the noisy image. This enables the initial image processing model to gradually incorporate image features from different noisy images during training, effectively improving the stability of model training, increasing the model's prediction accuracy, and meeting the user's actual image processing needs.

[0205] Corresponding to the above method embodiments, this specification also provides embodiments of an image processing model training device. Figure 7 A schematic diagram of an image processing model training apparatus according to one embodiment of this specification is shown. Figure 7 As shown, the device includes:

[0206] The request receiving module 702 is configured to receive model training requests submitted by users.

[0207] The noise processing module 704 is configured to perform noise processing on the target image in the image sample pair according to the model training request to obtain a noisy image.

[0208] The model processing module 706 is configured to input the original image from the image sample pair into the initial image processing model for processing to obtain the initial image;

[0209] The restoration processing module 708 is configured to generate a restored image based on the noisy image and the initial image, wherein the original image and the restored image have the same attribute characteristics;

[0210] The model training module 710 is configured to train the initial image processing model based on the restored image and the noisy image until a target image processing model that meets the training conditions is obtained, and then send it to the user.

[0211] The image processing model training device provided in this specification obtains a noisy image by adding noise to the target image in an image sample pair; the original image in the image sample pair is input into an initial image processing model for processing to obtain an initial image; a restored image is generated based on the noisy image and the initial image, wherein the original image and the restored image have the same attribute features; the initial image processing model is trained based on the restored image and the noisy image until a target image processing model that meets the training conditions is obtained. The restored image is indirectly obtained through the processing of the initial image processing model, while the noisy image is obtained by adding noise to the target image. When the initial image processing model is trained based on the restored image and the noisy image, it can learn new image features related to the noisy image. This allows the initial image processing model to gradually introduce image features of different noisy images during the training process, which can effectively improve the stability of model training, improve the prediction accuracy of the model, and meet the user's actual image processing needs.

[0212] See Figure 8 , Figure 8 A flowchart of an image processing model training method according to an embodiment of this specification is shown, which specifically includes the following steps.

[0213] Step S802: Receive image sample pairs uploaded by the user through the model training interactive interface for the model training task;

[0214] Step S804: Add noise to the target image in the image sample pair to obtain a noisy image;

[0215] Step S806: Input the original image from the image sample pair into the initial image processing model for processing to obtain the initial image;

[0216] Step S808: Generate a restored image based on the noisy image and the initial image, wherein the original image and the restored image have the same attribute characteristics;

[0217] Step S810: Train the initial image processing model based on the restored image and the noisy image until a target image processing model that meets the training conditions is obtained, and display the training results through the model training interactive interface.

[0218] When a user has image processing needs, a trained image processing model can be obtained through model training for image processing. The user uploads pre-prepared image sample pairs related to the task requirements via the model training interface. During model training, after receiving the uploaded image sample pairs, the server determines the image processing model based on the user's training requirements and begins training. The original image and the target image in the image sample pair are processed separately. For the target image, noise is added using a noise-adding method provided by the diffusion generation model to obtain a noise image corresponding to the target image. The original image is then input into the initial image processing model to obtain the initial image. The initial image and the noise image are then restored using the inverse diffusion process provided by the diffusion generation model to obtain the restored image. The model is then trained based on the restored image and the noise image to obtain the trained image processing model, i.e., the target image processing model. The target image processing model is the training result, which is displayed to the user through the model training interface. It should be noted that the training results can be a storage address in the form of a link to the corresponding target image processing model. Users can click the link to jump to the corresponding page to download the target image processing model, or it can be the trained target image processing model. This embodiment does not limit this in any way.

[0219] The image processing model training method provided in this specification involves: First, adding noise to the target image in an image sample pair to obtain a noisy image. Then, inputting the original image from the image sample pair into an initial image processing model to obtain an initial image. Next, generating a restored image based on the noisy image and the initial image, where the original and restored images share the same attribute features. Finally, training the initial image processing model using the restored image and the noisy image continues until a target image processing model that meets the training conditions is obtained. The restored image is indirectly obtained through the processing of the initial image processing model, while the noisy image is obtained by adding noise to the target image. Training the initial image processing model using the restored image and the noisy image allows the model to learn new image features related to the noisy image. This enables the initial image processing model to gradually incorporate image features from different noisy images during training, effectively improving the stability of model training, increasing the model's prediction accuracy, and meeting the user's actual image processing needs.

[0220] Corresponding to the above method embodiments, this specification also provides embodiments of an image processing model training device. Figure 9 A schematic diagram of an image processing model training apparatus according to one embodiment of this specification is shown. Figure 9 As shown, the device includes:

[0221] The image upload module 902 is configured to receive image sample pairs uploaded by the user through the model training interactive interface for the model training task.

[0222] The image noise-adding module 904 is configured to add noise to the target image in the image sample pair to obtain a noisy image;

[0223] The image input module 906 is configured to input the original image from the image sample pair into the initial image processing model for processing to obtain the initial image;

[0224] Image restoration module 908 is configured to generate a restored image based on the noisy image and the initial image, wherein the original image and the restored image have the same attribute characteristics;

[0225] The result display module 910 is configured to train the initial image processing model based on the restored image and the noisy image until a target image processing model that meets the training conditions is obtained, and to display the training results through the model training interactive interface.

[0226] The image processing model training device provided in this specification obtains a noisy image by adding noise to the target image in an image sample pair; the original image in the image sample pair is input into an initial image processing model for processing to obtain an initial image; a restored image is generated based on the noisy image and the initial image, wherein the original image and the restored image have the same attribute features; the initial image processing model is trained based on the restored image and the noisy image until a target image processing model that meets the training conditions is obtained. The restored image is indirectly obtained through the processing of the initial image processing model, while the noisy image is obtained by adding noise to the target image. When the initial image processing model is trained based on the restored image and the noisy image, it can learn new image features related to the noisy image. This allows the initial image processing model to gradually introduce image features of different noisy images during the training process, which can effectively improve the stability of model training, improve the prediction accuracy of the model, and meet the user's actual image processing needs.

[0227] The above is a schematic scheme of the image processing model training device of this embodiment. It should be noted that the technical solution of this image processing model training device and the technical solution of the image processing model training method described above belong to the same concept. For details not described in detail in the technical solution of the image processing model training device, please refer to the description of the technical solution of the image processing model training method described above.

[0228] See Figure 10 , Figure 10 A flowchart of an image processing method according to an embodiment of this specification is shown, which specifically includes the following steps.

[0229] Step S1002: Obtain the image to be processed;

[0230] Step S1004: Input the image to be processed into the target image processing model to obtain the image processing result output by the target image processing model corresponding to the image to be processed.

[0231] Specifically, the image to be processed refers to the image directly input into the target image processing model for image processing. The image to be processed can be different depending on the task scenario. The target image processing model can be used to predict the corresponding RGB image based on a grayscale image, generate a higher-resolution image from a lower-resolution image, or generate images of other poses related to a specific person's pose from a specific person's pose image; correspondingly, the image processing result is the predicted image output by the target image processing model, corresponding to the image to be processed.

[0232] Based on this, the image to be processed is determined, and the image to be processed is input into the target image processing model obtained through training for prediction, so as to obtain the predicted image corresponding to the image to be processed output by the target image processing model.

[0233] For example, when a target image processing model is used to convert a low-resolution image into a high-resolution image, that is, to improve the image clarity, a low-resolution group photo of people is input into the target image processing model for prediction. The model then predicts a high-resolution group photo of people corresponding to the low-resolution group photo, thereby improving the image clarity.

[0234] In summary, processing original images using model prediction methods to obtain predicted images that meet user needs improves the user experience. Inputting the image to be processed into a target image processing model that meets user requirements for prediction can yield a satisfactory predicted image, thereby reducing the difficulty of image processing.

[0235] Corresponding to the above method embodiments, this specification also provides embodiments of an image processing model training device. Figure 11 A schematic diagram of an image processing model training apparatus according to one embodiment of this specification is shown. Figure 11 As shown, the device includes:

[0236] Image acquisition module 1102 is configured to acquire an image to be processed;

[0237] The model output module 1104 is configured to input the image to be processed into the target image processing model to obtain the image processing result output by the target image processing model corresponding to the image to be processed.

[0238] The text processing device provided in this manual processes the original image using a model prediction method to obtain a predicted image that meets the user's needs, thus improving the user experience. By inputting the image to be processed into a target image processing model that meets the user's needs for prediction, a satisfactory predicted image can be obtained, thereby reducing the difficulty of image processing.

[0239] The above is an illustrative scheme of an image processing apparatus according to this embodiment. It should be noted that the technical solution of this image processing apparatus and the technical solution of the image processing method described above belong to the same concept. For details not described in detail in the technical solution of the image processing apparatus, please refer to the description of the technical solution of the image processing method described above.

[0240] Figure 12 A structural block diagram of a computing device 1200 according to an embodiment of this specification is shown. The components of the computing device 1200 include, but are not limited to, a memory 1210 and a processor 1220. The processor 1220 is connected to the memory 1210 via a bus 1230, and a database 1250 is used to store data.

[0241] The computing device 1200 also includes an access device 1240, which enables the computing device 1200 to communicate via one or more networks 1260. Examples of these networks include a Public Switched Telephone Network (PSTN), a Local Area Network (LAN), a Wide Area Network (WAN), a Personal Area Network (PAN), or a combination of communication networks such as the Internet. The access device 1240 may include one or more of any type of wired or wireless network interface (e.g., a Network Interface Card (NIC)), such as an IEEE 802.11 Wireless Local Area Network (WLAN) interface, a Wi-MAX interface, an Ethernet interface, a Universal Serial Bus (USB) interface, a cellular network interface, a Bluetooth interface, a Near Field Communication (NFC) interface, and so on.

[0242] In one embodiment of this specification, the aforementioned components of the computing device 1200 and Figure 12 Other components, not shown, can also be connected to each other, for example, via a bus. It should be understood that... Figure 12 The block diagram of the computing device shown is for illustrative purposes only and is not intended to limit the scope of this specification. Those skilled in the art can add or replace other components as needed.

[0243] The computing device 1200 can be any type of stationary or mobile computing device, including mobile computers or mobile computing devices (e.g., tablet computers, personal digital assistants, laptop computers, notebook computers, netbooks, etc.), mobile phones (e.g., smartphones), wearable computing devices (e.g., smartwatches, smart glasses, etc.) or other types of mobile devices, or stationary computing devices such as desktop computers or PCs. The computing device 1200 can also be a mobile or stationary server.

[0244] The processor 1220 is configured to execute the following computer-executable instructions, which, when executed by the processor, implement the steps of the above-described image processing model training method.

[0245] The above is an illustrative scheme of a computing device according to this embodiment. It should be noted that the technical solution of this computing device and the technical solution of the image processing model training method described above belong to the same concept. For details not described in detail in the technical solution of the computing device, please refer to the description of the technical solution of the image processing model training method described above.

[0246] An embodiment of this specification also provides a computer-readable storage medium storing computer-executable instructions that, when executed by a processor, implement the steps of the above-described image processing model training method.

[0247] The above is an illustrative scheme of a computer-readable storage medium according to this embodiment. It should be noted that the technical solution of this storage medium belongs to the same concept as the technical solution of the image processing model training method described above. For details not described in detail in the technical solution of the storage medium, please refer to the description of the technical solution of the image processing model training method described above.

[0248] An embodiment of this specification also provides a computer program, wherein when the computer program is executed in a computer, it causes the computer to perform the steps of the above-described image processing model training method.

[0249] The above is an illustrative example of a computer program according to this embodiment. It should be noted that the technical solution of this computer program belongs to the same concept as the technical solution of the image processing model training method described above. Details not described in detail in the computer program's technical solution can be found in the description of the technical solution of the image processing model training method described above.

[0250] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.

[0251] The computer instructions include computer program code, which may be in the form of source code, object code, executable file, or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording media, USB flash drive, portable hard drive, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium may be appropriately added to or subtracted according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media may not include electrical carrier signals and telecommunication signals.

[0252] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments in this specification are not limited to the described order of actions, because according to the embodiments in this specification, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in this specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to the embodiments in this specification.

[0253] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0254] The preferred embodiments disclosed above are merely illustrative of this specification. The optional embodiments do not exhaustively describe all details, nor do they limit the invention to the specific implementations described. Clearly, many modifications and variations can be made based on the embodiments described herein. These embodiments are selected and specifically described in this specification to better explain the principles and practical applications of the embodiments, thereby enabling those skilled in the art to better understand and utilize this specification. This specification is limited only by the claims and their full scope and equivalents.

Claims

1. A method for training an image processing model, comprising: The target images in the image sample pair are sequentially subjected to noise processing to obtain a noise image sequence. The first and second noise images with an adjacent relationship are selected from the noise image sequence as noise images. The original image from the image sample pair is input into the initial image processing model for processing to obtain the initial image; The second noise image and the initial image are restored based on the noise parameters of the first noise image to obtain a restored image, wherein the original image and the restored image have the same attribute characteristics; The initial image processing model is trained based on the restored image and the noisy image until a target image processing model that meets the training conditions is obtained, wherein the target image processing model is a machine learning model.

2. The method according to claim 1, wherein sequentially adding noise to the target images in the image sample pair to obtain a noisy image sequence comprises: The number of noise addition processes, n, is determined according to the preset noise addition strategy; The target image in the image sample pair is subjected to the i-th noise addition process to obtain the i-th noise image, where i starts from 1 and i and n are both positive integers; Determine if i equals n; If not, increment i by 1, take the i-th noisy image as the target image, and perform the i-th noise addition process on the target image in the image sample pair to obtain the i-th noisy image; If so, the n noisy images obtained by n noise addition processes constitute a noisy image sequence.

3. The method according to claim 1, wherein the step of performing restoration processing on the second noise image and the initial image based on the noise parameters of the first noise image to obtain a restored image comprises: In the noisy image sequence, determine the location information corresponding to the first noisy image, and determine the noise parameter based on the location information, wherein the noise parameter represents the degree of noise added to the first noisy image; The second noisy image and the initial image are restored according to the noise parameters to obtain the restored image.

4. The method according to claim 3, wherein performing restoration processing on the second noise image and the initial image based on the noise parameters to obtain the restored image includes: Based on the second noise image and the noise parameters, determine the image noise features corresponding to the second noise image; The initial image is denoised based on the image noise features to obtain the restored image.

5. The method according to claim 1, wherein training the initial image processing model based on the restored image and the noisy image until a target image processing model satisfying the training conditions is obtained, comprises: Calculate the initial loss value based on the first noisy image and the restored image; Determine whether the initial loss value is greater than the loss value threshold; If so, the initial image processing model is tuned based on the initial loss value to obtain an intermediate image processing model. The intermediate image processing model is used as the initial image processing model. Image sample pairs for the next model training cycle are selected from the image sample set, and noise processing is performed on the target images in the image sample pairs in sequence to obtain a noise image sequence. The first noise image and the second noise image with an adjacent relationship are selected as noise images in the noise image sequence. If not, the initial image processing model is used as the target image processing model that meets the training conditions.

6. The method according to claim 5, wherein calculating the initial loss value based on the first noisy image and the restored image comprises: Determine the first noise image matrix corresponding to the first noise image, and determine the restored image matrix corresponding to the restored image; Calculate the distance matrix between the first noisy image matrix and the restored image matrix, and use the distance matrix as the initial loss value.

7. The method according to any one of claims 1-6, wherein before the step of sequentially adding noise to the target images in the image sample pair to obtain a noise image sequence, and selecting a first noise image and a second noise image with an adjacent relationship as noise images in the noise image sequence, the method further includes: Determine the training task associated with the initial image processing model; According to the training task, at least one initial image sample pair is selected from a preset image sample set; Select an initial image sample pair that satisfies a preset image alignment relationship from the at least one initial image sample pair, and use it as the image sample pair.

8. The method according to any one of claims 1-6, wherein after the step of training the initial image processing model based on the restored image and the noisy image until a target image processing model satisfying the training conditions is obtained, the method further comprises: Extract verification image sample pairs from the image verification set; The original verification image from the verification image sample pair is input into the target image processing model for processing to obtain the predicted image; The target verification image in the verification image sample pair is compared with the predicted image, and the prediction accuracy information of the target image processing model is determined based on the comparison result.

9. A method for training an image processing model, comprising: Receive model training requests submitted by users; According to the model training request, the target images in the image sample pair are sequentially denoised to obtain a noise image sequence. In the noise image sequence, the first noise image and the second noise image with an adjacent relationship are selected as noise images. The original image from the image sample pair is input into the initial image processing model for processing to obtain the initial image; The second noise image and the initial image are restored based on the noise parameters of the first noise image to obtain a restored image, wherein the original image and the restored image have the same attribute characteristics; The initial image processing model is trained based on the restored image and the noisy image until a target image processing model that meets the training conditions is obtained, and then sent to the user.

10. A method for training an image processing model, comprising: Receive image sample pairs uploaded by users for model training tasks through the model training interactive interface; The target images in the image sample pair are sequentially subjected to noise processing to obtain a noise image sequence. The first and second noise images with an adjacent relationship are selected from the noise image sequence as noise images. The original image from the image sample pair is input into the initial image processing model for processing to obtain the initial image; The second noise image and the initial image are restored based on the noise parameters of the first noise image to obtain a restored image, wherein the original image and the restored image have the same attribute characteristics; The initial image processing model is trained based on the restored image and the noisy image until a target image processing model that meets the training conditions is obtained, and the training results are displayed through the model training interactive interface.

11. An image processing method, comprising: Obtain the image to be processed; The image to be processed is input into the target image processing model in any one of claims 1-8 to obtain the image processing result output by the target image processing model corresponding to the image to be processed.

12. A computing device, comprising: Memory and processor; The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions, which, when executed by the processor, implement the steps of the method of any one of claims 1 to 10.

13. A computer-readable storage medium storing computer-executable instructions that, when executed by a processor, implement the steps of the method of any one of claims 1 to 10.