Image processing method and apparatus, and computer device and storage medium

By detecting and adjusting the proportion of target objects in the image and using the corresponding target model information for image processing, the problem of poor image quality in the target objects is small, and the image processing effect is improved.

WO2025031411A1PCT designated stage expired Publication Date: 2025-02-13BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/110438
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-08-09
Filing Date
2024-08-07
Publication Date
2025-02-13

AI Technical Summary

Technical Problem

The current stylized model based on generative artificial intelligence technology, when the target object accounts for a small proportion of the input image, the image quality of the generated stylized image is poor, and the processing effect needs to be improved.

Method used

By detecting the proportion of the target object in the image to be processed, if it is less than the preset ratio, the target model information corresponding to the target object is determined, and the proportion of the target object in the image is adjusted, and the image processing model is controlled to adjust the target model information according to the target model information. The subsequent image is processed to generate a first target image.

Benefits of technology

The image processing effect when the target object accounts for a small proportion is improved, and the image quality of the generated stylized images is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024110438_13022025_PF_FP_ABST
    Figure CN2024110438_13022025_PF_FP_ABST
Patent Text Reader

Abstract

Provided in the present disclosure are an image processing method and apparatus, and a computer device and a storage medium. The method comprises: acquiring an image to be processed; detecting the proportion of a target object, which is in said image, in said image, and when the proportion is less than a preset ratio, determining target model information corresponding to the target object; and adjusting the proportion of the target object in said image, and controlling an image processing model to process said adjusted image according to the target model information, so as to obtain a first target image. By means of the method, the image quality of a generated first target image can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Image processing method, device, computer equipment and storage medium

[0001] Cross-references

[0002] This application claims priority to Chinese patent application No. 202311001868.9 filed on August 9, 2023. The contents of the above-mentioned Chinese patent application disclosure are hereby incorporated by reference in their entirety as a part of this application. Technical Field

[0003] The present disclosure relates to an image processing method, apparatus, computer equipment, and storage medium. Background Art

[0004] With the rapid development of artificial intelligence (AI), generative AI (AIGC) has gradually become part of our daily lives. AIGC-based network models can generate content, such as articles, images, and audio, based on input keywords, descriptions, or images, thereby enabling content generation.

[0005] In some cases, the stylization model based on AIGC technology can stylize the target object in the input image to obtain a stylized image. However, when the target object in the current input image accounts for a small proportion, the image quality of the generated stylized image is poor and the image processing effect needs to be improved.

[0006] Summary of the Invention

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

[0008] The present disclosure provides an image processing method including:

[0009] Get the image to be processed;

[0010] detecting a proportion of a target object in the image to be processed, and determining target model information corresponding to the target object when the proportion is less than a preset ratio;

[0011] The proportion of the target object in the image to be processed is adjusted, and the image processing model is controlled to process the adjusted image to be processed according to the target model information to obtain a first target image.

[0012] The present disclosure also provides an image processing device, including:

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

[0014] a determination module, configured to detect a proportion of a target object in the image to be processed, and determine target model information corresponding to the target object when the proportion is less than a preset ratio;

[0015] The adjustment module is used to adjust the proportion of the target object in the image to be processed, and control the image processing model to process the adjusted image to be processed according to the target model information to obtain a first target image.

[0016] 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. 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 provided in any embodiment of the present disclosure are performed.

[0017] 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 image processing method provided by any embodiment of the present disclosure are executed.

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

[0019] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the following briefly introduces the drawings required for use in the embodiments. The drawings herein are incorporated into and constitute a part of the specification. These drawings illustrate embodiments consistent with the present disclosure and, together with the specification, are used 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 those of ordinary skill in the art, other relevant drawings can be obtained based on these drawings without inventive effort.

[0020] FIG1 shows a flow chart of an image processing method provided by an embodiment of the present disclosure;

[0021] FIG2 shows a schematic diagram of an image processing device provided by an embodiment of the present disclosure; and

[0022] FIG3 shows a schematic structural diagram of a computer device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION

[0023] In order to make the purpose, technical solutions and advantages of the embodiments of the present disclosure clearer, the technical solutions 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, not all of the embodiments. The components of the embodiments of the present disclosure generally described and shown in the drawings herein 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 disclosure for which protection is sought, but merely represents 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 are within the scope of protection of the present disclosure.

[0024] 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, when the target object in the current input image accounts for a small proportion, the image quality of the generated stylized image is poor and the image processing effect needs to be improved.

[0025] Based on the above research, the present disclosure provides an image processing method, apparatus, computer equipment and storage medium, which determines the target model information corresponding to the target object in the acquired image to be processed when it is detected that the proportion of the target object in the image to be processed is less than a preset ratio, and after adjusting the proportion of the target object in the image to be processed, controls the image processing model to process the adjusted image to be processed according to the target model information to obtain a processed first target image. In this way, for image processing scenarios in which the proportion of the target object in the image to be processed is relatively small during the image processing process, image processing can be performed by adjusting the proportion of the target object in the image to be processed and using the target model information corresponding to the target object to perform image processing, thereby solving the problem of poor processing effect on the target object in the input image when the proportion of the target object in the input image is relatively small, thereby improving the image quality of the generated first target image.

[0026] 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, it does not need to be further defined or explained in subsequent drawings.

[0027] The term "and / or" herein simply describes an association relationship, indicating that three relationships can exist. For example, A and / or B can represent the existence of A alone, the simultaneous existence of A and B, and the existence of B alone. In addition, the term "at least one" herein refers to any combination of at least two of any one or more of a plurality of items. For example, "at least one of A, B, and C" can represent any one or more elements selected from the set consisting of A, B, and C.

[0028] It is understandable that before using the technical solutions disclosed in the various embodiments of this disclosure, the type, scope of use, usage scenarios, etc. of the personal information involved in this 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.

[0029] For example, in response to a user's active request, a prompt message is sent to the user to clearly inform the user that the operation requested will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the electronic device, application, server, storage medium, or other software or hardware that performs the operations of the disclosed technical solution based on the prompt message.

[0030] As an optional but non-limiting implementation, in response to receiving a user's active request, 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. Furthermore, the pop-up window may also contain a selection control for the user to select "agree" or "disagree" to provide personal information to the electronic device.

[0031] It is understandable that the above notification and user authorization process are merely illustrative and do not limit the implementation of the present disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of the present disclosure.

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

[0033] 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.

[0034] 1 , which is a flowchart of an image processing method provided by an embodiment of the present disclosure, the method includes steps 101 to 103 .

[0035] Step 101: Obtain an image to be processed.

[0036] Step 102: Detect the proportion of the target object in the image to be processed, and if the proportion is less than a preset ratio, determine the target model information corresponding to the target object.

[0037] Step 103: Adjust the proportion of the target object in the image to be processed, and control the image processing model to process the adjusted image to be processed according to the target model information to obtain a first target image.

[0038] For step 101,

[0039] Here, the image to be processed may be a facial image that has been subjected to stylization processing, beauty 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 the specific method of obtaining and using personal information, please refer to the description in paragraphs 6 to 9 of the specific implementation method of this disclosure.

[0040] Specifically, the image to be processed may include a target object and a background image. During the stylization process, the target object in the image to be processed may be stylized to obtain a stylized image.

[0041] For step 102,

[0042] Here, the target object can 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 can be made by framing the target object in the image to be processed, clicking at least one recognition result in the object recognition results corresponding to the image to be processed, etc.; the proportion of the target object in the image to be processed can be determined by the ratio between the area of ​​the target object and the area of ​​the image to be processed, and the preset ratio can be, for example, 1:20, 1:30, etc.

[0043] The target model information is the parameters used when the image to be processed is processed using an image processing model; the image processing model can be a target neural network model, and the target neural network model can be obtained by merging a trained basic network model with a trained low-order adaptive technology model based on a large language model.

[0044] Among them, the basic network model and the low-order adaptive technology model of the large language model can use the same image processing size for image processing during the training process. For example, the image size of the sample data in the training process can be processed to 704 pixels on the long side, and the short side is adaptively scaled according to a fixed ratio with the long side; the basic network model and the low-order adaptive technology model of the large language model can randomly crop the input image during the training process, and the image size after random cropping is related to the image size of the input image before cropping, so that the basic network model and the low-order adaptive technology model of the large language model have the ability to crop images and the ability to process the cropped image, which is convenient for subsequent cropping of the image and processing of the cropped image. The relevant content of the subsequent cropping of the image to be processed will be introduced in step 103 below and will not be elaborated here.

[0045] In this way, by setting the low-order adaptive technology model of the basic network model and the large language model to use the same image processing size for image processing before the merging process, and adaptively training for the specific application scenarios of subsequent image cropping and processing of the image after image cropping, the low-order adaptive technology model of the merged basic network model and the large language model can adapt to the specific image processing scenario, and can better perform the merging process, thereby improving the network performance of the target neural network model after the merging process.

[0046] In one possible embodiment, the image processing model may include multiple noise addition processes and multiple denoising processes; the denoising result image corresponding to at least some of the denoising processes in the multiple denoising processes is obtained by image fusion processing of a first denoised image generated by the denoising process and a first noisy image generated by the noise addition process corresponding to the denoising process.

[0047] Among them, 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 complete the stylized processing of the image to be processed; the target model information may include the fusion ratio used by the image processing model when performing image fusion processing, and / or the number of denoising processes included in the image processing model.

[0048] Specifically, the fusion ratio is used to characterize the proportions of the first denoised image and the first noisy image in the denoised result image that are respectively involved in the fusion to generate the denoised result image. The fusion ratio used in the image fusion processing can be adjusted by a preset fusion ratio adjustment method (such as increasing the fusion ratio corresponding to the first noisy image according to a preset amplitude, increasing the fusion ratio corresponding to the first noisy image according to historical adjustment results, etc.), thereby solving the problem of the target object being collapsed in the first target image due to the small proportion of the target object in the image to be processed, and improving the image quality of the generated first target image. On the other hand, , adjusting the number of times of the denoising process can be performed by increasing the number of times according to a preset number increase method (for example, increasing the number or amplitude of the denoising process according to a preset number, increasing the number of denoising processes according to historical adjustment results, etc.), for example, adjusting the number of times of denoising and denoising from 5 times to 10 times, so that the target object and the background in the first target image obtained after processing can be more coordinated by performing more image processing, thereby solving the problem of target object collapse in the first target image due to the small proportion of the target object in the image to be processed.

[0049] In this way, by detecting that the proportion of the target object in the image to be processed is less than a preset ratio, the target model information that matches the current target object proportion is determined, so that the problem of target object collapse in the first target image due to the small proportion of the target object in the image to be processed can be solved by setting the corresponding target model information, thereby improving the image quality of the generated first target image.

[0050] For step 103,

[0051] Here, when adjusting the proportion of the target object in the image to be processed, at least one of the following methods may be used:

[0052] Method 1: Crop the background area of ​​the image to be processed except the area where the target object is located.

[0053] Here, since the image content contained in the background area is irrelevant to the target object, cropping the background area except the area where the target object is located in the image to be processed can reduce the proportion of image content of non-target objects in the image, thereby adjusting the proportion of the target object in the adjusted image to be processed.

[0054] Specifically, when cropping the background area except the area where the target object is located in the image to be processed, the area around the target object (i.e., the four areas of the top, bottom, left and right) can be cropped with the target object as the center. In this way, the area around the target object can be cropped while retaining the target object, thereby achieving the effect of expanding the target object from multiple directions and increasing the proportion of the target object in the image to be processed.

[0055] Method 2: Expand the target object in the image to be processed.

[0056] Here, the target object in the image to be processed may be expanded to adjust the proportion of the target object in the image to be processed.

[0057] Specifically, when the target object in the image to be processed is expanded, the target object may be stretched in multiple directions, thereby increasing the proportion of the target object in the image to be processed.

[0058] In this way, by processing the image to be processed by at least one of the above-mentioned methods, the proportion of the target object in the image can be increased, thereby solving the problem of the target object collapse in the first target image due to the small proportion of the target object in the image to be processed; on the other hand, when using the above-mentioned multiple methods to process the image to be processed at the same time, after using one of the processing methods, if it is detected that the target object in the processed image to be processed is still small (for example, still smaller than the preset ratio, etc.), other processing methods among the multiple methods can be used to continue processing to further increase the proportion of the target object in the image.

[0059] In a possible implementation manner, when the image to be processed contains multiple target objects, the adjusted image to be processed can be processed through the following steps A1 to A2:

[0060] A1: performing attribute recognition on each target object in the image to be processed, and generating content description information corresponding to the image to be processed according to the attribute recognition result.

[0061] Here, when performing attribute recognition on each target object in the image to be processed, the attribute parameters considered may include parameters such as shape and size; alternatively, the attribute recognition of the target object in the image to be processed may be performed using a pre-trained attribute recognition model to obtain an attribute recognition result. The model type of the attribute 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.

[0062] 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 attribute parameter contained in the attribute recognition result and the content description information corresponding to each attribute parameter.

[0063] Taking the example of the attribute recognition result corresponding to the image to be processed being two wide faces and one narrow face, for the wide face, the quantity "2 people" corresponding to the attribute parameter, the attribute parameter "wide face", and the content description information "wide face description content" corresponding to the attribute 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 quantity "1 person" corresponding to the attribute parameter, the attribute parameter "narrow face", and the content description information "narrow face description content" corresponding to the attribute 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 can be spliced ​​together to obtain the content description information corresponding to the image to be processed.

[0064] A2: Control the image processing model to process the adjusted image to be processed according to the target model information and the content description information.

[0065] Here, the image processing model can process the adjusted image to be processed according to the target model information and the content description information to obtain the first target image.

[0066] Specifically, when processing the adjusted image to be processed, the target object in the adjusted image to be processed can be identified first, and an object mask image can be generated based on the identified target object, and the object mask image can be processed based on the target model information and the content description information to generate the first target image.

[0067] Furthermore, after obtaining the first target image, image processing may be performed through the following steps B1 to B3:

[0068] B1: Detecting key parts of the target object in the first target image to determine first distribution information corresponding to the key parts; and detecting key parts of the target object in the image to be processed to determine second distribution information corresponding to the key parts.

[0069] B2: Based on the distribution difference between the first distribution information and the second distribution information, adjust the target object in the image to be processed to obtain the image to be fused.

[0070] Here, the key parts can be the mouth, nose, eyes, etc.; by determining the first distribution information of the key parts in the first target image and the second distribution information of the key parts in the image to be processed, the distribution difference between the first distribution information and the second distribution information can be used to determine the change difference in the key parts between the first target image obtained after processing by the image processing model and the unprocessed image to be processed, so that the target object in the image to be processed can be adjusted according to the distribution difference to obtain the image to be fused that can be processed with the first target image, wherein the third distribution information corresponding to the key parts in the image to be fused matches the first distribution information.

[0071] B3: performing image fusion processing on the image to be fused and the first target image to obtain a fused second target image.

[0072] In a possible implementation, when performing image fusion processing on the image to be fused and the first target image to obtain the fused second target image, the following steps B31 to B32 may be performed:

[0073] B31: Determine the fusion weight corresponding to the image to be fused during image fusion processing according to the proportion of the target object in the image to be processed.

[0074] Here, if the proportion of the target object in the image to be processed is small, the distortion problem of the obtained first target image may be more serious, so the fusion ratio corresponding to the image to be fused can be increased; and if the proportion of the target object in the image to be processed is large, the distortion problem of the obtained first target image may be milder, so the fusion ratio corresponding to the image to be fused can be reduced.

[0075] Specifically, when determining the fusion ratio corresponding to the image to be fused during image fusion processing based on the proportion of the target object in the image to be processed, the fusion ratio corresponding to the image to be fused during image fusion processing can be determined based on the mapping relationship between the preset proportion of the target object and the fusion ratio, and the proportion of the target object in the image to be processed; wherein the proportion of the target object and the fusion ratio can be inversely proportional.

[0076] B32: performing image fusion processing on the image to be fused and the first target image based on the fusion ratio corresponding to the image to be fused, to obtain a second target image after fusion processing.

[0077] For example, taking the fusion ratio corresponding to the image to be fused as 40% as an example, when performing image fusion processing on the image to be fused and the first target image based on the fusion ratio corresponding to the image to be fused, the image to be fused and the first target image can be fused according to the fusion ratio corresponding to the image to be fused being 40% and the fusion ratio corresponding to the first target image being 60%, to obtain a second target image.

[0078] In this way, according to the proportion of the target object in the image to be processed, the fusion proportion corresponding to the image to be fused during image fusion processing is determined, and the image to be fused and the first target image are subjected to image fusion processing based on the fusion proportion corresponding to the image to be fused. This can make the second target image conform to the proportion of the target object in the image to be processed, improve the generation quality of the target object in the second target image, and avoid the problem of target object collapse.

[0079] The image processing method provided by the embodiment of the present disclosure determines the target model information corresponding to the target object in the acquired image to be processed when it is detected that the proportion of the target object in the image to be processed is less than a preset ratio, and after adjusting the proportion of the target object in the image to be processed, controls the image processing model to process the adjusted image to be processed according to the target model information to obtain a processed first target image. In this way, for image processing scenarios in which the proportion of the target object in the image to be processed is relatively small during the image processing process, image processing can be performed by adjusting the proportion of the target object in the image to be processed and using the target model information corresponding to the target object to perform image processing, thereby solving the problem of poor processing effect on the target object in the input image when the proportion of the target object in the input image is relatively small, thereby improving the image quality of the first target image.

[0080] Those skilled in the art will understand that in the above-mentioned method of the specific implementation method, the writing order of each step does not mean a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of each step should be determined by its function and possible internal logic.

[0081] 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.

[0082] 2 , which is a schematic diagram of the architecture of an image processing device provided by an embodiment of the present disclosure, the device includes: an acquisition module 201 , a determination module 202 , and an adjustment module 203 .

[0083] An acquisition module 201 is used to acquire an image to be processed;

[0084] A determination module 202 is configured to detect a proportion of a target object in the image to be processed, and determine target model information corresponding to the target object when the proportion is less than a preset ratio;

[0085] The adjustment module 203 is configured to adjust the proportion of the target object in the image to be processed, and control the image processing model to process the adjusted image to be processed according to the target model information to obtain a first target image.

[0086] In one possible embodiment, the image processing model includes multiple denoising processes and multiple denoising processes; the denoising result images corresponding to at least some of the denoising processes in the multiple denoising processes are obtained by performing image fusion processing on a first denoised image generated by the denoising process and a first noisy image generated by the denoising process corresponding to the denoising process;

[0087] The target model information includes the fusion weight used by the image processing model when performing image fusion processing, and / or the number of denoising processes included in the image processing model.

[0088] In a possible implementation, the adjustment module 203, when adjusting the proportion of the target object in the image to be processed, is configured to:

[0089] The background area of ​​the image to be processed, excluding the area where the target object is located, is cropped to adjust the proportion of the target object in the adjusted image to be processed.

[0090] In a possible implementation manner, the image to be processed contains multiple target objects;

[0091] The adjustment module 203 is used to control the image processing model to process the adjusted image to be processed according to the target model information:

[0092] Performing attribute recognition on each target object in the image to be processed, and generating content description information corresponding to the image to be processed according to the attribute recognition result;

[0093] The image processing model is controlled to process the adjusted image to be processed according to the target model information and the content description information.

[0094] In one possible implementation, the adjustment module 203, when performing attribute recognition on each target object in the image to be processed and generating content description information corresponding to the image to be processed based on the attribute recognition results, is configured to:

[0095] Performing attribute recognition on each target object in the image to be processed to obtain an attribute recognition result including attribute parameters;

[0096] Content description information corresponding to the image to be processed is generated according to the quantity corresponding to each attribute parameter included in the attribute recognition result and the content description method corresponding to each attribute parameter.

[0097] In a possible implementation, after obtaining the first target image, the adjustment module 203 is further configured to:

[0098] Detecting key parts of the target object in the first target image and determining first distribution information corresponding to the key parts; and detecting key parts of the target object in the image to be processed and determining second distribution information corresponding to the key parts;

[0099] Adjusting the target object in the image to be processed based on a distribution difference between the first distribution information and the second distribution information to obtain an image to be fused;

[0100] Performing image fusion processing on the image to be fused and the first target image to obtain a fused second target image.

[0101] In a possible implementation, the adjustment module 203, when performing image fusion processing on the image to be fused and the first target image to obtain a fused second target image, is configured to:

[0102] Determining the fusion weight of the image to be fused during image fusion processing according to the proportion of the target object in the image to be processed;

[0103] An image fusion process is performed on the image to be fused and the first target image based on a fusion ratio corresponding to the image to be fused to obtain a second target image after fusion processing.

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

[0105] The image processing device provided by the embodiment of the present disclosure determines the target model information corresponding to the target object in the acquired image to be processed when it is detected that the proportion of the target object in the image to be processed is less than a preset ratio, and after adjusting the proportion of the target object in the image to be processed, controls the image processing model to process the adjusted image to be processed according to the target model information to obtain a processed first target image. In this way, for image processing scenarios in which the proportion of the target object in the image to be processed is relatively small during the image processing process, image processing can be performed by adjusting the proportion of the target object in the image to be processed and using the target model information corresponding to the target object to perform image processing, thereby solving the problem of poor processing effect on the target object in the input image when the proportion of the target object in the input image is relatively small, thereby improving the image quality of the first target image.

[0106] Based on the same technical concept, the embodiment of the present disclosure also provides a computer device. Referring to Figure 3, there is a schematic diagram of the structure of the computer device 300 provided in the 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, laptops, 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. The computer device shown in Figure 3 is only an example and should not bring any limitations to the functions and scope of use of the embodiment of the present disclosure.

[0107] As shown in FIG3 , a computer device 300 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 301, which can perform various appropriate actions and processes according to a program stored in a read-only memory device (ROM) 302 or a program loaded from a storage device 308 into a random access memory device (RAM) 303. Various programs and data required for the operation of the computer device 300 are also stored in the RAM 303. 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.

[0108] Typically, the following devices may be connected to I / O interface 305: input device 306 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output device 307 including, for example, a liquid crystal display (LCD), speaker, vibrator, etc.; storage device 308 including, for example, a magnetic tape, hard disk, etc.; and communication device 309. Communication device 309 may allow computer device 300 to communicate with other devices wirelessly or by wire to exchange data. Although FIG3 illustrates computer device 300 with various devices, it should be understood that not all of the illustrated devices are required to be implemented or present. More or fewer devices may alternatively be implemented or present.

[0109] 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 includes program code for executing the image processing method. In such an embodiment, the computer program can be downloaded and installed from the network via the communication device 309, or installed from the storage device 308, or installed from the 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 performed.

[0110] The present disclosure also provides a computer-readable storage medium having a computer program stored thereon. When executed by a processor, the computer program executes the steps of the image processing method described in the above method embodiment. The storage medium may be a volatile or non-volatile computer-readable storage medium.

[0111] The embodiments of the present disclosure also provide a computer program product, which carries program code. The instructions included in the program code 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 and will not be repeated here.

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

[0113] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems and devices described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. In the several embodiments provided in the present disclosure, it should be understood that the disclosed systems, devices and methods 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, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

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

[0115] 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.

[0116] 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. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute 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.

[0117] 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 scope of protection of the present disclosure is not limited thereto. Although the present disclosure has been described in detail with reference to the above-described embodiments, those skilled in the art should understand that any person skilled in the art can modify or easily conceive of changes to the technical solutions described in the above-described embodiments within the technical scope disclosed in the present disclosure, or replace some of the technical features therein with equivalents. Such modifications, changes, or replacements do not deviate from the spirit and scope of the technical solutions of the embodiments of the present disclosure, and should be included in the scope of protection of the present disclosure. Therefore, the scope of protection of the present disclosure shall be subject to the scope of protection of the claims.

Claims

1. An image processing method, comprising: Get the image to be processed; Detecting a proportion of a target object in the image to be processed, and determining target model information corresponding to the target object when the proportion is less than a preset ratio; The proportion of the target object in the image to be processed is adjusted, and the image processing model is controlled to process the adjusted image to be processed according to the target model information to obtain a first target image.

2. The method according to claim 1, wherein: The image processing model includes multiple noise addition processes and multiple noise removal processes; The denoising result image corresponding to at least part of the denoising processes in the multiple denoising processes is obtained by performing image fusion processing on a first denoising image generated by the denoising process and a first denoising image generated by a denoising process corresponding to the denoising process; The target model information includes the fusion weight used by the image processing model when performing image fusion processing, and / or the number of denoising processes included in the image processing model.

3. The method according to claim 1 or 2, wherein: The adjusting the proportion of the target object in the image to be processed includes: A background area in the image to be processed, except for the area where the target object is located, is cropped to adjust the proportion of the target object in the adjusted image to be processed.

4. The method according to any one of claims 1 to 3, wherein: The image to be processed contains multiple target objects; The controlling image processing model processes the adjusted image to be processed according to the target model information, including: Performing attribute recognition on each target object in the image to be processed, and generating content description information corresponding to the image to be processed according to the attribute recognition result; The image processing model is controlled to process the adjusted image to be processed according to the target model information and the content description information.

5. The method according to claim 4, wherein: The step of performing attribute recognition on each target object in the image to be processed and generating content description information corresponding to the image to be processed according to the attribute recognition result includes: Perform attribute recognition on each target object in the image to be processed to obtain attributes including attribute parameters Identify the results; Content description information corresponding to the image to be processed is generated according to the quantities corresponding to the attribute parameters contained in the attribute recognition result and the content description methods corresponding to the attribute parameters.

6. The method according to any one of claims 1 to 5, wherein: After obtaining the first target image, the method further includes: Detecting key parts of the target object in the first target image to determine first distribution information corresponding to the key parts; and detecting key parts of the target object in the image to be processed to determine second distribution information corresponding to the key parts; Based on the distribution difference between the first distribution information and the second distribution information, adjusting the target object in the image to be processed to obtain the image to be fused; Perform image fusion processing on the image to be fused and the first target image to obtain a second target image after fusion processing.

7. The method according to claim 6, wherein: The performing image fusion processing on the image to be fused and the first target image to obtain a fused second target image includes: Determining the fusion weight corresponding to the image to be fused during image fusion processing according to the proportion of the target object in the image to be processed; The image to be fused and the first target image are subjected to image fusion processing based on the fusion ratio corresponding to the image to be fused to obtain a second target image after fusion processing.

8. An image processing device, comprising: An acquisition module, configured to acquire an image to be processed; A determination module is configured to detect a proportion of a target object in the image to be processed, and determine target model information corresponding to the target object when the proportion is less than a preset ratio; The adjustment module is configured to adjust the proportion of the target object in the image to be processed, and control the image processing model to process the adjusted image to be processed according to the target model information to obtain a first target image.

9. A computer device comprising: Processor, memory and bus, Wherein, the memory stores machine-readable instructions executable by the processor. When the computer device is running, the processor and the memory communicate through the bus. 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, wherein: 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.

Citation Information

Patent Citations

  • Image processing method and device, computer readable storage medium and electronic device

    CN107993209A

  • Image processing method and device, electronic equipment and computer readable medium

    CN114693920A

  • Character recognition method and device, electronic equipment and storage medium

    CN115171131A

  • Image processing method and apparatus, electronic device, and storage medium

    WO2023125374A1