Image denoising model training method and device, equipment and storage medium

By adding noise features from noisy sample images to noise-free sample images, generating noisy images and performing denoising processing, the problem of insufficient paired samples is solved, and the training effect and performance of the image denoising model are improved.

CN113822289BActive Publication Date: 2025-11-28TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110662101.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-06-15
Publication Date
2025-11-28
Estimated Expiration
2041-08-20

AI Technical Summary

Technical Problem

In existing technologies, the image denoising performance of CNN models is poor because it is difficult to obtain a sufficient number of paired image samples in clinical medicine.

Method used

By adding noise features from noisy sample images to noise-free sample images, a noisy image is generated. The noisy image is then denoised using an image denoising model, and the training loss is calculated to train the image denoising model.

Benefits of technology

The training effect of the image denoising model can be improved without the need for paired sample images, thus improving the image denoising performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113822289B_ABST
    Figure CN113822289B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a kind of training method, device and equipment of image denoising model and storage medium, involve image processing and machine learning technical field.The method comprises: obtaining at least one noisy sample image and at least one noiseless sample image;The noise feature of noisy sample image is added to noiseless sample image, and noiseless sample image corresponding noised image is generated;Image denoising model is used to carry out denoising processing to noised image, and the denoising image corresponding to noised image is generated;Based on noiseless sample image and the denoising image corresponding to noised image, the training loss of image denoising model is calculated;According to training loss, image denoising model is trained.The technical scheme provided in the embodiments of the present application can improve the denoising performance of image denoising model.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] Embodiments of the present application relate to the technical field of image processing and machine learning, in particular to a training method and device of an image denoising model, a device and a storage medium. BACKGROUND

[0002] Medical imaging technology is widely used in modern medicine. Sometimes, further processing is needed for the obtained original medical images.

[0003] In the related art, the paired sample images refer to two voxel images of the same human body part of the same person taken / generated from the same or similar angles. In order to reduce or remove the noise in the images, a CNN (Convolutional Neural Networks) model is used to learn the mapping relationship between the paired noisy images and the noise-free images. Then, the trained CNN model is used to perform denoising processing on the noisy images.

[0004] In the above related art, it is difficult to obtain a sufficient number of paired image samples in clinical medicine to train the CNN model, resulting in poor model learning effect and poor denoising performance. SUMMARY

[0005] Embodiments of the present application provide a training method, device, and storage medium of an image denoising model, which can improve the denoising performance of the image denoising model. The technical solution is as follows:

[0006] According to an aspect of an embodiment of the present application, a training method of an image denoising model is provided, which comprises:

[0007] obtaining at least one noisy sample image and at least one noise-free sample image;

[0008] adding the noise feature of the noisy sample image to the noise-free sample image to generate a noisy image corresponding to the noise-free sample image;

[0009] performing denoising processing on the noisy image by using the image denoising model to generate a denoised image corresponding to the noisy image;

[0010] calculating a training loss of the image denoising model based on the noise-free sample image and the denoised image corresponding to the noisy image;

[0011] training the image denoising model according to the training loss.

[0012] According to an aspect of an embodiment of the present application, a training device of an image denoising model is provided, which comprises:

[0013] An image acquisition module is configured to acquire at least one noisy sample image and at least one noise-free sample image.

[0014] A feature adding module is configured to add noise features of the noisy sample image to the noise-free sample image to generate a noisy image corresponding to the noise-free sample image.

[0015] An image generation module is configured to perform noise reduction processing on the noisy image by using the image denoising model to generate a denoised image corresponding to the noisy image.

[0016] A loss calculation module is configured to calculate a training loss of the image denoising model based on the noise-free sample image and the denoised image corresponding to the noisy image.

[0017] A model training module is configured to train the image denoising model according to the training loss.

[0018] According to an aspect of some embodiments of the present application, a computer device is provided, which includes a processor and a memory. The memory stores at least one instruction, at least one program, a code set or an instruction set. The at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement the image denoising model training method.

[0019] According to an aspect of some embodiments of the present application, a computer readable storage medium is provided, which stores at least one instruction, at least one program, a code set or an instruction set. The at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by a processor to implement the image denoising model training method.

[0020] According to an aspect of some embodiments of the present application, a computer program product or a computer program is provided, which includes computer instructions stored in a computer readable storage medium. A processor of a computer device reads the computer instructions from the computer readable storage medium. The processor executes the computer instructions to cause the computer device to perform the image denoising model training method.

[0021] The technical solutions provided by the embodiments of the present application can have the following beneficial effects.

[0022] The noise features of the noisy sample image are extracted and added to the noise-free sample image to generate a noisy image corresponding to the noise-free sample image, so that the noise-free sample image and the noisy image corresponding to the noise-free sample image become paired images in the model training process. Then, the image denoising model is used to denoise the noisy image to generate a denoised image corresponding to the noisy image, and the training loss is calculated based on the noise-free sample image and the denoised image corresponding to the noisy image to train the image denoising model. The training method of the image denoising model provided in the embodiment of the present application can directly train the image denoising model using unpaired sample images, without the need for paired sample images. The number of unpaired real sample images is sufficient and easy to obtain, thereby improving the training effect of the image denoising model and further improving the denoising performance of the trained image denoising model.

[0023] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present application. BRIEF DESCRIPTION OF DRAWINGS

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

[0025] Figure 1 is a flowchart of the method for training the image denoising model provided by an embodiment of the present application;

[0026] Figure 2 is a schematic diagram of the training system of the image denoising model provided by an embodiment of the present application;

[0027] Figure 3 is a flowchart of the method for training the image denoising model provided by another embodiment of the present application;

[0028] Figure 4 is a schematic diagram of the noise extraction network provided by an embodiment of the present application;

[0029] Figure 5 is a schematic diagram of the training system of the image denoising model provided by another embodiment of the present application;

[0030] Figure 6 is a flowchart of the method for training the image denoising model provided by another embodiment of the present application;

[0031] Figure 7 is a block diagram of the training device of the image denoising model provided by an embodiment of the present application;

[0032] Figure 8 is a block diagram of a training device of an image denoising model provided by another embodiment of the present application;

[0033] Figure 9 is a block diagram of a computer device provided by an embodiment of the present application. DETAILED DESCRIPTION

[0034] The exemplary embodiments will be described in detail herein with reference to the attached drawings. In the following description, the same or similar components are designated by the same or similar reference numerals, and the description thereof will not be repeated. The embodiments described in the following exemplary embodiments do not represent all the embodiments consistent with the present application. Rather, they are merely examples in accordance with some aspects of the present application, as detailed in the appended claims.

[0035] Artificial Intelligence (AI) is the theory, method, technology and application system of using digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology of computer science, which attempts to understand the essence of intelligence and produce a new intelligent machine that can react in a similar way to human intelligence. Artificial intelligence is to study the design principles and implementation methods of various intelligent machines, so that machines have the functions of perception, reasoning and decision-making.

[0036] Artificial intelligence technology is a comprehensive discipline, involving a wide range of fields, both hardware and software technologies. Artificial intelligence basic technologies generally include technologies such as sensors, special artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation / interaction system, mechatronics, etc. Artificial intelligence software technology mainly includes computer vision technology, speech processing technology, natural language processing technology, and machine learning / deep learning, etc.

[0037] Computer Vision (CV) is a science that studies how to make machines "see". More specifically, it refers to using cameras and computers to replace human eyes to identify, track and measure targets, and further perform image processing to make computer processing more suitable for human eye observation or image transmission to instruments for detection. As a scientific discipline, computer vision researches related theories and technologies, and attempts to establish artificial intelligence systems that can obtain information from images or multi-dimensional data. Computer vision technology usually includes image segmentation, image recognition, image semantic understanding, image retrieval, OCR (Optical Character Recognition), video processing, video semantic understanding, video content / behavior recognition, three-dimensional object reconstruction, 3D (three-dimensional) technology, virtual reality, augmented reality, simultaneous localization and mapping, and other technologies. It also includes common face recognition, fingerprint recognition and other biometric identification technologies.

[0038] Machine Learning (ML) is a multi-disciplinary subject that involves probability theory, statistics, approximation theory, convex analysis, algorithm complexity theory and other disciplines. It is a subject that studies how computers simulate or implement human learning behavior to acquire new knowledge or skills, and reorganize existing knowledge structure to continuously improve their performance. Machine learning is the core of artificial intelligence and the fundamental approach to making computers intelligent. Its applications are widespread in various fields of artificial intelligence. Machine learning and deep learning usually include artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and teaching learning.

[0039] Optionally, various pre-stored data involved in the present application can be saved on a blockchain, such as image data of noisy sample images, image data of noiseless sample images, parameters of image denoising models, and the like.

[0040] With the research and progress of artificial intelligence technology, artificial intelligence technology is being researched and applied in many fields, such as common smart home, smart wearable devices, virtual assistants, smart speakers, smart marketing, unmanned vehicles, autonomous vehicles, drones, robots, smart medical care, smart customer service, etc. It is believed that with the development of technology, artificial intelligence technology will be applied in more fields and play an increasingly important role.

[0041] The scheme provided by the embodiments of the present application relates to the fields of computer vision technology and machine learning technology, and uses computer vision technology and machine learning technology to train an image denoising model. The image denoising model is then used to perform denoising processing on noisy images. The specific implementation is described in the following embodiments.

[0042] The execution subject of each step of the method provided in the embodiments of the present application can be a computer device, which refers to an electronic device with data calculation, processing and storage capabilities. The computer device can be a terminal such as a PC (Personal Computer), a tablet computer, a smart phone, a wearable device, a smart robot, etc.; or a server. The server can be a standalone physical server, a server cluster or a distributed system composed of multiple physical servers, or a cloud server providing cloud computing services.

[0043] In the following, the technical solutions of the present application are introduced and described through several embodiments.

[0044] Reference is made to Figure 1 which shows a flowchart of a method for training an image denoising model provided in an embodiment of the present application. In the present embodiment, the method is applied in the computer device introduced above as an example. The method can include the following steps (101-105):

[0045] In step 101, at least one noisy sample image and at least one noiseless sample image are obtained.

[0046] The image involved in the embodiments of the present application can be an internal tissue image of a living being or a non-living being that cannot be directly seen by the human eye and is obtained by a non-invasive method. In the field of biological medicine, the image in the embodiments of the present application can be a biological image (such as a medical image). The biological image refers to an image of the internal tissue of a living being or a part of a living being (such as a human body or a part of a human body) obtained by a non-invasive method for medical treatment or medical research. In one example, for the medical field, the image in the embodiments of the present application can be an image of human organs such as heart and lung, liver, stomach, large and small intestines, brain, skeleton, blood vessels, etc.; or an image of non-human organs such as tumors. In addition, the image involved in the embodiments of the present application can be an image generated based on imaging technologies such as X-ray technology, CT (Computerized Tomography) technology, PET (Positron Emission Tomography) technology, NMRI (Nuclear Magnetic Resonance Imaging) technology, and Medical Ultrasonography. In addition, the sample image in the embodiments of the present application can also be a WYSIWYG (What You See Is What You Get) image generated by visual imaging technology, such as an image obtained by a camera (such as a camera of a camera, a camera of a terminal, etc.).

[0047] In this embodiment, the noisy sample image and the noise-free sample image used by the image denoising model in each round of training can not be paired sample images. For example, the noisy sample image and the noise-free sample image can be images of the same part of different human bodies, images of different parts of the same human body, or images of different parts of different human bodies. In one example, as shown in FIG. 21, the noisy sample image 21 and the noise-free sample image 22 used by the image denoising model in a certain round of training are images corresponding to different organs. Figure 2

[0048] In some embodiments, due to shooting conditions or other reasons, there can be unwanted image content or image content that has a negative impact on image content analysis and understanding in the image obtained by shooting, i.e., image noise. For example, in medical images, there are often artifacts (i.e., image noise) caused by metal interference, which can affect doctors' judgment of the physical health of the human body. An image without image noise or with image noise that does not affect or has a small impact on image content expression can be referred to as a noise-free image. Therefore, it is necessary to reduce or remove image noise in the noisy image and restore the real image content as much as possible. This process can be referred to as a denoising process (or a de-noising process) for the noisy image.

[0049] Step 102: Add the noise features of the noisy sample image to the noise-free sample image to generate a noise-added image corresponding to the noise-free sample image.

[0050] In some embodiments, the noise features of the image noise in the noisy sample image are extracted and added to the noise-free sample image, so that the generated noise-added image contains the same or similar noise features as the noisy sample image. In this way, the training system of the image denoising model generates a pair of images, i.e., the noise-added image, corresponding to the noisy sample image.

[0051] Step 103: Perform denoising processing on the noise-added image using the image denoising model to generate a denoised image corresponding to the noise-added image.

[0052] In some embodiments, the image denoising model is used to perform denoising processing on the noise-added image to reduce or remove the image noise in the noise-added image, thereby generating a denoised image corresponding to the noise-added image.

[0053] Step 104: Calculate the training loss of the image denoising model based on the noise-free sample image and the denoised image corresponding to the noise-added image.

[0054] The loss calculated based on the noise-free sample image and the denoised image corresponding to the noise-added image can be used to measure the training effect of the image denoising model.

[0055] ​At step 105, the image denoising model is trained according to the training loss.

[0056] Optionally, based on the training loss of the image denoising model, the model parameters of the image denoising model are adjusted until the image denoising model or the training system of the image denoising model reaches a training stop condition, and a trained image denoising model is obtained. In some embodiments, before the training stop condition is reached, the model parameters of other learning models in the training system of the image denoising model are also adjusted according to the training loss.

[0057] In summary, the technical scheme provided by the embodiments of the present application extracts the noise features of the noisy sample images and adds them to the noise-free sample images to generate the noisy images corresponding to the noise-free sample images, so that the noise-free sample images and the noisy images corresponding to the noise-free sample images become paired images in the model training process. Then, the image denoising model is used to denoise the noisy images to generate the denoised images corresponding to the noisy images, and the training loss is calculated based on the noise-free sample images and the denoised images corresponding to the noisy images to train the image denoising model. The training method of the image denoising model provided by the embodiments of the present application can directly train the image denoising model using unpaired sample images, without the need for paired sample images. Moreover, unpaired real sample images are sufficient and easy to obtain, so as to improve the training effect of the image denoising model and further improve the denoising performance of the trained image denoising model.

[0058] In some embodiments, as shown in Figure 2 , the training system of the image denoising model 200 includes an image denoising model 210, an image generation model 220, and a noise extraction network 230; wherein the image denoising model 210 includes a first encoding network 211 and a first decoding network 212, and the image generation model 220 includes a second encoding network 221 and a second decoding network 222.

[0059] Please refer to Figure 3 , which shows a flowchart of a method for training an image denoising model provided by another embodiment of the present application. In this embodiment, the method is applied to the training system 200 of the image denoising model in the above Figure 2 embodiment. Optionally, the training system 200 of the image denoising model is set in the computer device introduced above. The method can include the following steps (301-308):

[0060] At step 301, at least one noisy sample image and at least one noise-free sample image are obtained.

[0061] The content of this step 301 is the same as or similar to the content of step 101 in the above Figure 1 embodiment, which will not be repeated here.

[0062] Step 302, a second feature map of the noisy sample image is extracted through a second encoding network, and the second feature map of the noisy sample image contains noise features.

[0063] In some embodiments, the noisy sample image is input into the second encoding network, and the second feature map of the noisy sample image is extracted. Since the training target of the second encoding network does not include denoising processing on the image input therein, the second feature map of the noisy sample image still retains the same or similar noise features as the noisy sample image (of course, the noise features in the second feature map of the noisy sample image can not be the same as the noise features in the noisy sample image in form).

[0064] In one example, the step 302 can be embodied as the following formula one:

[0065] Formula one: f a = E a (x a )∈R H×W×C

[0066] Wherein, f a represents the second feature map of the noisy sample image, E a represents the second encoding network, x a represents the noisy sample image, H, W, C represent the length, width and height of the second feature map of the noisy sample image respectively, and the vectors in the second feature map of the noisy sample image are real vectors.

[0067] Step 303, decoupling the noise features from the second feature map of the noisy sample image through a noise extraction network.

[0068] Optionally, the noise features are separated and extracted from the second feature map of the noisy sample image through the noise extraction network (such as the Transformer network). Optionally, the noise features decoupled through the noise extraction network exist in the form of a noise feature map.

[0069] In some embodiments, the step 303 further includes the following steps:

[0070] 1. Construct an initial noise feature matrix, and the initial noise feature matrix is an unfolded matrix of the second feature map of the noisy sample image;

[0071] 2. Update the noise feature matrix through the noise extraction network for multiple rounds to obtain an updated noise feature matrix; wherein each round of iterative update processing includes at least one of the following: normalization processing, self-learning processing, linear projection processing;

[0072] 3. Obtain the noise feature based on the updated noise feature matrix.

[0073] In this implementation, the second feature map of the noisy sample image is unfolded to obtain an unfolded matrix of the second feature map of the noisy sample image, and the unfolded matrix of the second feature map of the noisy sample image is taken as an initial noise feature matrix. The noise feature matrix is iteratively updated by the noise extraction network for a specified number of rounds to obtain an updated noise feature matrix. The updated noise feature matrix is converted into a noise feature map, i.e., the noise feature of the noisy sample image is obtained.

[0074] As shown in Figure 4 , the noise extraction network 40 includes a regression network 41, a multi-head attention network 42, a regression network 43, and a linear projection layer 44.

[0075] In one example, the above-mentioned multi-round iteration process can refer to the following formulas two, three, four, and five:

[0076] Formula two:

[0077] Formula three: Z' l = MSA(LN(Z l-1 ))+ Z l-1 , l = 1, …, L

[0078] Formula four: Z l = MLP(LN(Z' l ))+ Z' l

[0079] Formula five:

[0080] In combination Figure 4 , where Z0 represents the initial noise feature matrix, represents the feature vector corresponding to the Nth pixel in the second feature map of the noisy sample image, Z' l represents the output matrix of the multi-head attention network 42 in the lth iteration process, LN(Z l-1 ) represents the output matrix of the regression network 41 in the lth iteration process, Z l represents the output matrix of the linear projection layer 44 in the lth iteration process. Formula five represents that the output matrix of the linear projection layer 44 in the Lth iteration process is converted into the corresponding feature map

[0081] Step 304: Extract the first feature map of the noiseless sample image by the first encoding network.

[0082] In some embodiments, the noise-free sample image is input into the first encoding network to extract a first feature map of the noise-free sample image. Since there is no noise feature in the noise-free sample image, the first feature map of the noise-free sample image generated also has no noise feature.

[0083] At step 305, a noise-added image corresponding to the noise-free sample image is generated by the second decoding network based on the first feature map of the noise-free sample image and the noise feature.

[0084] In some embodiments, the noise-added image corresponding to the noise-free sample image is generated by the second decoding network based on the noise feature map and the first feature map of the noise-free sample image.

[0085] In some embodiments, the step 305 further includes the following steps:

[0086] 1. The first feature map of the noise-free sample image and the noise feature are fused to generate a fused feature map;

[0087] 2. The fused feature map is decoded by the second decoding network to generate the noise-added image corresponding to the noise-free sample image.

[0088] In this implementation, the first feature map of the noise-free sample image and the noise feature map are fused to generate a fused feature map containing noise features. Since the training target of the second decoding network does not include denoising the image, the noise features in the noise-added image generated by decoding the fused feature map by the second decoding network will not be significantly reduced compared to the noise features extracted from the noisy sample image, thereby realizing the noise-adding process of the noise-free sample image.

[0089] At step 306, the noise-added image is denoised by the image denoising model to generate a denoised image corresponding to the noise-added image.

[0090] Alternatively, since the training target of the image denoising model is to denoise the noisy image, when the noise-added image is input into the image denoising model, the image output by the image denoising model is the denoised image corresponding to the noise-added image.

[0091] In some embodiments, the step 306 further includes the following steps:

[0092] 1. The first feature map of the noise-added image is extracted by the first encoding network;

[0093] 2. The first feature map of the noise-added image is decoded by the first decoding network to generate the denoised image corresponding to the noise-added image.

[0094] Optionally, in the encoding and decoding process of the noisy image by using the first encoding network and the first decoding network in the image denoising model, the noisy image is denoised to generate a denoised image corresponding to the noisy image.

[0095] In step 307, a training loss of the image denoising model is calculated based on the noiseless sample image and the denoised image corresponding to the noisy image.

[0096] In some embodiments, after the image denoising model denoises the noisy image to generate a denoised image corresponding to the noisy image, the training loss can be calculated based thereon to measure the current denoising effect of the image denoising model (i.e., to judge the denoising performance of the current image denoising model).

[0097] In some possible implementations, the training loss includes a first contrast loss and / or a second contrast loss, the first contrast loss is used to measure the local similarity between the noisy sample image and the denoised image corresponding to the noisy sample image, and the second contrast loss is used to measure the local similarity between the noiseless sample image and the noisy image. It can be understood that the first contrast loss and the second contrast loss are used to measure the similarity between the local features of images. That is, the first contrast loss is used to measure the preservation of the local features of the denoised image corresponding to the processed noisy sample image compared with the noisy sample image as the initial image; wherein the smaller the first contrast loss is, the higher the local similarity between the noisy sample image and the denoised image corresponding to the noisy sample image is, and the better the local features related to the noisy sample image are preserved in the denoised image of the noisy sample image. The second contrast loss is used to measure the preservation of the local features of the processed noisy image compared with the noiseless sample image as the initial image; wherein the smaller the second contrast loss is, the higher the local similarity between the noiseless sample image and the noisy image is, and the better the local features related to the noiseless sample image are preserved in the noisy image.

[0098] In some embodiments, the method further includes the following steps:

[0099] 1. In the case where the training loss includes the first contrast loss, a first feature map of the noisy sample image is extracted by the first encoding network;

[0100] 2. The first feature map of the noisy sample image is decoded by the first decoding network to generate a denoised image corresponding to the noisy sample image;

[0101] 3. A first feature map of the denoised image corresponding to the noisy sample image is extracted by the first encoding network;

[0102] 4. The first contrast loss is calculated based on the first feature map of the noisy sample image and the first feature map of the denoised image corresponding to the noisy sample image.

[0103] In this implementation, if the training loss includes the first contrast loss, the first contrast loss is obtained by extracting local features in the first feature map of the noisy sample image and the first feature map of the denoised image corresponding to the noisy sample image, and performing contrast calculation.

[0104] Optionally, based on the first feature map of the noisy sample image and the first feature map of the denoised image corresponding to the noisy sample image, the first contrast loss is calculated, including the following steps:

[0105] (1) From the first feature map of the noisy sample image and the first feature map of the denoised image corresponding to the noisy sample image, at least one first positive sample pair and at least one first negative sample pair are obtained, each first positive sample pair includes a pair of feature vectors from the same position in the first feature map of the noisy sample image and the first feature map of the denoised image corresponding to the noisy sample image, respectively, and each first negative sample pair includes a pair of feature vectors from different positions in the first feature map of the noisy sample image and the first feature map of the denoised image corresponding to the noisy sample image, respectively.

[0106] In one example, as shown in Figure 5 the first pixel (i.e. the first feature vector) 53 and the second pixel (i.e. the second feature vector) 54 in the first feature map 51 of the noisy sample image and the first feature map 52 of the denoised image corresponding to the noisy sample image, which are located in the same position of the two feature maps, can constitute a pair of positive sample pairs; and the third pixel (i.e. the third feature vector) 55 in the first feature map 51 of the noisy sample image does not correspond to the position of the second pixel (i.e. the second feature vector) 54 in the respective feature map, so the second pixel 54 and the third pixel 55 can constitute a pair of negative sample pairs. Optionally, the second pixel 54 can also constitute a negative sample pair with other pixels in the first feature map 51 of the noisy sample image.

[0107] (2) Based on the at least one first positive sample pair and the at least one first negative sample pair, the first contrast loss is calculated.

[0108] In some embodiments, the distance between the feature vectors in each sample pair is calculated respectively, and the distance calculation results of each sample pair are calculated based on a cross-entropy function. In order to make the trained image denoising model have good local feature preservation ability in the image processing process, one of the goals of the training process of the image denoising model is to make the distance between the feature vectors in the positive sample pair smaller and smaller (which means that the pixels corresponding to the positions are more and more similar, that is, the features of the local regions at the same position are kept as much as possible), and to make the distance between the feature vectors in the negative sample pair larger and larger (which means that the difference between the pixels corresponding to the positions is larger and larger, that is, the features of the local regions at different positions are kept as much as possible).

[0109] In one example, for the first feature map 52 of the denoised image corresponding to the noisy sample image pair as shown in Figure 5 The second pixel 54 in the first feature map 52 of the denoised image corresponding to the noisy sample image pair can only form a positive sample pair with the first pixel 51 in the first feature map 51 of the noisy sample image, and forms a negative sample pair with other pixels in the first feature map 51 of the noisy sample image except the first pixel 51. It can be seen that the second pixel 54 can only correspond to one positive sample pair, but can correspond to one or more negative sample pairs. Exemplarily, for the second pixel 54, the second vector corresponding thereto is represented as (the second pixel is the qth pixel selected in the first feature map 52 of the denoised image corresponding to the noisy sample image pair); the first vector corresponding to the first pixel 53 forming a positive sample pair with the second pixel 54 is represented as The vectors corresponding to the m pixels forming negative sample pairs with the second pixel 54 are respectively represented as wherein the specific value of m can be set by a person skilled in the art according to actual conditions, and the embodiments of the present application do not make specific limitations thereto.

[0110] Then, the loss L of the second pixel 54 is The approximate calculation can refer to the following formula six:

[0111] Formula six:

[0112] Optionally, τ is a scaling constant, and its value can be an empirical value 0.07. Of course, τ can also be other values, and the embodiments of the present application do not make specific limitations thereto.

[0113] wherein the feature vectors in each positive and negative sample are K-dimensional real vectors, and the specific value of K is not limited in the embodiments of the present application.

[0114] After the loss of each pixel in the first feature map 52 of the denoised image corresponding to the noisy sample image pair is calculated, the first contrast loss LPCL Reference can be made to the following Formula Seven:

[0115] Formula Seven:

[0116] Wherein, S represents that S pixels in the first feature map 52 of the denoising image corresponding to the noisy sample image are randomly selected to form a sample pair with the pixels in the first feature map 51 of the noisy sample image to calculate the first loss.

[0117] In some embodiments, the method further comprises the following steps:

[0118] 1. When the training loss comprises the second contrastive loss, extracting the first feature map of the noisy image by the first encoding network;

[0119] 2. Calculating the second contrastive loss based on the first feature map of the noiseless sample image and the first feature map of the noisy image.

[0120] Optionally, calculating the second contrastive loss based on the first feature map of the noiseless sample image and the first feature map of the noisy image comprises the following steps:

[0121] (1) Obtaining at least one second positive sample pair and at least one second negative sample pair from the first feature map of the noiseless sample image and the first feature map of the noisy image, each second positive sample pair comprising a pair of feature vectors from the same position in the first feature map of the noiseless sample image and the first feature map of the noisy image respectively, and each second negative sample pair comprising a pair of feature vectors from different positions in the first feature map of the noiseless sample image and the first feature map of the noisy image respectively;

[0122] (2) Calculating the second contrastive loss based on the at least one second positive sample pair and the at least one second negative sample pair.

[0123] Wherein, for the explanation of the second contrastive loss, reference can be made to the above introduction of the first contrastive loss, which will not be repeated here.

[0124] In some possible implementations, the training loss further comprises a first regression loss, a second regression loss, a first adversarial loss and a second adversarial loss. The step 307 further comprises the following steps:

[0125] 1. Calculating the first regression loss based on the denoising image corresponding to the noiseless sample image and the noisy image, the first regression loss being used to measure the overall similarity between the denoising image corresponding to the noiseless sample image and the noisy image;

[0126] 2. Calculate a second regression loss based on the noise-free sample image and the denoised image corresponding to the noise-free sample image, the second regression loss being used to measure the overall similarity between the noise-free sample image and the denoised image corresponding to the noise-free sample image;

[0127] 3. Calculate a first adversarial loss based on the noisy sample image and the noisy image, the first adversarial loss being used to measure the authenticity of the noisy image;

[0128] 4. Calculate a second adversarial loss based on the noise-free sample image and the denoised image corresponding to the noise-free sample image, the second adversarial loss being used to measure the authenticity of the denoised image corresponding to the noise-free sample image;

[0129] 5. Calculate a training loss based on the first contrast loss, the second contrast loss, the first regression loss, the second regression loss, the first adversarial loss, and the second adversarial loss.

[0130] In some embodiments, the first contrast loss, the second contrast loss, the first regression loss, the second regression loss, the first adversarial loss, and the second adversarial loss are calculated respectively, and the training loss is calculated based thereon, so that the image denoising model tends to remove as much image noise as possible in the entire noisy image while maintaining the local features of the image as much as possible during the training process.

[0131] In some embodiments, before calculating the second regression loss based on the noise-free sample image and the denoised image corresponding to the noise-free sample image, the following steps are further included to generate the denoised image corresponding to the noise-free sample image:

[0132] (1) Extract a first feature map of the noise-free sample image through a first encoding network;

[0133] (2) Decode the first feature map of the noise-free sample image through a first decoding network to generate the denoised image corresponding to the noise-free sample image.

[0134] Optionally, the first regression loss and the second regression loss can be L1 loss or regression loss, and the embodiments of the present application do not make specific limitations thereon.

[0135] In some embodiments, the first feature map of the noisy sample image is decoded through a second encoding network to obtain a processed noisy sample image; a third regression loss is calculated based on the noisy sample image and the processed noisy sample image, the third regression loss being used to measure the overall similarity between the noisy sample image and the processed noisy sample image.

[0136] In some embodiments, a first difference image between the noise-free sample image and a denoised image corresponding to the noise-free sample image, and a second difference image between the noisy sample image and a denoised image corresponding to the noisy sample image are obtained; a fourth regression loss is calculated based on the first difference image and the second difference image; the fourth regression loss is used to measure the overall similarity between the first difference image and the second difference image.

[0137] Optionally, the first contrast loss, the second contrast loss, the first regression loss, the second regression loss, the third regression loss, the fourth regression loss, the first adversarial loss and the second adversarial loss are weighted and summed to obtain the training loss.

[0138] The calculation of the training loss can refer to the following Formula Eight:

[0139] Formula Eight:

[0140] wherein, x a represents the noisy sample image, represents a denoised image corresponding to the noisy sample image, represents the processed noisy sample image, y represents the noise-free sample image, represents a denoised image corresponding to the noise-free sample image, represents the noisy sample image, represents a denoised image corresponding to the noisy sample image; λ1, λ2, λ3, λ4, λ5, λ6, λ7, λ8 are respectively the weight values corresponding to each loss.

[0141] Step 308, training the image denoising model according to the training loss.

[0142] The content of this step 308 is the same as or similar to the content of step 105 in the above Figure 1 Embodiments, which will not be described here.

[0143] In summary, the technical scheme provided by the embodiments of the present application introduces patch-wise contrastive learning (PCL), which makes the image denoising model trained to remove as much image noise as possible in the entire noisy image while preserving the local features of the image as much as possible.

[0144] In some possible implementations, the image noise in the noisy sample image is metal artifact, the image denoising model is a de-artifact model, the noisy sample image is an artifact-containing sample image, and the noise-free sample image is an artifact-free sample image. Metal artifact refers to artifact caused by metal interference. As Figure 6 As shown in the figure, the method can include the following steps (601-605):

[0145] At step 601, at least one sample image with artifacts and at least one sample image without artifacts are obtained.

[0146] At step 602, the artifact features of the sample image with artifacts are added to the sample image without artifacts to generate a corresponding artifact-added image of the sample image without artifacts.

[0147] At step 603, the artifact-added image is de-artifacted using a de-artifact model to generate a corresponding de-artifact image of the artifact-added image.

[0148] At step 604, a training loss of the de-artifact model is calculated based on the sample image without artifacts and the corresponding de-artifact image of the artifact-added image.

[0149] At step 605, the image de-artifact model is trained according to the training loss.

[0150] The following is an embodiment of the application, which can be used to execute the method embodiments of the application. For details not disclosed in the device embodiments of the application, please refer to the method embodiments of the application.

[0151] Please refer to Figure 7 which shows a block diagram of a training device of an image denoising model according to an embodiment of the application. The device has the function of implementing the method examples described above for training the image denoising model, which can be implemented by hardware or corresponding software executed by hardware. The device can be the computer device introduced above, or can be arranged on the computer device. The device 700 can include an image acquisition module 710, a feature addition module 720, an image generation module 730, a loss calculation module 740, and a model training module 750.

[0152] The image acquisition module 710 is configured to obtain at least one noisy sample image and at least one noise-free sample image.

[0153] The feature addition module 720 is configured to add noise features of the noisy sample image to the noise-free sample image to generate a corresponding noise-added image of the noise-free sample image.

[0154] The image generation module 730 is configured to perform denoising processing on the noise-added image using the image denoising model to generate a corresponding denoised image of the noise-added image.

[0155] The loss calculation module 740 is configured to calculate a training loss of the image denoising model based on the noise-free sample image and the corresponding denoised image of the noise-added image.

[0156] The model training module 750 is configured to train the image denoising model according to the training loss.

[0157] In summary, the technical scheme provided in the embodiments of the present application extracts the noise features of the noisy sample image and adds the noise features to the noise-free sample image to generate a noisy image corresponding to the noise-free sample image, so that the noise-free sample image and the noisy image corresponding to the noise-free sample image become paired images in the model training process. Then, the image denoising model is used to denoise the noisy image to generate a denoised image corresponding to the noisy image, and the training loss is calculated based on the noise-free sample image and the denoised image corresponding to the noisy image to train the image denoising model. The training method of the image denoising model provided in the embodiments of the present application can directly train the image denoising model using unpaired sample images, without the need for paired sample images. In addition, the number of unpaired real sample images is sufficient and easy to obtain, so that the training effect of the image denoising model can be improved, and the denoising performance of the trained image denoising model can be improved.

[0158] In an example embodiment, the training system of the image denoising model comprises the image denoising model, an image generation model and a noise extraction network; wherein the image denoising model comprises a first encoding network and a first decoding network, and the image generation model comprises a second encoding network and a second decoding network; as Figure 8 As shown in the figure, the image generation module 730 comprises a feature map extraction submodule 731, a noise decoupling submodule 732 and an image generation submodule 733.

[0159] The feature map extraction submodule 731 is configured to extract a second feature map of the noisy sample image through the second encoding network, and the second feature map of the noisy sample image comprises the noise features.

[0160] The noise decoupling submodule 732 is configured to decouple the noise features from the second feature map of the noisy sample image through the noise extraction network.

[0161] The feature map extraction submodule 731 is further configured to extract a first feature map of the noise-free sample image through the first encoding network.

[0162] The image generation submodule 733 is configured to generate a noisy image corresponding to the noise-free sample image according to the first feature map of the noise-free sample image and the noise features through the second decoding network.

[0163] In an example embodiment, as Figure 8 The noise decoupling submodule 732 is configured to:

[0164] construct an initial noise feature matrix, wherein the initial noise feature matrix is a flattened matrix of the second feature map of the noisy sample image;

[0165] The noise feature matrix is updated through multiple rounds of iteration by the noise extraction network to obtain an updated noise feature matrix; wherein each round of iteration includes at least one of the following: normalization processing, self-learning processing, linear projection processing;

[0166] Based on the updated noise feature matrix, the noise feature is obtained.

[0167] In an example embodiment, as shown in Figure 8 The image generation sub-module 733 is configured to:

[0168] The first feature map of the noise-free sample image and the noise feature are fused to generate a fused feature map.

[0169] The fused feature map is decoded by the second decoding network to generate a noisy image corresponding to the noise-free sample image.

[0170] In an example embodiment, as shown in Figure 8 The image generation sub-module 733 is configured to:

[0171] The first feature map of the noisy image is extracted by the first encoding network.

[0172] The first feature map of the noisy image is decoded by the first decoding network to generate a denoised image corresponding to the noisy image.

[0173] In an example embodiment, the training loss includes a first contrastive loss and / or a second contrastive loss, the first contrastive loss is used to measure the local similarity between the noisy sample image and the denoised image corresponding to the noisy sample image, and the second contrastive loss is used to measure the local similarity between the noise-free sample image and the noisy image; as shown in Figure 8 The device 700 further includes a feature map extraction module 760.

[0174] The feature map extraction module 760 is configured to extract the first feature map of the noisy sample image by the first encoding network when the training loss includes the first contrastive loss. The image generation module 730 is further configured to decode the first feature map of the noisy sample image by the first decoding network to generate a denoised image corresponding to the noisy sample image. The feature map extraction module 760 is further configured to extract the first feature map of the denoised image corresponding to the noisy sample image by the first encoding network. The loss calculation module 740 is further configured to calculate the first contrastive loss based on the first feature map of the noisy sample image and the first feature map of the denoised image corresponding to the noisy sample image.

[0175] The feature map extraction module 760 is further configured to extract, in a case where the training loss comprises the second contrastive loss, a first feature map of the noisy image by the first encoding network. The loss calculation module 740 is further configured to calculate the second contrastive loss based on the first feature map of the noise-free sample image and the first feature map of the noisy image.

[0176] In an example embodiment, the loss calculation module 740 is configured to:

[0177] obtain at least one first positive sample pair and at least one first negative sample pair from the first feature map of the noisy sample image and the first feature map of the denoised image corresponding to the noisy sample image, each of the first positive sample pair comprising a pair of feature vectors from the same position in the first feature map of the noisy sample image and the first feature map of the denoised image corresponding to the noisy sample image respectively, and each of the first negative sample pair comprising a pair of feature vectors from different positions in the first feature map of the noisy sample image and the first feature map of the denoised image corresponding to the noisy sample image respectively;

[0178] calculate the first contrastive loss based on the at least one first positive sample pair and the at least one first negative sample pair.

[0179] In an example embodiment, the loss calculation module 740 is configured to:

[0180] obtain at least one second positive sample pair and at least one second negative sample pair from the first feature map of the noise-free sample image and the first feature map of the noisy image, each of the second positive sample pair comprising a pair of feature vectors from the same position in the first feature map of the noise-free sample image and the first feature map of the noisy image respectively, and each of the second negative sample pair comprising a pair of feature vectors from different positions in the first feature map of the noise-free sample image and the first feature map of the noisy image respectively;

[0181] calculate the second contrastive loss based on the at least one second positive sample pair and the at least one second negative sample pair.

[0182] In an example embodiment, the second contrastive loss is calculated based on the first feature map of the noise-free sample image and the first feature map of the noisy image, and the loss calculation module 740 is configured to:

[0183] calculate the first regression loss based on the noise-free sample image and the denoised image corresponding to the noisy image, the first regression loss being used to measure an overall similarity between the noise-free sample image and the denoised image corresponding to the noisy image;

[0184] The second regression loss is calculated based on the noise-free sample image and the denoising image corresponding to the noise-free sample image, and is used to measure the overall similarity between the noise-free sample image and the denoising image corresponding to the noise-free sample image.

[0185] The first adversarial loss is calculated based on the noisy sample image and the noisy image, and is used to measure the authenticity of the noisy image.

[0186] The second adversarial loss is calculated based on the noise-free sample image and the denoising image corresponding to the noise-free sample image, and is used to measure the authenticity of the denoising image corresponding to the noise-free sample image.

[0187] The training loss is calculated based on the first contrast loss, the second contrast loss, the first regression loss, the second regression loss, the first adversarial loss, and the second adversarial loss.

[0188] It should be noted that the device provided in the above embodiment, in realizing its functions, only divides the above-mentioned each functional module as an example, and in actual application, the above-mentioned functions can be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the above-described functions. In addition, the device and method embodiments provided in the above embodiments belong to the same concept, and the specific implementation process is detailed in the method embodiments, which will not be described here.

[0189] Please refer to Figure 9 which shows the structure block diagram of the computer device provided in an embodiment of the present application. The computer device is used to implement the training method of the image denoising model provided in the above embodiments. Specifically:

[0190] The computer device 900 includes a CPU (Central Processing Unit, central processing unit) 901, a system memory 904 including a RAM (Random Access Memory, random access memory) 902 and a ROM (Read-Only Memory, read-only memory) 903, and a system bus 905 connecting the system memory 904 and the central processing unit 901. The computer device 900 also includes a basic I / O (Input / Output, input / output) system 906 to help transfer information between various devices in the computer, and a mass storage device 907 for storing an operating system 913, application programs 914 and other program modules 915.

[0191] The basic input / output system 906 includes the various components needed to display information for the user, such as a display 908 and input devices 908, such as a mouse, keyboard, or electronic stylus. Both the display 908 and input devices 908 are connected to the central processing unit 901 through an input / output controller 910 that is connected to the system bus 905. The basic input / output system 906 can also include the input / output controller 910 for receiving and processing input from a number of other devices, including a keyboard, mouse, or electronic stylus. Similarly, the input / output controller 910 provides output to a display screen, printer, or other type of output device.

[0192] The mass storage device 907 is connected to the central processing unit 901 through a mass storage controller (not shown) connected to the system bus 905. The mass storage device 907 and its associated computer-readable media provide non-volatile storage for the computer device 900. That is, the mass storage device 907 can include a computer- readable medium (not shown) such as a hard disk or a CD-ROM (Compact Disc Read-Only Memory) drive.

[0193] Without loss of generality, the computer-readable media can include computer storage media and communication media. Computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Computer storage media includes RAM, ROM, EPROM (Erasable Programmable Read Only Memory), EEPROM (Electrically Erasable Programmable Read Only Memory), flash memory or other solid state memory technology, CD-ROM, digital versatile disks (DVD), or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices. The computer storage media is not limited to the foregoing examples. The system memory 904 and the mass storage device 907 described above can be embodied as a memory.

[0194] According to various embodiments of the present application, the computer device 900 can further operate connected to a network, such as the Internet, by a network connection. That is, the computer device 900 can be connected to a network 912 through a network interface unit 911 connected to the system bus 905, or can be connected to other types of networks or remote computer systems (not shown) using the network interface unit 911.

[0195] In an example embodiment, a computer readable storage medium is also provided, in which at least one instruction, at least one program, a code set or an instruction set is stored, and the at least one instruction, the at least one program, the code set or the instruction set is executed by a processor to implement the training method of the image denoising model.

[0196] Optionally, the computer readable storage medium can include a ROM (Read-Only Memory), a RAM (Random-Access Memory), a SSD (Solid State Drives), an optical disc, etc. Among them, the random access memory can include ReRAM (Resistance Random Access Memory) and DRAM (Dynamic Random Access Memory).

[0197] In an example embodiment, a computer program product or computer program is also provided, which includes computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions to make the computer device execute the training method of the image denoising model.

[0198] It should be understood that "multiple" referred to herein refers to two or more. "And / or", which describes the association relationship of the associated objects, means that there can be three relationships, for example, A and / or B can represent: A exists alone, A and B exist together, and B exists alone. The character " / " generally represents that the associated objects before and after it are in an "or" relationship.

[0199] The above only describes example embodiments of the present application and is not intended to limit the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.

Claims

1. A training method for an image denoising model, characterized in that, The image denoising model includes a first encoding network and a first decoding network, and the method includes: Acquire at least one noisy sample image and at least one noise-free sample image; The noise features of the noisy sample image are added to the noise-free sample image to generate a noisy image corresponding to the noise-free sample image; The image denoising model is used to denoise the noisy image to generate a denoised image corresponding to the noisy image; A first feature map of the noisy sample image is extracted using the first encoding network; the first feature map of the noisy sample image is decoded using the first decoding network to generate a denoised image corresponding to the noisy sample image; a first feature map of the denoised image corresponding to the noisy sample image is extracted using the first encoding network; based on the first feature map of the noisy sample image and the first feature map of the denoised image corresponding to the noisy sample image, a first contrast loss is calculated, the first contrast loss being used to measure the local similarity between the noisy sample image and the denoised image corresponding to the noisy sample image. The first feature map of the noisy image is extracted through the first encoding network; at least one second positive sample pair and at least one second negative sample pair are obtained from the first feature map of the noiseless sample image and the first feature map of the noisy image, respectively. Each second positive sample pair includes a pair of feature vectors from the same position in the first feature map of the noiseless sample image and the first feature map of the noisy image, respectively. Each second negative sample pair includes a pair of feature vectors from different positions in the first feature map of the noiseless sample image and the first feature map of the noisy image, respectively. Based on the at least one second positive sample pair and the at least one second negative sample pair, a second contrast loss is calculated. The second contrast loss is used to measure the local similarity between the noiseless sample image and the noisy image. Based on the noise-free sample image and the denoised image corresponding to the denoised image, a first regression loss is calculated. The first regression loss is used to measure the overall similarity between the noise-free sample image and the denoised image corresponding to the denoised image. Based on the noiseless sample image and the corresponding denoised image, a second regression loss is calculated. The second regression loss is used to measure the overall similarity between the noiseless sample image and the corresponding denoised image. A first adversarial loss is calculated based on the noisy sample image and the noisy image, and the first adversarial loss is used to measure the realism of the noisy image. A second adversarial loss is calculated based on the noiseless sample image and the denoised image corresponding to the noiseless sample image. The second adversarial loss is used to measure the realism of the denoised image corresponding to the noiseless sample image. The training loss is calculated based on the first contrastive loss, the second contrastive loss, the first regression loss, the second regression loss, the first adversarial loss, and the second adversarial loss; The image denoising model is trained based on the training loss.

2. The method according to claim 1, characterized in that, The training system for the image denoising model includes: the image denoising model, the image generation model, and the noise extraction network. The image generation model includes a second encoding network and a second decoding network. The step of adding the noise features of the noisy sample image to the noise-free sample image to generate a noisy image corresponding to the noise-free sample image includes: The second feature map of the noisy sample image is extracted by the second coding network, and the second feature map of the noisy sample image contains the noise features; The noise features are obtained by decoupling from the second feature map of the noisy sample image through the noise extraction network; The first feature map of the noiseless sample image is extracted through the first encoding network; The second decoding network generates a noisy image corresponding to the noiseless sample image based on the first feature map of the noiseless sample image and the noise features.

3. The method according to claim 2, characterized in that, The step of decoupling the noise features from the second feature map of the noisy sample image through the noise extraction network includes: Construct an initial noise feature matrix, which is the unfolded matrix of the second feature map of the noisy sample image; The noise feature matrix is ​​updated through multiple rounds of iterative updates using the noise extraction network to obtain the updated noise feature matrix; wherein each round of iterative update includes at least one of the following: normalization, self-learning, and linear projection. The noise features are obtained based on the updated noise feature matrix.

4. The method according to claim 2, characterized in that, The step of generating a noisy image corresponding to the noiseless sample image through the second decoding network based on the first feature map of the noiseless sample image and the noise features includes: The first feature map and the noise features of the noise-free sample image are fused to generate a fused feature map. The fused feature map is decoded by the second decoding network to generate a noisy image corresponding to the noiseless sample image.

5. A training device for an image denoising model, characterized in that, The image denoising model includes a first encoding network and a first decoding network, and the device includes: An image acquisition module is used to acquire at least one noisy sample image and at least one noiseless sample image; The feature addition module is used to add noise features of the noisy sample image to the noiseless sample image to generate a noisy image corresponding to the noiseless sample image; An image generation module is used to perform noise reduction processing on the noisy image using the image noise reduction model, and generate a noise-reduced image corresponding to the noisy image. The loss calculation module is used to extract a first feature map of the noisy sample image through the first encoding network; decode the first feature map of the noisy sample image through the first decoding network to generate a denoised image corresponding to the noisy sample image; extract a first feature map of the denoised image corresponding to the noisy sample image through the first encoding network; and calculate a first contrast loss based on the first feature map of the noisy sample image and the first feature map of the denoised image corresponding to the noisy sample image, wherein the first contrast loss is used to measure the local similarity between the noisy sample image and the denoised image corresponding to the noisy sample image. The loss calculation module is further configured to extract a first feature map of the noisy image through the first encoding network; obtain at least one second positive sample pair and at least one second negative sample pair from the first feature map of the noiseless sample image and the first feature map of the noisy image, each second positive sample pair including a pair of feature vectors from the same position in the first feature map of the noiseless sample image and the first feature map of the noisy image, and each second negative sample pair including a pair of feature vectors from different positions in the first feature map of the noiseless sample image and the first feature map of the noisy image; and calculate a second contrast loss based on the at least one second positive sample pair and the at least one second negative sample pair, the second contrast loss being used to measure the local similarity between the noiseless sample image and the noisy image. The loss calculation module is further configured to calculate a first regression loss based on the noiseless sample image and the denoised image corresponding to the denoised image, wherein the first regression loss is used to measure the overall similarity between the noiseless sample image and the denoised image corresponding to the denoised image. The loss calculation module is further configured to calculate a second regression loss based on the noiseless sample image and the denoised image corresponding to the noiseless sample image. The second regression loss is used to measure the overall similarity between the noiseless sample image and the denoised image corresponding to the noiseless sample image. The loss calculation module is further configured to calculate a first adversarial loss based on the noisy sample image and the noisy image, wherein the first adversarial loss is used to measure the realism of the noisy image; The loss calculation module is further configured to calculate a second adversarial loss based on the noiseless sample image and the denoised image corresponding to the noiseless sample image, wherein the second adversarial loss is used to measure the realism of the denoised image corresponding to the noiseless sample image. The loss calculation module is further configured to calculate the training loss based on the first contrastive loss, the second contrastive loss, the first regression loss, the second regression loss, the first adversarial loss, and the second adversarial loss; The model training module is used to train the image denoising model based on the training loss.

6. A computer device, characterized in that, The computer device includes a processor and a memory, the memory storing at least one program, which is loaded and executed by the processor to implement the training method of the image denoising model as described in any one of claims 1 to 4.

7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores at least one program, which is loaded and executed by a processor to implement the training method of the image denoising model as described in any one of claims 1 to 4.

8. A computer program product, characterized in that, The computer program product includes computer instructions that are loaded and executed by a processor to implement the training method of the image denoising model as described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Unbalanced electrocardio sample classification method based on data enhancement and loss weighting

    CN111460956A

  • Multi-metric three-dimensional face reconstruction method based on parameterized model and position map

    CN112184912A