Two-dimensional texture printing migration method and device, storage medium and program product

By preprocessing and feature extraction of clothes pictures, the target generation network is used to migrate the printed patterns in the reference texture pictures to clothes, solving the shortcomings of AI in e-commerce clothing pattern design and achieving efficient texture printing migration.

CN120471972APending Publication Date: 2025-08-12XIAMEN MEITUZHIJIA TECH
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
CN202510700036.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-28
Publication Date
2025-08-12

AI Technical Summary

Technical Problem

In the prior art, AI lacks effective tools and methods in e-commerce clothing patterns and pattern design, making it difficult to achieve meticulous design work.

Method used

By obtaining the clothes to be migrated and the reference texture pictures, pre-processing the picture, using the target feature extraction network and generating network, extracting reference texture features and depth features, performing texture printing migration, and generating target texture clothing pictures.

Benefits of technology

It realizes the migration of the printed patterns in the reference texture picture to the clothes to be migrated under a simple process, providing convenience for clothing design, decoupling shape information and texture information, simulating changes in light and darkness, and improving design efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120471972A_ABST
    Figure CN120471972A_ABST
Patent Text Reader

Abstract

The invention relates to a two-dimensional texture printing migration method and device, computer equipment, a computer readable storage medium and a computer program product. The method comprises the following steps: acquiring a to-be-migrated clothes picture and a reference texture picture; performing picture preprocessing on the to-be-migrated clothes picture to obtain a depth image, a foreground segmentation image and a target grayscale image; performing feature extraction on the reference texture picture and the depth image through a target feature extraction network to obtain a reference texture feature and a depth feature; performing splicing processing on the foreground segmentation image and the target grayscale image through the target generation network to obtain a spliced image; and performing texture printing migration on the spliced image through the target generation network, the reference texture features and the depth features to obtain a target texture clothes picture. By adopting the method, the printed pattern can be transferred to the to-be-transferred clothes picture in a convenient manner, and convenience is provided for appearance design of clothes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing technology, and in particular to a two-dimensional texture printing migration method, device, computer equipment, computer-readable storage medium and computer program product. Background Art

[0002] With the development of artificial intelligence technology, functions such as AI model fitting and AI model face-changing have emerged in the field of e-commerce clothing applications. However, in actual application, AI cannot perform such detailed design work well for the design of some clothing patterns and designs. At the same time, there are still no available tools and methods with good effects for the design of clothing patterns and designs in the existing technology. Summary of the Invention

[0003] Based on this, the present application provides a two-dimensional texture print migration method, device, computer equipment, computer-readable storage medium and computer program product, which can conveniently migrate the print pattern to the picture of the clothing to be migrated, providing convenience for the appearance design of the clothing.

[0004] In one aspect, the present application provides a two-dimensional texture printing migration method, comprising:

[0005] Get the clothing image to be migrated and the reference texture image;

[0006] Performing image preprocessing on the clothing image to be migrated to obtain a depth image, a foreground segmentation image, and a target grayscale image;

[0007] Performing feature extraction on the reference texture image and the depth image through a target feature extraction network to obtain reference texture features and depth features;

[0008] Splicing the foreground segmentation image and the target grayscale image through a target generation network to obtain a spliced image;

[0009] The target texture clothing image is obtained by performing texture printing migration on the spliced image through the target generation network, the reference texture features and the depth features.

[0010] In one embodiment, the image preprocessing of the clothing image to be migrated to obtain a depth image, a foreground segmentation image, and a target grayscale image includes:

[0011] Performing depth estimation on the image of clothing to be migrated to obtain the depth image;

[0012] Performing foreground segmentation on the clothing picture to be migrated to obtain the foreground segmentation image and the foreground color image;

[0013] Grayscale processing is performed on the foreground color image to obtain the target grayscale image.

[0014] In one embodiment, performing grayscale processing on the foreground color image to obtain the target grayscale image includes:

[0015] Performing grayscale conversion on the foreground color image to obtain an original grayscale image;

[0016] Performing white balance processing on the original grayscale image to obtain a white-balanced grayscale image;

[0017] Normalizing the white balance grayscale image to obtain the target grayscale image.

[0018] In one embodiment, the target feature extraction network includes: a target texture reference network and a target depth map control network; the target feature extraction network extracts features from the reference texture image and the depth image to obtain reference texture features and depth features, including:

[0019] Extracting features from the reference texture image using the target texture reference network to obtain the reference texture features;

[0020] The target depth map is used to control the network to extract features from the depth image to obtain the depth features.

[0021] In one embodiment, the step of performing texture printing migration on the spliced image using the target generation network, the reference texture features, and the depth features to obtain a target texture clothing image includes:

[0022] Constructing a hierarchical attention module feature based on the reference texture feature and the depth feature;

[0023] Inputting the spliced image into the network structure of the target generation network, and constructing a target inference model based on the hierarchical attention module features and the network structure;

[0024] Texture printing migration inference is performed on the target inference model to obtain the target texture clothing image.

[0025] In one embodiment, the method further comprises:

[0026] Perform real-time page rendering according to the target texture clothing picture to obtain a target effect display page;

[0027] The target effect display page is displayed in real time.

[0028] In one embodiment, the method further comprises:

[0029] Get the clothing images to be trained and the training texture images;

[0030] Performing image preprocessing on the clothing image to be trained to obtain a training depth image, a training foreground segmentation image, and a training grayscale image;

[0031] Perform feature extraction on the training texture image and the training depth image through an original feature extraction network to obtain training texture features and training depth features;

[0032] Splicing the training foreground segmentation image and the training grayscale image through the original generative network to obtain a training spliced image;

[0033] Performing texture printing migration on the training spliced image through the original generation network, the training texture features, and the training depth features to obtain a training texture clothing image;

[0034] Performing loss optimization on the original feature extraction network based on the training texture features, the training depth features, and the validation set feature data to obtain the target feature extraction network;

[0035] The original generation network is subjected to loss optimization based on the training texture clothing images and the validation set clothing images to obtain the target generation network.

[0036] On the one hand, the present application also provides a two-dimensional texture printing migration device, comprising:

[0037] The acquisition module is used to obtain the clothing images to be migrated and the reference texture images;

[0038] A preprocessing module, configured to perform image preprocessing on the clothing image to be migrated to obtain a depth image, a foreground segmentation image, and a target grayscale image;

[0039] A feature extraction module is used to extract features from the reference texture image and the depth image through a target feature extraction network to obtain reference texture features and depth features;

[0040] a stitching module, configured to stitch the foreground segmentation image and the target grayscale image together through a target generation network to obtain a stitched image;

[0041] The texture printing migration module is used to perform texture printing migration on the spliced image through the target generation network, the reference texture features and the depth features to obtain a target texture clothing image.

[0042] In one embodiment,

[0043] In one aspect, the present application further provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0044] Get the clothing image to be migrated and the reference texture image;

[0045] Performing image preprocessing on the clothing image to be migrated to obtain a depth image, a foreground segmentation image, and a target grayscale image;

[0046] Performing feature extraction on the reference texture image and the depth image through a target feature extraction network to obtain reference texture features and depth features;

[0047] Splicing the foreground segmentation image and the target grayscale image through a target generation network to obtain a spliced image;

[0048] The target texture clothing image is obtained by performing texture printing migration on the spliced image through the target generation network, the reference texture features and the depth features.

[0049] In one aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:

[0050] Get the clothing image to be migrated and the reference texture image;

[0051] Performing image preprocessing on the clothing image to be migrated to obtain a depth image, a foreground segmentation image, and a target grayscale image;

[0052] Performing feature extraction on the reference texture image and the depth image through a target feature extraction network to obtain reference texture features and depth features;

[0053] Splicing the foreground segmentation image and the target grayscale image through a target generation network to obtain a spliced image;

[0054] The target texture clothing image is obtained by performing texture printing migration on the spliced image through the target generation network, the reference texture features and the depth features.

[0055] In one aspect, the present application further provides a computer program product, comprising a computer program, which, when executed by a processor, implements the following steps:

[0056] Get the clothing image to be migrated and the reference texture image;

[0057] Performing image preprocessing on the clothing image to be migrated to obtain a depth image, a foreground segmentation image, and a target grayscale image;

[0058] Performing feature extraction on the reference texture image and the depth image through a target feature extraction network to obtain reference texture features and depth features;

[0059] Splicing the foreground segmentation image and the target grayscale image through a target generation network to obtain a spliced image;

[0060] The target texture clothing image is obtained by performing texture printing migration on the spliced image through the target generation network, the reference texture features and the depth features.

[0061] The above-mentioned two-dimensional texture printing migration method, device, computer device, computer-readable storage medium and computer program product obtain a clothing image to be migrated and a reference texture image; perform image preprocessing on the clothing image to be migrated to obtain a depth image, a foreground segmentation image and a target grayscale image; perform feature extraction on the reference texture image and the depth image through a target feature extraction network to obtain reference texture features and depth features; perform splicing processing on the foreground segmentation image and the target grayscale image through a target generation network to obtain a spliced image; and perform texture printing migration on the spliced image using the target generation network, the reference texture features and the depth features to obtain a target texture clothing image. Therefore, by extracting features from the reference texture image and the depth image through the target feature extraction network, it is possible to decouple shape information and texture information to a certain extent, and extract reference texture features that are easy to fuse and depth features for simulating light and dark changes. Texture printing migration is performed on the spliced image using the target generation network, the reference texture features and the depth features, and a simple process is used to transfer the print pattern in the reference texture image to the clothing image to be migrated to obtain the target texture clothing image, providing convenience for clothing design appearance. BRIEF DESCRIPTION OF THE DRAWINGS

[0062] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following briefly introduces the drawings required for use in the embodiments of the present application or related technical descriptions. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying any creative work.

[0063] Figure 1 A diagram showing an application environment of a two-dimensional texture printing migration method in one embodiment;

[0064] Figure 2 Schematic diagram of the application process of the two-dimensional texture printing migration method in one embodiment;

[0065] Figure 3Schematic diagram of a model training process of a two-dimensional texture printing migration method in one embodiment;

[0066] Figure 4 A simplified flow chart of a two-dimensional texture printing migration method in another embodiment;

[0067] Figure 5 A schematic diagram of a visualization process of a two-dimensional texture printing migration method in another embodiment;

[0068] Figure 6 A schematic diagram of a model principle of a two-dimensional texture printing migration method in another embodiment;

[0069] Figure 7 2. It is a structural block diagram of a two-dimensional texture printing migration device in one embodiment;

[0070] Figure 8 FIG. 1 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0071] In order to make the purpose, technical solutions and beneficial effects of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.

[0072] The two-dimensional texture printing migration method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. The server 104 obtains the clothes picture to be migrated and the reference texture picture; performs image preprocessing on the clothes picture to be migrated to obtain a depth image, a foreground segmentation image and a target grayscale image; extracts features from the reference texture picture and the depth image through the target feature extraction network to obtain reference texture features and depth features; splices the foreground segmentation image and the target grayscale image through the target generation network to obtain a spliced image; performs texture printing migration on the spliced image through the target generation network, reference texture features and depth features to obtain a target texture clothes picture.

[0073] Terminal 102 may include, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices may include smart speakers, smart TVs, smart air conditioners, smart car devices, and projectors. Portable wearable devices may include smart watches, smart bracelets, and head-mounted devices. Head-mounted devices may include virtual reality (VR) devices, augmented reality (AR) devices, smart glasses, and the like. Server 104 may be a standalone physical server, a server cluster or distributed system consisting of multiple physical servers, or a cloud server providing cloud computing services.

[0074] In an exemplary embodiment, Figure 2 As shown, a two-dimensional texture printing migration method is provided, which is applied to Figure 1 The server 104 in the example is used as an example to illustrate the process, including the following steps 202 to 206.

[0075] Step 202: Obtain the clothing image to be migrated and the reference texture image.

[0076] The clothing images to be migrated may be clothing images of any type, style, and color, and the reference texture images may be any object or image with a texture pattern, without limitation thereto.

[0077] In some embodiments, the clothes pictures to be migrated can be obtained by obtaining clothes pictures selected by the user from a preset clothes collection, or obtaining clothes pictures input by the user as clothes pictures to be migrated, or obtaining clothes pictures to be migrated from a preset clothes collection by random screening, but is not limited thereto.

[0078] In some embodiments, a picture selected by a user in a preset texture atlas may be obtained as a reference texture picture, or a texture picture input by a user may be obtained as a reference texture picture, without limitation thereto.

[0079] Step 204 : performing image preprocessing on the clothing image to be transferred to obtain a depth image, a foreground segmentation image, and a target grayscale image.

[0080] Among them, it should be noted that image preprocessing is to process the clothing images to be migrated through a series of image processing methods, which can efficiently obtain different types of image data in the clothing images to be migrated for subsequent texture printing migration steps, thereby indirectly improving the efficiency of texture printing migration.

[0081] In some embodiments, the clothes picture to be migrated is preprocessed to obtain a depth image, a foreground segmentation image and a target grayscale image, including: performing depth estimation on the clothes picture to be migrated to obtain a depth image; performing foreground segmentation on the clothes picture to be migrated to obtain a foreground segmentation image and a foreground color image; and performing grayscale processing on the foreground color image to obtain a target grayscale image.

[0082] In some embodiments, depth estimation is performed on the clothing picture to be migrated to obtain a depth image of the foreground of the clothing picture to be migrated. Normal estimation can also be performed on the clothing picture to be migrated to obtain a normal image of the foreground of the clothing picture to be migrated, and subsequent feature extraction steps and texture print migration steps are performed based on the normal image, but are not limited to this.

[0083] The depth estimation may be depth estimation, and the normal estimation may be normal estimation.

[0084] In some embodiments, the picture of clothes to be migrated is pre-processed for foreground extraction to obtain a foreground segmentation image and a foreground color image, wherein the foreground segmentation image refers to a foreground mask image, that is, an image in which the foreground part of the picture of clothes to be migrated is masked, and the foreground color image refers to a color image that only includes the foreground part of the picture of clothes to be migrated.

[0085] In some embodiments, grayscale processing is performed on the foreground color image to obtain a target grayscale image, including: grayscale conversion of the foreground color image to obtain an original grayscale image; white balance processing is performed on the original grayscale image to obtain a white balanced grayscale image; and normalization processing is performed on the white balanced grayscale image to obtain a target grayscale image.

[0086] Among them, grayscale processing refers to a series of grayscale processing strategies based on grayscale conversion.

[0087] In some embodiments, the foreground color image is converted to grayscale to obtain an original grayscale image. At the same time, the original grayscale image is white balanced and normalized to obtain a normalized image that can only reflect the brightness and darkness of light. This normalized image is used as the target grayscale image, which can effectively ensure that the subsequent texture print migration step can perceive the brightness and darkness of each area in the image of the clothes to be migrated.

[0088] Step 206 : extract features from the reference texture image and the depth image through a target feature extraction network to obtain reference texture features and depth features.

[0089] Among them, the target feature extraction network can be a feature extraction network obtained after training based on the original feature extraction network. The reference texture features and depth features are hierarchical, that is, each level in the network structure of the target feature extraction network corresponds to a reference texture feature or depth feature.

[0090] In some embodiments, the target feature extraction network includes: a target texture reference network and a target depth map control network; feature extraction is performed on the reference texture image and the depth image through the target feature extraction network to obtain reference texture features and depth features, including: feature extraction is performed on the reference texture image through the target texture reference network to obtain reference texture features; feature extraction is performed on the depth image through the target depth map control network to obtain depth features.

[0091] Among them, the target texture reference network can be a trained RefenceNet, which is used to extract features of the reference texture image and input the extracted reference texture features into the target generation network as a texture reference. The target depth map control network can be Controlnet, which is used to control the surface depth or normal of the target texture clothing image generated by the target generation network, so that the generation effect of the target generation network basically maintains the shape and three-dimensional structure of the clothing image to be migrated.

[0092] In some embodiments, feature extraction is performed on a reference texture image through a target texture reference network to obtain reference texture features, which are used to input into a target generation network as a texture reference, and feature extraction is performed on a depth image through a target depth map control network to obtain depth features, which can be used to control the surface depth of a target texture clothing image generated by the target generation network.

[0093] Step 208: stitching the foreground segmentation image and the target grayscale image through the target generation network to obtain a stitched image.

[0094] Among them, the target generation network is the trained generateNet, which is an inpainting image generation model used to generate target texture clothing images. It should be further explained that the size of the target generation network is consistent with the target texture reference network in the target feature extraction network, so that the calculation dimension can be consistent with the inpaint model parameters, which can be more conducive to information fusion.

[0095] In some embodiments, the target generation network uses the foreground segmentation image to stitch the target grayscale image in the depth dimension as the input of the target generation network, thereby obtaining a basic clothing image in which the background does not change significantly and the foreground can reflect the brightness and darkness of the light, and uses the basic clothing image as the stitched image. Migrating texture features on the stitched image can ensure the accuracy of the target texture clothing image obtained after the migration.

[0096] Step 210 , performing texture printing migration on the spliced image through the target generation network, reference texture features and depth features to obtain a target texture clothing image.

[0097] Among them, texture print migration is a data fusion process, which integrates the reference texture features and depth features into the spliced image to obtain the target texture clothing image.

[0098] In some embodiments, texture printing migration is performed on the spliced image through a target generation network, reference texture features, and depth features to obtain a target texture clothing picture, including: constructing hierarchical attention module features based on reference texture features and depth features; inputting the spliced image into the network structure of the target generation network, and constructing a target inference model based on the hierarchical attention module features and the network structure; performing texture printing migration inference on the target inference model to obtain a target texture clothing picture.

[0099] Among them, the hierarchical attention module features refer to the attention module features corresponding to each layer of the network structure.

[0100] In some embodiments, hierarchical attention module features are constructed based on the depth features of each layer obtained by the target depth map control network and the reference texture features of each layer obtained by the target texture reference network. The spliced image is input into the network structure of the target generation network, and the corresponding hierarchical attention module features of each layer in the network structure are combined and constructed to obtain a target inference model. Finally, texture printing migration inference is performed on the target inference model to obtain a target texture clothing image.

[0101] In some embodiments, the method further includes: performing real-time page rendering according to the target texture clothing picture to obtain a target effect display page; and displaying the target effect display page in real time.

[0102] The target effect display page may be in the form of a small pop-up window or an independent display page, but is not limited thereto.

[0103] In this embodiment, by performing real-time page rendering based on the target texture clothing picture, obtaining the target effect display page, and displaying the target effect display page in real time, the user experience can be effectively improved. After the user provides the texture migration requirement, the target effect display page can provide timely feedback and display the real-time texture migration status of the target texture clothing picture after texture migration.

[0104] In the above-mentioned two-dimensional texture printing migration method, a garment image to be migrated and a reference texture image are obtained; the garment image to be migrated is preprocessed to obtain a depth image, a foreground segmentation image, and a target grayscale image; feature extraction is performed on the reference texture image and the depth image through a target feature extraction network to obtain reference texture features and depth features; the foreground segmentation image and the target grayscale image are spliced together through a target generation network to obtain a spliced image; and texture printing migration is performed on the spliced image using the target generation network, the reference texture features, and the depth features to obtain a target texture garment image. Therefore, by extracting features from the reference texture image and the depth image through the target feature extraction network, shape information and texture information can be decoupled to a certain extent, and reference texture features that are easy to fuse and depth features used to simulate light and dark changes are extracted. Texture printing migration is performed on the spliced image using the target generation network, the reference texture features, and the depth features, and the print pattern in the reference texture image is transferred to the garment image to be migrated in a simple process to obtain the target texture garment image, providing convenience for garment design appearance.

[0105] In an exemplary embodiment, Figure 3 As shown, the two-dimensional texture printing migration method further includes a model training step, which includes: step 302 to step 314.

[0106] Step 302: Obtain clothing images to be trained and training texture images.

[0107] Step 304 : Preprocess the clothing image to be trained to obtain a training depth image, a training foreground segmentation image, and a training grayscale image.

[0108] Step 306 : extract features from the training texture image and the training depth image using the original feature extraction network to obtain training texture features and training depth features.

[0109] Step 308: Splicing the training foreground segmentation image and the training grayscale image through the original generative network to obtain a training spliced image.

[0110] Step 310 , texture printing migration is performed on the training spliced image through the original generation network, the training texture features, and the training depth features to obtain a training texture clothing image.

[0111] Among them, steps 302 to 310 are the inference process of performing texture print migration in each round of training of the relevant model training steps to obtain the training texture clothing image. This process is consistent with the inference process of the actual application of the above-mentioned two-dimensional texture print migration method. The difference is that the input training texture image comes from the clothing image, and image patches of different positions and sizes are randomly cropped on the clothing image as the training texture image.

[0112] Step 312: performing loss optimization on the original feature extraction network based on the training texture features, the training depth features, and the validation set feature data to obtain a target feature extraction network.

[0113] The verification set feature data is pre-set for the clothing images to be trained, and includes verification texture features and verification depth features.

[0114] In some embodiments, the feature loss values of the training texture features and the training depth features can be calculated based on the training texture features, the training depth features and the validation set feature data, and then the original feature extraction network is back-propagated and optimized based on the feature loss values to obtain a target feature extraction network with more accurate feature extraction.

[0115] Step 314 : performing loss optimization on the original generative network based on the training texture clothing images and the validation set clothing images to obtain a target generative network.

[0116] The clothing images in the validation set are pre-confirmed clothing images in the validation set based on the clothing images to be trained and the training texture images.

[0117] In some embodiments, the error loss value of the training image can be calculated based on the training texture clothing image and the verification set clothing image, and then the original generation network is back-propagated and optimized based on the error loss value to obtain a target generation network with smaller generation effect error.

[0118] In this embodiment, it should be noted that when the model training step is not used, the present application can still achieve a certain texture replacement effect, but after model training of the original generation network and the original feature extraction network, the texture printing migration effect can be made better and more stable.

[0119] In order to understand this application more clearly, Figure 4 、 Figure 5 and Figure 6 The details are as follows:

[0120] First, if Figure 4 As shown, Figure 4 This paper demonstrates the specific data flow in a simple and complete embodiment of this solution, as well as the corresponding results generated in each step, and finally the process of generating the target texture clothing image based on each step.

[0121] Secondly, in order to more vividly illustrate some implementation details of the specific embodiment, here we combine Figure 5 For further explanation, such as Figure 5 As shown, Figure 5 A visual example step is shown, wherein: Figure 5The steps in Figure 4 One to one correspondence, it needs to be explained that, Figure 5 The Depth estimation module in refers to the depth estimation module. Figure 5 The Decolor module in the image refers to the grayscale processing module. Figure 5 The Control Net in is the target depth map control network, Figure 5 The generate Net in is the target generation network, Figure 5 The refence Net in is the target texture reference network. Figure 5 It shows that the depth or normal estimation of the clothes picture to be transferred is first performed to obtain the depth image or normal image of its foreground ( Figure 5 The depth image is shown) and then used as the controlnet input; the target clothes are preprocessed to extract the foreground segmentation mask, and the foreground color image is converted into a grayscale image. At the same time, white balance processing and normalization are performed to obtain a normalized image that can only reflect the brightness of the light, and together with the obtained mask, it is used as the generateNet input image condition part. GenerateNet is an inpainting image generation model. During inference, it is connected to the controlnet module mentioned above; finally, the information extraction part of the reference texture image is the reference texture image. After VAE encoding (the input of the above model part except the mask is first vae encoded), it is input into the refenceNet with the same shape as generateNet. During inference, refenceNet and generateNet perform the concat operation of the corresponding self-attn module at the corresponding position. The specific concat operation is as follows Figure 6 As shown in the figure, using Controlnet can better control the shape of the target clothes, and using depth or normal can better simulate the generated light and shade changes; the overall framework is essentially still an inpaint task, so the inpaint model structure is selected; using depth and grayscale images can decouple shape information and texture information to a certain extent; using the RefenceNet model of the same size for texture information extraction can keep the calculation dimension consistent with the inpaint model parameters, which can better fuse information.

[0122] It should be understood that, although the various steps in the flowcharts involved in the various embodiments described above are displayed in sequence according to the instructions of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flowcharts involved in the various embodiments described above can include multiple steps or multiple stages, and these steps or stages are not necessarily executed and completed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of steps or stages in other steps.

[0123] Based on the same inventive concept, embodiments of the present application also provide a two-dimensional texture print migration device for implementing the two-dimensional texture print migration method described above. The solution provided by this device is similar to the solution described in the above-mentioned method. Therefore, the specific limitations of one or more embodiments of the two-dimensional texture print migration device provided below can be found in the above-mentioned limitations of the two-dimensional texture print migration method and will not be repeated here.

[0124] In an exemplary embodiment, Figure 7 As shown, a two-dimensional texture printing migration device is provided, including: an acquisition module 702, a pre-processing module 704, a feature extraction module 706, a splicing module 708 and a texture printing migration module 710, wherein:

[0125] An acquisition module 702 is used to acquire a clothing image to be migrated and a reference texture image;

[0126] A preprocessing module 704 is used to perform image preprocessing on the clothing image to be transferred to obtain a depth image, a foreground segmentation image, and a target grayscale image;

[0127] A feature extraction module 706 is configured to extract features from the reference texture image and the depth image using a target feature extraction network to obtain reference texture features and depth features;

[0128] A stitching module 708 is configured to stitch the foreground segmentation image and the target grayscale image together through a target generation network to obtain a stitched image.

[0129] The texture printing migration module 710 is used to perform texture printing migration on the spliced image through the target generation network, reference texture features and depth features to obtain a target texture clothing image.

[0130] In some embodiments, the preprocessing module 704 is further used to perform depth estimation on the clothing image to be migrated to obtain a depth image; perform foreground segmentation on the clothing image to be migrated to obtain a foreground segmentation image and a foreground color image; and perform grayscale processing on the foreground color image to obtain a target grayscale image.

[0131] In some embodiments, the preprocessing module 704 is further used to perform grayscale processing on the foreground color image to obtain a target grayscale image, including: grayscale conversion of the foreground color image to obtain an original grayscale image; white balance processing of the original grayscale image to obtain a white balanced grayscale image; and normalization processing of the white balanced grayscale image to obtain a target grayscale image.

[0132] In some embodiments, the target feature extraction network includes: a target texture reference network and a target depth map control network; the feature extraction module 706 is also used to extract features of the reference texture image through the target texture reference network to obtain reference texture features; and to extract features of the depth image through the target depth map control network to obtain depth features.

[0133] In some embodiments, the texture print migration module 710 is also used to construct hierarchical attention module features based on reference texture features and depth features; input the spliced image into the network structure of the target generation network, and construct a target inference model based on the hierarchical attention module features and the network structure; perform texture print migration inference on the target inference model to obtain a target texture clothing image.

[0134] In some embodiments, the device further includes: a real-time display module for performing real-time page rendering according to the target texture clothing picture to obtain a target effect display page; and performing real-time display of the target effect display page.

[0135] In some embodiments, the device also includes: a training module for obtaining training clothing pictures and training texture pictures; performing image preprocessing on the training clothing pictures to obtain training depth images, training foreground segmentation images and training grayscale images; performing feature extraction on the training texture pictures and training depth images through the original feature extraction network to obtain training texture features and training depth features; performing splicing processing on the training foreground segmentation images and training grayscale images through the original generation network to obtain training spliced images; performing texture print migration on the training spliced images through the original generation network, training texture features and training depth features to obtain training texture clothing pictures; performing loss optimization on the original feature extraction network based on the training texture features, training depth features and verification set feature data to obtain a target feature extraction network; performing loss optimization on the original generation network based on the training texture clothing pictures and the verification set clothing pictures to obtain a target generation network.

[0136] In the above-mentioned two-dimensional texture printing migration device, a picture of clothing to be migrated and a reference texture picture are obtained; the picture of clothing to be migrated is preprocessed to obtain a depth image, a foreground segmentation image, and a target grayscale image; the reference texture picture and the depth image are feature extracted by a target feature extraction network to obtain reference texture features and depth features; the foreground segmentation image and the target grayscale image are spliced by a target generation network to obtain a spliced image; and the spliced image is subjected to texture printing migration using the target generation network, the reference texture features, and the depth features to obtain a target texture clothing picture. Therefore, by extracting features from the reference texture picture and the depth image using the target feature extraction network, shape information and texture information can be decoupled to a certain extent, and reference texture features that are easy to fuse and depth features used to simulate light and dark changes are extracted. Texture printing migration is performed on the spliced image using the target generation network, the reference texture features, and the depth features, and the print pattern in the reference texture picture is transferred to the picture of clothing to be migrated in a simple process to obtain the target texture clothing picture, providing convenience for clothing design appearance.

[0137] Each module in the above-mentioned two-dimensional texture printing migration device can be implemented in whole or in part through software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in hardware form, or can be stored in a computer device memory in software form, so that the processor can call and execute the corresponding operations of each module.

[0138] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Figure 8 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, abbreviated as I / O) and a communication interface. The processor, memory and input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store a target feature extraction network and a target generation network. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a two-dimensional texture printing migration method is implemented.

[0139] Those skilled in the art will understand that Figure 8The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.

[0140] In an exemplary embodiment, a computer device is provided, including a memory and a processor. The memory stores a computer program, and the processor implements the steps in the above method embodiments when executing the computer program.

[0141] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0142] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.

[0143] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0144] Those skilled in the art will understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. In particular, any reference to memory, database, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The databases involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the various embodiments provided herein may be, but are not limited to, general-purpose processors, central processing units (CPUs), graphics processing units (GPUs), digital signal processors (DSPs), programmable logic devices (PLDs), quantum computing-based data processing logic devices, artificial intelligence (AI) processors, and the like.

[0145] The technical features of the above embodiments can be combined arbitrarily. In order to make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0146] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present application. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present application, and these modifications and improvements fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the appended claims.

Claims

1. A two-dimensional texture printing migration method, characterized in that: The method comprises: Get the clothing image to be migrated and the reference texture image; Performing image preprocessing on the clothing image to be migrated to obtain a depth image, a foreground segmentation image, and a target grayscale image; Performing feature extraction on the reference texture image and the depth image through a target feature extraction network to obtain reference texture features and depth features; Splicing the foreground segmentation image and the target grayscale image through a target generation network to obtain a spliced image; The target texture clothing image is obtained by performing texture printing migration on the spliced image through the target generation network, the reference texture features and the depth features.

2. The method according to claim 1, characterized in that The image preprocessing of the clothes to be migrated to obtain a depth image, a foreground segmentation image and a grayscale image includes: Performing depth estimation on the image of clothing to be migrated to obtain the depth image; Performing foreground segmentation on the clothing picture to be migrated to obtain the foreground segmentation image and the foreground color image; Grayscale processing is performed on the foreground color image to obtain the target grayscale image.

3. The method according to claim 2, characterized in that The grayscale processing of the foreground color image to obtain the target grayscale image includes: Performing grayscale conversion on the foreground color image to obtain an original grayscale image; Performing white balance processing on the original grayscale image to obtain a white-balanced grayscale image; Normalizing the white balance grayscale image to obtain the target grayscale image.

4. The method according to claim 1, wherein The target feature extraction network includes: a target texture reference network and a target depth map control network; the target feature extraction network extracts features from the reference texture image and the depth image to obtain reference texture features and depth features, including: Extracting features from the reference texture image using the target texture reference network to obtain the reference texture features; The target depth map is used to control the network to extract features from the depth image to obtain the depth features.

5. The method according to claim 1, wherein The step of performing texture printing migration on the spliced image using the target generation network, the reference texture features, and the depth features to obtain a target texture clothing image includes: Constructing a hierarchical attention module feature based on the reference texture feature and the depth feature; Inputting the spliced image into the network structure of the target generation network, and constructing a target inference model based on the hierarchical attention module features and the network structure; Texture printing migration inference is performed on the target inference model to obtain the target texture clothing image.

6. The method according to claim 1, characterized in that The method further comprises: Perform real-time page rendering according to the target texture clothing picture to obtain a target effect display page; The target effect display page is displayed in real time.

7. The method according to claim 1, characterized in that The method further comprises: Get the clothing images to be trained and the training texture images; Performing image preprocessing on the clothing image to be trained to obtain a training depth image, a training foreground segmentation image, and a training grayscale image; Perform feature extraction on the training texture image and the training depth image through an original feature extraction network to obtain training texture features and training depth features; Splicing the training foreground segmentation image and the training grayscale image through the original generative network to obtain a training spliced image; Performing texture printing migration on the training spliced image through the original generation network, the training texture features, and the training depth features to obtain a training texture clothing image; Performing loss optimization on the original feature extraction network based on the training texture features, the training depth features, and the validation set feature data to obtain the target feature extraction network; The original generation network is subjected to loss optimization based on the training texture clothing images and the validation set clothing images to obtain the target generation network.

8. A two-dimensional texture printing migration device, characterized in that: The device comprises: The acquisition module is used to obtain the clothing images to be migrated and the reference texture images; A preprocessing module, configured to perform image preprocessing on the clothing image to be migrated to obtain a depth image, a foreground segmentation image, and a target grayscale image; A feature extraction module is used to extract features from the reference texture image and the depth image through a target feature extraction network to obtain reference texture features and depth features; a stitching module, configured to stitch the foreground segmentation image and the target grayscale image together through a target generation network to obtain a stitched image; The texture printing migration module is used to perform texture printing migration on the spliced image through the target generation network, the reference texture features and the depth features to obtain a target texture clothing image.

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 steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Garment style migration system and method

    CN113160033A

  • Garment style migration method and system based on deep learning

    CN114445268A

  • Image processing method and device, equipment, medium and program product

    CN115937020A

  • Room decoration style migration method based on semantic and style information guidance

    CN119130782A

  • Image fusion method and device, storage medium and program product

    CN119273558A