Virtual fitting method and system based on adaptive multi-modal fusion and dynamic feature enhancement

By acquiring and processing multi-modal image data, the virtual try-on model is trained, which solves the problems of insufficient realism and loss of details in virtual try-on technology, realizes clothing display and image fine-tuning capabilities in complex backgrounds, and improves the quality of generation. and adaptability.

CN118608910APending Publication Date: 2024-09-06GUANGDONG HENGQIN SHUSHUSHUO STORY INFORMATION TECH CO LTD
View PDF 0 Cites 7 Cited by

Patent Information

Application Number
CN202410820422.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-24
Publication Date
2024-09-06

AI Technical Summary

Technical Problem

The images generated by existing virtual try-on technology have insufficient realism, loss of details, insufficient processing of complex backgrounds, and cannot be fine-tuned by inputting prompt text.

Method used

By acquiring human body images, clothing images and try-on image groups, we use multi-modal large models to generate text descriptions, mask processing and add text descriptions, train virtual try-on models, implement feature extraction and fusion, and generate virtual try-on prediction images.

Benefits of technology

The realism and detail retention of the generated images are improved, clothing can be accurately placed in complex backgrounds, and fine-tuning can be performed by inputting prompt text, which enhances the model's adaptability and generation quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118608910A
    Figure CN118608910A
Patent Text Reader

Abstract

The invention relates to the technical field of computer vision, and provides a virtual fitting method and system for adaptive multi-modal fusion and dynamic feature enhancement, and the method comprises the following steps: obtaining a plurality of image groups; generating a text description of each image of the image group by using a multi-modal large model; for each image group, shielding an area, which should be covered by the clothing corresponding to the clothing image, in the human body image, and adding a corresponding text description to each image in the image group subjected to shielding processing to obtain an image group subjected to word addition processing; training a virtual try-on model used for generating a virtual try-on prediction image by using the image group subjected to word addition processing to obtain a trained virtual try-on model; and inputting a to-be-fitted clothing image, a target human body image and / or a prompt text into the trained virtual fitting model, performing feature extraction and feature fusion on the input data by the virtual fitting model, converting the input data into a virtual fitting prediction image, and outputting the virtual fitting prediction image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of computer vision, and more specifically, to a virtual try-on method and system with adaptive multi-modal fusion and dynamic feature enhancement. Background Art

[0002] As an important part of e-commerce, virtual try-on technology greatly enriches consumers' shopping experience by simulating how clothes will look on people of different body shapes and postures, and helps them make more informed purchasing decisions. This technology is of great significance in reducing returns, improving customer satisfaction and promoting personalized shopping.

[0003] However, despite the significant progress, the existing virtual try-on technology still faces some challenges. The existing technology proposes a virtual try-on method, including: collecting a personal image to obtain a first plane image; obtaining a second plane image corresponding to the pre-triggered object; converting the first plane image and the second plane image into a first stereoscopic image and a second stereoscopic image respectively; establishing a stereoscopic model according to the first stereoscopic image; pairing the second stereoscopic image with the stereoscopic model; judging whether the pairing is successful; when the pairing is successful, judging whether the personal portrait needs to be replaced; when the personal portrait needs to be replaced, replacing the head of the stereoscopic model with the personal portrait to form a third stereoscopic image; and animating the third stereoscopic image. The existing technology has defects such as insufficient realism of the generated image, loss of details, insufficient processing of complex backgrounds, and inability to fine-tune the generated image by inputting prompt text. Summary of the invention

[0004] In order to overcome the defect of the above-mentioned prior art that a generated image cannot be fine-tuned by inputting prompt text, the present invention provides a virtual try-on method and system with adaptive multimodal fusion and dynamic feature enhancement, which can fine-tune a generated image by inputting prompt text.

[0005] In order to solve the above technical problems, the technical solution of the present invention is as follows:

[0006] Acquire a plurality of image groups, wherein each image group includes: a human body image, a clothing image, and a human body try-on image of a human body wearing corresponding clothing;

[0007] generating a text description for each image in the set of images using the multimodal large model;

[0008] For each image group, mask the area in the human body image that should be covered by the clothing corresponding to the clothing image to obtain a masked image group, and add a corresponding text description to each image in the masked image group to obtain a word-added image group;

[0009] Using the word-added image group to train a virtual try-on model for generating virtual try-on prediction images, to obtain a trained virtual try-on model;

[0010] The image of clothing to be tried on, the target human body image and / or prompt text are input into the trained virtual try-on model, and the virtual try-on model extracts and fuses the input data and converts it into a virtual try-on prediction image output.

[0011] The present invention also proposes a virtual try-on system with adaptive multi-modal fusion and dynamic feature enhancement for realizing the above-mentioned virtual try-on method with adaptive multi-modal fusion and dynamic feature enhancement, and the system comprises:

[0012] An image acquisition module is used to acquire a plurality of image groups, wherein each image group includes: a human body image, a clothing image, and a human body trying-on image of a human body wearing corresponding clothing;

[0013] A text description generation module, used to generate a text description of each image in the image group using the multimodal large model;

[0014] A word adding module is used for masking the area of ​​the human body image that should be covered by the clothing corresponding to the clothing image for each image group to obtain a masked image group, and adding a corresponding text description to each image in the masked image group to obtain a word adding image group;

[0015] A training module, used for training a virtual try-on model for generating a virtual try-on prediction image using the image group processed with added words, to obtain a trained virtual try-on model;

[0016] The virtual try-on prediction image generation module is used to input the clothing image to be tried on, the target human body image and / or the prompt text into the trained virtual try-on model. The virtual try-on model extracts and fuses the input data and converts it into a virtual try-on prediction image output.

[0017] Compared with the prior art, the technical solution of the present invention has the following beneficial effects:

[0018] For each image group, the area in the human body image that should be covered by the clothing corresponding to the clothing image is masked to obtain a masked image group, and a corresponding text description is added to each image in the masked image group to obtain a word-added image group; the virtual try-on model is trained using the word-added image group to obtain a trained virtual try-on model that can fine-tune the generated image by inputting prompt text; and the virtual try-on model can fuse the features corresponding to the human body image, clothing image and text, and the virtual try-on prediction image generated based on the fused features has sufficient realism and fully retained details. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 This is a first flow chart of the virtual try-on method with adaptive multi-modal fusion and dynamic feature enhancement proposed in Example 1;

[0020] Figure 2 A second flow chart of the virtual try-on method with adaptive multi-modal fusion and dynamic feature enhancement proposed in Example 1;

[0021] Figure 3 This is an example of a human body image proposed in Example 2;

[0022] Figure 4 This is the overall framework diagram of the virtual try-on system with adaptive multimodal fusion and dynamic feature enhancement proposed in Example 3. DETAILED DESCRIPTION

[0023] The accompanying drawings are only used for illustrative purposes and should not be construed as limiting the present embodiment;

[0024] In order to better illustrate the present embodiment, some parts in the drawings may be omitted, enlarged or reduced, and do not represent the size of the actual product;

[0025] It is understandable to those skilled in the art that some well-known structures and their descriptions may be omitted in the drawings.

[0026] The technical solution of the present invention is further described below in conjunction with the accompanying drawings and embodiments.

[0027] Example 1

[0028] This embodiment proposes a virtual try-on method with adaptive multi-modal fusion and dynamic feature enhancement. Figure 1 This is a first flow chart of the virtual try-on method with adaptive multi-modal fusion and dynamic feature enhancement in this embodiment;

[0029] The virtual try-on method with adaptive multi-modal fusion and dynamic feature enhancement proposed in this embodiment includes the following steps:

[0030] S1: obtaining a plurality of image groups, wherein each image group includes: a human body image, a clothing image, and a human body trying-on image of a human body wearing corresponding clothing;

[0031] S2: Generate a text description of each image in the image group using the multimodal large model;

[0032] S3: for each image group, masking the area in the human body image that should be covered by the clothing corresponding to the clothing image to obtain a masked image group, and adding a corresponding text description to each image in the masked image group to obtain a word-added image group;

[0033] S4: using the image group processed with added words to train a virtual try-on model for generating a virtual try-on prediction image, to obtain a trained virtual try-on model;

[0034] S5: Input the clothing image to be tried on, the target human body image and / or the prompt text into the trained virtual try-on model, and the virtual try-on model extracts and fuses the input data and converts it into a virtual try-on prediction image output.

[0035] As an exemplary explanation, the text description corresponding to the clothing image includes: the type, color, texture and / or clothing background description of the clothing; the text description corresponding to the human body image includes: description of the human body posture, description of the human body background, age, gender, skin color, action, full body and / or half body description of the human body; the text description corresponding to the human body fitting image includes: text description for clothing and text description for the human body; there is no fixed requirement for the text description, and the content can be added or deleted according to actual needs;

[0036] As an example, when the clothing in the clothing image is a top, the upper limbs of the human body image that should be wearing the top will be masked, and the same applies to bottoms or full-body clothing;

[0037] In the specific implementation process, for each image group, the area in the human body image that should be covered by the clothing corresponding to the clothing image is masked to obtain a masked image group, and a corresponding text description is added to each image in the masked image group to obtain a word-added image group; the virtual try-on model is trained using the word-added image group to obtain a trained virtual try-on model that can fine-tune the generated image by inputting prompt text; and the virtual try-on model can fuse the features corresponding to the human body image, clothing image and text, and the virtual try-on prediction image generated based on the fused features has sufficient realism and fully retained details;

[0038] In this embodiment, the area in the human body image that should be covered by the clothing corresponding to the clothing image is masked, so that the virtual fitting model can accurately place and display the clothing in various backgrounds.

[0039] In an optional embodiment, the virtual try-on model includes: a feature extraction and splicing module, a multimodal feature dynamic fusion module and a try-on image generation module;

[0040] The feature extraction and splicing module is configured with a text-image pre-training model, which is used to extract and splice image features and text features from the input data, and output the fused image and text features;

[0041] The multimodal feature dynamic fusion module is used to fuse and weight the image and text features output by the feature extraction and splicing module, and output the weighted image and text features; wherein the multimodal feature dynamic fusion module includes: an input unit, a cross attention unit and a weight prediction unit; wherein the input unit includes a plurality of fully connected layers for receiving input data; the cross attention unit is used to weight the output features of the input unit based on the attention mechanism; the weight prediction unit is configured with a multi-layer neural network for weighting the output features of the cross attention unit;

[0042] The try-on image generation module is configured with a UNet_b model, which is used to convert the weighted graphic features output by the multimodal feature dynamic fusion module into a virtual try-on prediction image.

[0043] As an exemplary illustration, the text-image pre-training model includes: a clip model (Contrastive Language-Image Pre-Training), a TOnICS model (Training with Ontology-Informed Contrastive Sampling), a GLIP model (Grounded Language-Image Pre-training), a BERT model (Bidirectional Encoder Representations from Transformers), a ViT model (Vision Transformer), or a DALL-E model (DALL·E: A Discriminative e Framework for Image-to-Image Translation);

[0044] In this optional embodiment, the role of the text description is to provide additional semantic information to help the model better understand and distinguish different clothing features and human body postures; through the text-image pre-training model, the text description is encoded into text features and fused with image features to form a rich semantic feature representation; these feature representations are then used by the UNet structure to learn the detailed features of clothing and human body, as well as the relationship between them;

[0045] In this optional embodiment, the clothing image of the existing virtual dressing method based on a pre-trained diffusion model relies on an external deformation network to be deformed in the RGB space and pasted onto the character image, rather than using a pre-trained model. The external deformation network has a poor effect and the fusion is unnatural, which wastes the prior knowledge and high-fidelity image generation capability of the pre-trained model. This optional embodiment uses a text-image pre-training model to extract features and outputs fused text and image features, which can effectively utilize the prior knowledge and high-fidelity image generation capability of the pre-trained model, thereby improving the quality of the generated image.

[0046] In an optional embodiment, when the image group processed with added words is used to train the virtual try-on model for generating the virtual try-on prediction image, the step of outputting the image and text features by the feature extraction and splicing module includes:

[0047] The feature extraction and splicing module receives the image group processed with word addition, and the text-image pre-training model encodes the clothing image and the human body image in the image group processed with word addition to obtain the image feature F of the clothing image. A and the image feature F of the human image B ;

[0048] Add randomly generated noise values ​​to the clothing images and human body images of the word-added image group, and convert the noise values ​​into noise image features F using the text-image pre-training model. N ;

[0049] The expression of the noise value includes:

[0050] Noise(x,y)~N(μ,σ 2 )

[0051] In the formula, Noise(x, y) represents the noise value of the image, where x and y represent the pixel coordinates of the image corresponding to the noise value; N(μ, σ 2 ) means the mean is μ and the variance is σ 2 Normal distribution of

[0052] At the same time, the text-image pre-training model encodes the text description in the image group after word addition to obtain the text feature T of the clothing image. A , the text feature T of the human image B and the text features of human fitting images T C ;

[0053] For the image feature F A With the text feature T A Perform splicing operation and transform the image features T B With the text feature T BPerform splicing operations to obtain the fused clothing image and text features A And the fused human body image and text features B , the Feature A and Feature B The expressions include:

[0054] Feature A =[F A :T A ]

[0055] Feature B =[F B :T B ]

[0056] In the formula, […:…] represents the concatenation operation.

[0057] As an exemplary illustration, the denoising operation can be performed by an autoencoder, a variational autoencoder (VAE), or other types of generative adversarial networks (GANs).

[0058] In an optional embodiment, when the image group processed with added words is used to train the virtual try-on model for generating the virtual try-on prediction image, the step of the multimodal feature dynamic fusion module outputting the weighted graphic and text features includes:

[0059] The multimodal feature dynamic fusion module receives the fused clothing graphic feature Feature A , the fused human body image and text features B , noise image feature F N and the text features of human fitting images T C After the input unit horizontally splices the input features, the cross attention unit uses the attention mechanism to make each mode in the horizontally spliced ​​input features interact with other modes in a weighted manner to obtain the interactively processed feature Featurefuse d ;

[0060] The interactively processed feature Feature fused The expressions include:

[0061] Feature fused =CrossAttention(Feature A , Feature B , Feature C )

[0062] In the formula, CrossAttention(·) means using the attention mechanism for interactive processing;

[0063] The interactively processed feature Feature fused Input the weight prediction unit, and the weight prediction unit outputs feature Feature fused The weight W of each mode in selected , based on the weight W selected , for feature fused Perform weighted processing and output weighted image and text features Feature weighted ;

[0064] The weighted image and text feature Feature weighted The expressions include:

[0065] Feature weighted =Softmax(W selected )·Feature fused

[0066] W selected =AdjustWeights(Feature fused )

[0067] Where Softmax(·) represents the normalized exponential function, and AdjustWeights(·) represents the weight prediction operation of the weight prediction unit.

[0068] As an exemplary illustration, the input unit of the multimodal feature dynamic fusion module (MMOnet) includes four fully connected layers; Feature A , Feature B , Feature F C and feature T C Each feature is input into the corresponding fully connected layer, and each feature is mapped to an N-dimensional feature;

[0069] As an exemplary illustration, the cross attention unit horizontally splices each feature (N-dimensional) (clothing image and text, human image and text, noise image, human image text description feature) into a (4N-dimensional) feature vector, and uses cross attention to make each modality interact with other modalities to obtain the processed feature Feature fused ;

[0070] In this optional embodiment, the image and text description are processed adaptively, and the fusion strategy can be intelligently adjusted according to the diversity and complexity of the input to extract and utilize the most relevant feature information.

[0071] In an optional embodiment, when the virtual try-on model for generating a virtual try-on prediction image is trained using the word-added image group, the step of converting the output features of the multimodal feature dynamic fusion module into a virtual try-on prediction image by the try-on image generation module includes:

[0072] The trial image generation module uses the encoder of the UNet b model to process the weighted image and text features Feature weighted Encode and obtain the encoded feature F encoder , and use the decoder of the UNet_b model to decode the feature F encoder Perform denoising and output the virtual try-on prediction image. final ;

[0073] The feature F encoder and virtual try-on prediction images, final The expressions include:

[0074] F encoder =E(D)

[0075]

[0076] I t+1 =D t -N t

[0077] N t =D t -P t (F encoder )

[0078] In the formula, E(·) represents the encoding operation using the encoder of the UNet_b model, D represents the feature map of the last input encoder, and the initial value of D is Feature weighted ;I t and, t+1 Denote the restored images at the t-th time step and the t+1-th time step, respectively, and D t represents the noise image at the tth time step, N t represents the noise predicted at the tth time step; P t represents the denoised prediction of the decoder at time step t.

[0079] As an exemplary illustration, the UNet b model includes an encoder and a decoder, wherein the encoder includes: an input layer, a convolution layer 1, a convolution layer 2, a pooling layer, a convolution layer 3, a dropout layer, a convolution layer 4 and a self-attention layer; the decoder includes: an upsampling layer 1, a convolution layer 5, a convolution layer 6, an upsampling layer 2, a convolution layer 7 and an output layer; wherein the numbers are the numbers of each layer and do not represent the number of each layer; each layer of the encoder part is built on the basis of the previous layer and gradually extracts higher-level feature representations; the pooling layer helps to expand the receptive field of the model while reducing the number of parameters and computational complexity; the self-attention layer is applied to the high-level features of the encoder to capture global dependencies and enhance the expressiveness of the features; the upsampling and convolution layers of the decoder part gradually restore the spatial resolution of the image and refine the feature representation to generate high-quality reconstructed images; through this structure, UNet b can not only effectively extract and fuse features, but also enhance the generalization and robustness of the model through the self-attention mechanism and dropout strategy;

[0080] As an exemplary illustration, the input layer is used to receive the multimodal features after the text and image features are spliced; the convolution layer 1 is used to extract preliminary features using the convolution layer, followed by an activation function such as ReLU; the convolution layer 2 is used to further extract features, followed by a ReLU activation function; the pooling layer is used to downsample the spatial dimension, reduce the number of parameters, and improve the model receptive field; the convolution layer 3 is used to extract features at a higher level, followed by a ReLU activation function; the dropout layer is used to apply the dropout strategy on the output of the encoder part; the convolution layer 4 is used to continue to extract higher-level features, followed by a ReLU activation function. U activation function; the self-attention layer is used to apply the self-attention mechanism on the high-level features of the encoder to strengthen the correlation between features; the upsampling layer 1 is used to upsample the output of the self-attention layer to gradually restore the spatial resolution of the image; the convolution layer 5 is used to apply a convolution operation on the upsampled features to refine the feature representation; the convolution layer 6 is used to further refine the features in preparation for image reconstruction; the upsampling layer 2 is used to continue to restore the resolution of the image; the convolution layer is used to perform a convolution operation on the final upsampled features to generate clear image details; the output layer is used to output the final denoised and reconstructed image;

[0081] As an example, the UNet b gradually constructs the final synthetic image through a series of denoising steps; in this process, the model starts from an initial state with noise. weighted , gradually recovering a clear human body composite image; each step of denoising is based on the current feature map and the results of the previous steps. In this way, the model gradually integrates clothing features into the human body image;

[0082] In this optional embodiment, in the feature extraction stage, the encoder part of UNet b receives the input feature map D. The self-attention layer further processes the texture, color, shape and other information in the feature map as well as the semantic correspondence and text description information to understand the relationship between different features, especially the interaction between clothing features and human body features; in the denoising prediction stage, the decoder part of UNet b uses the features extracted by the encoder to predict the noise components in the current noisy image; then, the model subtracts these predicted noises from the noisy image to gradually restore a clearer image; in the gradual recovery stage, the model gradually reduces the noise in the image and improves the clarity of the image through an iterative denoising process; each step brings the image closer to the original noise-free state; after multiple iterations, UNet_b outputs the final composite image, final , in which the clothing is realistically "worn" on a human body model; the generated image shows the natural transition between the clothing and the edges of the human body, as well as the appropriate deformation of the clothing with the human body posture, thus achieving a highly realistic visual effect.

[0083] In an optional embodiment, when using the image group processed with added words to train the virtual try-on model for generating the virtual try-on prediction image, a loss function Loss is introduced using the virtual try-on prediction image corresponding to the image group processed with added words, and the virtual try-on model is trained using the loss function Loss. During the training process, the loss function Loss is iteratively solved, and when the number of iterations reaches a preset value or the loss function value reaches a minimum value, the training is terminated to obtain a trained virtual try-on model;

[0084] The expression of the loss function includes:

[0085] Loss = W KL ·Loss KL +W SSIM ·Loss SSIM +W FID ·Loss FID

[0086]

[0087] Where W KL , W SSIM and W FID Respectively represent the loss function Loss KL 、Loss SSIM and Loss FID The weight of ; μx represents the mean of the virtual try-on prediction image, μy represents the mean of the real image, and also represents the mean of the human try-on image in the image group, ||·|| 2 represents the square of the Euclidean distance, tr(·) represents the trace of the matrix, ∑x and∑ y They represent the geometric mean of the covariance matrix of the virtual try-on prediction image and the real image, σ x and σ y denote the standard deviation of the virtual try-on prediction image and the real image, σ xy represents the covariance, C1 and C2 are constants; N represents the dimension of the virtual try-on prediction image and the real image, y i represents the value of the i-th dimension of the virtual try-on prediction image, x i Represents the value of the i-th dimension of the real image.

[0088] As an illustrative example, optimizers such as AdamW are used to update the model weights according to the loss function to minimize the difference between the generated image and the target image; during the training process, model parameters such as learning rate, dropout ratio, and guidance scale are continuously adjusted, and the validation set is used to evaluate the performance of the model. An ablation study is performed to understand the impact of different components on model performance and select the optimal model. The goal of the entire training process is to enable the model proposed in this paper to learn how to generate realistic fitting results based on given human images and clothing images, while maintaining a high degree of control over clothing details by introducing text descriptions. Through data augmentation and text control, the background, human features, actions, and clothing styles of the final fitting can be adjusted to increase the diversity of generation;

[0089] As an exemplary illustration, in order to improve the generalization of the model, a dropout strategy is designed during the training process; wherein, as an exemplary illustration, for the dropout strategy of clothing and human body features, the dropout rate set in this application is 10%. During the training process, the model randomly selects 10% of the dimensions of the input clothing features and the input human clothing feature vectors and sets them to 0 (if the vector is 1024 dimensions, 10% of the 100 dimensions will be set to 0). The processed vectors then enter the next step of the process;

[0090] In this optional embodiment, the model's ability to dynamically adjust clothing and human features during training is highlighted. Through the innovative Dropout strategy and loss function design, the model's learning of key features is enhanced, and the detail richness and realism of the generated images are improved; the model is made more realistic, personalized, and adapted to different user needs and scenarios;

[0091] As an example, the loss function LoSS FIDBased on FID design, FID is a standard for evaluating the quality of generated images. A pre-trained deep convolutional neural network is used to extract image features. As an example, the Inception network trained on the ImageNet dataset is used to capture high-level image features well. For real images and generated images, their feature representations in the Inception network are calculated respectively. As an example, the activation of the last pooling layer is extracted from each image as the feature representation. As an example, the mean and covariance matrices are calculated by generating image features and real image features. The FID score is a scalar value that combines the differences in feature mean and covariance. Ideally, the FID score is close to 0, which means that the feature distributions of the generated image and the real image are almost the same.

[0092] As an example, the loss function LoSs SSIM Based on the SSIM design, SSIM is an indicator that measures the perceived similarity between images, and is used to measure the visual similarity between the image generated by the model and the real image; where C1 and C2 are constants set to prevent the denominator from being 0; as an example, C1 = 0.01, C2 = 0.03, as an example, the calculation of SSIM is performed by sliding a window on the image, calculating the SSIM value in each window, and then taking the average of the calculation results of all windows as the SSIM value between the two images; this method can effectively evaluate the local similarity of the image, thereby obtaining an overall similarity evaluation;

[0093] As an example, the loss function LoSS KL Based on the KL divergence design, the larger the KL divergence value between the generated clothing feature map and the real clothing image, the greater the difference in the probability distribution of the two images; when the KL divergence is 0, it means that the probability distribution of the two images is exactly the same;

[0094] As an exemplary illustration, the loss function can be replaced by other types of similarity or distance metrics. As an exemplary illustration, the loss function includes: perceptual loss or adversarial loss, mean squared error (MSE), absolute error (MSE), e Erro r , MAE);

[0095] In this optional embodiment, the present application adopts a joint loss as the final loss function, calculates the KL divergence, SSIM distance, and FID distance of the two images respectively, and performs weighted addition to more accurately evaluate the difference in richness and detail level between the generated content and the real image content; as an exemplary illustration, W KL =0.2,W SSIM =0.5,W FID =0.3; by minimizing this joint loss function, the image features generated by the model learning will be as close to the real clothing features as possible, while maintaining a high visual similarity with the real image, and the distribution of the overall image set is also closer to the distribution of the real data set, which prompts the model to continuously optimize during the training process to generate more realistic virtual fitting images; the loss function here is to judge the gap between the generated image and the real image from multiple dimensions; during the training process, the model will continuously adjust the weights and biases to minimize the value of the loss function; in this way, the model's prediction results will gradually approach the real results and generate higher quality images; it can be seen that in the process of minimizing the loss function, the distance between the predicted results and the real results is actually narrowed; in this way, the model can learn how to generate images that are more consistent with real data, thereby improving the performance and generation quality of the model.

[0096] In an optional embodiment, when using the word-added image group to train a virtual try-on model for generating a virtual try-on prediction image, a random zero strategy is adopted for the text description in the word-added image group, and the steps include:

[0097] In each iteration of the virtual try-on model, a number of image groups that have been processed with word addition are randomly selected with a preset probability, and the text descriptions in the selected image groups are blanked using a blanking strategy;

[0098] The emptying strategy includes:

[0099] For each image group of the selected image groups, using a preset first blanking probability as the probability that the number of blanked text descriptions in the image group is 1, using a preset second blanking probability as the probability that the number of blanked text descriptions in the image group is 2, and using a preset third blanking probability as the probability that the number of blanked text descriptions in the image group is 3, blanking the text descriptions in the selected image group;

[0100] The sum of the first vacancy probability, the second vacancy probability and the third vacancy probability is less than or equal to 1.

[0101] As an example, the blanking strategy enables the model to learn and generate effectively with or without textual prompts; this not only enhances the model's reliance on textual information, but also improves the model's robustness and adaptability in practical applications; in this way, the model can learn to generate realistic virtual fitting images based on image features when textual information is incomplete or unavailable;

[0102] As an exemplary illustration, the preset probability includes: 15%; the first blank probability includes: 20%; the second blank probability includes: 30%; the third blank probability includes: 50%; wherein, when the number of blank text descriptions is 3, it means that there is no input of any prompt word, only image input.

[0103] In an optional embodiment, when the input data of the trained virtual try-on model are an image of clothing to be tried on and an image of a target human body, the trained virtual try-on model outputs a virtual try-on prediction image of the target human body wearing the clothing to be tried on;

[0104] When the input data of the trained virtual fitting model are an image of clothing to be tried on, an image of a target human body and prompt text for the human body, the trained virtual fitting model outputs a virtual fitting prediction image of the target human body wearing the clothing to be tried on after performing actions and / or adjusting angles using the prompt text;

[0105] When the input data of the trained virtual try-on model are the image of clothing to be tried on, the target human body image and the prompt text of the requirements for the output image, the trained virtual try-on model outputs a virtual try-on prediction image that meets the requirements of the prompt text; the prompt text of the requirements for the output image includes: modifying the background of the output image, the gender and action of the human body in the output image, and the style and / or color of the clothing in the output image.

[0106] In this optional embodiment, under a given human body and clothing, the composite image of the human body and clothing can be customized by inputting prompt text, and the human body and clothing can be adjusted in detail to achieve more precise control of the synthesis effect.

[0107] In this implementation, Figure 2 This is a second flow chart of the virtual try-on method with adaptive multi-modal fusion and dynamic feature enhancement proposed in this embodiment; Figure 2As shown, the present application enhances the model's understanding of clothing and human features by combining images and text descriptions and using pre-trained models for feature extraction and fusion; at the same time, the concept of text prompt words is introduced, allowing users to control specific aspects of the generated images through natural language, such as human features, clothing styles and background settings, thereby achieving a more personalized and flexible virtual try-on experience; using denoising and image reconstruction technology based on diffusion models, realistic synthetic images are gradually constructed through an iterative process, effectively solving the problem of unnatural fusion of clothing and human bodies in traditional methods; a comprehensive loss function is designed, combining multiple evaluation indicators such as KL divergence, SSIM and FID, to more comprehensively optimize model performance; at the same time, the end-to-end training method of the model simplifies the process and improves training efficiency; for the input text prompt words, a rotating random blanking strategy is proposed. This strategy not only increases the model's adaptability to different text prompts, but also improves the model's generation ability when there are no text prompts, making the model more flexible and robust when dealing with uncertain or incomplete inputs; the Dropout strategy is innovatively applied to clothing and human feature vectors, rather than just on neurons; this strategy can randomly set a part of the feature dimensions to zero during training, forcing the model to learn more robust feature representations, thereby better generalizing to new, unseen data during testing.

[0108] Example 2

[0109] This embodiment is based on the virtual try-on method of adaptive multimodal fusion and dynamic feature enhancement proposed in Embodiment 1, and proposes the following example of performing data enhancement operations on the image group:

[0110] In an optional embodiment, before generating a text description of each image in the image group using the multimodal large model, performing a data enhancement operation on the image group;

[0111] The data enhancement operation steps include: human posture diversification enhancement and / or background diversification enhancement;

[0112] The operation steps of the human body posture diversification enhancement include:

[0113] The human body image and the human body fitting image are respectively converted into 3D human body models using a human body reconstruction implicit function, so as to obtain a 3D human body model A corresponding to the human body image and a 3D human body model B corresponding to the human body fitting image;

[0114] Using three-dimensional animation software, the skeleton points of the 3D human body model A and the 3D human body model B are bound, and then by transforming the skeleton points, the 3D human body model A and the 3D human body model B corresponding to several human body movements are generated, and the images of the generated 3D human body model A and the 3D human body model B are collected by switching the perspective and taking screenshots; wherein the images of the 3D human body model A and the 3D human body model B with the same human body movement are divided into the same image group;

[0115] The operation steps of background diversity enhancement include:

[0116] Extracting the subject of the human body image, clothing image and human body fitting image by using the image segmentation model, the subject includes: human body and clothing;

[0117] Collect background images;

[0118] Random background replacement is performed on human images, clothing images, and human fitting images by randomly combining the collected background images with the extracted image subjects.

[0119] As an exemplary illustration, the image segmentation model includes: Model_seg;

[0120] As an exemplary illustration, the implementation method of the operation of human posture diversification enhancement can be replaced by the following methods: by other 3D modeling and animation techniques, or by using physically based rendering (PBR) technology to enhance the data set to simulate more realistic lighting and material effects, or by using other 2D images to synthesize 3D object models (such as: PIFuHD, PaMIR or ICON);

[0121] As an exemplary illustration, the human body images include images of several types of people; the collected background images include: images of several different life scenes;

[0122] As an example, Figure 3 This is an example of a human body image proposed in this embodiment, such as Figure 3 As shown, in this optional embodiment, when generating images of 3D human body model A and 3D human body model B, a plurality of sets of data are generated under the condition that the clothing to be synthesized remains unchanged, wherein human body images A and images B (such as those shown in FIG. 1 ) with consistent movements and visuals are generated in a preset ratio. Figure 3 ), as well as human images A and B with consistent movements but inconsistent vision (as shown in the first row of images of Figure 3 As shown in the second row of images), the visual representation shows the direction of the character;

[0123] As an exemplary illustration, the preset ratio includes generating human images A and B with consistent movements and consistent vision at a ratio of 60%, and generating human images A and B with consistent movements and inconsistent vision at a ratio of 40%;

[0124] In this optional embodiment, the existing virtual try-on technology is still limited in generalization ability. Due to the difficulty and high cost of collecting data sets, the human body and clothing shapes, backgrounds, and forms of the data sets are single, which makes it impossible to adapt well to the synthesis of human bodies and clothing under various complex backgrounds. The synthesis loses many details. The existing technology cannot learn how to accurately place and display clothing in various different backgrounds. The limitations of data collection lead to the insufficiency of the generation model in terms of generation ability. The synthesis ability for human bodies of different sizes and postures and clothing of different shapes is poor, and the clothing structure cannot be maintained when the background is complex, and the fit with the human body is poor; the present application realizes data enhancement through 3D model generation and transformation, as well as background replacement, and improves the adaptability of the model to different postures, backgrounds, and clothing; the operation of human body posture diversification enhancement enables the model to accurately fit clothing to the human body in different postures and retain clothing details, and the operation of background diversification enhancement enhances the diversity of the background in the data set, thereby enhancing the model's ability to maintain clothing structure and human body fit under complex backgrounds.

[0125] Example 3

[0126] This embodiment proposes a virtual try-on system with adaptive multi-modal fusion and dynamic feature enhancement, which is used to implement the virtual try-on method with adaptive multi-modal fusion and dynamic feature enhancement proposed in Embodiment 1.

[0127] Figure 4 This is the overall framework diagram of the virtual try-on system with adaptive multimodal fusion and dynamic feature enhancement of this embodiment.

[0128] The virtual try-on system with adaptive multi-modal fusion and dynamic feature enhancement includes:

[0129] An image acquisition module is used to acquire a plurality of image groups, wherein each image group includes: a human body image, a clothing image, and a human body trying-on image of a human body wearing corresponding clothing;

[0130] A text description generation module, used to generate a text description of each image in the image group using the multimodal large model;

[0131] A word adding module is used for masking the area of ​​the human body image that should be covered by the clothing corresponding to the clothing image for each image group to obtain a masked image group, and adding a corresponding text description to each image in the masked image group to obtain a word adding image group;

[0132] A training module, used for training a virtual try-on model for generating a virtual try-on prediction image using the image group processed with added words, to obtain a trained virtual try-on model;

[0133] The virtual try-on prediction image generation module is used to input the clothing image to be tried on, the target human body image and / or the prompt text into the trained virtual try-on model. The virtual try-on model extracts and fuses the input data and converts it into a virtual try-on prediction image output.

[0134] It can be understood that the virtual try-on system with adaptive multimodal fusion and dynamic feature enhancement in this embodiment improves the method in embodiment 1. The options in the above embodiment 1 are also applicable to this embodiment, so they will not be described repeatedly here.

[0135] The same or similar reference numerals correspond to the same or similar components;

[0136] The terms used to describe the positional relationship in the drawings are only used for illustrative purposes and should not be construed as limiting the present embodiment;

[0137] Obviously, the above embodiments of the present invention are merely examples for clearly illustrating the present invention, and are not intended to limit the embodiments of the present invention. For those skilled in the art, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to list all the embodiments here. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the claims of the present invention.

Claims

1. A virtual try-on method based on adaptive multi-modal fusion and dynamic feature enhancement, characterized in that: The following steps are involved: Acquire a plurality of image groups, wherein each image group includes: a human body image, a clothing image, and a human body try-on image of a human body wearing corresponding clothing; generating a text description for each image in the set of images using the multimodal large model; For each image group, mask the area in the human body image that should be covered by the clothing corresponding to the clothing image to obtain a masked image group, and add a corresponding text description to each image in the masked image group to obtain a word-added image group; Using the word-added image group to train a virtual try-on model for generating virtual try-on prediction images, to obtain a trained virtual try-on model; The image of clothing to be tried on, the target human body image and / or prompt text are input into the trained virtual try-on model, and the virtual try-on model extracts and fuses the input data and converts it into a virtual try-on prediction image output.

2. The virtual try-on method with adaptive multi-modal fusion and dynamic feature enhancement according to claim 1 is characterized in that: The virtual try-on model includes: a feature extraction and splicing module, a multi-modal feature dynamic fusion module and a try-on image generation module; The feature extraction and splicing module is configured with a text-image pre-training model, which is used to extract and splice image features and text features from the input data, and output the fused image and text features; The multimodal feature dynamic fusion module is used to fuse and weight the image and text features output by the feature extraction and splicing module, and output the weighted image and text features; wherein the multimodal feature dynamic fusion module includes: an input unit, a cross attention unit and a weight prediction unit; wherein the input unit includes a plurality of fully connected layers for receiving input data; the cross attention unit is used to weight the output features of the input unit based on the attention mechanism; the weight prediction unit is configured with a multi-layer neural network for weighting the output features of the cross attention unit; The try-on image generation module is configured with a UNet_b model, which is used to convert the weighted graphic features output by the multimodal feature dynamic fusion module into a virtual try-on prediction image.

3. The virtual try-on method with adaptive multi-modal fusion and dynamic feature enhancement according to claim 2 is characterized in that: When the image group processed with added words is used to train the virtual try-on model for generating the virtual try-on prediction image, the step of outputting the image and text features by the feature extraction and splicing module includes: The feature extraction and splicing module receives the image group processed with word addition, and the text-image pre-training model encodes the clothing image and the human body image in the image group processed with word addition to obtain the image feature F of the clothing image. A and the image feature F of the human image B ; Add randomly generated noise values ​​to the clothing images and human body images of the word-added image group, and convert the noise values ​​into noise image features F using the text-image pre-training model. N ; The expression of the noise value includes: Noise(x,y)~N(μ,σ 2 ) In the formula, Noise(x, y) represents the noise value of the image, where x and y represent the pixel coordinates of the image corresponding to the noise value; N(μ, σ 2 ) means the mean is μ and the variance is σ 2 Normal distribution of At the same time, the text-image pre-training model encodes the text description in the image group after word addition to obtain the text feature T of the clothing image. A , the text feature T of the human image B and the text features of human fitting images T C ; For the image feature F A With the text feature T A Perform splicing operation and transform the image feature F B With the text feature T B Perform splicing operations to obtain the fused clothing image and text features A And the fused human body image and text features B , the Feature A and Feature B The expressions include: Feature A =[F A :T A ] Feature B =[F B :T B ] In the formula, […:…] represents the concatenation operation.

4. The virtual try-on method with adaptive multi-modal fusion and dynamic feature enhancement according to claim 3 is characterized in that: When the image group processed with added words is used to train the virtual try-on model for generating the virtual try-on prediction image, the step of the multimodal feature dynamic fusion module outputting the weighted image and text features includes: The multimodal feature dynamic fusion module receives the fused clothing graphic feature Feature A , the fused human body image and text features B , noise image feature F N and the text features of human fitting images T C After the input unit horizontally splices the input features, the cross attention unit uses the attention mechanism to make each mode in the horizontally spliced ​​input features interact with other modes in a weighted manner to obtain the interactively processed feature Feature fused ; The interactively processed feature Feature fused The expressions include: Feature fused =CrossAttention(Feature A ,Feature B ,Feature C ) In the formula, CrossAttention(·) means using the attention mechanism for interactive processing; The interactively processed feature Feature fused Input the weight prediction unit, and the weight prediction unit outputs feature Feature fused The weight W of each mode in selected , based on the weight W selected , for feature fused Perform weighted processing and output weighted image and text features Feature weighted ; The weighted image and text feature Feature weighted The expressions include: Feature weighted =Softmax(W selected )·Feature fused W selected =AdjustWeights(Feature fused ) Where Softmax(·) represents the normalized exponential function, and AdjustWeights(·) represents the weight prediction operation of the weight prediction unit.

5. The virtual try-on method with adaptive multi-modal fusion and dynamic feature enhancement according to claim 2, characterized in that: When the virtual try-on model for generating a virtual try-on prediction image is trained by using the word-added image group, the step of converting the output features of the multimodal feature dynamic fusion module into a virtual try-on prediction image by the try-on image generation module comprises: The trial image generation module uses the encoder of the UNet_b model to process the weighted image and text features. weighted Encode and obtain the encoded feature F encoder , and use the decoder of the UNet_b model to decode the feature F encoder Perform denoising and output the virtual try-on prediction image I final ; The feature F encoder and virtual try-on prediction image I final The expressions include: F encoder =E(D) I t+1 =D t -N t N t =D t -P t (F encoder ) In the formula, E(·) represents the encoding operation using the encoder of the UNet_b model, D represents the feature map of the last input encoder, and the initial value of D is Feature weighted ;I t and I t+1 Denote the restored images at the t-th time step and the t+1-th time step, respectively, and D t represents the noise image at the tth time step, N t represents the noise predicted at the tth time step; P t represents the denoised prediction of the decoder at time step t.

6. The virtual try-on method with adaptive multi-modal fusion and dynamic feature enhancement according to claim 1, characterized in that: When using the word-added image group to train a virtual try-on model for generating a virtual try-on prediction image, a loss function Loss is introduced using the virtual try-on prediction image corresponding to the word-added image group, and the virtual try-on model is trained using the loss function Loss. During the training process, the loss function Loss is iteratively solved, and when the number of iterations reaches a preset value or the loss function value reaches a minimum value, the training is terminated to obtain a trained virtual try-on model; The expression of the loss function includes: Loss=W KL ·Loss KL +W SSIM ·Loss SSIM +W FID ·Loss FID Where W KL , W SSIM and W FID Respectively represent the loss function Loss KL 、Loss SSIM and Loss FID The weight of x represents the mean of the virtual try-on prediction image, μ y represents the mean of the real images and also represents the mean of the human body trying-on images in the image group, ||·|| 2 represents the square of the Euclidean distance, tr(·) represents the trace of the matrix, ∑ x and∑ y They represent the geometric mean of the covariance matrix of the virtual try-on prediction image and the real image, σ x and σ y denote the standard deviation of the virtual try-on prediction image and the real image, σ xy represents the covariance, C1 and C2 are constants; N represents the dimension of the virtual try-on prediction image and the real image, y i represents the value of the i-th dimension of the virtual try-on prediction image, x i Represents the value of the i-th dimension of the real image.

7. The virtual try-on method with adaptive multi-modal fusion and dynamic feature enhancement according to claim 1, characterized in that: When training a virtual try-on model for generating a virtual try-on prediction image using a word-added image group, a random zero strategy is adopted for text descriptions in the word-added image group, and the steps include: In each iteration of the virtual try-on model, a number of image groups that have been processed with word addition are randomly selected with a preset probability, and the text descriptions in the selected image groups are blanked using a blanking strategy; The emptying strategy includes: For each image group of the selected image groups, using a preset first blanking probability as the probability that the number of blanked text descriptions in the image group is 1, using a preset second blanking probability as the probability that the number of blanked text descriptions in the image group is 2, and using a preset third blanking probability as the probability that the number of blanked text descriptions in the image group is 3, blanking the text descriptions in the selected image group; The sum of the first vacancy probability, the second vacancy probability and the third vacancy probability is less than or equal to 1.

8. The virtual try-on method with adaptive multi-modal fusion and dynamic feature enhancement according to any one of claims 1 to 7, characterized in that: When the input data of the trained virtual fitting model are the image of the garment to be tried on and the image of the target human body, the trained virtual fitting model outputs a virtual fitting prediction image of the target human body wearing the garment to be tried on; When the input data of the trained virtual fitting model are an image of clothing to be tried on, an image of a target human body and prompt text for the human body, the trained virtual fitting model outputs a virtual fitting prediction image of the target human body wearing the clothing to be tried on after performing actions and / or adjusting angles using the prompt text; When the input data of the trained virtual try-on model are the clothing image to be tried on, the target human body image and the prompt text of the requirements for the output image, the trained virtual try-on model outputs the virtual try-on prediction image that meets the requirements of the prompt text; The prompt text of the requirement for the output image includes: modifying the background of the output image, the gender and action of the human body in the output image, and the style and / or color of the clothing in the output image.

9. The virtual try-on method with adaptive multi-modal fusion and dynamic feature enhancement according to any one of claims 1 to 7, characterized in that: Before generating a text description of each image in the image group using the multimodal large model, performing a data augmentation operation on the image group; The data enhancement operation steps include: human posture diversification enhancement and / or background diversification enhancement; The operation steps of the human body posture diversification enhancement include: The human body image and the human body fitting image are respectively converted into 3D human body models using a human body reconstruction implicit function, so as to obtain a 3D human body model A corresponding to the human body image and a 3D human body model B corresponding to the human body fitting image; Using three-dimensional animation software, the skeleton points of the 3D human body model A and the 3D human body model B are bound, and then by transforming the skeleton points, the 3D human body model A and the 3D human body model B corresponding to several human body movements are generated, and the images of the generated 3D human body model A and the 3D human body model B are collected by switching the perspective and taking screenshots; wherein the images of the 3D human body model A and the 3D human body model B with the same human body movement are divided into the same image group; The operation steps of background diversity enhancement include: Extracting the subject of the human body image, clothing image and human body fitting image by using the image segmentation model, the subject includes: human body and clothing; Collect background images; Random background replacement is performed on human images, clothing images, and human fitting images by randomly combining the collected background images with the extracted image subjects.

10. A virtual try-on system with adaptive multi-modal fusion and dynamic feature enhancement, used to implement the virtual try-on method with adaptive multi-modal fusion and dynamic feature enhancement as described in any one of claims 1 to 9, characterized in that: include: An image acquisition module is used to acquire a plurality of image groups, wherein each image group includes: a human body image, a clothing image, and a human body trying-on image of a human body wearing corresponding clothing; A text description generation module, used to generate a text description of each image in the image group using the multimodal large model; A word adding module is used for masking the area of ​​the human body image that should be covered by the clothing corresponding to the clothing image for each image group to obtain a masked image group, and adding a corresponding text description to each image in the masked image group to obtain a word adding image group; A training module, used for training a virtual try-on model for generating a virtual try-on prediction image using the image group processed with added words, to obtain a trained virtual try-on model; The virtual try-on prediction image generation module is used to input the clothing image to be tried on, the target human body image and / or the prompt text into the trained virtual try-on model. The virtual try-on model extracts and fuses the input data and converts it into a virtual try-on prediction image output.

Citation Information

Cited By

  • Virtual model clothing display image intelligent generation method and device based on diffusion model

    CN119131212A

  • Customized concept replacement method based on stable diffusion and fractional distillation

    CN119358065A

  • A Customized Conceptual Replacement Method Based on Stable Diffusion and Fractional Distillation

    CN119358065B

  • Virtual fitting method and device

    CN119444349A

  • A virtual fitting method and device

    CN119444349B