Comprehensive virtual try-on method, system and medium based on cyclic three-level transformation

By combining the cyclic three-level transformation and the moving least squares method, the problem of difficulty in maintaining the shape and texture of non-standard clothing during virtual try-on is solved, and a higher-quality virtual dressing effect is achieved.

CN114820294BActive Publication Date: 2024-08-27PIXEL STEP (HANGZHOU) TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210568501.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-23
Publication Date
2024-08-27
Estimated Expiration
2042-05-23

AI Technical Summary

Technical Problem

Existing virtual try-on technology is difficult to accurately handle non-standard clothing, such as off-shoulder clothing and one-shoulder clothing, resulting in poor shape and texture retention of clothing during virtual try-on, which limits the industrial application of virtual clothing-changing neural networks.

Method used

A method based on cyclic three-level transformation is used to find the correspondence between clothing and human posture through a semantic generation algorithm, and the moving least squares method and similarity preservation constraints are combined to deform the clothing to generate a higher quality try-on effect.

Benefits of technology

It achieves refined virtual dressing of non-standard clothing, maintains the actual shape and texture of the clothing, and solves the problems of excessive clothing distortion and difficulty in maintaining texture in existing methods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114820294B
    Figure CN114820294B
Patent Text Reader

Abstract

The present invention discloses a comprehensive virtual try-on method, system and medium based on cyclic three-level transformation, the method comprising the following steps: based on the representation of clothing, human posture and human semantics, a semantic generation algorithm combined with cyclic three-level transformation is used to generate try-on semantic layout information; according to the semantic layout information, an image deformation method based on moving least squares method and similarity preservation constraint is used to deform the target clothing to transfer texture; according to the try-on semantic layout information and the deformed clothing image, a person wearing the clothing is generated. Compared with the prior art, the present invention can achieve higher quality clothing deformation to achieve refined virtual dressing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of virtual try-on, and in particular to an all-round virtual try-on method, system and medium based on cyclic three-level transformation. Background Art

[0002] In recent years, with the rapid development of Internet technology, data collection methods have become more diverse and simplified, making it possible to implement many computer vision-related models that need to be trained based on large amounts of image data. As the commercial potential of computer vision continues to be explored, how to design a model that can be implemented for virtual try-on has become a big challenge, and it has also received more and more attention because of its huge commercial potential and application prospects.

[0003] On the one hand, virtual dressing itself requires the generation of realistic characters in specified clothing images, given target clothing, and reference character images. Although many algorithms have been proposed to build virtual try-on generation models, it is still challenging to try on different types of clothing in real-world scenarios. Standard clothing such as T-shirts and long-sleeved jackets have a clear relationship with the reference person, while non-standard clothing may involve irregular patterns and designs, resulting in a more ambiguous correspondence. Two typical non-standard types are off-shoulder tops (normal collar and off-shoulder) and one-shoulder tops (horizontal collar line facing the shoulder). Currently, almost no one has reported the results and solutions for these non-standard clothing. ACGPN is one of the earliest batches that improves the try-on effect by introducing a post-try-on human semantic map. However, when the clothing flattening map is non-standard clothing, the clothing part of the pre-test-on human semantic map is incorrect and the original semantic shape of the clothing cannot be maintained.

[0004] On the other hand, early works utilized coarse shape and pose graphs to synthesize try-on results. Pioneering methods first predict semantic layouts with target garment images and then improve blurring artifacts caused by coarse shapes through regularized thin plate spline algorithms, resulting in better results with sharper boundaries. However, these methods still struggle to accurately depict the semantics of “after try-on”, where features are also limited to standard garments. Another obstacle that prevents full-scale virtual try-on is the misalignment of garment images with reference people. Thin plate spline algorithms are a common practice to spatially transform garment images while preserving features. However, excessive distortion of garment images hinders thin plate spline-based methods, prompting a growing preference for affine-based algorithms. Compared with thin plate spline algorithms, affine-based methods show great potential in generating undistorted results, but do not involve the non-rigid part of the deformation, which cannot simulate the natural interaction between clothes and people. Flow-based methods embed maximum capacity into deformation modeling to densely predict pixel-level offset fields. However, without true flow, optimized flow networks such as in PF-AFN can only be implemented with strong regularization priors, such as affine priors, total variance constraints, or second-order Laplace penalties, otherwise excessive deformation will occur.

[0005] The above-mentioned problems seriously limit the industrialization and commercial application of virtual clothing-changing neural networks. Summary of the invention

[0006] The main purpose of the present invention is to provide a comprehensive virtual try-on method, system and medium based on cyclic three-level transformation, aiming to achieve higher quality clothing deformation to realize refined virtual dressing.

[0007] To achieve the above object, the present invention provides an all-round virtual try-on method based on cyclic three-level transformation, the method comprising the following steps:

[0008] Based on the representation of clothing, human posture and human semantics, a semantic generation algorithm combining cyclic three-level transformation is used to generate the semantic layout information of the try-on.

[0009] According to the semantic layout information, a moving least squares-based image deformation method and a similarity-preserving constraint are used to deform the target garment to transfer the texture;

[0010] A person wearing the clothing is generated according to the try-on semantic layout information and the deformed clothing image.

[0011] A further technical solution of the present invention is that the step of generating the fitting semantic layout information based on the representation of clothing, human body posture and human body semantics and combining the semantic generation algorithm of cyclic three-level transformation comprises:

[0012] Based on the representation of clothing, human posture and human semantics, a semantic generation algorithm based on cyclic three-level transformation is used to find the clothing and posture Figure 2 The corresponding relationship between them;

[0013] According to the clothing and posture Figure 2 The correspondence between them generates the try-on semantic layout information.

[0014] A further technical solution of the present invention is that the representation based on clothing, human posture and human semantics is combined with a semantic generation algorithm of cyclic three-level transformation to find out clothing and posture Figure 2 The steps to establish the correspondence between the two parties include:

[0015] Set the initial human semantic map to Clothes picture set to The posture graph is represented as Human body semantic map at the tth layer And clothes picture is the posture graph of the tth layer. Attention mask update in , where a sigmoid gated convolution is applied:

[0016]

[0017] Among them, conv S→C and conv S→P refers to the convolutional layer, σ is the activation function;

[0018] Find out and The corresponding relationship.

[0019] A further technical solution of the present invention is that the clothing and posture Figure 2 The steps of generating the try-on semantic layout information based on the correspondence between the two include:

[0020] Will and Flatten into and is the human posture graph at the tth layer Rearrange to R HW×C The symbol for It is the clothes picture of the tth layer Rearrange to R HW×C The symbol for R HW×C represents a real matrix with a length of H×W and a width of C, that is, the dimension is [H×W, C], the correlation matrix Computed from pairs of features:

[0021]

[0022] in, refers to Features, It refers to the correspondence similarity;

[0023] Then use the nonlocal correspondence matrix from Clothes vector flattened

[0024]

[0025] Among them, α is the sharpening parameter, It is expanded using a sliding window, softmax v It is the softmax operation of the row dimension operation;

[0026] Then re-flatten the clothes vector becomes

[0027] Use the calculated attention mask and Clothes and poses were updated to:

[0028]

[0029] Among them, ⊙ refers to the Hadamard product;

[0030] High-level features are then extracted to calculate the correlation matrix Get the converted clothing code Encoding the semantics of the human body Updated as follows:

[0031]

[0032] Among them, γ(·), β(·) represent the conditional scale and offset parameter calculation, following the spatial feature transform SFT.

[0033] A further technical solution of the present invention is that the step of deforming the target clothing to transfer texture by using an image deformation method based on a moving least squares method and a similarity preservation constraint according to the semantic layout information comprises:

[0034] Define the uniformly sampled initial control point as q and the predicted target point as q′. Given a point v in the image, apply the attenuation weights to calculate different affine transformations for each point v:

[0035]

[0036] Among them, α is the attenuation parameter with a default value of 1, and i represents the i-th point.

[0037] A further technical solution of the present invention is that, in the step of deforming the target clothing to transfer texture by using the image deformation method based on the moving least squares method and the similarity preservation constraint according to the semantic layout information, a similarity preservation constraint is imposed, and the similarity preservation constraint is calculated in each quadrilateral of the predicted target point q′, and the deformed triangle {q′ 0 , q′ 1 , q′ 2} to force a similarity transformation on each triangle.

[0038] A further technical solution of the present invention is that the similarity preservation constraint is calculated in each quadrilateral of the predicted target point q′, by penalizing the deformed triangle {q′ 0 , q′ 1 , q′ 2 The steps to force each triangle to undergo a similarity transformation include:

[0039] Define relative coordinates q 1 {x 01 ,0},q 2 {0,y 02}, where x 01 ,y 02 is the fixed interval of uniformly sampled control points, q 2 By q 0 and q 1 Defined as:

[0040]

[0041] Among them, R 90 Indicates a 90 degree counterclockwise rotation, given q′ 0 and q′ 1 Calculate q′ using the following formula 2 Expected location:

[0042]

[0043] The regularization term used is then calculated using the following formula:

[0044]

[0045] in refers to q′ 2 The error term of

[0046] Similarly, the same mechanism is applied to q′ of another triangle in the same quadrilateral 1 :

[0047]

[0048] The error of each quadrilateral is added to form the final regularization loss. During training, the real clothing image c after trying on is obtained based on the real image image and the real semantic image after trying on. gt , calculate the deformed clothing c warp and c gt The L1 loss between them; then the original clothing image c and the real clothing image c after trying on are gt The features are extracted through the vgg19 network to obtain c feature and c gt-feature , and then transform c through the matrix grid predicted during deformation feature Transform; transform the transformed image and c gt-feature The pixel-by-pixel difference is calculated as the perceptual loss.

[0049] A further technical solution of the present invention is that the step of generating a person wearing clothing according to the fitting semantic layout information and the deformed clothing image comprises:

[0050] Generate triples {I′ S , C R , α}, where I′ S is the generated body part, C R is the deformed clothes used for auxiliary supervision, α is the synthesis mask, and the generated image is combined with the deformed clothes C W synthesis:

[0051] I S =α⊙I′ S +(1-α)⊙C W ,

[0052] Among them, ⊙ represents element-by-element multiplication, I S is the final generated result;

[0053] During the test, the semantic layout of the person and the predicted semantic layout are used to transform the remaining body I R Input to the trial fusion module to retain the unchanged skin pixels, defined as follows:

[0054] I R =I⊙M skin ⊙M′ skin ,

[0055] Among them, I is the input reference person, M skin is the skin area of ​​the reference person, M′ skin is the skin region for predicting semantic layout.

[0056] To achieve the above objectives, the present invention also proposes an all-round virtual try-on system based on cyclic three-level transformation, the system comprising a memory, a processor, and an all-round virtual try-on program based on cyclic three-level transformation stored on the processor, the all-round virtual try-on program based on cyclic three-level transformation executing the steps of the method described above when run by the processor.

[0057] To achieve the above objectives, the present invention also proposes a computer-readable storage medium, which stores a full-range virtual try-on program based on a cyclic three-level transformation, and the full-range virtual try-on program based on a cyclic three-level transformation executes the steps of the method described above when executed by a processor.

[0058] The beneficial effects of the omnidirectional virtual try-on method, system and medium based on cyclic three-level transformation of the present invention are:

[0059] 1. The present invention adopts a new semantic generation algorithm, which can fully generate the semantic information of "after trying on", solving the problem that the virtual try-on algorithm before simulation is only applicable to standard clothes without complex lace or tearing effects, and cannot be extended to non-standard clothes (off-shoulder shirts) with complex patterns and a wide variety.

[0060] 2. The present invention adopts an algorithm based on moving least squares and similarity-preserving constraints, which maintains the similarity of local warping, reduces distortion and occurrence, and solves the problem that the existing methods often produce excessive distortion of clothes.

[0061] 3. The present invention proposes a try-on synthesis algorithm that integrates semantic segmentation, distorted clothing and non-target body images to synthesize output, where the auxiliary clothing reconstruction loss solves the problem that current methods cannot maintain texture. BRIEF DESCRIPTION OF THE DRAWINGS

[0062] Figure 1 It is a flow chart of a preferred embodiment of the omnidirectional virtual try-on method based on cyclic three-level transformation of the present invention;

[0063] Figure 2 It is a schematic diagram of hardware modules involved in the all-round virtual try-on method based on cyclic three-level transformation of the present invention;

[0064] Figure 3 It is a schematic diagram of the overall process of the omnidirectional virtual try-on method based on cyclic three-level transformation of the present invention;

[0065] Figure 4 It is a schematic diagram comparing the three-level transform with the ordinary encoder-decoder and Unet structure;

[0066] Figure 5 is a schematic diagram for calculating ASAP normalization.

[0067] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0068] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.

[0069] The existing virtual try-on methods mainly focus on changing clothes for standard styles, and the changing effect is poor for off-shoulder, one-shoulder, and clothes with complex shapes. Therefore, the present invention proposes a comprehensive virtual try-on method based on cyclic three-level transformation, which can well retain the actual shape of the clothes to achieve a real changing effect. Through the image deformation method, the balance between flexibility and stability can be found to achieve higher-quality clothing deformation and realize refined virtual changing. .

[0070] Specifically, Figure 1 As shown, a preferred embodiment of the omnidirectional virtual try-on method based on cyclic three-level transformation of the present invention includes the following steps:

[0071] Step S10, based on the representation of clothing, human body posture and human body semantics, a semantic generation algorithm combining cyclic three-level transformation is used to generate fitting semantic layout information.

[0072] The existing technology mainly focuses on the virtual try-on of standard clothing such as T-shirts and long-sleeved jackets, but almost does not involve the try-on of non-standard clothing with irregular patterns and designs. This embodiment adopts a semantic generation algorithm based on cyclic three-level transformation, which can generate a better semantic layout of clothes worn on a model and improve the realism of dressing.

[0073] Specifically, the step S10, based on the representation of clothing, human body posture and human body semantics, generates the fitting semantic layout information in combination with the semantic generation algorithm of cyclic three-level transformation, including:

[0074] Step S101, based on the representation of clothing, human posture and human semantics, combined with the semantic generation algorithm of cyclic three-level transformation, find out clothing and posture Figure 2 The corresponding relationship between them.

[0075] Step S101 specifically includes:

[0076] Set the initial human semantic map to Clothes picture set to The posture graph is represented as Human body semantic map at the tth layer And clothes picture is the posture graph of the tth layer. Attention mask update in , where a sigmoid gated convolution is applied:

[0077]

[0078] Among them, conv S→C and conv S→P refers to the convolutional layer, σ is the activation function;

[0079] Find out and The corresponding relationship.

[0080] Step S102, according to the clothing and posture Figure 2 The correspondence between them generates the try-on semantic layout information.

[0081] In this embodiment, step S102 specifically includes:

[0082] Will and Flatten into and is the human posture graph at the tth layer Rearrange to R HW×C The symbol for It is the clothes picture of the tth layer Rearrange to R HW×C The symbol for R HW×C represents a real matrix with a length of H×W and a width of C, that is, the dimension is [H×W, C], the correlation matrix Computed from pairs of features:

[0083]

[0084] in, refers to Features, Refers to the corresponding similarity.

[0085] Then use the nonlocal correspondence matrix from Flattened clothes vector

[0086]

[0087] Among them, α is the sharpening parameter, It is expanded using a sliding window, softmax v It is a softmax operation in row dimension.

[0088] Then re-flatten the clothes vector becomes

[0089] Use the calculated attention mask and Clothes and poses were updated to:

[0090]

[0091] Here, ⊙ refers to the Hadamard product.

[0092] High-level features are then extracted to calculate the correlation matrix Get the converted clothing code Encoding the semantics of the human body Updated as follows:

[0093]

[0094] Among them, γ(·), β(·) represent the conditional scale and offset parameter calculation, following the spatial feature transform SFT.

[0095] Step S20: deforming the target clothing to transfer texture by using an image deformation method based on moving least squares method and similarity preservation constraint according to the semantic layout information.

[0096] The prior art cannot balance the flexibility of spatial transformation and the rigidity of affine transformation, which can easily lead to distortion of clothing images. This embodiment adopts an image deformation method based on moving least squares method and similarity preservation constraints to flexibly and stably deform the target clothing, thereby obtaining better clothing feature preservation results.

[0097] In this embodiment, step S20 specifically includes:

[0098] Define the uniformly sampled initial control point as q and the predicted target point as q′. Given a point v in the image, apply the attenuation weights to calculate different affine transformations for each point v:

[0099]

[0100] Among them, α is the attenuation parameter with a default value of 1, and i represents the i-th point.

[0101] Step S30, generating a person wearing the clothing according to the try-on semantic layout information and the deformed clothing image.

[0102] In this embodiment, a similarity preservation constraint is imposed in step S30. The similarity preservation constraint is calculated in each quadrilateral of the predicted target point q′, and the deformed triangle {q′ 0 , q′ 1 , q′ 2} to force a similarity transformation on each triangle.

[0103] Specifically, the similarity preservation constraint is calculated within each quadrilateral of the predicted target point q′, by penalizing the deformed triangle {q′ 0 , q′ 1 , q′ 2 The steps to force each triangle to undergo a similarity transformation include:

[0104] Define relative coordinates q 1 {x 01 ,0},q 2 {0,y 02}, where x 01 ,y 02 is the fixed interval of uniformly sampled control points, q 2 By q 0 and q 1 Defined as:

[0105]

[0106] Among them, R 90 Indicates a 90 degree counterclockwise rotation, given q′ 0 and q′ 1 Calculate q′ using the following formula 2 Expected location:

[0107]

[0108] The regularization term used is then calculated using the following formula:

[0109]

[0110] in refers to q′ 2 The error term of .

[0111] Similarly, the same mechanism is applied to q′ of another triangle in the same quadrilateral 1 :

[0112]

[0113] The error of each quadrilateral is added to form the final regularization loss. During training, the real clothing image c after trying on is obtained based on the real image image and the real semantic image after trying on. gt , calculate the deformed clothing c warp and c gt The L1 loss between them; then the original clothing image c and the real clothing image c after trying on are gt The features are extracted through the vgg19 network to obtain c feature and c gt-feature , and then transform c through the matrix grid predicted during deformation featureTransform; transform the transformed image and c gt-feature The pixel-by-pixel difference is calculated as the perceptual loss.

[0114] In this embodiment, the step of generating a person wearing clothing according to the try-on semantic layout information and the deformed clothing image includes:

[0115] Generate triples {I′ S , C R , α}, where I′ S is the generated body part, C R is the deformed clothes used for auxiliary supervision, α is the synthesis mask, and the generated image is combined with the deformed clothes C W synthesis:

[0116] I S =α⊙I′ S +(1-α)⊙C W ,

[0117] Among them, ⊙ represents element-by-element multiplication, I S is the final generated result.

[0118] During the test, the semantic layout of the person and the predicted semantic layout are used to transform the remaining body I R Input to the trial fusion module to retain the unchanged skin pixels, defined as follows:

[0119] I R =I⊙M skin ⊙M′ skin ,

[0120] Among them, I is the input reference person, M skin is the skin area of ​​the reference person, M′ skin is the skin region for predicting semantic layout.

[0121] The following combination Figures 2 to 5 The omnidirectional virtual try-on method based on cyclic three-level transformation of the present invention is further produced in detail.

[0122] The omnidirectional virtual try-on method based on cyclic three-level transformation of the present invention can perform omnidirectional virtual try-on of standard and non-standard clothing. The specific invention points include the following two points:

[0123] 1. A semantic generation algorithm based on cyclic three-level transformation is proposed to deeply explore the semantic information of "after trying on" and perform progressive feature transformation on three different levels of clothing representation, namely clothing, posture and human semantics, thereby greatly improving the quality of trying on and adaptability to a full range of clothing types, especially non-standard clothing. Compared with the previous direct generation of semantic layout based on clothing images and posture graphs, the cyclic three-level transformation can first find the connection between clothing and posture graphs, and then predict the semantic layout. This two-stage prediction method allows the network to predict the semantic layout of non-standard clothing after trying on more realistically and accurately.

[0124] 2. A clothing deformation algorithm based on moving least squares is proposed. This semi-rigid deformation method is used to align clothing images with predicted semantics, thereby maintaining local warping similarity. Compared with the previous thin plate spline-based algorithm, it avoids excessive distortion of clothing while designing the rigid part of the deformation, which can well simulate the natural interaction between clothing and people.

[0125] In the omnidirectional virtual try-on method based on cyclic three-level transformation of the present invention, the above steps S10 to S30 can be respectively performed as follows: Figure 2 It is executed by three technical modules: semantic generation module, clothing deformation module and content fusion module.

[0126] When doing a virtual dress-up, the semantic graph after the try-on is first predicted, and the cyclic three-level transformation network proposed in the present invention is used to perform semantic prediction after the try-on;

[0127] When there are predicted clothing regions and clothing tiled images, the clothing deformation algorithm of the present invention is used to deform a tiled clothing image into the specified clothing region.

[0128] 1. Recurrent Tri-Level Transform:

[0129] Previous works such as CP-VITON and VTION use rough body shapes as input instead of semantic segmentation, losing the grasp of fine details of clothing and non-clothing areas. ACGPN proposes a human body semantics-based method to generate realistic results, but it cannot stabilize the semantic prediction process. In addition, due to the misalignment of clothing images, it is still a big challenge to accurately maintain the shape of clothing after trying on.

[0130] In order to solve the above problems, the present invention proposes a cyclic three-level transformation based on the representation of clothing, human posture and human semantics. Inspired by the real dressing process of humans, first find out the clothing and posture Figure 2This breaks the direct learning of the semantic conversion process conditioned on clothing images and human posture graphs, making it possible to accurately predict the semantic layout of non-standard clothing.

[0131] like Figure 3 As shown, the algorithm of the present invention combines the local gated attention mechanism and gradually refines the three-level features through global correspondence learning, which enables us to accurately generate semantic layout.

[0132] The detailed process is as follows:

[0133] The present invention uses a local gated attention mechanism to filter out irrelevant features to achieve a self-correction process.

[0134] The initial human semantic map is set as Clothes pictured and the posture graph is represented as Human body semantic map at the tth layer And clothes picture is the posture graph of the tth layer. The attention mask in is updated. The widely used sigmoid gated convolution is applied here as follows:

[0135]

[0136] where conv S→C and conv S→P refers to the convolutional layer, and σ is the activation function. Then, the present invention attempts to find and The corresponding relationship between . The convolution layer is used to and Downsampling is performed to extract more semantic features. Then and Flatten into (Posture) and (clothing),( is the human body posture graph of the tth layer Rearrange to R HW×C The symbol for ; is the clothes picture of the tth layer Rearrange to R HW×C The symbol for HW×C represents a real matrix with a length of H×W and a width of C, that is, the dimension is [H×W, C]); and the correlation matrix Computed from pairs of features:

[0137]

[0138] in refers to characteristics. Refers to the correspondence similarity. Then use the non-local correspondence matrix from Flattened clothes vector

[0139]

[0140] Where α is the sharpening parameter. It is expanded using a sliding window, softmax v It is a softmax operation on the row dimension, and then we re-flatten the clothes vector Became

[0141] Use the calculated attention mask and Clothes and poses were updated to:

[0142]

[0143] Where ⊙ refers to the Hadamard product, which is an entry-wise multiplication, and then extracts high-level features to calculate the correlation matrix And get the converted clothing code through the formula Encoding the semantics of the human body Updated as follows:

[0144]

[0145] Among them, γ(·) and β(·) represent the conditional scale and offset parameter calculation, following the spatial feature transformation (SFT). Therefore, the human body semantic encoding does not directly depend on clothing features, but is derived from the clothing encoding of spatial transformation. This effectively bridges the misalignment between the target clothing and the reference model. A reconstruction loss is added to help correspondence learning by warping the downsampled clothing images, where the clothing on the reference person is used as the ground truth. Figure 4 We show that non-local correspondence learning helps the network understand the “after-try-on” semantics.

[0146] 2. Clothes Warping Module

[0147] Given the semantic layout of the “after-try-on” body, clothing images can be deformed to transfer texture. However, previous attempts to combine the flexibility of thin plate spline algorithms with the rigidity of affine transformations by training spatial transformer networks have failed to find this trade-off.

[0148] To solve this problem, we propose a semi-rigid transformation that models the deformation of clothing as a learnable moving least squares problem to balance flexibility and rigidity. The influence of the control points decays quadratically with the distance, thus allowing local flexibility when calculating the individual affine transformation parameters for each point. We define the uniformly sampled initial control points as q and the predicted target points as q′. Given a point v in an image, we calculate different affine transformations for each v by applying decay weights:

[0149]

[0150] Where α is an attenuation parameter with a default value of 1, and i represents the i-th point. By solving the weighted least squares problem, the present invention can perform a semi-rigid deformation on the target clothing image according to the predicted control point q′. By applying the spatial attenuation weight, the advantages of the affine transformation are fully utilized while allowing local flexibility.

[0151] The present invention imposes an As-Similarity-As-Possible (ASAP) constraint, which is calculated in each quadrilateral where the predicted control point q′ is calculated. Each quadrilateral is divided into two triangles. Figure 5 As shown, the ASAP constraint penalizes the deformed triangle {q′ 0 , q′ 1 , q′ 2} to force each triangle to undergo similar transformation. The present invention defines the relative coordinate q 1 {x 01 ,0},q 2 {0,y 02}, where x 01 ,y 02 is a fixed interval of uniformly sampled control points, so q 2 Can be obtained by 0 and q 1 Defined as:

[0152]

[0153] Where R 90 Indicates a 90 degree counterclockwise rotation, given q′ 0 and q′ 1 , the present invention can calculate q′ according to the following formula 2 Expected location:

[0154]

[0155] Then the regularization term used can be calculated according to the following formula:

[0156]

[0157] in refers to q′ 2 Similarly, the present invention can apply the same mechanism to q′ of another triangle in the same quadrilateral. 1 :

[0158]

[0159] The error of each quadrilateral is added to form the final regularization loss. During training, the real clothing image c after trying on is obtained based on the real image image and the real semantic image after trying on. gt , calculate the deformed clothing c warp and c gt The L1 loss between them; then the original clothing image c and the real clothing image c after trying on are gt The features are extracted through the vgg19 network to obtain c feature and c gt-feature , and then transform c through the matrix grid predicted during deformation feature Transform; transform the transformed image and c gt-feature The pixel-by-pixel difference is calculated as the perceptual loss. So far, L1 loss and perceptual loss are used to guide image deformation, which is regularized by the ASAP constraint.

[0160] 3. Try-on Synthesizer

[0161] Given the predicted semantic layout of the human body and the deformed clothing image, the proposed try-on fusion module generates a person wearing clothing using the above input. The present invention adopts a similar adaptive generation and preservation strategy to preserve non-target body parts while generating exposed body textures. In order to encourage the network to preserve the distorted clothing texture, the deformed clothing input is reconstructed at the same time, which helps the network retain the original features.

[0162] In order to make the network have both the ability to generate and preserve clothing textures, the network is able to learn to generate missing skin by randomly removing body parts. During training, the trial fusion module of the present invention finally generates a triple {I′ S , C R , α}, where I′ S is the generated body part, C R is the deformed clothes used for auxiliary supervision, α is the synthesis mask used to combine the generated image with the deformed clothes C W synthesis:

[0163] I S =α⊙I′ S +(1-α)⊙C W

[0164] Where ⊙ represents element-by-element multiplication, I S is the final generated result. L1 loss, perceptual loss and adversarial loss are used in the generation of clothing body and clothing. During the test, the semantic layout of the person and the predicted semantic layout can be used to transform the remaining body I R Input to the trial fusion module to retain the unchanged skin pixels, defined as follows:

[0165] I R =I⊙M skin ⊙M′ skin

[0166] Where I is the input reference person, M skin is the skin area of ​​the reference person, M′ skin is the skin region for predicting semantic layout.

[0167] The beneficial effects of the omnidirectional virtual try-on method based on cyclic three-level transformation of the present invention are:

[0168] 1. The present invention adopts a new semantic generation algorithm, which can fully generate the semantic information of "after trying on", solving the problem that the virtual try-on algorithm before simulation is only applicable to standard clothes without complex lace or tearing effects, and cannot be extended to non-standard clothes (off-shoulder shirts) with complex patterns and a wide variety.

[0169] 2. The present invention adopts an algorithm based on moving least squares and similarity-preserving constraints, which maintains the similarity of local warping, reduces distortion and occurrence, and solves the problem that the existing methods often produce excessive distortion of clothes.

[0170] 3. The present invention proposes a try-on synthesis algorithm that integrates semantic segmentation, distorted clothing and non-target body images to synthesize output, where the auxiliary clothing reconstruction loss solves the problem that current methods cannot maintain texture.

[0171] To achieve the above-mentioned purpose, the present invention also proposes an all-round virtual try-on system based on cyclic three-level transformation, the system comprising a memory, a processor, and an all-round virtual try-on program based on cyclic three-level transformation stored on the processor, the all-round virtual try-on program based on cyclic three-level transformation being executed by the processor to perform the steps of the method described in the above embodiment when it is run, which will not be repeated here.

[0172] To achieve the above-mentioned purpose, the present invention also proposes a computer-readable storage medium, which stores a full-range virtual try-on program based on a cyclic three-level transformation. When the full-range virtual try-on program based on a cyclic three-level transformation is executed by a processor, the steps of the method described in the above embodiment are executed, which will not be repeated here.

[0173] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A omnidirectional virtual try-on method based on cyclic three-level transformation, characterized in that: The method comprises the following steps: Based on the representation of clothing, human posture and human semantics, a semantic generation algorithm combining cyclic three-level transformation is used to generate the semantic layout information of the try-on. According to the semantic layout information, a moving least squares-based image deformation method and a similarity-preserving constraint are used to deform the target garment to transfer the texture; Generate a person wearing the clothing according to the try-on semantic layout information and the deformed clothing image; The step of generating the fitting semantic layout information based on the representation of clothing, human body posture and human body semantics and combining the semantic generation algorithm of cyclic three-level transformation comprises: Based on the representation of clothing, human posture and human semantics, combined with the semantic generation algorithm of cyclic three-level transformation, the corresponding relationship between clothing and posture graph is found; Generate fitting semantic layout information according to the corresponding relationship between the garment and the posture graph; The step of finding the corresponding relationship between clothing and posture graph based on the representation of clothing, human posture and human semantics and combining the semantic generation algorithm of cyclic three-level transformation includes: Set the initial human semantic map to Clothes picture set to The posture graph is represented as Human body semantic map at the tth layer And clothes picture is the posture graph of the tth layer. Attention mask update in , where a sigmoid gated convolution is applied: Among them, conv S→C and conv S→P refers to the convolutional layer, σ is the activation function; Find out and The corresponding relationship; The step of generating the try-on semantic layout information according to the correspondence between the clothing and the posture graph comprises: Will and Flatten into and is the human posture graph at the tth layer Rearrange to R HW×C The symbol for It is the clothes picture of the tth layer Rearrange to R HW×C The symbol for R HW×C represents a real matrix with a length of H×W and a width of C, that is, the dimension is [H×W, C], the correlation matrix Computed from pairs of features: in, refers to Features, It refers to the correspondence similarity; Then use the nonlocal correspondence matrix from Clothes vector flattened Among them, a is the sharpening parameter, It is expanded using a sliding window, softmax v It is the softmax operation of row dimension operation; Then re-flatten the clothes vector becomes Use the calculated attention mask and Clothes and poses were updated to: Among them, ⊙ refers to the Hadamard product; High-level features are then extracted to calculate the correlation matrix Get the converted clothing code Encoding the semantics of the human body Updated as follows: Among them, γ(·), β(·) represent the conditional scale and offset parameter calculation, following the spatial feature transform SFT.

2. The omnidirectional virtual try-on method based on cyclic three-level transformation according to claim 1 is characterized in that: The step of deforming the target clothing to transfer texture by using an image deformation method based on a moving least squares method and a similarity preservation constraint according to the semantic layout information comprises: Define the uniformly sampled initial control point as q and the predicted target point as q′. Given a point v in the image, apply the attenuation weights to calculate different affine transformations for each point v: Among them, a is the attenuation parameter with a default value of 1, and i represents the i-th point.

3. The omnidirectional virtual try-on method based on cyclic three-level transformation according to claim 2 is characterized in that: In the step of deforming the target clothing to transfer texture by using an image deformation method based on moving least squares and a similarity preservation constraint according to the semantic layout information, a similarity preservation constraint is imposed. The similarity preservation constraint is calculated within each quadrilateral of the predicted target point q′, and each triangle is forced to undergo a similarity transformation by penalizing the deformed triangles {q′0, q′1, q′2}.

4. The omnidirectional virtual try-on method based on cyclic three-level transformation according to claim 3 is characterized in that: The similarity preservation constraint is calculated in each quadrilateral of the predicted target point q′, and the steps of forcing each triangle to undergo a similarity transformation by penalizing the deformed triangle {q′0, q′1, q′2} include: Define the relative coordinates q1{x 01 ,0},q2{0,y 02 }, where x 01 ,y 02 is a fixed interval of uniformly sampled control points, and q2 is defined by q0 and q1 as: Among them, R 90 It means rotating 90 degrees counterclockwise. Given q′0 and q′1, the expected position of q′2 is calculated according to the following formula: The regularization term used is then calculated using the following formula: Where E {q′2} refers to the error term of q′2; Similarly, the same mechanism is applied to q′1 of another triangle in the same quadrilateral: The error of each quadrilateral is added to form the final regularization loss. During training, the real clothing image c after trying on is obtained based on the real image image and the real semantic image after trying on. gt , calculate the deformed clothing c warp and c gt The L1 loss between them; then the original clothing image c and the real clothing image c after trying on are gt The features are extracted through the vgg19 network to obtain c feature and c gt-feature , and then transform c through the matrix grid predicted during deformation feature Transform; transform the transformed image and c gt-feature The pixel-by-pixel difference is calculated as the perceptual loss.

5. The omnidirectional virtual try-on method based on cyclic three-level transformation according to claim 4 is characterized in that: The step of generating a person wearing clothing according to the fitting semantic layout information and the deformed clothing image comprises: Generate triples {I′ S , C R , α}, where I′ S is the generated body part, C R is the deformed clothes used for auxiliary supervision, a is the synthesis mask, and the generated image is combined with the deformed clothes C W synthesis: I s =α⊙I′ s +(1-a)⊙C W , Among them, ⊙ represents element-by-element multiplication, I S is the final generated result; During the test, the semantic layout of the person and the predicted semantic layout are used to transform the remaining body I R Input to the trial fusion module to retain the unchanged skin pixels, defined as follows: I R =I⊙M skin ⊙M′ skin , Among them, I is the input reference person, M skin is the skin area of ​​the reference person, M′ skin is the skin region for predicting semantic layout.

6. A comprehensive virtual try-on system based on cyclic three-level transformation, characterized in that: The system includes a memory, a processor, and an all-round virtual try-on program based on cyclic three-level transformation stored on the processor. When the all-round virtual try-on program based on cyclic three-level transformation is executed by the processor, the steps of the method described in any one of claims 1 to 5 are executed.

7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores an all-round virtual try-on program based on cyclic three-level transformation, and the all-round virtual try-on program based on cyclic three-level transformation executes the steps of the method described in any one of claims 1 to 5 when executed by a processor.

Citation Information

Patent Citations

  • Semantic-based multi-posture virtual fitting method

    CN113361560A

  • Cloth Warping Using Multi-Scale Patch Adversarial Loss

    US20210133919A1