Image processing method and device, equipment and storage medium
By identifying and generating target virtual images and adding them to the pending images, the problems of high cost and long period of shooting live models are solved, and more efficient and convenient product renderings are achieved.
Patent Information
- Application Number
- CN202311055793.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-21
- Publication Date
- 2025-02-21
AI Technical Summary
In the prior art, the shooting cost and long cycles of real-life models are high, and the merchant users cannot meet the needs of efficient and convenient access to product renderings.
An image processing method is provided, by identifying a target object on the image to be processed, receiving target description information, and generating a target virtual image based on it, adding it to the image to be processed, and generating a processing result image.
Without real-life models shooting, the image processing method is used to generate renderings for displaying target objects more efficiently and conveniently, meeting the needs of users.
Smart Images

Figure CN119494694A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of data processing, and in particular to an image processing method, device, equipment and storage medium. Background Art
[0002] With the development of e-commerce platforms, more and more people choose to shop online. In order to display and promote products, merchants will use real models to show the effects of the products. For example, they will take pictures of real models wearing clothes and jewelry to display and promote the products.
[0003] However, using real models to shoot product renderings is expensive and takes a long time, so how to more efficiently and conveniently obtain renderings for displaying products is a problem that needs to be solved urgently. Summary of the invention
[0004] In order to solve the above technical problems, an embodiment of the present disclosure provides an image processing method.
[0005] In a first aspect, the present disclosure provides an image processing method, the method comprising:
[0006] In response to a preset image processing request for an image to be processed, identifying a target object on the image to be processed;
[0007] Receiving target description information corresponding to the image to be processed, and generating a target virtual image based on the target description information;
[0008] The target virtual image is added to the image to be processed to obtain a processing result image corresponding to the image to be processed; wherein the processing result image displays the target object on the image to be processed.
[0009] In an optional implementation manner, before adding the target virtual image to the image to be processed to obtain a processing result image corresponding to the image to be processed, the method further includes:
[0010] Acquire display area information of the target object on the image to be processed;
[0011] Correspondingly, the step of adding the target virtual image to the image to be processed to obtain a processing result image corresponding to the image to be processed includes:
[0012] Based on the display area information of the target object on the image to be processed, the target virtual image is added to the image to be processed to obtain a processing result image corresponding to the image to be processed.
[0013] In an optional implementation, the adding the target virtual image to the image to be processed based on the display area information of the target object on the image to be processed to obtain a processing result image corresponding to the image to be processed includes:
[0014] Based on the display area information of the target object on the image to be processed, acquiring a partial image corresponding to the target object in the image to be processed;
[0015] The target virtual image and the partial image corresponding to the target object are spliced to obtain a processing result image corresponding to the image to be processed.
[0016] In an optional implementation manner, the acquiring display position information of the target object on the image to be processed includes:
[0017] Based on the recognition result of the target object, the image to be processed is binarized to obtain a binary image corresponding to the image to be processed; wherein the binary image is used to identify a display area of the target object on the image to be processed.
[0018] In an optional implementation, the adding the target virtual image to the image to be processed based on the display area information of the target object on the image to be processed to obtain a processing result image corresponding to the image to be processed includes:
[0019] Based on the binary image corresponding to the image to be processed and the target virtual image, a mask is redrawn on the image to be processed to obtain a processing result image corresponding to the image to be processed.
[0020] In an optional implementation manner, the method further includes:
[0021] The binary image corresponding to the image to be processed, the processing result image and the image to be processed are input into a preset edge processing model. After the preset edge processing model processes the edge of the target object in the processing result image, an edge processing result image corresponding to the image to be processed is obtained.
[0022] In an optional implementation manner, generating a target virtual image based on the target description information includes:
[0023] The target description information is input into a virtual image generation model, and after being processed by the virtual image generation model, a target virtual image is generated; wherein the virtual image generation model is trained based on virtual image image samples with text description information.
[0024] In an optional implementation manner, before identifying the target object on the image to be processed, the method further includes:
[0025] Performing image quality compression processing on the image to be processed;
[0026] And / or, sampling processing is performed on the length and width pixel points in the image to be processed.
[0027] In a second aspect, the present disclosure provides an image processing device, the device comprising:
[0028] An identification module, configured to identify a target object on the image to be processed in response to a preset image processing request for the image to be processed;
[0029] A generating module, configured to receive target description information corresponding to the image to be processed, and generate a target virtual image based on the target description information; wherein the target description information is used to describe the characteristics of the target virtual image;
[0030] An adding module is used to add the target virtual image to the image to be processed to obtain a processing result image corresponding to the image to be processed; wherein the processing result image is used to display the target object based on the target virtual image.
[0031] In a third aspect, the present disclosure provides a computer-readable storage medium, wherein the computer-readable storage medium stores instructions, and when the instructions are executed on a terminal device, the terminal device implements the above method.
[0032] In a fourth aspect, the present disclosure provides an image processing device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above method when executing the computer program.
[0033] In a fifth aspect, the present disclosure provides a computer program product, wherein the computer program product comprises a computer program / instructions, and the computer program / instructions implement the above method when executed by a processor.
[0034] Compared with the prior art, the technical solution provided by the embodiments of the present disclosure has at least the following advantages:
[0035] The disclosed embodiment provides an image processing method, first, in response to a preset image processing request for an image to be processed, a target object on the image to be processed is identified, target description information corresponding to the image to be processed is received, and a target virtual image is generated based on the target description information, wherein the target description information is used to describe the characteristics of the target virtual image, and then the target virtual image is added to the image to be processed to obtain a processing result image corresponding to the image to be processed, wherein the processing result image is used to display the target object based on the target virtual image. The disclosed embodiment generates a target virtual image for the target object based on the target description information, and processes the image to be processed into a processing result image that displays the target object based on the target virtual image. It can be seen that the disclosed embodiment does not need to be shot by a real model, but rather generates a rendering for displaying the target object more efficiently and conveniently based on image processing, thereby meeting user needs. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0037] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0038] Figure 1 A flowchart of an image processing method provided by an embodiment of the present disclosure;
[0039] Figure 2 A schematic diagram of an interactive interface for selecting an image feature label provided by an embodiment of the present disclosure;
[0040] Figure 3 A schematic diagram of a binary image provided by an embodiment of the present disclosure;
[0041] Figure 4 A schematic diagram of an interactive interface provided by an embodiment of the present disclosure;
[0042] Figure 5 A schematic diagram of another interactive interface provided by an embodiment of the present disclosure;
[0043] Figure 6 A data interaction diagram provided for an embodiment of the present disclosure;
[0044] Figure 7 A schematic diagram of the structure of an image processing device provided by an embodiment of the present disclosure;
[0045] Figure 8A schematic diagram of the structure of an image processing device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0046] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.
[0047] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.
[0048] In the field of e-commerce, new products need to be continuously launched. In order to facilitate the display and promotion of products, products are often displayed by shooting product renderings of real models wearing products. However, the above method is expensive and time-consuming to shoot, and cannot meet the needs of merchants and users to obtain product renderings efficiently and conveniently.
[0049] To this end, the disclosed embodiment provides an image processing method, first, in response to a preset image processing request for an image to be processed, a target object on the image to be processed is identified, target description information corresponding to the image to be processed is received, and a target virtual image is generated based on the target description information, wherein the target description information is used to describe the characteristics of the target virtual image, and then, the target virtual image is added to the image to be processed to obtain a processing result image corresponding to the image to be processed, wherein the processing result image is used to display the target object based on the target virtual image. The disclosed embodiment generates a target virtual image for the target object based on the target description information, and processes the image to be processed into a processing result image that displays the target object based on the target virtual image. It can be seen that the disclosed embodiment does not need to be shot with a real model, but rather generates a rendering for displaying the target object more efficiently and conveniently based on image processing, thereby meeting user needs.
[0050] Based on this, the present disclosure provides an image processing method, referring to Figure 1 , is a flow chart of an image processing method provided by an embodiment of the present disclosure, the method specifically comprising:
[0051] S101: In response to a preset image processing request for an image to be processed, identifying a target object on the image to be processed.
[0052] The image to be processed may be selected from the user's photo album and uploaded, or may be obtained by shooting and uploaded, which is not limited in the disclosed embodiment. The image to be processed displays a target object, which may be a displayable item, such as clothing, jewelry, backpacks, glasses, etc.
[0053] The image processing method provided by the embodiment of the present disclosure can be applied to the server.
[0054] In the disclosed embodiment, when a preset image processing request for an image to be processed is received from a client, a target object on the image to be processed is first identified, wherein the preset image processing request is used to request the server to perform preset processing on the target object on the image to be processed.
[0055] S102: Receive target description information corresponding to the image to be processed, and generate a target virtual image based on the target description information.
[0056] In the disclosed embodiment, the target description information is used to describe the characteristics of the target virtual image, and may include appearance feature description information, expression description information, etc. for the target virtual image; in addition, the target description information may also include scene description information and environment description information, such as indoor, outdoor, etc. scene feature information.
[0057] In an optional implementation manner, the target description information may be user-defined feature information. Specifically, the user customizes the information by selecting an image feature label on the interactive interface.
[0058] like Figure 2 As shown, an interactive interface for selecting an image feature label provided by an embodiment of the present disclosure is provided. Specifically, the interactive interface displays a plurality of selectable facial feature labels of a virtual image and a plurality of selectable scene feature labels. A user can customize the image feature label of a target virtual image by clicking on a label on the interactive interface. A user can customize virtual images of different styles according to actual needs, which can be used to improve the display effect of a target object.
[0059] like Figure 2 As shown, the image feature tags currently selected by the user include: short hair, smile, indoors, etc. Correspondingly, the target description information corresponding to the image to be processed includes: short hair, smile, indoors, etc.
[0060] In the disclosed embodiment, after receiving the image feature tag selected by the user, the client sends the description information corresponding to the selected image feature tag as the target description information of the image to be processed to the server, and after receiving the target description information corresponding to the image to be processed, the server generates a target virtual image based on the target description information. The target virtual image can be generated by an artificial intelligence model and has a face and body close to a real person.
[0061] In an optional implementation, a target virtual image is generated based on the target description information, and specifically, an artificial intelligence model can be used to generate a target virtual image that meets the description characteristics based on the target description information. The artificial intelligence model can specifically be a trained virtual image generation model, and specifically, the virtual image generation model is obtained by training with virtual image image samples with text description information.
[0062] During the application of the virtual image generation model, the target description information is input into the virtual image generation model, and after being processed by the virtual image generation model, a target virtual image is generated.
[0063] S103: adding the target virtual image to the image to be processed to obtain a processing result image corresponding to the image to be processed;
[0064] The processing result image is used to display the target object based on the target virtual image, and the processing result image displays the target object on the image to be processed.
[0065] In the disclosed embodiment, it is necessary to first obtain the display area information of the target object on the image to be processed, and then add the target virtual image to the image to be processed to obtain a processing result image corresponding to the image to be processed.
[0066] The target object display area information on the image to be processed is used to identify the display position, display range, etc. of the target object on the image to be processed.
[0067] In an optional implementation, the display area information of the target object on the image to be processed may include coordinate information of the area occupied by the target object on the image to be processed, for example, coordinate information of edge pixels of the area occupied by the target object on the image to be processed.
[0068] In another optional implementation, the display position information of the target object on the image to be processed may be obtained by segmenting the target object from other content (also called background content) other than the target object through an image segmentation model, and then generating a binary image (such as a grayscale image) through binarization processing to identify the display area information of the target object on the image to be processed.
[0069] In the disclosed embodiment, based on the recognition result of the target object, the image to be processed is binarized to obtain a binary image corresponding to the image to be processed, wherein the binary image can be used to identify the display area of the target object on the image to be processed.
[0070] For example, in a binary image, the pixels of the area occupied by the target object can be set to the pixel values corresponding to black, and the pixels corresponding to the image other than the target object can be set to the pixel values corresponding to white. Specifically, the specific pixel values set for the pixels in the binary image are not limited in the embodiments of the present disclosure.
[0071] like Figure 3 As shown, it is a schematic diagram of a binary image provided by an embodiment of the present disclosure, specifically a black and white grayscale image, wherein the white area is used to identify the display area of the target object on the image to be processed.
[0072] On the basis of the above-mentioned embodiment, based on the display area information of the target object on the image to be processed, the target virtual image is added to the image to be processed to obtain a processing result image corresponding to the image to be processed.
[0073] In an optional implementation, based on the display area information of the target object on the image to be processed, a partial image corresponding to the target object is obtained from the image to be processed, and then the target virtual image and the partial image are spliced to obtain a processing result image corresponding to the image to be processed.
[0074] The partial image corresponding to the target object refers to the smallest image on the image to be processed that contains the target object. For example, the image to be processed shows a model wearing a long skirt (target object) and a background image (such as a live studio scene). The smallest image on the image to be processed that contains the target object is the target object itself, so the partial image corresponding to the target object refers to the image of the long skirt display area. Optionally, the target virtual image and the partial image corresponding to the target object can be spliced using any image processing technology, which is not limited in the embodiments of the present disclosure.
[0075] In another optional implementation, based on the binary image corresponding to the image to be processed and the target virtual image, a mask redrawing can be performed on the image to be processed to obtain a processing result image corresponding to the image to be processed. In this embodiment, the binary image is used as a mask to draw the target virtual object in an area outside the display area of the target object identified in the binary image.
[0076] In the disclosed embodiment, by responding to a preset image processing request for an image to be processed, a target object on the image to be processed is identified, target description information corresponding to the image to be processed is received, and a target virtual image is generated based on the target description information, wherein the target description information is used to describe the characteristics of the target virtual image, and the target virtual image is added to the image to be processed to obtain a processing result image corresponding to the image to be processed, wherein the processing result image is used to display the target object based on the target virtual image. The disclosed embodiment generates a target virtual image for the target object based on the target description information, and processes the image to be processed into a processing result image that displays the target object based on the target virtual image. It can be seen that the disclosed embodiment does not need to be shot with a real model, but rather generates a rendering for displaying the target object more efficiently and conveniently based on image processing, thereby meeting user needs.
[0077] In practical applications, after the stitching processing of the partial images corresponding to the target virtual image and the target object, the stitching edges of the processed result image may have poor edge fusion effect. Therefore, in order to further improve the quality of the processed image, the embodiment of the present disclosure can also perform edge processing on the stitching edges in the processed result image corresponding to the image to be processed.
[0078] Specifically, based on the display area information of the target object on the image to be processed, edge recognition is performed on the target object in the image to be processed to obtain an edge recognition result. Then, according to the edge recognition result, edge processing is performed on the processing result image corresponding to the image to be processed, so that the splicing edge effect of the target virtual image and the target object in the processing result image after edge processing is more realistic.
[0079] In an optional implementation, a binary image corresponding to the image to be processed, a processing result image, and an original image of the image to be processed are input into a preset edge processing model, and after being processed by the preset edge processing model, an edge processing result image corresponding to the image to be processed is obtained. Specifically, the preset edge processing model processes the edge of the target object in the processing result image, with the purpose of making the splicing edge effect of the target virtual image and the target object more realistic.
[0080] In another optional implementation, a neural network model can be used to perform edge detection and recognition on the target object in the image to be processed based on the display area information of the target object on the image to be processed, obtain an edge recognition result, and then perform edge processing on the processing result graph corresponding to the image to be processed based on the edge recognition result. The specific type of neural network model is not limited.
[0081] In the disclosed embodiment, by performing edge processing on the processing result image corresponding to the processed image, the spliced edge between the target object and the target virtual image in the processing result image is made softer and smoother, closer to the real image, and the quality of the generated image is improved.
[0082] In practical applications, in order to improve the efficiency of image processing, the image to be processed can be compressed to improve the image quality, the length and width of the image can be sampled, and the efficiency of image processing can be improved by reducing the image quality. In the embodiment of the present disclosure, when a preset image processing request for the image to be processed is received, the image quality of the image to be processed is compressed, and / or the length and width of the image to be processed are sampled. By appropriately compressing the image quality of the image to be processed, the server reduces the amount of image processing calculations, improves the speed of generating images, and improves the image processing efficiency.
[0083] In order to facilitate understanding of the above embodiments, the present disclosure introduces them from the perspective of the client. Figure 4 The following is a schematic diagram of an interactive interface provided by an embodiment of the present disclosure. First, the client receives a user-based Figure 2 After the target description information is determined on the interface shown in the figure, it is uploaded to the server. In addition, after the user uploads the image to be processed to the server through the interactive interface (assuming it is a real person's clothing picture), the interactive interface is displayed as follows Figure 4 The interface status shown shows a prompt message waiting for the server to process the image, such as "working hard to generate model".
[0084] After receiving the preset image processing request from the client, the server performs image quality compression processing on the received image to be processed, and then identifies the target object. According to the recognition result, the target object (clothing) on the image to be processed is segmented from the background content. For example, the image to be processed is binarized to obtain a black and white grayscale image, wherein the black and white grayscale image is used to identify the display area information of the target object (clothing) on the image to be processed.
[0085] The server can use the black and white grayscale image as a mask and draw the target virtual image based on the target description information to obtain a processing result image corresponding to the image to be processed, that is, a processing result image showing the target object based on the target virtual image.
[0086] After the server completes processing the image to be processed, it transmits the generated processing result image back to the client. After the client receives the processing result image, it displays it on the interactive interface, such as Figure 5 , which is a schematic diagram of another interactive interface provided by an embodiment of the present disclosure, and an image of a target object (clothing) displayed based on a target virtual image (model) is displayed on the interactive interface.
[0087] When the server performs splicing processing on the target virtual image and the target object based on the display area information of the target object on the image to be processed, the processed result image may have poor edge processing effect. In order to make the edges of the processed result image smoother, the server can further perform edge processing on the processed result image and then transmit it to the client. The client displays the processed result image on the interactive interface for the user to view.
[0088] In order to facilitate users to further understand the image processing method provided by the embodiment of the present disclosure, the embodiment of the present disclosure provides a specific application method, such as Figure 6 As shown, it is a data interaction diagram provided by the embodiment of the present disclosure. Specifically, based on the data interaction between the client and the server, the image processing method in the embodiment of the present disclosure can be implemented. The server is deployed with the trained first model and the second model.
[0089] First, the user selects an image feature description tag on the client interaction interface, and then the client forms target description information based on the image feature description tag selected by the user, and sends the target description information to the server; the user uploads the image to be processed through the client (assuming it is a picture of a real person in clothing), and sends a preset image processing request for the image to be processed to the server.
[0090] After receiving the preset image processing request from the client, the server uses the first model to identify the target object (clothing) on the image to be processed, and based on the recognition result of the target object, performs binarization on the image to be processed to obtain a binary image corresponding to the image to be processed as a mask; in order to enable the user to perceive the progress of the image processing and enhance the human-computer interaction experience, the image that only displays the target object obtained based on the binary image processing corresponding to the image to be processed can be transmitted to the client, and after receiving the image, the client displays the image on the client.
[0091] In order to avoid the problem of slow operation due to the huge processing logic, and the possibility of the entire processing process stopping due to a loophole in one of the processing logics, interfaces can be deployed separately for different logic units during the application process. For example, an interface can be deployed separately for edge processing of the image to be processed. In actual applications, the embodiments of this disclosure do not limit the implementation architecture deployment method of the server.
[0092] As mentioned above Figure 6As shown, the client sends the image to be processed and the binary image corresponding to the image to be processed to the server again through a separate interface. After receiving the image to be processed and the binary image corresponding to the image to be processed, the server performs edge processing on the image to be processed through the second model based on the binary image corresponding to the image to be processed and the target virtual image, and obtains the processing result image corresponding to the image to be processed. Finally, the image to be processed is transmitted back to the client and displayed on the client.
[0093] Based on the above method embodiment, the present disclosure also provides an image processing device, referring to Figure 7 , is a schematic diagram of the structure of an image processing device provided by an embodiment of the present disclosure, the device comprising:
[0094] The identification module 701 is used to identify a target object on the image to be processed in response to a preset image processing request for the image to be processed;
[0095] A generating module 702 is used to receive target description information corresponding to the image to be processed, and generate a target virtual image based on the target description information; wherein the target description information is used to describe the characteristics of the target virtual image;
[0096] The adding module 703 is used to add the target virtual image to the image to be processed to obtain a processing result image corresponding to the image to be processed; wherein the processing result image is used to display the target object based on the target virtual image.
[0097] In an optional implementation manner, the device further includes:
[0098] A first acquisition module is used to acquire display area information of the target object on the image to be processed;
[0099] Accordingly, the adding module is specifically used for:
[0100] Based on the display area information of the target object on the image to be processed, the target virtual image is added to the image to be processed to obtain a processing result image corresponding to the image to be processed.
[0101] In an optional implementation manner, the adding module includes:
[0102] A first acquisition submodule, configured to acquire a partial image corresponding to the target object in the image to be processed based on display area information of the target object on the image to be processed;
[0103] The first splicing submodule is used to splice the target virtual image and the partial image corresponding to the target object to obtain a processing result image corresponding to the image to be processed.
[0104] In an optional implementation manner, the first acquisition module is specifically configured to:
[0105] Based on the recognition result of the target object, the image to be processed is binarized to obtain a binary image corresponding to the image to be processed; wherein the binary image is used to identify a display area of the target object on the image to be processed.
[0106] In an optional implementation manner, the adding module is specifically used to:
[0107] Based on the binary image corresponding to the image to be processed and the target virtual image, a mask is redrawn on the image to be processed to obtain a processing result image corresponding to the image to be processed.
[0108] In an optional implementation manner, the device further includes:
[0109] The edge processing module is used to input the binary image corresponding to the image to be processed, the processing result image and the image to be processed into a preset edge processing model, and after the preset edge processing model processes the edge of the target object in the processing result image, an edge processing result image corresponding to the image to be processed is obtained.
[0110] In an optional implementation manner, the generating module is specifically used to:
[0111] The target description information is input into a virtual image generation model, and after being processed by the virtual image generation model, a target virtual image is generated; wherein the virtual image generation model is trained based on virtual image image samples with text description information.
[0112] In an optional implementation manner, the device further includes:
[0113] An image processing module, used for performing image quality compression processing on the image to be processed;
[0114] And / or, an image sampling module, used for sampling the length and width pixels in the image to be processed.
[0115] In the image processing method provided by the embodiment of the present disclosure, first, in response to a preset image processing request for the image to be processed, the target object on the image to be processed is identified, the target description information corresponding to the image to be processed is received, and a target virtual image is generated based on the target description information; wherein the target description information is used to describe the characteristics of the target virtual image, and then, the target virtual image is added to the image to be processed to obtain a processing result image corresponding to the image to be processed, wherein the processing result image is used to display the target object based on the target virtual image. The embodiment of the present disclosure generates a target virtual image for the target object based on the target description information, and processes the image to be processed into a processing result image that displays the target object based on the target virtual image. It can be seen that the embodiment of the present disclosure does not need to be shot by a real model, but is based on image processing to more efficiently and conveniently generate a rendering for displaying the target object, thereby meeting user needs.
[0116] In addition to the above-mentioned method and apparatus, the embodiments of the present disclosure further provide a computer-readable storage medium, in which instructions are stored. When the instructions are executed on a terminal device, the terminal device implements the image processing method described in the embodiments of the present disclosure.
[0117] The embodiment of the present disclosure further provides a computer program product, which includes a computer program / instructions. When the computer program / instructions are executed by a processor, the image processing method described in the embodiment of the present disclosure is implemented.
[0118] In addition, the present disclosure also provides an image processing device, see Figure 8 As shown, it may include:
[0119] Processor 801, memory 802, input device 803 and output device 808. The number of processors 801 in the image processing device can be one or more. Figure 8 In some embodiments of the present disclosure, the processor 801, the memory 802, the input device 803 and the output device 808 may be connected via a bus or other means, wherein: Figure 8 The example of connecting through bus is taken in the following.
[0120] The memory 802 can be used to store software programs and modules. The processor 801 executes various functional applications and data processing of the image processing device by running the software programs and modules stored in the memory 802. The memory 802 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application required for a function, etc. In addition, the memory 802 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. The input device 803 can be used to receive input digital or character information, and generate signal input related to user settings and function control of the image processing device.
[0121] Specifically in this embodiment, the processor 801 will load the executable files corresponding to the processes of one or more applications into the memory 802 according to the following instructions, and the processor 801 will run the applications stored in the memory 802, thereby realizing various functions of the above-mentioned image processing device.
[0122] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0123] The above description is only a specific embodiment of the present disclosure, so that those skilled in the art can understand or implement the present disclosure. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to the embodiments described herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. An image processing method, characterized in that: The method comprises: In response to a preset image processing request for an image to be processed, identifying a target object on the image to be processed; Receive target description information corresponding to the image to be processed, and generate a target virtual image based on the target description information; wherein the target description information is used to describe the characteristics of the target virtual image; The target virtual image is added to the image to be processed to obtain a processing result image corresponding to the image to be processed; wherein the processing result image is used to display the target object based on the target virtual image.
2. The method according to claim 1, characterized in that Before adding the target virtual image to the image to be processed to obtain a processing result image corresponding to the image to be processed, the method further includes: Acquire display area information of the target object on the image to be processed; Correspondingly, the step of adding the target virtual image to the image to be processed to obtain a processing result image corresponding to the image to be processed includes: Based on the display area information of the target object on the image to be processed, the target virtual image is added to the image to be processed to obtain a processing result image corresponding to the image to be processed.
3. The method according to claim 2, characterized in that The step of adding the target virtual image to the image to be processed based on the display area information of the target object on the image to be processed to obtain a processing result image corresponding to the image to be processed includes: Based on the display area information of the target object on the image to be processed, acquiring a partial image corresponding to the target object in the image to be processed; The target virtual image and the partial image corresponding to the target object are spliced to obtain a processing result image corresponding to the image to be processed.
4. The method according to claim 2, characterized in that: The obtaining the display area information of the target object on the image to be processed includes: Based on the recognition result of the target object, the image to be processed is binarized to obtain a binary image corresponding to the image to be processed; wherein the binary image is used to identify a display area of the target object on the image to be processed.
5. The method according to claim 4, characterized in that The step of adding the target virtual image to the image to be processed based on the display area information of the target object on the image to be processed to obtain a processing result image corresponding to the image to be processed includes: Based on the binary image corresponding to the image to be processed and the target virtual image, a mask is redrawn on the image to be processed to obtain a processing result image corresponding to the image to be processed.
6. The method according to claim 4, characterized in that The method further comprises: The binary image corresponding to the image to be processed, the processing result image and the image to be processed are input into a preset edge processing model. After the preset edge processing model processes the edge of the target object in the processing result image, an edge processing result image corresponding to the image to be processed is obtained.
7. The method according to claim 1, characterized in that The generating of the target virtual image based on the target description information comprises: The target description information is input into a virtual image generation model, and after being processed by the virtual image generation model, a target virtual image is generated; wherein the virtual image generation model is trained based on virtual image image samples with text description information.
8. The method according to claim 1, characterized in that Before identifying the target object on the image to be processed, the method further includes: Performing image quality compression processing on the image to be processed; And / or, sampling processing is performed on the length and width pixel points in the image to be processed.
9. An image processing device, characterized in that: The device comprises: An identification module, configured to identify a target object on the image to be processed in response to a preset image processing request for the image to be processed; A generating module, configured to receive target description information corresponding to the image to be processed, and generate a target virtual image based on the target description information; wherein the target description information is used to describe the characteristics of the target virtual image; An adding module is used to add the target virtual image to the image to be processed to obtain a processing result image corresponding to the image to be processed; wherein the processing result image is used to display the target object based on the target virtual image.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores instructions, and when the instructions are executed on a terminal device, the terminal device implements the method according to any one of claims 1 to 8.
11. An image processing device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method according to any one of claims 1 to 8 is implemented.
Citation Information
Cited By
Image processing method and apparatus, device, and storage medium
EP4769282A1