Virtual reloading method, system and device, storage medium and program product
By segmenting and layering the user image and target clothing image, and performing fusion processing, the problems of authenticity and details of the dressing image in the prior art are solved, and a higher quality dressing effect is achieved.
Patent Information
- Application Number
- CN202510171202.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-17
- Publication Date
- 2025-05-30
AI Technical Summary
The images after dressing in the prior art cannot ensure the true nature of the characters and cannot retain the details of the clothes.
By acquiring user images and target clothing images, clothing segmentation and clothing layering processing are performed, clothing sub-images are transformed based on the original clothing images, and human body images and target clothing sub-images are fused to generate target user images after changing outfits.
A higher quality dress-up image is achieved, the characters are more realistic and natural, and the details of the clothing are retained and improved, improving the user experience.
Smart Images

Figure CN120070670A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of image processing, and particularly to a virtual clothing changing method, system, device, storage medium, and program product. Background Art
[0002] With the development of artificial intelligence, a large number of generation-related tasks have started to be processed using deep models and achieved good results; clothing changing is one of such tasks. The essence of the clothing changing task is to change the clothing in a human image to the specified clothing in another image. Clothing changing has many applications in fields such as advertising.
[0003] The current mainstream technologies for clothing changing are all implemented using deep neural network technologies. Using deep neural network technologies has greatly improved the effect of clothing changing, but there are still some problems. For example, for the task of changing a long-sleeved human image to a short-sleeved one, it is very challenging to make the human arms that are not visible in the original image after clothing changing more realistic and natural. The current mainstream technologies are prone to generating human arms with defects. In addition, for some clothes with obvious marks or patterns, it is also very difficult to make the generated pictures still retain these details on the clothes. Summary of the Invention
[0004] The technical problem to be solved by the present disclosure is to overcome the defects that the changed clothing image after clothing changing in the prior art cannot ensure the authenticity and naturalness of the human body and cannot retain the details of the clothes, and to provide a virtual clothing changing method, system, device, storage medium, and program product.
[0005] The present disclosure solves the above technical problem through the following technical solutions:
[0006] According to a first aspect of the present disclosure, there is provided a virtual clothing changing method, and the virtual clothing changing method includes:
[0007] Obtain a user image and a target clothing image;
[0008] Perform clothing segmentation processing on the user image to obtain an original clothing image and a human body image;
[0009] Perform layering processing on the target clothing image to obtain a plurality of clothing sub-images;
[0010] Based on the original clothing image, transform the clothing sub-images to obtain target clothing sub-images corresponding to the clothing sub-images;
[0011] Fuse the human body image and the target clothing sub-images to generate a target user image after clothing changing.
[0012] Optionally, the step of performing hierarchical processing on the target clothing image to obtain a plurality of clothing sub-images includes:
[0013] Identifying a plurality of target objects in the target clothing image based on a preset rule;
[0014] Performing hierarchical processing on the target clothing image according to the target objects to obtain a first sub-image and a plurality of second sub-images corresponding to the target objects;
[0015] Wherein, the first sub-image is a clothing image that does not include the target objects.
[0016] Optionally, the step of transforming the clothing sub-image based on the original clothing image to obtain the target clothing sub-image corresponding to the clothing sub-image includes:
[0017] Obtaining a first mask image corresponding to the original clothing in the original clothing image, and a second mask image corresponding to the target clothing in the target clothing image;
[0018] Calculating transformation parameters for transforming the second mask image to the first mask image;
[0019] Transforming the clothing sub-image based on the transformation parameters to obtain the target clothing sub-image corresponding to the clothing sub-image.
[0020] Optionally, the target objects include patterns and / or logos;
[0021] And / or,
[0022] The transformation parameters are calculated using thin plate spline transformation or a deep network.
[0023] Optionally, the step of performing clothing segmentation on the user image to obtain an original clothing image and a human body image includes:
[0024] Processing the user image using a pre-trained deep network model to obtain a third mask image corresponding to the original clothing in the user image;
[0025] Performing Hadamard product calculation on the third mask image and the user image to obtain the original clothing image and the human body image;
[0026] And / or,
[0027] After the step of performing clothing segmentation on the user image to obtain an original clothing image and a human body image, the virtual clothing try-on method further includes:
[0028] The repaired human body image is obtained by using the pre-trained deep network model to repair the human body image.
[0029] Optionally, the step of fusing the human body image and the target clothing sub-image to generate a target user image after dressing change includes:
[0030] The human body image and the target clothing sub-image are input into a deep network after channel splicing, or the human body image and the target clothing sub-image are respectively input into sub-modules corresponding to the deep network to generate the target user image after dressing change.
[0031] According to a second aspect of the present disclosure, a virtual dressing change system is provided. The virtual dressing change system includes an acquisition module, a segmentation processing module, a layering processing module, a transformation module, and a generation module;
[0032] The acquisition module is configured to acquire a user image and a target clothing image;
[0033] The segmentation processing module is configured to perform clothing segmentation processing on the user image to obtain an original clothing image and a human body image;
[0034] The layering processing module is configured to perform layering processing on the target clothing image to obtain a plurality of clothing sub-images;
[0035] The transformation module is configured to transform the clothing sub-images based on the original clothing image to obtain target clothing sub-images corresponding to the clothing sub-images;
[0036] The generation module is configured to fuse the human body image and the target clothing sub-images to generate a target user image after dressing change.
[0037] Optionally, the layering processing module includes an identification unit and a layering processing unit;
[0038] The identification unit is configured to identify a plurality of target objects in the target clothing image based on a preset rule;
[0039] The layering processing unit is configured to perform layering processing on the target clothing image according to the target objects to obtain a first sub-image and a plurality of second sub-images corresponding to the target objects;
[0040] Wherein, the first sub-image is a clothing image that does not include the target objects.
[0041] Optionally, the transformation module includes an acquisition unit, a first calculation unit, and a transformation unit;
[0042] The obtaining unit is configured to obtain a first mask image corresponding to the original clothing in the original clothing image and a second mask image corresponding to the target clothing in the target clothing image;
[0043] The first calculation unit is configured to calculate transformation parameters for transforming the second mask image to the first mask image;
[0044] The transformation unit is configured to transform the clothing sub-image based on the transformation parameters to obtain the target clothing sub-image corresponding to the clothing sub-image.
[0045] Optionally, the target object includes a pattern and / or a logo;
[0046] and / or,
[0047] The transformation parameters are calculated using thin plate spline transformation or a deep network.
[0048] Optionally, the segmentation processing module includes a segmentation unit and a second calculation unit;
[0049] The segmentation unit is configured to process the user image using a pre-trained deep network model to obtain a third mask image corresponding to the original clothing in the user image;
[0050] The second calculation unit is configured to perform Hadamard product calculation based on the third mask image and the user image to obtain the original clothing image and the human body image;
[0051] and / or,
[0052] The virtual dressing system further includes a restoration module;
[0053] The restoration module is configured to restore the human body image using the pre-trained deep network model to obtain the restored human body image.
[0054] Optionally, the generation module is further configured to input the human body image and the target clothing sub-image after channel splicing into a deep network, or input the human body image and the target clothing sub-image into corresponding sub-modules of the deep network respectively to generate the target user image after dressing up.
[0055] According to a third aspect of the present disclosure, there is provided an electronic device, including a memory, a processor, and a computer program stored on the memory and configured to run on the processor, where the processor implements the virtual dressing method according to the first aspect of the present disclosure when executing the computer program.
[0056] According to a fourth aspect of the present disclosure, there is provided a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the virtual dressing method described in the first aspect of the present disclosure is implemented.
[0057] According to a fifth aspect of the present disclosure, there is provided a computer program product including a computer program, and when the computer program is executed by a processor, the virtual dressing method described in the first aspect of the present disclosure is implemented.
[0058] On the basis of conforming to common knowledge in the art, the above preferred conditions can be combined arbitrarily to obtain various preferred examples of the present disclosure.
[0059] The positive and progressive effects of the present disclosure are as follows: By performing hierarchical processing on the clothing to retain the details of the dressed clothing and performing human body restoration to make the characters in the dressed images more realistic and natural, higher-quality dressed images are obtained, thereby improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] Figure 1 It is a flowchart of the virtual dressing method in Embodiment 1;
[0061] Figure 2 It is a flowchart of step S4 in the virtual dressing method in Embodiment 1;
[0062] Figure 3 It is an example flowchart of the virtual dressing method in Embodiment 1;
[0063] Figure 4 It is a schematic diagram of the modules of the virtual dressing system in Embodiment 2;
[0064] Figure 5 It is a schematic diagram of the structure of an electronic device in Embodiment 3. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0065] The present disclosure will be further described below by way of examples, but the present disclosure is not limited to the scope of the described examples for this reason.
[0066] In the embodiments of the present disclosure, prefix words such as "first" and "second" are only used to distinguish different described objects, and have no limiting effect on the position, order, priority, quantity or content of the described objects. The use of ordinal words and other prefix words for distinguishing described objects in the embodiments of the present disclosure does not constitute a limitation on the described objects. The statements of the described objects refer to the descriptions in the claims or the context of the embodiments, and should not constitute unnecessary limitations due to the use of such prefix words. In addition, in the description of this embodiment, unless otherwise specified, the meaning of "a plurality" is two or more.
[0067] In the embodiments of the present disclosure, the collection, storage, use, processing, transmission, provision, and disclosure of the user's personal information and other processing comply with the provisions of relevant laws and regulations and do not violate public order and good customs.
[0068] Embodiment 1
[0069] In a specific embodiment of the present disclosure, a virtual dressing method is provided. As Figure 1 shown, the virtual dressing method includes:
[0070] S1. Obtain a user image and a target clothing image;
[0071] S2. Perform clothing segmentation processing on the user image to obtain an original clothing image and a human body image;
[0072] S3. Perform hierarchical processing on the target clothing image to obtain several clothing sub-images;
[0073] S4. Transform the clothing sub-images based on the original clothing image to obtain target clothing sub-images corresponding to the clothing sub-images;
[0074] S5. Perform fusion processing on the human body image and the target clothing sub-images to generate a target user image after dressing.
[0075] Specifically, when a user needs to perform virtual dressing, a user image can be uploaded. The user image includes the human body part that needs to be dressed. For example, it can be a full-body photo, a half-body photo, etc., and the target clothing image to be dressed is selected or uploaded. The clothing includes but is not limited to various types such as upper garments, lower garments, one-piece garments, shoes, hats, and accessories.
[0076] After obtaining the user image and the target clothing image through step S1, perform clothing segmentation processing on the user image through step S2 to obtain the original clothing image and the human body image corresponding to the user image.
[0077] Perform hierarchical processing on the target clothing image through step S3. Among them, the rules of hierarchical processing can be customized, and the details that are easily lost during the dressing process are hierarchically processed to obtain several clothing sub-images, so as to perform dressing processing on each clothing sub-image respectively, avoid the loss of details of the target clothing after dressing, and ensure the image quality after dressing.
[0078] Among them, the execution order of step S2 and step S3 can be interchanged. For example, step S3 can be executed first, and then step S2. Of course, step S2 and step S3 can also be executed simultaneously. This specific implementation manner does not limit this.
[0079] After performing segmentation processing on the user image and hierarchical processing on the target clothing image, in step S4, according to the shape of the original clothing in the original clothing image, the hierarchical clothing sub-images are corrected and transformed to obtain the corresponding target clothing sub-images after transformation for each clothing sub-image.
[0080] In step S5, the corrected and transformed target clothing sub-images and the human body image are fused to obtain the final target user image.
[0081] In this specific embodiment, by performing hierarchical processing on the clothing to retain the details of the clothing after dressing up, a higher-quality dressing-up image can be obtained, improving the user experience.
[0082] In one specific embodiment, step S2 includes:
[0083] S21. Use a pre-trained deep network model to process the user image to obtain a third mask image corresponding to the original clothing in the user image;
[0084] S22. Perform Hadamard product calculation based on the third mask image and the user image to obtain the original clothing image and the human body image.
[0085] Specifically, the user image A can be input into a pre-trained deep network model to process the user image, obtaining a third mask image M corresponding to the original clothing in the user image. And according to the third mask image M, the user image is segmented to obtain the original clothing segmentation result. At the same time, perform Hadamard product calculation based on the third mask image M and the user image, that is, calculate , where represents the element-wise product between two matrices, thus obtaining the original clothing image A1. Similarly, by calculating , the human body image A2 after removing the original clothing area can be obtained.
[0086] In one specific embodiment, after step S2, the virtual dressing-up method further includes: using a pre-trained deep network model to repair the human body image to obtain the repaired human body image.
[0087] Specifically, since the human body image A2 refers to the image after removing the original clothing area, there are a large number of black areas (i.e., the original clothing area) in the human body image A2. When the target clothing area after dressing up is smaller than the original clothing area, the black areas in the human body image A2 will greatly affect the final presented dressing-up image effect. Therefore, in order to fill the black areas in the human body image A2 and prepare for subsequent dressing up, a deep network can be used to repair the human body image A2. By inputting the human body image A2 into a pre-trained deep network model, such as an adversarial neural network, a diffusion model, etc., the repaired human body image C can be obtained.
[0088] In this specific implementation, by repairing the human body image, it is possible to avoid the situation where the human body has defects due to the difference between the human body area covered by the original clothing and the target clothing, thereby obtaining a high-quality clothing-changing image and improving the user experience.
[0089] In one specific implementation, step S3 includes:
[0090] S31. Identify a number of target objects in the target clothing image based on a preset rule;
[0091] S32. Perform hierarchical processing on the target clothing image according to the target objects to obtain a first sub-image and several second sub-images corresponding to the target objects;
[0092] Among them, the first sub-image is a clothing image that does not contain the target object.
[0093] Specifically, when performing hierarchical processing on the target clothing image, the target objects in the target clothing image can be identified according to a custom preset rule, and the target objects and the target clothing can be hierarchically processed by using a deep network, manual processing or other hierarchical processing methods to obtain corresponding different hierarchical images. Among them, the different hierarchical images include a first sub-image that does not contain the target object and a second sub-image that separately contains the target object. For example, if the preset rule is to separate relatively large logos and patterns from the clothing, then by identifying the relatively large logos and patterns in the target clothing image B, the logos and patterns can be hierarchically processed with the target clothing to obtain a clothing image B1 without logos and patterns and separate logo image B2 and pattern image B3.
[0094] In one specific implementation, as Figure 2 shown, step S4 includes:
[0095] S41. Obtain a first mask image corresponding to the original clothing in the original clothing image and a second mask image corresponding to the target clothing in the target clothing image;
[0096] S42. Calculate the transformation parameters for transforming the second mask image to the first mask image;
[0097] S43. Transform the clothing sub-image based on the transformation parameters to obtain a target clothing sub-image corresponding to the clothing sub-image.
[0098] Specifically, the first mask image corresponding to the original clothing in the original clothing image and the second mask image M corresponding to the target clothing in the target clothing image can be obtained through a deep network or a traditional algorithm B , and the thin plate spline transformation (TPS) or a deep network is used to calculate the second mask image M BThe transformation parameters for transforming to the first mask image, and each clothing sub-image is transformed based on the transformation parameters to obtain the corresponding target clothing sub-image. For example, through the second mask image M B and the first mask image, the transformation parameters of the thin plate spline transformation are calculated to obtain the corresponding TPS transformation. Then, using the TPS transformation, the first sub-image B1, the second sub-images B2, and B3 are respectively transformed to obtain the corrected target clothing sub-images D1, D2, and D3.
[0099] It should be noted that since the original clothing image is obtained based on the third mask image M corresponding to the original clothing in the user image, the first mask image corresponding to the original clothing in the original clothing image is the same as the third mask image M. In steps S41 - S43, the third mask image M obtained in step S2 can be directly used to calculate the transformation parameters to improve the calculation efficiency.
[0100] In a specific embodiment, step S5 includes: concatenating the channels of the human body image and the target clothing sub-image and then inputting them into a deep network, or inputting the human body image and the target clothing sub-image into corresponding sub-modules of the deep network respectively to generate the target user image after dressing up.
[0101] Specifically, the corrected target clothing sub-images D1, D2, D3 and the human body image A2 (or the repaired human body image C) are fused. For example, fusion processing is performed using a deep network. The corrected target clothing sub-images D1, D2, D3 and the human body image A2 are input into the deep network to obtain the target user image after dressing up. Among them, the target clothing sub-images D1, D2, D3 and the human body image A2 (or the repaired human body image C) can be input into the deep network after channel concatenation, or the target clothing sub-images D1, D2, D3 and the human body image A2 (or the repaired human body image C) can be respectively input into sub-modules in the deep network for fusion processing through the deep network. The specific method is determined by the constructed network. The deep network can be an adversarial neural network or a diffusion model.
[0102] In a specific example, as Figure 3 shown, the user image is segmented using a segmentation network to obtain the human body image and the original clothing image, and the target clothing image is layered to obtain the layered clothing sub-images. The human body image is input into a repair network for human body repair to obtain the repaired human body image. The layered clothing sub-images are corrected and transformed according to the original clothing image to obtain the corrected target clothing sub-images. The repaired human body image and the target clothing sub-images are input into a fusion network for fusion processing to generate the target user image after dressing up.
[0103] In this embodiment, the clothing is processed in layers to retain the details of the clothing after dressing, and the human body is repaired to make the characters in the dressed image more realistic and natural, so as to obtain a dressed image of higher quality and improve the user experience.
[0104] Embodiment 2
[0105] In a specific embodiment of the present disclosure, a virtual dressing system is provided, as Figure 4 shown. The virtual dressing system includes an acquisition module 100, a segmentation processing module 200, a layering processing module 300, a transformation module 400, and a generation module 500;
[0106] The acquisition module 100 is used to acquire a user image and a target clothing image;
[0107] The segmentation processing module 200 is used to perform clothing segmentation processing on the user image to obtain an original clothing image and a human body image;
[0108] The layering processing module 300 is used to perform layering processing on the target clothing image to obtain several clothing sub-images;
[0109] The transformation module 400 is used to transform the clothing sub-images based on the original clothing image to obtain target clothing sub-images corresponding to the clothing sub-images;
[0110] The generation module 500 is used to perform fusion processing on the human body image and the target clothing sub-images to generate a target user image after dressing.
[0111] In a specific implementation manner, the layering processing module 300 includes an identification unit and a layering processing unit;
[0112] The identification unit is used to identify several target objects in the target clothing image based on a preset rule;
[0113] The layering processing unit is used to perform layering processing on the target clothing image according to the target objects to obtain a first sub-image and several second sub-images corresponding to the target objects;
[0114] Among them, the first sub-image is a clothing image that does not include the target object.
[0115] In a specific implementation manner, the transformation module 400 includes an acquisition unit, a first calculation unit, and a transformation unit;
[0116] The acquisition unit is used to acquire a first mask image corresponding to the original clothing in the original clothing image, and a second mask image corresponding to the target clothing in the target clothing image;
[0117] The first calculation unit is used to calculate the transformation parameters for transforming the second mask image to the first mask image;
[0118] The transformation unit is used to transform the clothing sub-image based on transformation parameters to obtain the target clothing sub-image corresponding to the clothing sub-image.
[0119] In a specific embodiment, the target object includes a pattern and / or a logo;
[0120] and / or,
[0121] The transformation parameters are obtained by using thin plate spline transformation or a deep network.
[0122] In a specific embodiment, the segmentation processing module 200 includes a segmentation unit and a second calculation unit;
[0123] The segmentation unit is used to process the user image by using a pre-trained deep network model to obtain a third mask image corresponding to the original clothing in the user image;
[0124] The second calculation unit is used to perform Hadamard product calculation according to the third mask image and the user image to obtain the original clothing image and the human body image;
[0125] and / or,
[0126] The virtual clothing change system further includes a repair module;
[0127] The repair module is used to repair the human body image by using a pre-trained deep network model to obtain a repaired human body image.
[0128] In a specific embodiment, the generation module 500 is further used to input the human body image and the target clothing sub-image into a deep network after channel splicing, or input the human body image and the target clothing sub-image into corresponding sub-modules of the deep network respectively to generate a target user image after clothing change.
[0129] For the system embodiment, since it basically corresponds to the method embodiment, the relevant parts can be referred to the partial description of the method embodiment. The system embodiments described above are only illustrative. The units described as separate components may or may not be physically separated, and the components as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the present disclosure solution.
[0130] In this embodiment, by performing hierarchical processing on the clothing to retain the details of the clothing after clothing change and performing human body repair to make the characters in the clothing change image more real and natural, a higher-quality clothing change image is obtained, improving the user experience.
[0131] Embodiment 3
[0132] Figure 5 The following is a schematic structural diagram of an electronic device shown in an exemplary embodiment of the present disclosure. The electronic device includes a memory, a processor, and a computer program stored in the memory and configured to run on the processor. When the processor executes the computer program, the virtual dressing method described in any of the above embodiments is implemented. Figure 5 The electronic device 30 shown is merely an example and should not impose any limitations on the functions and usage scope of the embodiments of the present disclosure.
[0133] As Figure 5 shown, the electronic device 30 may be presented in the form of a general-purpose computing device. For example, it may be a server device. The components of the electronic device 30 may include, but are not limited to: at least one of the above processors 31, at least one of the above memories 32, and a bus 33 connecting different system components (including the memory 32 and the processor 31).
[0134] The bus 33 includes a data bus, an address bus, and a control bus.
[0135] The memory 32 may include volatile memory, such as random access memory (RAM) 321 and / or cache memory 322, and may further include read-only memory (ROM) 323.
[0136] The memory 32 may further include a program tool 325 (or utility) having a set (at least one) of program modules 324. Such program modules 324 include, but are not limited to: an operating system, one or more application programs, other program modules, and program data. The implementation of a network environment may be included in each or some combination of these examples.
[0137] The processor 31 executes various functional applications and data processing by running the computer program stored in the memory 32, such as the virtual dressing method provided in any of the above embodiments.
[0138] The electronic device 30 may also communicate with one or more external devices 34 (such as a keyboard, a pointing device, etc.). Such communication may be carried out through an input / output (I / O) interface 35. In addition, the electronic device 30 may also communicate with one or more networks (such as a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) through a network adapter 36. As shown in the figure, the network adapter 36 communicates with other modules of the electronic device 30 through the bus 33. It should be understood that although not shown in the figure, other hardware and / or software modules may be used in combination with the electronic device 30, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID (disk array) systems, tape drives, and data backup storage systems, etc.
[0139] It should be noted that although several units / modules or sub-units / modules of the electronic device are mentioned in the above detailed description, this division is merely exemplary and not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more units / modules described above can be embodied in one unit / modules. Conversely, the features and functions of one unit / modules described above can be further divided and embodied by multiple units / modules.
[0140] Embodiment 4
[0141] The embodiments of the present disclosure also provide a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, the virtual dressing method provided in any of the above embodiments is implemented.
[0142] Among them, the more specific computer-readable storage medium that can be adopted may include, but is not limited to: portable disks, hard disks, random access memories, read-only memories, erasable programmable read-only memories, optical storage devices, magnetic storage devices, or any suitable combination of the above.
[0143] Embodiment 5
[0144] The embodiments of the present disclosure also provide a computer program product, including a computer program, and when the computer program is executed by a processor, the virtual dressing method described in any of the above is implemented.
[0145] Among them, the program code for executing the computer program product of the present disclosure can be written in any combination of one or more programming languages, and the program code can be executed entirely on the user device, partially on the user device, executed as an independent software package, partially on the user device and partially on a remote device, or entirely on a remote device.
[0146] Although the specific embodiments of the present disclosure are described above, those skilled in the art should understand that this is only an example, and the protection scope of the present disclosure is defined by the appended claims. Without departing from the principles and essence of the present disclosure, those skilled in the art can make various changes or modifications to these embodiments, but these changes and modifications all fall within the protection scope of the present disclosure.
Claims
1. A virtual dressing method, characterized in that: The virtual dressing method comprises: Obtain user image and target clothing image; Performing clothing segmentation processing on the user image to obtain an original clothing image and a human body image; Performing layered processing on the target clothing image to obtain a plurality of clothing sub-images; Transforming the clothing sub-image based on the original clothing image to obtain a target clothing sub-image corresponding to the clothing sub-image; The human body image and the target clothing sub-image are fused to generate a target user image after changing clothes.
2. The virtual dressing method according to claim 1, characterized in that: The step of performing layered processing on the target clothing image to obtain a plurality of clothing sub-images comprises: Identifying a plurality of target objects in the target clothing image based on preset rules; Performing layered processing on the target clothing image according to the target object to obtain a first sub-image and a plurality of second sub-images corresponding to the target object; The first sub-image is a clothing image that does not contain the target object.
3. The virtual dressing method according to claim 2, characterized in that: The step of transforming the clothing sub-image based on the original clothing image to obtain a target clothing sub-image corresponding to the clothing sub-image comprises: Acquire a first mask image corresponding to the original clothing in the original clothing image, and a second mask image corresponding to the target clothing in the target clothing image; calculating transformation parameters for transforming the second mask image into the first mask image; The clothing sub-image is transformed based on the transformation parameters to obtain the target clothing sub-image corresponding to the clothing sub-image.
4. The virtual dressing method according to claim 3, characterized in that: The target object includes a pattern and / or a logo; and / or, The transformation parameters are obtained by thin plate spline transformation or deep network calculation.
5. The virtual dressing method according to claim 1, characterized in that: The step of performing clothing segmentation processing on the user image to obtain an original clothing image and a human body image comprises: Processing the user image using a pre-trained deep network model to obtain a third mask image corresponding to the original clothing in the user image; Performing Hadamard product calculation based on the third mask image and the user image to obtain the original clothing image and the human body image; and / or, After the step of performing clothing segmentation processing on the user image to obtain the original clothing image and the human body image, the virtual dressing method further includes: The pre-trained deep network model is used to repair the human body image to obtain the repaired human body image.
6. The virtual dressing method according to any one of claims 1 to 5, characterized in that: The step of fusing the human body image and the target clothing sub-image to generate a target user image after changing clothes comprises: The human body image and the target clothing sub-image are channel-joined and then input into a deep network, or the human body image and the target clothing sub-image are respectively input into corresponding sub-modules of the deep network to generate the target user image after changing clothes.
7. A virtual dressing system, characterized in that: The virtual dressing system includes an acquisition module, a segmentation processing module, a layered processing module, a transformation module and a generation module; The acquisition module is used to acquire a user image and a target clothing image; The segmentation processing module is used to perform clothing segmentation processing on the user image to obtain an original clothing image and a human body image; The layered processing module is used to perform layered processing on the target clothing image to obtain a plurality of clothing sub-images; The transformation module is used to transform the clothing sub-image based on the original clothing image to obtain a target clothing sub-image corresponding to the clothing sub-image; The generating module is used to fuse the human body image and the target clothing sub-image to generate a target user image after changing clothes.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and used to run on the processor, characterized in that: When the processor executes the computer program, the virtual dressing method according to any one of claims 1 to 6 is implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the virtual dressing method according to any one of claims 1 to 6 is implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the virtual dressing method according to any one of claims 1 to 6 is implemented.