Image processing method and device, computer equipment and storage medium

By introducing an image fusion process in the denoising process of the image processing model, the denoising image and the noise-added image are fused, which solves the problem of large differences in the target object in the stylized model, and improves the image processing effect and quality.

CN119559079APending Publication Date: 2025-03-04BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311001878.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-08-09
Publication Date
2025-03-04

AI Technical Summary

Technical Problem

During the multiple noise addition and denoising processing of the stylized model based on AIGC technology, the target object in the generated stylized image may be greatly different from the target object in the input image, and the image processing effect needs to be improved.

Method used

In the denoising process of the image processing model, an image fusion process is introduced, and the first denoising image generated according to the denoising process is fused with the first denoising image generated by the corresponding noise addition process to generate the final denoising result image.

Benefits of technology

The similarity between the target object in the final generated target image by the image processing model and the target object in the input to be processed is improved, the problem of large differences in target objects is solved, and the image processing effect and image quality are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119559079A_ABST
    Figure CN119559079A_ABST
Patent Text Reader

Abstract

The invention provides an image processing method and device, computer equipment and a storage medium, and the method comprises the steps: obtaining a to-be-processed image; inputting the to-be-processed image into an image processing model, and determining a target image corresponding to the to-be-processed image; wherein the image processing model comprises multiple denoising processing processes and multiple denoising processing processes, and denoising result images corresponding to at least part of the denoising processing processes in the multiple denoising processing processes are first denoising image sums generated based on the denoising processing processes, and second denoising image sums generated based on the denoising processing processes. And fusing a first noise adding image generated in a noise adding processing process corresponding to the de-noising processing process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of image processing technology, and in particular to an image processing method, apparatus, computer equipment and storage medium. Background Art

[0002] With the rapid development of artificial intelligence technology, artificial intelligence generated content (AIGC) has gradually entered people's daily lives. The network model based on AIGC technology can generate articles, images, audio and other content that match the input content based on input keywords, descriptions or images, thereby realizing the content generation function.

[0003] In the related technology, the stylization model based on AIGC technology can stylize the target object in the input image to obtain a stylized image. However, the stylization model often performs multiple noise addition and denoising processes, which may cause the target object in the generated stylized image to be significantly different from the target object in the input image, and the image processing effect needs to be improved. Summary of the invention

[0004] The embodiments of the present disclosure at least provide an image processing method, apparatus, computer equipment, and storage medium.

[0005] In a first aspect, an embodiment of the present disclosure provides an image processing method, including:

[0006] Get the image to be processed;

[0007] The image to be processed is input into an image processing model to determine a target image corresponding to the image to be processed; wherein the image processing model includes multiple denoising processes and multiple denoising processes, and a denoising result image corresponding to at least some of the denoising processes in the multiple denoising processes is obtained by fusion of a first denoising image generated by the denoising process and a first denoised image generated by the denoising process corresponding to the denoising process.

[0008] In a second aspect, the present disclosure also provides an image processing device, including:

[0009] An acquisition module, used for acquiring an image to be processed;

[0010] A determination module is used to input the image to be processed into an image processing model to determine a target image corresponding to the image to be processed; wherein the image processing model includes multiple noise addition processes and multiple denoising processes, and a denoising result image corresponding to at least some of the denoising processes in the multiple denoising processes is obtained by fusion of a first denoised image generated by the denoising process and a first noisy image generated by the denoising process corresponding to the denoising process.

[0011] In a third aspect, an embodiment of the present disclosure further provides a computer device, comprising: a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the computer device is running, the processor and the memory communicate via the bus, and when the machine-readable instructions are executed by the processor, the steps of the above-mentioned first aspect, or any possible implementation of the first aspect are performed.

[0012] In a fourth aspect, an embodiment of the present disclosure further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned first aspect or any possible implementation of the first aspect are executed.

[0013] The image processing method, apparatus, computer equipment and storage medium provided by the embodiments of the present disclosure can improve the similarity between a target object in a target image finally generated by the image processing model and a target object in an input image to be processed by adding, during a process of processing an image to be processed using an image processing model, an image fusion process for fusing a first denoised image generated according to a denoising process and a first noisy image generated by a denoising process corresponding to the denoising process in a denoising process, thereby solving the problem that a target object in a target image is greatly different from a target object in an input image to be processed due to multiple image processing performed by the image processing model, thereby improving image processing effect and image quality.

[0014] In order to make the above-mentioned objectives, features and advantages of the present disclosure more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the following is a brief introduction to the drawings required for use in the embodiments. The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments consistent with the present disclosure and are used together with the specification to illustrate the technical solutions of the present disclosure. It should be understood that the following drawings only illustrate certain embodiments of the present disclosure and should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can also be obtained based on these drawings without creative work.

[0016] Figure 1 A flowchart of an image processing method provided by an embodiment of the present disclosure is shown;

[0017] Figure 2 A schematic diagram of the architecture of an image processing device provided by an embodiment of the present disclosure is shown;

[0018] Figure 3 A schematic diagram of the structure of a computer device provided by an embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0019] In order to make the purpose, technical scheme and advantages of the embodiments of the present disclosure clearer, the technical scheme in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all of the embodiments. The components of the embodiments of the present disclosure generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present disclosure provided in the drawings is not intended to limit the scope of the present disclosure for protection, but merely represents the selected embodiments of the present disclosure. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present disclosure.

[0020] Research has found that the stylization model based on AIGC technology can stylize the target object in the input image to obtain a stylized image. However, the stylization model often performs multiple noise addition and denoising processes, which may cause the target object in the generated stylized image to be quite different from the target object in the input image. The image processing effect needs to be improved.

[0021] Based on the above research, the present disclosure provides an image processing method, apparatus, computer equipment and storage medium. By adding an image fusion process to the denoising process to fuse a first denoised image generated according to a denoising process and a first noisy image generated by a denoising process corresponding to the denoising process in the process of processing an image to be processed using an image processing model, the similarity between a target object in a target image finally generated by the image processing model and a target object in an input image to be processed can be improved, the problem that the target object in the target image is greatly different from the target object in the input image to be processed due to multiple image processing performed by the image processing model is solved, and the image processing effect and image quality are improved.

[0022] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.

[0023] The term "and / or" herein only describes an association relationship, indicating that three relationships may exist. For example, A and / or B may represent the following three situations: A exists alone, A and B exist at the same time, and B exists alone. In addition, the term "at least one" herein represents any combination of at least two of any one or more of a plurality of. For example, including at least one of A, B, and C may represent including any one or more elements selected from the set consisting of A, B, and C.

[0024] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.

[0025] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.

[0026] As an optional but non-limiting implementation, in response to receiving an active request from the user, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0027] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet the relevant laws and regulations may also be applied to the implementation of the present disclosure.

[0028] To facilitate understanding of the present embodiment, an image processing method disclosed in the present embodiment is first introduced in detail. The execution subject of the image processing method provided in the present embodiment is generally a computer device with certain computing capabilities, and the computer device includes, for example: a terminal device or a server or other processing device, and the terminal device can be a user equipment (User Equipment, UE), a mobile device, a user terminal, a terminal, a personal digital assistant (Personal Digital Assistant, PDA), a handheld device, a computing device, a vehicle-mounted device, a wearable device, etc. In some possible implementations, the image processing method can be implemented by a processor calling a computer-readable instruction stored in a memory.

[0029] The image processing method provided by the embodiment of the present disclosure is described below by taking the execution subject as a terminal device as an example.

[0030] See also Figure 1 FIG. 1 is a flowchart of an image processing method provided by an embodiment of the present disclosure, wherein the method includes S101 to S102, wherein:

[0031] S101: Acquire an image to be processed.

[0032] S102: Input the image to be processed into an image processing model to determine a target image corresponding to the image to be processed; wherein the image processing model includes multiple noise addition processes and multiple denoising processes, and a denoising result image corresponding to at least some of the denoising processes in the multiple denoising processes is a fusion of a first denoised image generated by a denoising process and a first noisy image generated by a denoising process corresponding to the denoising process.

[0033] The following is a detailed description of the above steps.

[0034] Here, the image to be processed may be a face image that has been subjected to stylization processing, beautification processing, and other image processing after user authorization. The image to be processed may contain at least one target object, and the target object may be an animal in the image, a user's face, etc. In the present disclosure, the step of obtaining the image to be processed is authorized by the user. For specific methods of obtaining and using personal information, please refer to the description of paragraphs 6 to 9 of the specific implementation method of the present disclosure; the image processing model may be a target neural network model, and the target neural network model may be obtained by merging a trained basic network model with a trained low-order adaptive technology model based on a large language model.

[0035] Specifically, when the image processing model processes the image to be processed, it may be to process the target object of the image to be processed; wherein, the target object may be at least one object selected from multiple objects to be screened. When selecting at least one target object from multiple objects to be screened, the selection may be made by selecting the target object in the image to be processed, at least one recognition result of the click object recognition results corresponding to the image to be processed, or the like.

[0036] In a possible implementation manner, when the image processing model processes the image to be processed, the following steps A1 to A2 may be performed:

[0037] A1: Generate an object mask image corresponding to the target object in the image to be processed; and identify the target object in the image to be processed, and generate content description information corresponding to the image to be processed according to the identification result.

[0038] Here, when generating an object mask image corresponding to the target object in the image to be processed, the target object area where the target object in the image to be processed is located can be identified, and the object mask image can be generated based on the identified target object area; when the target object in the image to be processed is identified and content description information corresponding to the image to be processed is generated based on the identification result, feature recognition can be performed on the target object in the image to be processed, and content description information corresponding to the image to be processed can be generated based on the obtained feature recognition result. The content description information can be prompt information used by the image processing model when performing image processing. By using the prompt for image processing, the finally generated target image can match the prompt, that is, match the specific content of the image to be processed.

[0039] Specifically, feature recognition can be performed on the target object in the image to be processed by a preset feature recognition algorithm, and the parameters considered during feature recognition may include feature parameters such as shape and size; or, feature recognition can be performed on the target object in the image to be processed by a pre-trained feature recognition model to obtain a feature recognition result, and the model type of the feature recognition model may be, for example, a convolutional neural network (CNN), a deep residual network (ResNet), a recurrent neural network (RNN), a Transformer model, etc.

[0040] Specifically, when generating content description information corresponding to the image to be processed based on the recognition result, the content description information corresponding to the image to be processed can be generated based on the quantity corresponding to each feature parameter contained in the feature recognition result and the content description information corresponding to each feature parameter.

[0041] Taking the example of two wide faces and one narrow face as the feature recognition result corresponding to the image to be processed, for the wide face, the number "2" corresponding to the feature parameter "wide face", the feature parameter "wide face", and the content description information "wide face description content" corresponding to the feature parameter can be spliced ​​together to generate the description information to be spliced ​​"2 wide faces + wide face description content"; for the narrow face, the number "1" corresponding to the feature parameter "narrow face", the feature parameter "narrow face", and the content description information "narrow face description content" corresponding to the feature parameter can be spliced ​​together to generate the description information to be spliced ​​"1 narrow face + narrow face description content", and the description information to be spliced ​​corresponding to the wide face and the narrow face respectively can be spliced ​​together to obtain the content description information corresponding to the image to be processed.

[0042] A2: Perform multiple noise addition and multiple denoising processes according to the object mask image and the content description information to obtain a target image corresponding to the image to be processed.

[0043] Here, the number of denoising and denoising times when the image processing model performs denoising and denoising can be the same, for example, the number of denoising and denoising times are both 5 times, 10 times, etc. When performing image processing, the image processing model can first perform multiple denoising processes, and then perform multiple denoising processes to obtain a target image corresponding to the image to be processed.

[0044] In one possible implementation, when performing denoising, for any denoising process, if it is detected that the denoising process meets a preset image fusion processing condition, the first denoised image generated in the denoising process can be used to perform image fusion processing with the first noisy image obtained after the denoising process.

[0045] The image fusion processing condition includes at least one of the following:

[0046] Condition 1: The interval between the number of times the last image fusion process was performed reaches a preset interval.

[0047] Here, if the interval between the number of times the image fusion process was performed last reaches a preset interval, it means that the number of times the denoising process was performed continuously without image fusion process is large. At this time, if the image fusion process is not performed in time, the target object in the target image finally generated may have a low similarity with the target object in the image to be processed. Therefore, when it is detected that the interval between the number of times the image fusion process was performed last reaches a preset interval, the image fusion process may be performed during the current denoising process. The number of denoising processes corresponding to the first image fusion process may be the preset number of denoising processes. For example, the image fusion process may be performed during the first denoising process.

[0048] Exemplarily, taking the preset interval as 3, and the number of times of image fusion processing, denoising processing and noise adding processing during the first denoising processing is 10, image fusion processing can be performed during the 1st, 4th, 7th and 10th denoising processing by judging that the interval between the number of times of image fusion processing and the last time reaches the preset interval.

[0049] Condition 2: The number of denoising processes corresponding to the current denoising process reaches the target number of denoising processes.

[0050] Here, the target denoising processing times can be obtained through experiments, and can improve the denoising times of similarity between the target object in the target image and the target object in the image to be processed. Therefore, when it is detected that the denoising processing times corresponding to the current denoising processing process reaches the target denoising processing times, image fusion processing can be performed during the current denoising processing.

[0051] Exemplarily, taking the target denoising processing times as 1, 5, and 10, and the denoising processing and the denoising processing times as 10, image fusion processing can be performed when performing the 1st, 5th, and 10th denoising processing.

[0052] Condition 3: the similarity between the target object included in the first denoised image in the current denoising process and the target object included in the image to be processed is lower than a preset similarity.

[0053] Here, in each denoising process, the similarity between the target object contained in the first denoised image in the current denoising process and the target object contained in the image to be processed can be determined. If the similarity between the target object contained in the first denoised image in the current denoising process and the target object contained in the image to be processed is lower than the preset similarity, it means that the similarity between the first denoised image and the target object in the image to be processed is low at this time. Therefore, if the similarity between the target object contained in the first denoised image in the current denoising process and the target object contained in the image to be processed is lower than the preset similarity, image fusion processing can be performed in the current denoising process.

[0054] Specifically, when determining the similarity between the target object contained in the first denoised image in the current denoising process and the target object contained in the image to be processed, the calculation can be performed using a preset similarity calculation method, which can calculate the similarity by calculating the feature distance between corresponding feature points in the two target objects.

[0055] Exemplarily, taking the preset similarity of 50% as an example, if the similarity between the target object in the first denoised image obtained in the fifth denoising process and the target object in the image to be processed is 45%, image fusion processing can be performed based on the first denoised image obtained in the current denoising process and the corresponding first noisy image to improve the similarity between the first denoised image and the image to be processed.

[0056] In a possible implementation, when a first denoised image generated by a denoising process and a first denoised image generated by a denoising process corresponding to the denoising process are fused, for the Mth denoising process, the first denoised image generated by the Mth denoising process and the first denoised image obtained after the NMth denoising process can be fused, and the image obtained after the image fusion process is used as the denoising result image corresponding to the Mth denoising process; wherein M is a preset positive integer less than or equal to N.

[0057] Exemplarily, taking N as 10 and M as 7 as an example, in the Mth denoising process, the first denoised image generated in the 7th denoising process can be fused with the first noisy image obtained after the 3rd denoising process, and the image obtained after the image fusion process is used as the denoising result image corresponding to the 7th denoising process.

[0058] In this way, since the image processing model first performs multiple noise addition processes and then performs multiple denoising processes during the image processing process; and as the number of noise addition processes increases during the noise addition process, the similarity between the first noisy image and the image to be processed (target object) may gradually decrease, and as the number of denoising processes increases, the similarity between the first denoised image after denoising and the image to be processed (target object) may further decrease. Therefore, the first denoised image obtained in the denoising process with a later denoising number and the first noisy image obtained in the denoising process with an earlier denoising number are subjected to image fusion processing. The first noisy image with higher similarity can be used to perform image fusion processing with the first denoised image with lower similarity at this time, thereby improving the similarity between the denoising result image after the image fusion processing and the image to be processed (target object) while retaining the image processing effect of the noise addition process.

[0059] In a possible implementation, when multiple noise addition and multiple denoising processes are performed according to the object mask image and the content description information to obtain a target image corresponding to the image to be processed, the following steps A21 to A22 may be performed:

[0060] A21: Adjust the object mask image to obtain an adjusted object mask image.

[0061] Here, when performing image processing according to the object mask image, if the object mask image and the corresponding position in the image to be processed coincide with the edge of the target object of the image to be processed, the object mask image only contains all the content corresponding to the target object, and it is difficult to generate the background content corresponding to the target object by image processing according to the target object; and if the object mask image contains some background content other than the target object, it is convenient for the image processing model to improve the background content by image processing to obtain a target image with a more natural background content; and if the object mask image contains part of the target object, the image processing model can fill the complete target object content according to the part of the target object, and can also generate a target image with higher image quality, that is, when the corresponding position of the object mask image in the image to be processed may completely coincide with the edge of the target object of the image to be processed, it may be difficult to generate the background content corresponding to the target object by image processing because the object mask image only contains the complete content corresponding to the target object, resulting in the problem of target object collapse in the finally generated target image due to the incoordination between the target object and the background content in the area where the target object is located.

[0062] Specifically, since errors may exist when the object mask image is generated, the corresponding position of the generated object mask image in the image to be processed may overlap with the edge of the target object in the image to be processed, resulting in the target object being collapsed in the final generated target image due to the inconsistency between the target object and the background content in the area where the target object is located. Therefore, when adjusting the object mask image, the object mask image can be adjusted when it is detected that the corresponding position of the object mask image in the image to be processed overlaps with the edge of the target object in the image to be processed.

[0063] A22: Perform multiple noise addition and multiple denoising processes according to the adjusted object mask image and the content description information to obtain a target image corresponding to the image to be processed.

[0064] Here, when adjusting the object mask image, any of the following adjustment methods may be used:

[0065] Mode 1: performing a first erosion process on the object mask image according to a first erosion degree that matches object size information corresponding to the object mask image.

[0066] Here, the object size information may be the size of an object detection frame corresponding to the target object. By performing object recognition on the image to be processed, the object detection frame corresponding to the target object in the image to be processed can be obtained.

[0067] Specifically, when the first corrosion processing is performed on the object mask image according to the first corrosion degree that matches the object size information corresponding to the object mask image, when it is detected that the object size information is greater than the preset reference object size information, the first corrosion degree that matches the object size information corresponding to the object mask image can be determined according to the mapping relationship between the preset object size information and the corrosion degree, and the first corrosion processing is performed on the object mask image according to the first corrosion degree.

[0068] Among them, the mapping relationship between the object size information and the corrosion degree can be established based on the multiple relationship between the object size information and the first benchmark object size information. Taking the benchmark object size of 256px×256px as an example, if the object size 1 is 512px×512px, that is, the object size is 4 times the benchmark object size, the corrosion degree corresponding to the object size 1 can be set to 4 times the first benchmark corrosion degree corresponding to the search benchmark object size, so that the corrosion parameters can be adaptively set according to the object size and the benchmark object size.

[0069] In this way, the object mask image can be adaptively eroded according to the mapping relationship between the object size information and the degree of erosion, so as to obtain an adjusted object mask image that is more suitable for image processing, and obtain a target image with better image quality through subsequent image processing.

[0070] Mode 2: dilating the object mask image according to a dilation degree that matches the object size information corresponding to the object mask image.

[0071] Specifically, when the object mask image is subjected to a first dilation processing according to a first dilation degree that matches the object size information corresponding to the object mask image, when it is detected that the object size information is smaller than preset reference object size information, the dilation degree that matches the object size information corresponding to the object mask image may be determined according to a preset mapping relationship between the object size information and the dilation degree, and the object mask image may be subjected to a dilation processing according to the dilation degree.

[0072] Among them, the mapping relationship between the object size information and the expansion degree can be established based on the multiple relationship between the basic object size information and the object size information. Taking the benchmark object size of 256px×256px as an example, if the object size 2 is 128px×128px, that is, the benchmark object size is 4 times the object size 2, then the expansion degree corresponding to the object size 2 can be set to 4 times the benchmark expansion degree corresponding to the benchmark object size, so that the expansion parameters can be adaptively set according to the object size and the benchmark object size.

[0073] In this way, the object mask image can be adaptively expanded according to the mapping relationship between the object size information and the expansion degree, so as to obtain an adjusted object mask image that is more suitable for image processing, and obtain a target image with better image quality through subsequent image processing.

[0074] Method 3: determining a forehead mask image and a hair mask image corresponding to the object mask image, and performing a second corrosion process on the object mask image according to a second corrosion degree that matches the overlap degree of the forehead mask image and the hair mask image.

[0075] Here, the higher the degree of overlap between the forehead mask image and the hair mask image, the more bangs there are on the forehead of the target object. The more bangs there are on the forehead of the target object, the more likely it is that the bangs in the image to be processed will also be present in the generated target image, resulting in poor image quality of the generated target image. Therefore, the object mask image can be subjected to a second corrosion process according to a second corrosion degree that matches the degree of overlap between the forehead mask image and the hair mask image.

[0076] Specifically, when the object mask image is subjected to a second corrosion processing according to a second corrosion degree that matches the degree of overlap between the forehead mask image and the hair mask image, the second corrosion degree that matches the degree of overlap between the forehead mask image and the hair mask image can be determined according to a preset mapping relationship between the degree of overlap and the degree of corrosion, and the object mask image is subjected to a second corrosion processing according to the second degree of corrosion; wherein, the mapping relationship between the degree of overlap and the degree of corrosion can be that when the proportion of the overlapping area to the forehead mask image exceeds 1 / 5, the corrosion parameters corresponding to the second baseline corrosion degree are doubled, and the doubled corrosion parameters are used as the corrosion parameters in the second corrosion degree.

[0077] It should be noted that multiple methods among the above methods can be used simultaneously to process the object mask image. For example, the above method 1 and method 3 can be used simultaneously. After determining the first corrosion degree that matches the object size information corresponding to the object mask image, the determined first corrosion degree is used as the second reference corrosion degree, and the first corrosion degree is adaptively adjusted according to the overlap degree of the forehead mask image and the hair mask image, so as to obtain a corrosion degree that matches the object size information and the overlap degree of the forehead mask image and the hair mask image.

[0078] In this way, by performing adaptive dilation or erosion processing on the object mask image according to at least one of the above-mentioned methods before using the object mask image for image processing, an adjusted object mask image that is more suitable for image processing can be obtained, and a target image with better image quality can be obtained through subsequent image processing processes.

[0079] In a possible implementation manner, when the image to be processed is input into the image processing model and the target image corresponding to the image to be processed is determined, the following steps B1 to B2 may be performed:

[0080] B1: Adjusting the image content in the image to be processed that meets the preset adjustment conditions to obtain an adjusted image to be processed; wherein the image content that meets the preset adjustment conditions includes clothes with a preset color.

[0081] B2: Inputting the adjusted image to be processed into the image processing model to determine the target image corresponding to the adjusted image to be processed.

[0082] Here, the preset color can be black, and the color of clothes in the target image generated by the image processing model can be white. Since the image processing model needs to use the content description information corresponding to the image to be processed when performing image processing, and there is a large difference between black and white, and the image processing model will retain the features in the original image when performing image processing, but from the perspective of model understanding, black and white are two opposite contents. For the network model with understanding ability after training, retaining the original black image content and generating white image content are obviously in conflict. Therefore, if there are black clothes in the image to be processed, it may cause the image processing model to have difficulty in generating a target image that meets the preset requirements (that is, the color of the clothes is white) when performing image processing according to the content description information. Therefore, the image content in the image to be processed that meets the preset adjustment conditions can be adjusted according to the image generation requirements corresponding to the target image to obtain the adjusted image to be processed.

[0083] Specifically, when adjusting the image content in the image to be processed that meets the preset adjustment conditions according to the image generation requirements, the image content in the image to be processed that meets the preset adjustment conditions can be adjusted according to the preset adjustment method corresponding to the image content that meets the preset adjustment conditions.

[0084] For example, taking the image content of black clothes that meets the preset adjustment conditions as an example, the image content can be adjusted according to the adjustment method corresponding to black clothes, "converting black to white", to obtain a processed image in which the color of the clothes is adjusted to white, and the adjusted processed image can be input into the image processing model to determine the target image corresponding to the adjusted processed image.

[0085] In this way, by adjusting the image content in the image to be processed that meets the preset adjustment conditions, and inputting the adjusted image to be processed into the image processing model, the input image to be processed can meet the preset requirements corresponding to the target image, thereby improving the image quality of the target image.

[0086] The image processing method provided by the embodiment of the present disclosure can improve the similarity between the target object in the target image finally generated by the image processing model and the target object in the input image to be processed by adding an image fusion process to the denoising process to fuse the first denoised image generated by the denoising process and the first noisy image generated by the denoising process corresponding to the denoising process during the process of processing the image to be processed using the image processing model, thereby solving the problem that the target object in the target image is greatly different from the target object in the input image to be processed due to multiple image processing performed by the image processing model, thereby improving the image processing effect and image quality.

[0087] Those skilled in the art will appreciate that, in the above method of specific implementation, the order in which the steps are written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of the steps should be determined by their functions and possible internal logic.

[0088] Based on the same inventive concept, an image processing device corresponding to the image processing method is also provided in the embodiment of the present disclosure. Since the principle of solving the problem by the device in the embodiment of the present disclosure is similar to the above-mentioned image processing method in the embodiment of the present disclosure, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be repeated.

[0089] Reference Figure 2 , which is a schematic diagram of the architecture of an image processing device provided by an embodiment of the present disclosure, the device comprises: an acquisition module 201 and a determination module 202; wherein,

[0090] An acquisition module, used for acquiring an image to be processed;

[0091] A determination module is used to input the image to be processed into an image processing model to determine a target image corresponding to the image to be processed; wherein the image processing model includes multiple noise addition processes and multiple denoising processes, and a denoising result image corresponding to at least some of the denoising processes in the multiple denoising processes is obtained by fusion of a first denoised image generated by the denoising process and a first noisy image generated by the denoising process corresponding to the denoising process.

[0092] In a possible implementation manner, the number of times the noise addition process is performed and the number of times the noise removal process is performed is N;

[0093] The determining module is used to fuse the first denoised image generated by the denoising process and the first denoised image generated by the denoising process corresponding to the denoising process according to the following steps:

[0094] For the Mth denoising process, the first denoised image generated in the Mth denoising process is fused with the first denoised image obtained after the NMth denoising process, and the image obtained after the image fusion process is used as the denoising result image corresponding to the Mth denoising process; wherein M is a preset positive integer less than or equal to N.

[0095] In a possible implementation manner, the determining module is used to perform denoising processing according to the following steps:

[0096] For any denoising process, when it is detected that the denoising process satisfies a preset image fusion processing condition, a first denoised image generated in the denoising process is used to perform image fusion processing with a first denoised image obtained after the denoising process;

[0097] The image fusion processing condition includes at least one of the following:

[0098] The interval between the number of times of image fusion processing last performed reaches the preset interval, the number of denoising processing times corresponding to the current denoising processing process reaches the target denoising processing times, and the similarity between the target object contained in the first denoising image in the current denoising processing and the target object contained in the image to be processed is lower than the preset similarity.

[0099] In a possible implementation manner, the image to be processed includes a target object;

[0100] The image processing model is used to process the image to be processed according to the following steps:

[0101] generating an object mask image corresponding to the target object in the image to be processed; and identifying the target object in the image to be processed, and generating content description information corresponding to the image to be processed according to the identification result;

[0102] Multiple noise addition and multiple denoising processes are performed according to the object mask image and the content description information to obtain a target image corresponding to the image to be processed.

[0103] In a possible implementation manner, the determination module, when performing multiple noise addition and multiple denoising processes according to the object mask image and the content description information to obtain a target image corresponding to the image to be processed, is used to:

[0104] Adjusting the object mask image to obtain an adjusted object mask image;

[0105] Multiple noise addition processes and multiple noise removal processes are performed according to the adjusted object mask image and the content description information to obtain a target image corresponding to the image to be processed.

[0106] In a possible implementation manner, the determining module, when adjusting the object mask image, is used to:

[0107] performing a first erosion process on the object mask image according to a first erosion degree matching the object size information corresponding to the object mask image; or,

[0108] dilating the object mask image according to a dilation degree that matches the object size information corresponding to the object mask image; or,

[0109] A forehead mask image and a hair mask image corresponding to the object mask image are determined, and a second erosion process is performed on the object mask image according to a second erosion degree that matches the overlap degree of the forehead mask image and the hair mask image.

[0110] In a possible implementation manner, the determination module, when inputting the image to be processed into the image processing model to determine the target image corresponding to the image to be processed, is used to:

[0111] Adjusting the image content in the image to be processed that meets the preset adjustment condition to obtain an adjusted image to be processed; wherein the image content that meets the preset adjustment condition includes clothes with a preset color;

[0112] The adjusted image to be processed is input into the image processing model to determine a target image corresponding to the adjusted image to be processed.

[0113] The image processing device provided by the disclosed embodiment can improve the similarity between the target object in the target image finally generated by the image processing model and the target object in the input image to be processed by adding an image fusion process to the denoising process to fuse the first denoised image generated by the denoising process and the first noisy image generated by the denoising process corresponding to the denoising process during the process of processing the image to be processed using the image processing model, thereby solving the problem that the target object in the target image is greatly different from the target object in the input image to be processed due to multiple image processing performed by the image processing model, thereby improving the image processing effect and image quality.

[0114] For descriptions of the processing flow of each module in the device and the interaction flow between each module, reference may be made to the relevant descriptions in the above method embodiment, which will not be described in detail here.

[0115] Based on the same technical concept, the embodiment of the present disclosure also provides a computer device. Figure 3, which is a schematic diagram of the structure of a computer device 300 provided in an embodiment of the present disclosure. The computer device in the embodiment of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc., or various forms of servers, such as independent servers or server clusters. Figure 3 The computer device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0116] like Figure 3 As shown, the computer device 300 may include a processing device (e.g., a central processing unit, a graphics processor, etc.) 301, which can perform various appropriate actions and processes according to a program stored in a read-only storage device (ROM) 302 or a program loaded from a storage device 308 to a random access storage device (RAM) 303. In the RAM 303, various programs and data required for the operation of the computer device 300 are also stored. The processing device 301, the ROM 302, and the RAM 303 are connected to each other via a bus 304. An input / output (I / O) interface 305 is also connected to the bus 304.

[0117] Typically, the following devices may be connected to the I / O interface 305: input devices 306 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 307 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 308 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 309. The communication devices 309 may allow the computer device 300 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 3 The computer device 300 is shown with various devices, but it should be understood that it is not required to implement or have all the devices shown. More or fewer devices may be implemented or have instead.

[0118] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the image processing method. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 309, or installed from a storage device 308, or installed from a ROM 302. When the computer program is executed by the processing device 301, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.

[0119] The present disclosure also provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the steps of the image processing method described in the above method embodiment are executed. The storage medium can be a volatile or non-volatile computer-readable storage medium.

[0120] The present disclosure also provides a computer program product that carries a program code. The program code includes instructions that can be used to execute the steps of the image processing method described in the above method embodiment. For details, please refer to the above method embodiment, which will not be repeated here.

[0121] The computer program product may be implemented in hardware, software or a combination thereof. In one optional embodiment, the computer program product is implemented as a computer storage medium. In another optional embodiment, the computer program product is implemented as a software product, such as a software development kit (SDK).

[0122] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, the specific working process of the system and device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here. In the several embodiments provided in the present disclosure, it should be understood that the disclosed system, device and method can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of the device or unit can be electrical, mechanical or other forms.

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

[0124] In addition, each functional unit in each embodiment of the present disclosure may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0125] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present disclosure, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present disclosure. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0126] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present disclosure, which are used to illustrate the technical solutions of the present disclosure, rather than to limit them. The protection scope of the present disclosure is not limited thereto. Although the present disclosure is described in detail with reference to the above-described embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-described embodiments within the technical scope disclosed in the present disclosure, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present disclosure, and should be included in the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be based on the protection scope of the claims.

Claims

1. An image processing method, characterized in that: include: Get the image to be processed; The image to be processed is input into an image processing model to determine a target image corresponding to the image to be processed; wherein the image processing model includes multiple denoising processes and multiple denoising processes, and a denoising result image corresponding to at least some of the denoising processes in the multiple denoising processes is obtained by fusion of a first denoising image generated by the denoising process and a first denoised image generated by the denoising process corresponding to the denoising process.

2. The method according to claim 1, characterized in that The number of times of the noise adding process and the number of times of the noise removing process is N; The method comprises fusing a first denoised image generated by a denoising process and a first denoised image generated by a denoising process corresponding to the denoising process according to the following steps: For the Mth denoising process, the first denoised image generated in the Mth denoising process is fused with the first denoised image obtained after the NMth denoising process, and the image obtained after the image fusion process is used as the denoising result image corresponding to the Mth denoising process; wherein M is a preset positive integer less than or equal to N.

3. The method according to claim 1, characterized in that The method comprises performing denoising according to the following steps: For any denoising process, when it is detected that the denoising process satisfies a preset image fusion processing condition, a first denoised image generated in the denoising process is used to perform image fusion processing with a first denoised image obtained after the denoising process; The image fusion processing condition includes at least one of the following: The interval between the number of times of image fusion processing last performed reaches the preset interval, the number of denoising processing times corresponding to the current denoising processing process reaches the target denoising processing times, and the similarity between the target object contained in the first denoising image in the current denoising processing and the target object contained in the image to be processed is lower than the preset similarity.

4. The method according to claim 1, characterized in that: The image to be processed contains a target object; The image processing model is used to process the image to be processed according to the following steps: generating an object mask image corresponding to the target object in the image to be processed; and identifying the target object in the image to be processed, and generating content description information corresponding to the image to be processed according to the identification result; Multiple noise addition and multiple denoising processes are performed according to the object mask image and the content description information to obtain a target image corresponding to the image to be processed.

5. The method according to claim 4, characterized in that The step of performing multiple noise addition and multiple noise removal processes according to the object mask image and the content description information to obtain a target image corresponding to the image to be processed includes: Adjusting the object mask image to obtain an adjusted object mask image; Multiple noise addition processes and multiple noise removal processes are performed according to the adjusted object mask image and the content description information to obtain a target image corresponding to the image to be processed.

6. The method according to claim 5, characterized in that The adjusting the object mask image comprises: performing a first erosion process on the object mask image according to a first erosion degree matching the object size information corresponding to the object mask image; or, dilating the object mask image according to a dilation degree that matches the object size information corresponding to the object mask image; or, A forehead mask image and a hair mask image corresponding to the object mask image are determined, and a second erosion process is performed on the object mask image according to a second erosion degree that matches the overlap degree of the forehead mask image and the hair mask image.

7. The method according to claim 1, characterized in that The step of inputting the image to be processed into an image processing model and determining a target image corresponding to the image to be processed includes: Adjusting the image content in the image to be processed that meets the preset adjustment condition to obtain an adjusted image to be processed; wherein the image content that meets the preset adjustment condition includes clothes with a preset color; The adjusted image to be processed is input into the image processing model to determine a target image corresponding to the adjusted image to be processed.

8. An image processing device, characterized in that: include: An acquisition module, used for acquiring an image to be processed; A determination module is used to input the image to be processed into an image processing model to determine a target image corresponding to the image to be processed; wherein the image processing model includes multiple noise addition processes and multiple denoising processes, and a denoising result image corresponding to at least some of the denoising processes in the multiple denoising processes is obtained by fusion of a first denoised image generated by the denoising process and a first noisy image generated by the denoising process corresponding to the denoising process.

9. A computer device, characterized in that: include: A processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the computer device is running, the processor and the memory communicate via the bus, and when the machine-readable instructions are executed by the processor, the steps of the image processing method as described in any one of claims 1 to 7 are performed.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the image processing method according to any one of claims 1 to 7 are executed.