Image processing method, system and electronic device

By using multiple segmentation models to process the target image, determine and change the color clothing area, the problem of high cost of changing the color of clothing in the prior art and unreal effect is solved, and a fast, automated and realistic effect of changing the color clothing is achieved.

CN114266782BActive Publication Date: 2025-05-09HANGZHOU ALIBABA INT INTERNET IND CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111481296.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-06
Publication Date
2025-05-09
Estimated Expiration
2041-12-06

AI Technical Summary

Technical Problem

In the prior art, merchants need to find live models to take photos of each clothing color, which is costly and the color change effect is not realistic enough.

Method used

By using multiple segmentation models of different segmentation objects, the target image is processed, the target area corresponding to the color change object is determined, and the target area is changed based on the color change requirement to generate the image after color change.

Benefits of technology

It realizes rapid and automated color change of clothing, with real results and reduces user learning costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114266782B_ABST
    Figure CN114266782B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention provides an image processing method, system and electronic device. The method includes the following steps: determining a target image, a color-changing object in the target image and a color-changing requirement; using multiple segmentation models with different segmentation objects to process the target image respectively to obtain multiple segmentation areas; determining a target area corresponding to the color-changing object in the target image according to the multiple segmentation areas; performing color-changing processing on the target area based on the color-changing requirement; and displaying the target image after color-changing. The technical solution provided by the present invention can make the color-changing object in the target image have a better color-changing effect, and the color-changing process is fully automated without user participation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to an image processing method, system and electronic equipment. Background Art

[0002] When merchants promote their own clothing, the effect of using real people to show it is definitely better and more intuitive than just showing the clothing. However, when there are many colors of clothing, if you find a model to shoot for each piece of clothing, the shooting cost will be very high.

[0003] There are some technologies in the prior art that allow merchants (or users) to change clothing colors through some image tools without having to find real models to wear every color for shooting. However, using image tools requires merchants to learn in advance and master certain tool usage skills. The learning cost is high, and the display effect after color change is not realistic enough. Summary of the invention

[0004] The present invention provides an image processing method, system and electronic device that solve the above problems or at least partially solve the above problems.

[0005] In one embodiment of the present invention, an image processing method is provided. The method comprises:

[0006] Determining a target image, a color-changing object in the target image, and a color-changing requirement;

[0007] Using a plurality of segmentation models with different segmentation objects, the target image is processed respectively to obtain a plurality of segmentation regions;

[0008] Determining a target area corresponding to the color-changing object in the target image according to the multiple segmented areas;

[0009] Based on the color change requirement, performing color change processing on the target area;

[0010] The target image after color change is displayed.

[0011] In another embodiment of the present invention, an image processing method is also provided. The method comprises:

[0012] In response to the user's operation, a target image containing an exhibit and a target pattern of the exhibit are acquired;

[0013] Using a plurality of segmentation models with different segmentation objects, the target image is processed respectively to obtain a plurality of segmentation regions;

[0014] Determining a target area corresponding to the exhibit in the target image according to the multiple segmented areas;

[0015] According to the target color, the target area is subjected to a color change operation;

[0016] The target image after color change is displayed.

[0017] In another embodiment of the present invention, an image processing method is also provided. The method comprises:

[0018] In response to the user's operation, obtaining clothing display images and clothing color change requirements;

[0019] Using the first segmentation model, segmenting the clothing corresponding region in the clothing display image to obtain a first segmented region;

[0020] Using at least one second segmentation model, segmenting a region corresponding to at least one object other than the clothing in the clothing display image to obtain at least one second segmented region;

[0021] Determine the region boundary of the first segmented region according to the at least one second segmented region to obtain a target region;

[0022] Based on the clothing color change requirement, the target area is subjected to color change processing;

[0023] The clothing display image after color change is displayed.

[0024] In another embodiment of the present invention, an image processing system is provided. The system comprises:

[0025] The application layer is used to receive a target image, a color-changing object in the target image, and a color-changing requirement input by a user;

[0026] The region processing layer has multiple segmentation models for different segmentation objects, and is used to process the target image respectively using the multiple segmentation models for different segmentation objects to obtain multiple segmentation regions; and determine the target region corresponding to the color-changing object in the target image according to the multiple segmentation regions;

[0027] A color change processing layer, having a color migration model, for performing color change processing on the target area according to the color change requirement;

[0028] The application layer is also used to send the target image after color change to the client device corresponding to the user.

[0029] In another embodiment of the present invention, an image processing system is provided. The system comprises:

[0030] The application layer is used to receive a target image, a color-changing object in the target image, and a color-changing requirement input by a user;

[0031] The region processing layer has multiple segmentation models for different segmentation objects, and is used to process the target image respectively using the multiple segmentation models for different segmentation objects to obtain multiple segmentation regions; and determine the target region corresponding to the color-changing object in the target image according to the multiple segmentation regions;

[0032] A color change processing layer, having a color migration model, for performing color change processing on the target area according to the color change requirement;

[0033] The application layer is also used to send the target image after color change to the client device corresponding to the user.

[0034] In another embodiment of the present invention, an image processing system is provided. The system comprises:

[0035] The client is used to obtain the target image, the color-changing object and the color-changing requirement input by the user, and send them to the server;

[0036] The server is used to process the target image using multiple segmentation models with different segmentation objects to obtain multiple segmentation areas; determine the target area corresponding to the color-changing object in the target image according to the multiple segmentation areas; and perform color-changing processing on the target area based on the color-changing requirement;

[0037] The client is also used to display the target image after the color change fed back by the server.

[0038] In another embodiment of the present invention, an electronic device is provided. The electronic device includes:

[0039] The memory is used to store one or more computer instructions;

[0040] The processor is coupled to the memory and is used to execute the at least one or more computer instructions to implement the steps in the method described in the above embodiments.

[0041] The technical solution provided by the embodiment of the present invention, on the basis of determining the target image (such as the target image containing the exhibit, the clothing display image), the color-changing object in the target image (such as the exhibit, clothing, etc.) and the color-changing requirement (such as the target color of the exhibit, the color-changing requirement of clothing), further comprehensively determines the target area corresponding to the color-changing object in the target image according to the multiple segmentation models with different segmentation objects, and the multiple segmentation areas obtained by processing the target image respectively. The determination of the target area fully considers the mutual influence relationship between the corresponding segmentation results of the different segmentation objects contained in the target image. Based on the mutual influence relationship, the area boundary of the segmentation area corresponding to the color-changing object (i.e., the first segmentation area) is determined according to the segmentation area corresponding to the non-color-changing object (i.e., the second segmentation area), so as to obtain the target area, which can effectively ensure the accuracy of the target area. Afterwards, according to the color-changing requirement, the color-changing object in the target image is processed by the color migration model to obtain the target image after color-changing, so that the color-changing object in the target image has a better color-changing effect, which can give the user a more realistic look and feel. Moreover, the entire color-changing process of the above-mentioned scheme is fully automated, without user participation, which can reduce the user's learning cost. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0043] Figure 1 A schematic diagram showing a flow chart of an image processing method provided by an embodiment of the present invention;

[0044] Figure 2 A schematic diagram showing the technical solution provided by an embodiment of the present invention from the perspective of an application interface is shown;

[0045] Figure 3 A schematic diagram showing a flow chart of an image processing method provided by another embodiment of the present invention;

[0046] Figure 4 A schematic diagram showing a flow chart of an image processing method provided by another embodiment of the present invention;

[0047] Figure 5 A schematic diagram of an image processing system provided by an embodiment of the present application is shown;

[0048] Figure 6 A schematic diagram showing the principle of an image processing method provided by an embodiment of the present application is shown;

[0049] Figure 7 A schematic diagram of the architecture of an image processing system provided by an embodiment of the present application from the system software architecture level is shown;

[0050] Figure 8 A schematic diagram of the structure of an image processing device provided by an embodiment of the present application is shown;

[0051] Fig. 9 A schematic diagram of the structure of an image processing device provided by another embodiment of the present application is shown;

[0052] Fig.10 A schematic diagram showing the structure of an image processing device provided by another embodiment of the present application is shown;

[0053] Fig.11 A schematic diagram of the principle structure of an electronic device provided in one embodiment of the present application is shown. DETAILED DESCRIPTION

[0054] There is a solution in the prior art, which is to use an image tool, such as PS (Photoshop), to change the color of the clothing on the model in the target image. The main processing steps of this solution are: the target image is imported into the image tool and displayed on the editing interface provided by the image tool, and then the merchant uses the various functional modules provided by the image tool to change the color of the clothing on the model. This solution requires the merchant to learn the image tool in advance and master certain image tool usage skills in the early stage, which undoubtedly requires the merchant to spend a lot of learning time. Moreover, for the color part of the clothing that is similar to human skin, when the image tool is used to change the color of the clothing, the color of some exposed body areas of the model will also be changed, such as the color of the model's neck, hands, etc. may change. In addition, the image tool is not universal and it is difficult to change the color of dark clothing. To this end, the present invention provides the following embodiments to solve the problems in the prior art, which can quickly and realistically change the color of clothing, and the solution does not require merchants to learn in advance.

[0055] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiment of the present invention will be described clearly and completely below in conjunction with the drawings in the embodiment of the present invention. In some processes described in the specification, claims and the above drawings of the present invention, multiple operations appearing in a specific order are included, and these operations may not be executed or executed in parallel in the order in which they appear in this article. The sequence numbers of the operations, such as 101, 102, etc., are only used to distinguish between different operations, and the sequence numbers themselves do not represent any execution order. In addition, these processes may include more or fewer operations, and these operations may be executed in sequence or in parallel. It should be noted that the descriptions of "first", "second", etc. in this article are used to distinguish different messages, devices, modules, etc., do not represent the order of precedence, and do not limit "first" and "second" to different types. In addition, the following embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of the present invention.

[0056] Before introducing the various embodiments provided by the present invention, a brief introduction is given to the application scenarios of the technical solutions provided by the embodiments of the present invention.

[0057] The technical solution provided by the embodiment of the present invention can be applied to scenarios including but not limited to changing the color of clothing on a model. Figure 2In the scenario described above, the scheme provided by the embodiment of the present invention can provide merchants with a service for changing the color of the clothing worn by the model. In other words, it provides merchants with a service for changing the color of the clothing worn by the model (hereinafter referred to as clothing color changing service). Specifically: the merchant can upload a model image A (such as a previously taken photo of a model wearing a light blue shirt dress a) through a client device 401 (such as a smart phone, a desktop computer, a tablet computer, etc.); then, the merchant enters the target color (such as dark red, cyan, etc.) to which the light blue shirt dress is to be changed in the input area provided by the interactive interface of the client device, and clicks the "color change" control, so that the color of the shirt dress on the model can be changed from the original "light blue" to "dark red" or "cyan", etc., and multiple model images of the model wearing shirt dresses of different colors are obtained. Because the clothing color change is realized by processing the model image A using multiple segmentation models, accurately determining the area corresponding to the shirt dress, and using a color migration model obtained based on a color migration related algorithm, it has high performance and accuracy, and the shirt dress has good color restoration and realistic effect. In addition, if the merchant not only wants to promote the model wearing different colored shirt dresses on the e-commerce platform, but also wants to make external advertising, such as window advertising posters, PPC advertising or video advertising, the merchant can also use the model wearing different colored shirt dresses in the advertisement to create different dynamic display effects, further improve the display effect of the shirt dress, and increase the click-through rate of the shirt dress. In the above, PPC advertising is an advertising model used to guide people who view the PPC advertisement to click into the website or application of the advertiser.

[0058] It should be noted here that Figure 2 The shirt dress shown in FIG. 1 is displayed in different grayscales when different colors are used. In this figure, the shirt dress in the model image A and the shirt dress segmented from the model image A (i.e., the shirt dress shown in image B) have the same color, such as light blue. The color of the shirt dress in the model image A' is the target color, such as dark red, cyan, etc., which is not limited here.

[0059] In addition to changing the color of clothing, the technical solution provided by the present invention is also applicable to other types of goods, such as shoes, bags (handbags, school bags, luggage, etc.), scarves, hats, gloves, belts, accessories (such as bracelets, rings, necklaces, earrings, headwear, etc.), watches, handheld electronic devices (such as mobile phones, laptops, tablet computers, etc.), etc., and the embodiments of the present invention are not limited to this. In the following embodiments, clothing is mainly used as an example to introduce the technical solution provided by the present invention.

[0060] In the above, the multiple segmentation models used in the present invention to determine the corresponding areas of clothing in the model image are all semantic segmentation models, which are obtained by training the machine learning model through a large number of training samples; at the same time, the color migration model used to perform clothing color change can also be obtained by training the machine learning model, and the color migration model here can also be obtained based on a common algorithm, and the present invention is no longer limited to this. The server can be responsible for model training. For example, assuming that the color migration model is also obtained through training, the server trains the segmentation model and the color migration model, and then sends the trained segmentation model and color migration model to the client; the client automatically loads the received matching segmentation model and color migration model locally, and then can directly use the segmentation model to perform semantic segmentation on the model image input by the client user locally to determine the area corresponding to the clothing in the model image, and then further based on the target color input by the client user, use the color migration module to change the color of the clothing in the model image, and change the color of the clothing to the target color. Alternatively, the training of the above-mentioned segmentation models, color transfer models, etc., and the use of segmentation models, color transfer models, etc. to complete the color change of clothing in the model image are all executed by the server, and the role of the client is to send the model image input by the user, the color change object in the model image, and the color change requirement (such as the target color) to the server, and then receive the model image with the color of the model's clothing changed to the target color fed back by the server and display it.

[0061] It should be noted here that the "merchant" and "user" appearing in the context of the present invention refer to those who have the need to change color, and different terms are used to describe them only to meet the corresponding scene description needs.

[0062] The following describes and explains various embodiments provided by the present invention to illustrate the specific implementation process of changing the color of clothing.

[0063] Figure 1 The flowchart of the image processing method provided by an embodiment of the present invention is shown. The execution subject of the method provided by this embodiment may be a client, and the client may be but not limited to a smart phone, a desktop computer, a laptop computer, a tablet computer, a smart wearable device, etc., which is not limited in this embodiment. Specifically, Figure 1 As shown, the image processing method includes:

[0064] 101. Determine a target image, a color-changing object in the target image, and a color-changing requirement;

[0065] 102. Using a plurality of segmentation models with different segmentation objects, respectively process the target image to obtain a plurality of segmentation regions;

[0066] 103. Determine, according to the multiple separated areas, a target area corresponding to the color-changing object in the target image;

[0067] 104. Based on the color change requirement, perform color change processing on the target area;

[0068] 105. Display the target image after color change.

[0069] See also Figure 2 In the example shown, the target image, the color-changing object in the target image, and the color-changing requirement may be a user's Figure 2 The target image can be selected by the user from the gallery, and the gallery can be stored locally by the execution subject described in this embodiment (such as an album), or stored on other devices on the network side, which is not limited in this embodiment. After entering the target image, the user can enter the color-changing object in the target image in the corresponding input area of ​​the color-changing service interface through the interactive methods provided on the color-changing service interface (such as mouse, voice, keyboard, etc.). For example, if the color-changing object is clothing in the target image (such as a shirt dress), the user can use manual input to enter keywords such as "top clothing, shirt dress" and the like in the corresponding input area; or, the color-changing object can be directly entered by circling, for example, the user can trigger a circling operation for the color-changing object in the target image, and the execution subject performs recognition and analysis based on the area image circled by the user to determine the color-changing object in the target image, etc., which is not limited here. For the color change demand, it can be but not limited to color, material texture, etc., as well as the input of the color change object, the user can also complete the color change demand input through the interactive method provided by the color change service interface; for example, continuing with the above example, the color change object is the clothing in the target image, and assuming that the color change demand is color, the user can trigger the color input operation through the color change service interface to achieve the input of the target color.

[0070] It should be noted that the above-mentioned “input” does not only refer to keyboard typing input, but is a broad concept, which can be input by users clicking on corresponding elements, for example, users can input the target color by clicking on color selection elements, etc. Specifically, if the user wants to Figure 2 To change the color of the light blue shirt dress in the model image A shown in the figure, the user can click the "color change demand input" element on the color change service interface to select the target color, and select a tiled image containing only the shirt dress of the target color from the gallery and input it to the client; wherein the tiled image containing the shirt dress of the target color is the source image providing the target color. For a detailed introduction to the source image, please refer to the relevant content below, which will not be repeated here.

[0071] Based on the above content, a feasible technical solution for the above 101 “determining a target image, a color-changing object in the target image, and a color-changing requirement” is:

[0072] 1011. Displaying a color changing service interface;

[0073] 1012. In response to an input operation of the user through the color-changing service interface, the target image, the color-changing object in the target image, and the color-changing requirement input by the user are obtained.

[0074] After determining the target image, the color-changing object in the target image, and the color-changing requirements, a key technical problem is how to accurately determine the target area corresponding to the color-changing object in the target image in order to subsequently implement the color-changing processing according to the color-changing requirements. The process of determining the target area corresponding to the color-changing object refers to the process of segmenting the color-changing object to be processed from the background of the target image, that is, image segmentation. Image segmentation is a key step from image processing to image analysis, and is also a basic computer vision technology. This is because image segmentation, feature extraction, etc. will convert the image into a more abstract and compact form, making higher-level analysis and understanding possible. The essence of image segmentation is to correctly divide the attribute space so that pixels with the same attributes belong to the same area, and pixels with different attributes belong to different areas; from another perspective, image segmentation can also be considered as pixel labeling, and pixels belonging to the same area are marked with the same number.

[0075] In the existing scheme, when using image segmentation technology to determine the target area corresponding to the color-changing object in the target image, a simple single segmentation is often performed on the color-changing object, and then the segmented area is directly used as the target area corresponding to the color-changing object. The effect of the segmentation results of other non-color-changing objects in the target image on the segmentation results of the color-changing object is not considered, which easily leads to the problem of inaccurate extraction results. The technical solution provided in this embodiment, in order to ensure that the target area corresponding to the color-changing object determined has a high accuracy, all objects contained in the target image are used as segmentation objects, and the segmentation process of the target image is performed once for each segmented object to obtain a corresponding plurality of segmented areas, and the target area corresponding to the color-changing object is comprehensively determined through the plurality of segmented areas.

[0076] In specific implementation, this embodiment will first study and analyze the different objects that may be contained in the target image, determine all the objects that may be contained in the target image, train multiple corresponding segmentation models for all the objects that may be contained and deploy them on the execution subject of this embodiment (i.e., the client); when a specific target image (such as Figure 2When the model image A) shown in the figure is processed to determine the target area corresponding to the color-changing object (such as a light blue shirt dress), the client can select multiple segmentation models suitable for segmenting different objects in the target image from multiple segmentation models stored in itself based on the different objects contained in the target image identified by the image recognition technology, so as to process the target image respectively using the selected multiple segmentation models, thereby obtaining multiple corresponding segmentation areas. Based on this, the segmentation object in the above 102 can refer to the different objects contained in the target image determined by identifying the target image. Accordingly, before the above 102 "using multiple segmentation models with different segmentation objects to process the target image to obtain multiple segmentation areas", the solution provided in this embodiment can also include the following steps:

[0077] A01, identifying the target image;

[0078] A02. Determine, based on the image recognition result, a plurality of segmentation models suitable for segmenting different objects in the target image.

[0079] For example, still taking the clothing color change scene as an example, after research, merchants are looking for models to shoot clothing with a certain color (such as Figure 2 When the light blue clothing A) is shown, in order to better show the effect of the clothing, other accessories such as handbags, scarves, etc. are often matched with the clothing. For this reason, the model image captured in this scene may include other objects such as handbags and scarves in addition to clothing and models; wherein clothing is a color-changing object, and models, handbags, scarves, etc. are non-color-changing objects. In the execution body of this embodiment, multiple segmentation models such as clothing segmentation model, model segmentation model, and accessories segmentation model will be deployed. Furthermore, because clothing and models are closely related, in order to better segment clothing from models, models can be further divided into fine divisions, so as to train multiple corresponding segmentation models specifically for models. Specifically, the model can be subdivided into human body, skin, hair, etc., and accordingly, the above-mentioned model segmentation model can specifically include human body segmentation model, skin segmentation model, hair segmentation model, etc.

[0080] When receiving Figure 2For the model image A shown, when it is necessary to determine the target area corresponding to the light blue shirt dress in the model image A so as to change the color of the shirt dress, the model image A is identified and analyzed, and it is determined that the objects contained in the model image A are the light blue shirt dress and the model's body, hair and skin. In other words, the segmentation objects contained in the model image A are the shirt dress, the model's body, hair and skin, the shirt dress is the color-changing object, and the model's body, hair and skin are non-color-changing objects; based on the image recognition result, it can be determined that multiple segmentation models suitable for segmenting the model image A are: clothing segmentation model, body segmentation model, skin segmentation model and hair segmentation model, and the subsequent execution subject can also retrieve the clothing segmentation model, the body segmentation model, the skin segmentation model and the hair segmentation model from the multiple segmentation models pre-stored by itself, so as to process the model image and obtain the corresponding area corresponding to the shirt dress, the area corresponding to the model's body, the area corresponding to the skin and the area corresponding to the hair.

[0081] In summary of the above content, the segmented objects in the above 102 also include color-changing objects and non-color-changing objects. In specific implementation, the types specified for the color-changing objects and non-color-changing objects are determined according to actual conditions and are not limited here. All objects in the target image except the color-changing objects are non-color-changing objects. For a specific description of the color-changing objects and non-color-changing objects, please refer to the above-mentioned related examples, which will not be described in detail here. Accordingly, the multiple segmentation models with different segmentation objects may include two major types of segmentation models, namely, a first segmentation module for segmenting color-changing objects and a second segmentation model for segmenting non-color-changing objects, and the number of the second segmentation models is at least one. Specifically, see Figure 2 Following the above example, let Figure 2 The target image shown in the figure is a model image A, in which the shirt dress is a color-changing object, and the model's body, skin, and hair are non-color-changing objects. The first segmentation model is a clothing segmentation model, and the at least one second segmentation model includes a body segmentation model, a skin segmentation model, and a hair segmentation model.

[0082] The above-mentioned first segmentation model and at least one second segmentation model are both semantic segmentation models, which are obtained by training the machine learning model to be trained based on a large number of training samples using machine learning technology (such as deep learning technology). The training process can be implemented on the server side, and the first segmentation model and at least one second segmentation model after training can be deployed on the client side, so that the client side can directly call the first segmentation module and at least one second segmentation model locally to perform segmentation processing on the target image to determine the target area corresponding to the color-changing object in the target image. In specific implementation, the server side trains the machine learning model to be trained to obtain the corresponding segmentation model as follows:

[0083] A11, obtaining a training sample graph; the training sample graph includes segmentation objects and the categories to which the segmentation objects belong;

[0084] A12. Using the sample graph as input of a machine learning model to be trained, and executing the machine learning model to obtain an output result;

[0085] A13. Optimize the machine learning module according to the output result and the category of the segmented object in the sample image.

[0086] In specific implementation, the above training sample graphs can be determined based on the acquired data atlas, which can be obtained from some public data atlases published on the Internet. Public data atlases are data atlases that are open to the public for reading and use by the holder of the data atlas. In this embodiment, the selection of public data atlases is not specifically limited. After the data atlas is acquired, sample graphs suitable for training can be selected according to actual needs. For example, in this embodiment, Figure 2 The model image shown is segmented to extract the clothing worn by the model, so as to perform color change processing on the clothing. When training the machine learning model to obtain a clothing segmentation model for segmenting the area corresponding to the clothing, those clothing images in the data atlas are suitable as training sample images; for example, when training the machine learning model to obtain a clothing accessories segmentation model for segmenting the area corresponding to clothing accessories, those accessories images, character images, etc. in the data atlas are suitable as training sample images, and so on. After the training sample image is input into the machine learning model to be trained, the machine learning model is executed to obtain the corresponding output result, which includes the estimated category of the segmented object in the sample image; according to the output result and the category of the segmented object in the sample image, the machine learning model can be optimized to obtain the corresponding segmentation model. For the specific implementation process of optimizing the machine learning model, please refer to the existing scheme.

[0087] The above-mentioned machine learning model is constructed based on a machine learning algorithm, and the machine learning algorithm may include but is not limited to at least one of the following: logistic regression algorithm, decision tree algorithm, random forest algorithm, support vector machine algorithm, etc.

[0088] It should be noted that: in practical applications, it is not difficult to find that the resolution of the image in the data map is generally low (such as only 256*192). When a low-resolution image is used as a training sample map, the segmentation result output by the trained segmentation model will have low accuracy. In order to improve the resolution of the sample map to improve the accuracy of the segmentation model, the image super-resolution reconstruction method can be used to improve the quality of the sample map before the sample map is input into the machine learning model to be trained. That is, through the software processing method, the detailed information of the image is reconstructed from the low-resolution image, so as to obtain a higher quality super-resolution image. Specifically, the following methods can be used to improve the resolution of the image, but are not limited to: a super-resolution reconstruction method based on interpolation, a super-resolution reconstruction method based on reconstruction, a super-resolution reconstruction method based on learning, etc. Regarding the specific implementation process of using the above means to provide image resolution, please refer to the existing scheme, which will not be described in detail here. Of course, in the specific embodiment, if the sample map is a high-resolution image, the high-resolution image can be directly input into the machine learning model without the need to improve the resolution of the image through the above method.

[0089] Furthermore, by using the multiple segmentation models with different segmentation objects obtained through the training of the above steps, the multiple segmentation models include a first segmentation model and at least one second segmentation model, and the present embodiment can process the target image separately to obtain multiple corresponding segmentation areas. The multiple segmentation areas may specifically include:

[0090] A first segmentation area corresponding to the color-changing object obtained by processing the target image using the first segmentation model;

[0091] A second segmentation area corresponding to the non-color-changing object is obtained by processing the target image using the second segmentation model.

[0092] For example, see Figure 2 Continuing with the above example in this step, it is assumed that the color-changing object is the shirt dress in the model image A, and the first segmentation model is the clothing segmentation model. The first segmentation area obtained by processing the target image with the clothing segmentation model is the area corresponding to the shirt dress (hereinafter referred to as the clothing area); accordingly, the non-color-changing object is the model, more specifically the model's body, skin, hair, etc., and the second segmentation model can be a body segmentation model, a hair segmentation model, a skin segmentation model, etc., and the target image is processed using the body segmentation model, the hair segmentation model, the skin segmentation model, etc., respectively, to obtain the following second segmentation areas: the area corresponding to the body (hereinafter referred to as the body area, or the second segmentation area), the area corresponding to the skin (hereinafter referred to as the skin area, or the third segmentation area), the area corresponding to the hair (hereinafter referred to as the hair area, or the fourth segmentation area), etc., which are not limited here.

[0093] Based on the relationship between the above-mentioned first segmentation area and the second segmentation area, the target area corresponding to the color-changing object can be accurately determined. Specifically, considering that the first segmentation model and the second segmentation model accurately segment the target image, the first segmentation area and the second segmentation area obtained by the first segmentation model and at least one second segmentation model respectively, the boundaries between the areas will be adaptive splicing relationships, and the areas will not overlap partially. At this time, the first segmentation area can be directly used as the target area; on the contrary, if there is a partial overlap between the first segmentation area and the second segmentation area, it means that the segmentation results obtained by the first segmentation model and the corresponding second segmentation model for processing the target image respectively conflict, and pixels are wrongly divided. In this case, the area boundary of the first segmentation area can be processed based on the area boundary of the second segmentation area to improve the accuracy of the area boundary of the first segmentation area, and finally obtain a target area with higher accuracy. That is,

[0094] In a specific achievable technical solution, the above 103 “determining the target area corresponding to the color-changing object in the target image according to the multiple segmented areas” may specifically include:

[0095] 1031. Determine whether the first segmented area and the second segmented area partially overlap;

[0096] 1032. When it exists, perform boundary processing on the region boundary of the first segmented region according to the region boundary of the second segmented region;

[0097] 1033. Use the first segmented area after boundary processing as the target area.

[0098] In the above 1031, pixel feature points of the first segmented area and the second segmented area can be extracted, and then a pixel feature point matching algorithm can be used to determine whether the first segmented area and the second segmented area partially overlap. For a specific implementation of determining whether the first segmented area and the second segmented area partially overlap, refer to the existing solution.

[0099] In the above 1032, when there is a partial overlap between the first segmentation area and the second segmentation area, it is often caused by the wrong division of pixels when the first segmentation model and the corresponding second segmentation model respectively segment the target image. The accuracy of the segmentation model is a key factor affecting the segmentation result. For this reason, the region boundary of the first segmentation area can be processed according to the region boundary of the second segmentation area based on the accuracy of the segmentation model; wherein the accuracy is related to the degree of optimization of the machine learning model when the corresponding segmentation model is obtained by training the machine learning model. In addition, further, the region boundary of the first segmentation area can also be processed according to the region boundary of the second segmentation area based on the importance of the segmentation result; wherein the importance can refer to the degree of influence of the segmentation result corresponding to the segmentation object on the display effect of the color-changing object.

[0100] In specific implementation, corresponding weights can be assigned to different segmentation models based on the accuracy of the segmentation model and the importance of the corresponding segmentation results; wherein, the greater the weight of the segmentation model, the higher the accuracy of the segmentation model and / or the importance of its corresponding segmentation results, and accordingly, the accuracy and / or importance of the segmented region obtained by processing the target image by the segmentation model is relatively high. Based on this, when the first segmentation region and the second segmentation region partially overlap, it can be determined whether to perform boundary processing on the region boundary of the first segmentation region according to the region boundary of the second segmentation region based on the relationship between the weight of the first segmentation model corresponding to the first segmentation region and the weight of the second segmentation model corresponding to the second segmentation region. For example, when the weight of the first segmentation model is less than the weight of the second segmentation model, it can be indicated that the accuracy and / or importance of the first segmentation region is less than the accuracy and / or importance of the second segmentation region. In this case, the region boundary of the first segmentation region can be processed according to the region boundary of the second segmentation region; conversely, when the weight of the first segmentation model is greater than or equal to the weight of the second segmentation model, the first segmentation region can be directly used as the target region.

[0101] Based on the above content, before the above step 1032 of "performing boundary processing on the region boundary of the first segmented region according to the region boundary of the second segmented region", the solution provided by this embodiment further includes:

[0102] A21. Obtain weights corresponding to the first segmentation model and the second segmentation model respectively;

[0103] A22: When the weight of the first segmentation model is less than the weight of the second segmentation model, trigger an operation of performing boundary processing on the region boundary of the first segmentation region according to the region boundary of the second segmentation region.

[0104] For example, see Figure 2 Continuing with the above example, let's take the shirt dress in model image A as the color change object. Assume that the first segmentation model is the clothing segmentation model, and the second segmentation model includes: human segmentation model, skin segmentation model and hair segmentation model. Set the human segmentation model to have the highest accuracy, and the segmentation result corresponding to the hair segmentation model to have the highest importance. The weights assigned to the human segmentation model and the hair segmentation model are both greater than those to the clothing segmentation model and the skin segmentation model. Figure 2 The model shown in the figure has long hair and part of it is scattered on the chest side of the human body. At this time, the hair will partially block the shirt dress. If the clothing area obtained by processing the model image A with the clothing segmentation model and the hair area obtained by processing the model image with the hair segmentation model partially overlap, because the weight of the clothing segmentation model is less than the weight of the hair segmentation model, it means that the accuracy and / or importance of the clothing area is lower than that of the hair area. In this case, the area boundary of the first segmentation area can be based on the area boundary of the second segmentation area. Perform a shrinking process until there is no overlapping between the first segmentation area and the second segmentation area. For the specific implementation of the above-mentioned specific implementation of no overlapping between the first segmentation area and the second segmentation area, please refer to the existing scheme, for example, the implementation principle of the overlapping cell nucleus processing process in the existing scheme, etc., which will not be described in detail here.

[0105] In the above 1033, after completing the boundary processing of the first segmented area, the first segmented area can be used as the target area corresponding to the color-changing object in the target image (eg Figure 2 Image B).

[0106] Based on the target area corresponding to the determined color-changing object, the target area can be analyzed and processed to obtain regional information of the target area, such as the brightness, texture or contour of the area. Then, based on the color-changing requirements input by the user, the target image, and the regional information of the target area, the color-changing object is subjected to corresponding color-changing processing such as color migration-related algorithms.

[0107] In image processing, color migration refers to using one image as a color reference image, and using the color provided by the color reference image to change the color information of another image to be processed using the corresponding color migration-related algorithm, so that the newly generated image has the color information of the color reference image while preserving the geometric structure and shape information of the original image to be processed; the above-mentioned color reference image is used to provide the target color, and the image to be processed is mainly used to provide geometric structure and shape information. For the convenience of description, the color reference image is usually called the source image and the image to be processed is called the target image. In practice, color migration can be represented by a transformation T, C(x, y) = T(f(x, y)), where f(x, y) is the source image and C(x, y) is the newly generated image.

[0108] In different application scenarios, the purpose of color migration using color migration technology will be different. The technical solution provided in this embodiment, in the application scenario of clothing, aims to change the fabric color of the clothing while keeping the geometric structure details of the clothing worn by the model in the model image unchanged. Figure 2 As shown, assuming that the source image provided by this embodiment is a tiled image of a dark red shirt dress (not shown in the figure), the purpose of this embodiment is to transfer the dark red color of the shirt dress in the source image to the light blue shirt dress in the model image A, so that the color of the shirt dress in the model image A is changed from "light blue" to "dark red", thereby obtaining the model image A' after the shirt dress is changed in color. While preserving the geometric structure shape information of the shirt dress in the original model image A, the model image A' also has the color information of the dark red shirt dress in the source image.

[0109] Based on the above description of color migration, in order to achieve the purpose of this embodiment, in a specific achievable technical solution, the color change requirement determined in the above 101 may include a target color, and the target color may be provided by a source image input by a user. For the relevant introduction of the source image, please refer to the above related content. Accordingly, the above 104 "based on the color change requirement, perform color change processing on the target area" may specifically include:

[0110] 1041. Obtain a color migration model;

[0111] 1042. Input the target color, the target image, and the area information of the target area into the color transfer model, execute the color transfer model, and output the target image after the target area is changed to the target color.

[0112] In the above 1041, the color migration model is constructed based on the corresponding color migration algorithm, and the color migration related algorithm can be but not limited to the global color migration algorithm, the user interactive color migration algorithm, the color migration algorithm based on the neural network, etc. Among them,

[0113] The global color migration algorithm refers to: implementing a global color migration algorithm between color images by performing simple statistical calculations on images converted to the lαβ color space; here, the reason for using the lαβ color space is: because the lαβ color space dimension coordinates contain the coordinates of the brightness (l) component, compared with the classic RGB color space, the lαβ color space can better describe the texture noise of the image of the color-changing object (such as the fabric of clothing).

[0114] The user interactive color migration algorithm, also known as the sample block color migration algorithm, refers to: the user selects sample blocks of appropriate size, position and number from the target image and the source image respectively, and specifies the correspondence between the target image sample blocks and the meta-image sample blocks, so as to achieve color migration.

[0115] For a detailed introduction to the above color migration algorithm and color space, please refer to the prior art, which will not be described in detail here. In addition, since the image acquisition device and the image display device both use the RGB color space, when no color space processing is performed on the target color, target image, and target area, the target color, target image, and target area all refer to the corresponding color value or RGB image in the RGB color space.

[0116] In the above 1042, the region information of the target region can be obtained by using a corresponding acquisition method based on the adopted color migration algorithm. The following takes the global color migration algorithm as an example to briefly explain the implementation principle of changing the color of the target region, which specifically includes the following main steps:

[0117] 1. Remove the correlation of color space, that is, use the conversion relationship between RGB color space and lαβ color space to convert the source image providing the target color and the image corresponding to the target area from RGB space to lαβ color space; and calculate the mean and standard deviation of the target color, as well as the mean and standard deviation of the regional information of the target area (such as the color information of the target area) respectively;

[0118] 2. Use the following formula to transfer the mean and standard deviation of the target color to the image corresponding to the target area, so that the image corresponding to the target area has the same standard deviation and mean as the source image:

[0119]

[0120]

[0121]

[0122] In the above formula, l dst , α dst , β dst They represent the three channel values ​​of the image pixels corresponding to the target area in the lαβ color space; is the overall mean of the three channels in the target area, is the overall standard deviation of the three channels in the target area; is the overall mean of the three channels in the target area, is the overall standard deviation of the three channels in the target area; The channel values ​​of the three channels after transformation for the target area;

[0123] 3. The image data after the target area is changed is converted to the RGB color space and merged with the target image to display the synthesized target image.

[0124] Considering that users may sometimes have other needs besides wanting to change the color of the object, such as changing the material texture of the color-changing object, for example, see Figure 2 As shown, in addition to changing the color of the shirt dress in the model image A, the user may also want to change the material of the shirt dress from "polyester material" to "silk material". In order to meet other needs of the user, such as changing the material texture of the color-changing object, the color-changing demand may also include the target material texture; accordingly, the above 104 "based on the color-changing demand, performing color-changing processing on the target area" may also include the following steps:

[0125] 1043. Replace the material texture of the target area in the target image with the target material texture.

[0126] In the technical solution of this embodiment, during the color change process of the target area, the material texture is introduced so that the color-changing object in the final synthesized target image, such as clothing, has more fabric texture details, thereby improving the display effect of the clothing.

[0127] In the above 105, after the target image is changed in color through the above processing steps, in order to facilitate the user to view the color change effect, the target image after the color change can be displayed on the interactive interface provided by the client.

[0128] In summary, the technical solution provided by this embodiment, on the basis of determining the target image (such as clothing display image), the color-changing object (such as clothing, etc.) in the target image and the color-changing requirement (such as target color, target material texture), further determines the target area corresponding to the color-changing object in the target image by using multiple segmentation models with different segmentation objects to process the target image respectively and obtain multiple segmentation areas. The determination of the target area fully considers the mutual influence relationship between the segmentation results corresponding to the different segmentation objects contained in the target image. Based on the mutual influence relationship, the area boundary of the segmentation area corresponding to the color-changing object (i.e., the first segmentation area) is determined according to the segmentation area corresponding to the non-color-changing object (i.e., the second segmentation area), so as to obtain the target area, which can effectively ensure the accuracy of the target area. Afterwards, according to the color-changing requirement, the color-changing object in the target image is processed by the color migration model to obtain the target image after color-changing, which can make the color-changing object in the target image have a better color-changing effect and give the user a more realistic look and feel. Moreover, the entire color-changing process of the above-mentioned scheme is fully automated and does not require user participation, which can reduce the user's learning cost.

[0129] The technical solution provided by the present invention is described below in conjunction with specific application scenarios, such as changing the pattern and color of the model's display items, changing the color of the clothes worn by the model, and the like.

[0130] like Figure 3 As shown, a flowchart of an image processing method provided by another embodiment of the present invention is shown. The method provided by this embodiment is proposed for changing the color scene of the model's display object. The execution subject of this method can be a client, and the client can be a smart phone, a desktop computer, a laptop computer, a tablet computer, a smart wearable device, etc., which is not limited in this embodiment. Specifically, the method includes:

[0131] 201. In response to a user operation, obtaining a target image containing an exhibit and a target pattern of the exhibit;

[0132] 202. Using a plurality of segmentation models with different segmentation objects, respectively process the target image to obtain a plurality of segmentation regions;

[0133] 203. Determine a target area corresponding to the exhibit in the target image according to the multiple segmented areas;

[0134] 204. Perform a color change operation on the target area according to the target color;

[0135] 205. Display the target image after color change.

[0136] The exhibits in this embodiment may be clothing, accessories, electronic products, bags (such as handbags, luggage, backpacks, etc.), shoes, hats, scarves, gloves, etc. Among them, accessories may be necklaces, watches, rings, headwear, earrings, etc., which are not limited in this embodiment. The pattern and color may refer to the pattern and color of fabrics, etc., which are not limited here.

[0137] like Figure 2 In the example shown, the user can input a target image containing an exhibit (such as model image A) and a target pattern of the exhibit (not shown in the figure) through an interactive interface. The user can see the target image after color change by clicking the "color change" control on the interactive interface. For the subject (such as a mobile phone, computer, etc.) that executes the method of this embodiment, after the user inputs the target image and target pattern of the exhibit, multiple segmentation models are first determined, and then the target image is processed using the multiple segmentation models to obtain multiple segmentation areas, so as to obtain the target area corresponding to the target image exhibit according to the multiple segmentation synthesis, and finally the target area is color-changed according to the target pattern to obtain the target image after color change (such as the target image after color change of the model wearing a dark red dress in the figure).

[0138] In order to change the color, material texture, etc. of the clothing worn by the model, another embodiment of the present invention also provides an image processing method. Figure 4 FIG. 1 is a flow chart of an image processing method provided by another embodiment of the present invention. The execution subject of the method provided by this embodiment may be a client, and the client may be a smart phone, a desktop computer, a laptop computer, a tablet computer, a smart wearable device, etc., which is not limited in this embodiment. Specifically, the method includes:

[0139] 301. In response to the user's operation, obtain a clothing display image and a clothing color change requirement;

[0140] 302. Segmenting a region corresponding to clothing in the clothing display image using a first segmentation model to obtain a first segmented region;

[0141] 303. Segment a region corresponding to at least one object other than the clothing in the clothing display image using at least one second segmentation model to obtain at least one second segmented region;

[0142] 304. Determine a region boundary of the first segmented region according to the at least one second segmented region to obtain a target region;

[0143] 305. Based on the clothing color change requirement, the target area is subjected to color change processing;

[0144] 306. Display the clothing display image after the color is changed.

[0145] For the contents of 301 to 302 above, please refer to the corresponding contents above and will not be repeated here.

[0146] In the above, the clothing display image is a model clothing display image. Accordingly, the above 303 "using at least one second segmentation model to segment a region corresponding to at least one object other than the clothing in the clothing display image to obtain at least one second segmented region" may include at least one of the following:

[0147] 3031. Segmenting a region corresponding to a human body in the model clothing display image using a human body segmentation model to obtain a second segmented region;

[0148] 3032. Segment the area corresponding to the skin in the model clothing display image using the skin segmentation model to obtain a third segmented area;

[0149] 3033. Use the hair segmentation model to segment the region corresponding to the hair in the model clothing display image to obtain a fourth segmented region.

[0150] The above 304 “determine the region boundary of the first segmented region according to the at least one second segmented region to obtain the target region” includes:

[0151] 3041. If the second segmented area partially overlaps with the area boundary of the first segmented area, perform boundary processing on the area boundary of the first segmented area according to the second segmented area;

[0152] 3042. If the third segmented area partially overlaps with the area boundary of the first segmented area, perform boundary processing on the area boundary of the first segmented area according to the third segmented area;

[0153] 3043. If the fourth segmented area partially overlaps with the area boundary of the first segmented area, perform boundary processing on the area boundary of the first segmented area according to the fourth segmented area;

[0154] 3044. Use the first segmented area after boundary processing as the target area.

[0155] Similarly, for the contents of 3031 to 3033 and 3041 to 3044 above, please refer to the corresponding contents in the above text and will not be repeated here.

[0156] An embodiment of the present invention further provides an image processing system. Figure 5 As shown, the image processing system comprises:

[0157] The client 401 is used to obtain the target image input by the user, the color-changing object and the color-changing requirement in the target image, and send them to the server;

[0158] The server 402 is used to process the target image using multiple segmentation models with different segmentation objects to obtain multiple segmentation regions; determine the target region corresponding to the color-changing object in the target image according to the multiple segmentation regions; and perform color-changing processing on the target region based on the color-changing requirement;

[0159] The client 401 is also used to display the target image after the color change fed back by the server.

[0160] like Figure 5 As shown, multiple segmentation models trained by the server are stored locally, and the server can be but not limited to a single server, a server cluster, a virtual server deployed on a server or a cloud, etc. The client can be but not limited to: a desktop computer, a laptop, a mobile phone, a tablet computer, etc.

[0161] It is necessary to add here that: Figure 6 and Figure 2As shown, the above-mentioned segmentation model can also be deployed on the client 401, and the server 402 is used to train multiple segmentation models with different segmentation objects and send them to the client 401; the client 401 is used to automatically load the multiple segmentation models with different segmentation objects sent by the server locally or update the multiple existing segmentation models locally after receiving them; in this case, the client 401 will be specifically used for: obtaining the target image input by the user, the color-changing object in the target image and the color-changing requirement; using the multiple segmentation models with different segmentation objects, respectively processing the target image to obtain multiple segmentation areas; determining the target area corresponding to the color-changing object in the target image according to the multiple segmentation areas; based on the color-changing requirement, performing color-changing processing on the target area; and displaying the target image after the color-changing feedback from the server.

[0162] The technical solution provided by the present invention can also be adopted as follows Figure 7 The system architecture shown is implemented. Figure 7 The system architecture shown may be deployed on a single server on the server side, a server cluster, a virtual server deployed on a server, or in the cloud, etc. Figure 7 The system architecture shown in the figure can also be deployed on a client-side computer. Figure 7 As shown, the image processing system includes: an application layer, a region processing layer and a color change processing layer.

[0163] The application layer is used to receive a target image, a color-changing object in the target image, and a color-changing requirement input by a user;

[0164] The region processing layer has multiple segmentation models for different segmentation objects, and is used to process the target image respectively using the multiple segmentation models for different segmentation objects to obtain multiple segmentation regions; and determine the target region corresponding to the color-changing object in the target image according to the multiple segmentation regions;

[0165] A color change processing layer, having a color migration model, for performing color change processing on the target area according to the color change requirement;

[0166] The application layer is also used to send the target image after color change to the client device corresponding to the user.

[0167] The technical solutions provided by the embodiments of the present invention are described below in conjunction with specific application scenarios. The technical solutions provided by the embodiments of the present invention can provide merchants with a service of changing the color of commodity objects. For example, a merchant user can upload a model image (such as a previously taken photo of a model wearing a light blue shirt dress) through a client, and input a color change object (such as a shirt dress) and a color change requirement (such as a target color, which can be a tiled image of a shirt dress in colors other than light blue (such as dark red)) in the model image. Then the merchant user clicks the "color change" control to obtain a model image of a model wearing a dark red shirt dress. Because when the model image after color change is generated, the area corresponding to the shirt dress that needs to be changed in the original model image (hereinafter referred to as the clothing area) is determined, and multiple segmentation models are used to segment all objects in the original model image to obtain multiple segmentation areas, which improves the accuracy of the clothing area and can ensure that only the clothing area is color-changed without affecting other non-color-changing areas. The color-changing process is completed using the color transfer model, which ensures that the shirt dress can highly restore the structure, texture, brightness, shadow, etc. of the shirt dress after the color change, and can achieve a fake-real effect. The entire color-changing process is completed automatically without the intervention of the merchant. If the merchant user not only wants to promote the color-changed image on the e-commerce platform, but also wants to make it into a video for online promotion, the color-changed image has a good color-changing effect and can be used to add dynamic effects to the video.

[0168] In fact, based on the technical solutions provided by the embodiments of the present invention, a batch processing service for changing the color of clothing can also be provided for merchants. For example, a new clothing x of the season has 4 colors, namely color 1, color 2, color 3, and color 4; for the clothing x, a model image of a model wearing clothing x of color 1 is taken, and the other three colors of the clothing x, namely color 2, color 3, and color 4, can be photographed into corresponding tiled images; then, the model image, the logo of the clothing x that needs to be changed in the model image, and the three tiled images containing color 2 clothing x, color 3 clothing x, and color 3 clothing x are uploaded at one time, and then the "batch processing" control is clicked, and the back-end of the client device or the server device processes the model image, the clothing x in the model image, and the three tiled images in turn, and the model images of the model wearing clothing x of the three colors of color 2, color 3, and color 4 can be obtained. In this way, the user does not need to perform multiple input operations, which simplifies the operation and improves efficiency.

[0169] It can be seen that the technical solutions provided by the embodiments of the present invention save the shooting costs of clothing displays, adapt to the different changes in clothing colors more quickly, and can change the display effects in real time according to the color changes.

[0170] The above description is only combined with the scenario of model changing clothes. The technical solution provided by the embodiment of the present invention can also be applied to other scenarios for users with different needs, which are not listed one by one in this article.

[0171] Figure 8 FIG. 2 shows a schematic diagram of the structure of an image processing device provided by an embodiment of the present invention. Figure 8 As shown, the device includes: a determination module 51, a processing module 52 and a display module 53. The determination module 51 is used to determine the target image, the color-changing object in the target image and the color-changing requirement; the processing module 52 is used to process the target image respectively using multiple segmentation models with different segmentation objects to obtain multiple segmentation areas; the determination module 51 is also used to determine the target area corresponding to the color-changing object in the target image according to the multiple segmentation areas; the processing module 52 is also used to perform color-changing processing on the target area based on the color-changing requirement; the display module 53 is used to display the target image after color-changing.

[0172] Furthermore, the above-mentioned multiple segmentation models include a first segmentation model and at least one second segmentation model; the multiple segmentation areas include: a first segmentation area corresponding to the color-changing object obtained by processing the target image through the first segmentation model; a second segmentation area corresponding to the non-color-changing object obtained by processing the target image through the second segmentation model; accordingly,

[0173] The above-mentioned determination module 51, when used to "determine the target area in the target image based on the multiple segmented areas", is specifically used to: determine whether the first segmented area and the second segmented area partially overlap; if so, perform boundary processing on the area boundary of the first segmented area based on the area boundary of the second segmented area; and use the first segmented area after boundary processing as the target area.

[0174] Furthermore, the method provided in this embodiment also includes: an acquisition module, used to obtain the weights corresponding to the first segmentation model and the second segmentation model respectively; a trigger module, used to trigger the operation of performing boundary processing on the area boundary of the first segmentation area according to the area boundary of the second segmentation area when the weight of the first segmentation model is less than the weight of the second segmentation model.

[0175] Furthermore, the above-mentioned color change requirement includes a target color; accordingly, the above-mentioned processing module 52, when used to perform color change processing on the target area based on the color change requirement, is specifically used to: obtain a color migration model; input the target color, the target image, and the area information of the target area into the color migration model, execute the color migration model, and output the target image after the target area is changed to the target color.

[0176] Furthermore, the above-mentioned color change requirement also includes a target material texture; accordingly, the processing module, when used to perform color change processing on the target area based on the color change requirement, is also specifically used to: replace the material texture of the target area in the target image with the target material texture.

[0177] Furthermore, the method provided in this embodiment also includes: a recognition model for recognizing the target image; the above-mentioned determination module 51 is also used to determine multiple segmentation models suitable for segmenting different objects in the target image based on the image recognition result.

[0178] Furthermore, the display module 53 is also used to display a color-changing service interface; the acquisition module is also used to respond to the user's input operation through the color-changing service interface to acquire the target image, the color-changing object in the target image and the color-changing requirement input by the user.

[0179] It should be noted here that: the image processing device provided in the above embodiment can implement the technical solutions described in the above method embodiments. The specific implementation principles of the above modules or units can be found in the corresponding contents in the above method embodiments, which will not be repeated here.

[0180] Another embodiment of the present invention provides an image processing device, the structure of which is as follows: Fig. 9 As shown. The image processing device includes: an acquisition module 61, a processing module 62, a determination module 63, a color change module 64 and a display module 65. The acquisition module 61 is used to obtain a target image containing an exhibit and a target pattern of the exhibit in response to a user's operation; the processing module 62 is used to process the target image using multiple segmentation models with different segmentation objects to obtain multiple segmentation areas; the determination module 63 is used to determine the target area corresponding to the exhibit in the target image according to the multiple segmentation areas; the color change module 64 is used to change the color of the target area according to the target pattern; and the display module 65 is used to display the target image after the color change.

[0181] It should be noted here that: the image processing device provided in the above embodiment can implement the technical solutions described in the above method embodiments. The specific implementation principles of the above modules or units can be found in the corresponding contents in the above method embodiments, which will not be repeated here.

[0182] A schematic diagram of the structure of an image processing device provided by another embodiment of the present invention. Fig.10As shown. The image processing device includes: an acquisition module 71, a segmentation module 72, a determination module 73, a color change module 74 and a display module 75. The acquisition module 71 is used to obtain a clothing display image and a clothing color change requirement in response to a user's operation; the segmentation module 72 is used to segment the clothing corresponding area in the clothing display image using a first segmentation model to obtain a first segmented area; and is also used to segment the area corresponding to at least one object other than the clothing in the clothing display image using at least one second segmentation model to obtain at least one second segmented area; the determination module 73 is used to determine the area boundary of the first segmented area according to the at least one second segmented area to obtain a target area; the color change module 74 is used to perform color change processing on the target area based on the clothing color change requirement; and the display module 75 is used to display the clothing display image after color change.

[0183] Further, the above-mentioned clothing display image is a model clothing display image; accordingly, the above-mentioned segmentation module 72, when used to use at least one second segmentation model to segment out a region corresponding to at least one object other than the clothing in the clothing display image to obtain at least one second segmented region, is specifically used to: use at least one second segmentation model to segment out a region corresponding to at least one object other than the clothing in the clothing display image to obtain at least one second segmented region, including at least one of the following: use a human body segmentation model to segment out a region corresponding to the human body in the model clothing display image to obtain a second segmented region; use a skin segmentation model to segment out a region corresponding to the skin in the model clothing display image to obtain a third segmented region; use a hair segmentation model to segment out a region corresponding to the hair in the model clothing display image to obtain a fourth segmented region.

[0184] Furthermore, the above-mentioned determination module 73, when used to determine the area boundary of the first segmented area according to the at least one second segmented area to obtain the target area, is specifically used to: if the area boundary of the second segmented area partially overlaps with that of the first segmented area, then perform boundary processing on the area boundary of the first segmented area according to the second segmented area; if the area boundary of the third segmented area partially overlaps with that of the first segmented area, then perform boundary processing on the area boundary of the first segmented area according to the third segmented area; if the area boundary of the fourth segmented area partially overlaps with that of the first segmented area, then perform boundary processing on the area boundary of the first segmented area according to the fourth segmented area; and use the first segmented area after boundary processing as the target area.

[0185] It should be noted here that: the image processing device provided in the above embodiment can implement the technical solutions described in the above method embodiments. The specific implementation principles of the above modules or units can be found in the corresponding contents in the above method embodiments, which will not be repeated here.

[0186] Fig.11 The schematic diagram of the principle structure of an electronic device provided by an embodiment of the present invention is shown. The electronic device includes a processor 81 and a memory 83. The memory 83 is used to store one or more computer instructions; the processor 81 is coupled to the memory 83 and is used for the at least one or more computer instructions (such as computer instructions for implementing data storage logic) to implement:

[0187] Determining a target image, a color-changing object in the target image, and a color-changing requirement;

[0188] Using a plurality of segmentation models with different segmentation objects, the target image is processed respectively to obtain a plurality of segmentation regions;

[0189] Determining a target area corresponding to the color-changing object in the target image according to the multiple segmented areas;

[0190] Based on the color change requirement, performing color change processing on the target area;

[0191] The target image after color change is displayed.

[0192] It should be noted that: in addition to implementing the above steps, the processor can also implement other method steps provided in the above data processing method embodiment. For details, please refer to the detailed description in the above embodiment, which will not be repeated here. The memory 33 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as a static random access memory (SRAM), an electrically erasable programmable read-only memory (EEPROM), an erasable programmable read-only memory (EPROM), a programmable read-only memory (PROM), a read-only memory (ROM), a magnetic memory, a flash memory, a magnetic disk or an optical disk.

[0193] Further, if Fig.11 As shown, the electronic device also includes: a communication component 85, a power supply component 82, a display 84 and other components. Fig.11 Only some components are shown schematically, which does not mean that the electronic device only includes Fig.11 Components shown.

[0194] Another embodiment of the present invention provides an electronic device, the principle structure diagram of which is as shown above Fig.11Specifically, the electronic device includes a processor and a memory. The memory is used to store one or more computer instructions; the processor, coupled to the memory, is used to execute the at least one or more computer instructions to implement:

[0195] In response to the user's operation, a target image containing an exhibit and a target pattern of the exhibit are acquired;

[0196] Using a plurality of segmentation models with different segmentation objects, the target image is processed respectively to obtain a plurality of segmentation regions;

[0197] Determining a target area corresponding to the exhibit in the target image according to the multiple segmented areas;

[0198] According to the target color, the target area is subjected to a color change operation;

[0199] The target image after color change is displayed.

[0200] It should be noted here that: in addition to implementing the above steps, the processor can also implement other method steps provided in the above image processing method embodiment. For details, please refer to the detailed description in the above embodiment, which will not be repeated here.

[0201] Another embodiment of the present invention provides an electronic device, the principle structure diagram of which is as shown above Fig.11 Specifically, the electronic device includes a processor and a memory. The memory is used to store one or more computer instructions; the processor, coupled to the memory, is used to execute the at least one or more computer instructions to implement:

[0202] In response to the user's operation, obtaining clothing display images and clothing color change requirements;

[0203] Using the first segmentation model, segmenting the clothing corresponding region in the clothing display image to obtain a first segmented region;

[0204] Using at least one second segmentation model, segmenting a region corresponding to at least one object other than the clothing in the clothing display image to obtain at least one second segmented region;

[0205] Determine the region boundary of the first segmented region according to the at least one second segmented region to obtain a target region;

[0206] Based on the clothing color change requirement, the target area is subjected to color change processing;

[0207] The clothing display image after color change is displayed.

[0208] It should be noted here that: in addition to implementing the above steps, the processor can also implement other method steps provided in the above data processing method embodiment. For details, please refer to the detailed description in the above embodiment, which will not be repeated here.

[0209] Another embodiment of the present invention provides a computer program product (not shown in the accompanying drawings of the specification). The computer program product includes a computer program or instructions, and when the computer program or instructions are executed by a processor, the processor is enabled to implement the steps in the above-mentioned method embodiments.

[0210] Accordingly, an embodiment of the present invention further provides a computer-readable storage medium storing a computer program, and when the computer program is executed by a computer, the method steps or functions provided in the above embodiments can be implemented.

[0211] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Those of ordinary skill in the art may understand and implement it without creative effort.

[0212] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0213] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. An image processing method, characterized in that: include: Determining a target image, a color-changing object in the target image, and a color-changing requirement; The target image is processed respectively by using a plurality of segmentation models with different segmentation objects to obtain a plurality of segmentation regions; wherein the plurality of segmentation models include a first segmentation model and at least one second segmentation model, and the plurality of segmentation regions include: a first segmentation region corresponding to the color-changing object obtained by processing the target image by the first segmentation model, and a second segmentation region corresponding to the non-color-changing object obtained by processing the target image by the second segmentation model; When the first segmented area partially overlaps with the second segmented area and the weight of the first segmentation model is less than the weight of the second segmentation model, performing boundary processing on the area boundary of the first segmented area according to the area boundary of the second segmented area, and determining the first segmented area after the boundary processing as the target area corresponding to the color-changing object in the target image; Based on the color change requirement, performing color change processing on the target area; The target image after color change is displayed.

2. The method according to claim 1, characterized in that: The color change requirement includes a target color; as well as Based on the color change requirement, the target area is subjected to color change processing, including: Get the color transfer model; The target color, the target image, and the area information of the target area are input into the color transfer model, and the color transfer model is executed to output the target image after the target area is changed to the target color.

3. The method according to claim 2, characterized in that The color change requirement also includes the target material texture; as well as Based on the color change requirement, the target area is subjected to color change processing, further comprising: The material texture of the target area in the target image is replaced with the target material texture.

4. The method according to claim 1, characterized in that: Also includes: Recognizing the target image; According to the image recognition result, a plurality of segmentation models suitable for segmenting different objects in the target image are determined.

5. The method according to claim 1, characterized in that Also includes: Display the color change service interface; In response to an input operation of a user through the color-changing service interface, the target image, the color-changing object in the target image, and the color-changing requirement input by the user are acquired.

6. An image processing method, characterized in that: include: In response to the user's operation, a target image containing an exhibit and a target pattern of the exhibit are acquired; The target image is processed respectively by using a plurality of segmentation models with different segmentation objects to obtain a plurality of segmentation regions; wherein the plurality of segmentation models include a first segmentation model and at least one second segmentation model, and the plurality of segmentation regions include: a first segmentation region corresponding to the exhibit obtained by processing the target image by the first segmentation model, and a second segmentation region corresponding to the non-exhibition object obtained by processing the target image by the second segmentation model; When the first segmented area partially overlaps with the second segmented area and the weight of the first segmented model is less than the weight of the second segmented model, performing boundary processing on the area boundary of the first segmented area according to the area boundary of the second segmented area, and determining the first segmented area after the boundary processing as the target area corresponding to the exhibit in the target image; According to the target color, the target area is subjected to a color change operation; The target image after color change is displayed.

7. An image processing method, characterized in that: include: In response to the user's operation, obtaining clothing display images and clothing color change requirements; Using the first segmentation model, segmenting the clothing corresponding region in the clothing display image to obtain a first segmented region; Using at least one second segmentation model, segmenting a region corresponding to at least one object other than the clothing in the clothing display image to obtain at least one second segmented region; According to the at least one second segmented area, a region boundary of the first segmented area is determined to obtain a target area; wherein, when the first segmented area partially overlaps with the second segmented area and the weight of the first segmentation model is less than the weight of the second segmentation model, a region boundary of the first segmented area is processed according to the region boundary of the second segmented area, and the first segmented area after the boundary processing is used as the target area; Based on the clothing color change requirement, the target area is subjected to color change processing; The clothing display image after color change is displayed.

8. The method according to claim 7, characterized in that The clothing display image is a model clothing display image, and Using at least one second segmentation model, segmenting a region corresponding to at least one object other than the clothing in the clothing display image to obtain at least one second segmented region includes at least one of the following: Using the human body segmentation model, segmenting the region corresponding to the human body in the model clothing display image to obtain a second segmented region; Using the skin segmentation model, segmenting the area corresponding to the skin in the model clothing display image to obtain a third segmented area; The hair segmentation model is used to segment the region corresponding to the hair in the model clothing display image to obtain a fourth segmented region.

9. The method according to claim 8, characterized in that Determining a region boundary of the first segmented region according to the at least one second segmented region to obtain a target region includes: If the second segmented area partially overlaps with the area boundary of the first segmented area, performing boundary processing on the area boundary of the first segmented area according to the second segmented area; If the third segmented area partially overlaps with the area boundary of the first segmented area, performing boundary processing on the area boundary of the first segmented area according to the third segmented area; If the fourth segmented area partially overlaps with the area boundary of the first segmented area, performing boundary processing on the area boundary of the first segmented area according to the fourth segmented area; The first segmented area after boundary processing is used as the target area.

10. An image processing system, characterized in that: include: The application layer is used to receive a target image, a color-changing object in the target image, and a color-changing requirement input by a user; A region processing layer, having a plurality of segmentation models for different segmentation objects, for processing the target image respectively by using the plurality of segmentation models for different segmentation objects to obtain a plurality of segmentation regions; wherein the plurality of segmentation models include a first segmentation model and at least one second segmentation model, and the plurality of segmentation regions include: a first segmentation region corresponding to the color-changing object obtained by processing the target image by the first segmentation model, and a second segmentation region corresponding to the non-color-changing object obtained by processing the target image by the second segmentation model; when the first segmentation region partially overlaps with the second segmentation region and the weight of the first segmentation model is less than the weight of the second segmentation model, performing boundary processing on the region boundary of the first segmentation region according to the region boundary of the second segmentation region, and determining the first segmentation region after the boundary processing as the target region corresponding to the color-changing object in the target image; A color change processing layer, having a color migration model, for performing color change processing on the target area according to the color change requirement; The application layer is also used to send the target image after color change to the client device corresponding to the user.

11. An image processing system, characterized in that: include: The client is used to obtain the target image, the color-changing object and the color-changing requirement input by the user, and send them to the server; A server, for processing the target image respectively using multiple segmentation models with different segmentation objects to obtain multiple segmentation areas; wherein the multiple segmentation models include a first segmentation model and at least one second segmentation model, and the multiple segmentation areas include: a first segmentation area corresponding to the color-changing object obtained by processing the target image with the first segmentation model, and a second segmentation area corresponding to the non-color-changing object obtained by processing the target image with the second segmentation model; when the first segmentation area partially overlaps with the second segmentation area and the weight of the first segmentation model is less than the weight of the second segmentation model, performing boundary processing on the area boundary of the first segmentation area according to the area boundary of the second segmentation area, and determining the first segmentation area after the boundary processing as the target area corresponding to the color-changing object in the target image; performing color-changing processing on the target area based on the color-changing requirement; The client is also used to display the target image after the color change fed back by the server.

12. An electronic device, characterized in that: comprising a processor and a memory, wherein: The memory is used to store one or more computer instructions; The processor, coupled to the memory, is used to execute the one or more computer instructions to implement the steps in the method described in any one of claims 1 to 5, or to implement the steps in the method described in claim 6, or to implement the steps in the method described in any one of claims 7 to 9.

Citation Information

Patent Citations

  • Picture matting method and device, terminal equipment and computer readable storage medium

    CN111383232A

  • Image Processing Method and Device, and Electronic Device

    US20210304413A1