TailorNet: Predicting Clothing in 3D as a Function of Human Pose, Shape and Garment Style
Chaitanya Patel, Zhouyingcheng Liao, Gerard Pons-Moll
Introduction
Animating digital humans in clothing has numerous applications in 3D content production, games, entertainment and virtual try on. The predominant approach is still physics based simulation (PBS). However, the typical PBS pipeline requires editing the garment shape in 2D with patterns, manually placing it on the digital character and fine tuning parameters to achieve desired results, which is laborious, time consuming and requires expert knowledge. Moreover, high quality PBS methods are computationally expensive, complex to implement and to control, and are not trivially differentiable. For computer vision tasks, generative models of clothed humans need to be differentiable, easy to deploy, and should be easy to integrate within CNNs, and to fit them to image and video data.
In order to make animation easy, several works learn efficient approximate models from PBS complied off-line. At least three factors influence clothing deformation: body pose, shape and garment style (by style we mean the garment geometry). Existing methods either model deformation due to pose Aguiar10; lahner2018deepwrinkles for a fixed shape, shape and pose Casas19; Garnet19 for a fixed style, or style Mitra18 for a fixed pose. The aforementioned methods inspire our work; however, they do not model the effects of pose, shape and style jointly, even though they are intertwined. Different garments deform differently as a function of pose and shape, and garment specific models Casas19; lahner2018deepwrinkles; DRAPE12; Aguiar10 (1 style) have limited use. Furthermore, existing joint models of pose and shape DRAPE12; Casas:2014; Garnet19 often produce over-smooth results (even for a fixed style), and they are not publicly available. Consequently, none of existing approaches has materialized in a model which can be used to solve computer vision and graphics problems.
What is lacking is a unified model capable of generating different garment styles, and animating them on any body shape in any pose, while retaining wrinkle detail. To that end, we introduce TailorNet, a mixture of Neural Networks (NN) learned from physics based simulations, which decomposes clothing deformations into style, shape and pose – this effectively approximates the physical clothing deformation allowing intuitive control of synthesized animations. In the same spirit as SMPL Loper2015SMPL for bodies, TailorNet learns deformations as a displacements to a garment template in a canonical pose, while the articulated motion is driven by skinning. TailorNet can either take a real garment as input, or generate it from scratch, and drape it on top of the SMPL body for any shape and pose. In contrast to DRAPE12, our model predicts how the garment would fit in reality, e.g., a medium size garment is predicted tight on a large body, and loose on a thin body.
Learning TailorNet required addressing several technical challenges. To generate different garment styles in a static pose, we compute a PCA subspace using the publicly available digital wardrobe of real static garments bhatnagar2019mgn. To generate more style variation while satisfying garment-human physical constraints, we sample from the PCA subspace, run PBS for each sample, and recompute PCA again, to obtain a static style subspace. Samples from this subspace produce variation in sleeve length, size and fit in a static pose. To learn deformation as a function of pose and shape, we generated a semi-real dataset by animating garments (real or samples from the static style subspace) using PBS on top of SMPL Loper2015SMPL body for static SMPL poses, and for different shapes.
Our first observation is that, for a fixed style (garment instance) and body shape, predicting high frequency clothing deformations as a function of pose is possible – perhaps surprisingly, our experiments show that, for this task, a simple multi-layer perceptron model (MLP) performs as well as or better than Graph Neural Networks litany2017deformable; kolotouros2019cmr and Image-decoder on a UV-space lahner2018deepwrinkles. In stark contrast, straightforward prediction of deformation as a function of style, shape and pose results in overly smooth un-realistic results. We hypothesize that any attempt to combine training examples smoothes out high frequency components, which explains why previous models Casas19; DRAPE12; Garnet19, even for a single style, lack fine scale wrinkles and folds.
These key observations motivate the design of TailorNet: we predict the clothing low frequency geometry with a simple MLP. High frequency geometry is predicted with a mixture of high frequency style-shape specific models, where each specific model consists of a MLP which predicts deformation as a function of pose, and the weights of the mixture are obtained using a kernel which evaluates similarity in style and shape. A kernel with a very narrow bandwidth, prevents smoothing out fine scale wrinkles. Several experiments demonstrate that our model generalizes well to novel poses, predicts garment fit dependent on body shape, retains wrinkle detail, can produce style variations for a garment category (e.g., for T-shirts it produces different sizes, sleeve lengths and fit type), and importantly is easy to implement and control. To summarize, the main contributions of our work are:
The first joint model of clothing style, pose and shape variation, which is simple, easy to deploy and fully differentiable for easy integration with deep learning.
A simple yet effective decomposition of mesh deformations into low and high-frequency components, which coupled with a mixture model, allows to retain high-frequency wrinkles.
A comparison of different methods (MLP, Graph Neural Nets and image-to-image translation on UV-space) to predict pose dependent clothing deformation.
To stimulate further research, we make available a Dataset of aligned real static garments, simulated in poses, for body shapes, totaling frames.
Several experiments show that our model generalizes to completely new poses of the AMASS dataset (even though we did not use AMASS to train our model), and produces variations due to pose, shape and style, while being more detailed than previous style specific models Casas19; Garnet19. Furthermore, despite being trained on static poses, TailorNet produces smooth continuous animations.
Related Work
There are two main approaches to animation of clothing: physics based simulation (PBS), and efficient data-driven models learned from offline PBS, or real captures.
Super realistic animations require simulating millions of triangles terzopoulos1987elastically; selle2009robust; jiang2017anisotropic, which is computationally expensive. Many works focus on making simulation efficient GHFBG07 by adding wrinkles to low-resolution simulations Gillette:SCA:2015; Kavan:2011; Kim:2013:NEP; Wang:2010:EBW, or using simpler mass-spring models provot1995deformation and position based dynamics muller2007PBD; muller2008hpbd compromising accuracy and physical correctness for speed. Tuning the simulation parameters is a tedious task that can take weeks. Hence, several authors attempted to infer physical parameters mechanically Miguel:2012:DEC; Wang:SIGGRAPH:2011, from multi-view video Rosenhahn:2007; yang2018physics; Stoll:2010, or from perceptual judgments of humans Sigal:2015:PCS, but they only work in controlled settings and still require running PBS. PBS approaches typically require designing garments in 2D, grading them, adjusting them to the 3D body, and fine tuning parameters, which can take hours if not weeks, even for trained experts.
Data-driven cloth models.
One way to achieve realism is to capture real clothing on humans from images bhatnagar2019mgn; alldieck2019tex2shape; alldieck2019learning; alldieck2018video; habermann2019TOG, dynamic scans Pons-Moll:Siggraph2017; neophytou2014layered or RGBD SimulCap19; DoubleFusion2018 and re-target it to novel shapes, but this is limited to re-animating the same motion on a novel shape. While learning pose-dependent models from real captures yang2018analyzing; lahner2018deepwrinkles; ma20autoenclother is definitely an exciting route, accurately capturing sufficient real data is still a major challenge. Hence, these models yang2018analyzing; lahner2018deepwrinkles; ma20autoenclother only demonstrate generalization to motions similar to the training data.
Another option is to generate data with PBS, and learn efficient data-driven models. Early methods relied on linear auto-regression or efficient nearest neighbor search to predict pose Aguiar10; Kim:2013:NEP; wang2010example, or pose and shape dependent clothing deformation DRAPE12. Recent ones are based on deep learning, and vary according to the factor modeled (style or pose and shape), the data representation, and architecture used. Style variation is predicted from a user sketch with a VAE Mitra18 but the pose is fixed. For a single style, pose and shape variation is regressed with MLPs and RNNs Casas19; yang2018analyzing, or Graph-NNs that process body and garment Garnet19. Pose effects are predicted with a normal map lahner2018deepwrinkles or a displacement map pixelbased2018 in UV-space. These models Aguiar10; Garnet19; DRAPE12 tend to produce over-smooth results, with the exception of lahner2018deepwrinkles, but the model is trained for a single garment and subject, and as mentioned before generalization to in the wild motions (for example CMU de2009guide) is not demonstrated. Since there is no consensus on what representation and learning model is best suited for this task, for a fixed style and shape, we compare representations and architectures, and find that MLPs perform as well as more sophisticated Graph-NNs or image-to-image translation on UV-space. While we draw inspiration from previous works, unlike our model, none of them can jointly model style, pose and shape variation.
Pixel based models.
An alternative to 3D cloth modeling is to retrieve and warp images and videos Xu:2011:VCC; casasEG2014. Recent methods use deep learning to generate pixels han2017viton; Dong_2019_ICCV; Dong_2019_Towards; Yu_2019_ICCV; zhao2018multi; zhu2017your; Hsiao_2019_ICCV; raj2018swapnet; wang2018toward; GANprada17, often guided by 2D warps, or smooth 3D models Lassner:GP:2017; zanfir2018human; weng2018photo; shysheya2019textured, or learn to transfer texture from cloth images to 3D models mir20pix2surf. They produce (at best) photo-realistic images in controlled settings, but do not capture the 3D shape of wrinkles, cannot easily control motion, view-point, illumination, shape and style.
Garment Model Aligned with SMPL
Our base garment template is aligned with SMPL Loper2015SMPL as done in Pons-Moll:Siggraph2017; bhatnagar2019mgn. SMPL represents the human body as a parametric function of pose() and shape()
followed by the SMPL skinning function in Eq. 1
Since is fixed, this assumes that clothing deforms in the same way as the body, which is a practical but clearly over-simplifying assumption. Like previous work, we also decompose deformation as a non-rigid component (Eq. 3) and an articulated component (Eq. 3), but unlike previous work, we learn non-rigid deformation as a function of pose, style and shape. That is, we learn true clothing variations as we explain in the next section.
Method
In this section, we describe our decomposition of clothing as non-rigid deformation (due to pose, shape and style) and articulated deformation, which we refer to as un-posing (Section 4.1). The first component of our model is a subspace of garment styles which generates variation in A-pose (Section 4.2). As explained in the introduction, pose-models specific to a fixed shape and style (explained in Section 4.3), do preserve high-frequencies, but models that combine different styles and shapes produce overly smooth results. Hence, at the heart of our technique is a model, which predicts low frequency with a straight-forward MLP, and high-frequency with a mixture model Sections 4.2–4.4. An overview of our method is shown in Fig. 1.
Given a set of simulated garments for a given pose and shape , we first disentangle non-rigid deformation from articulation by un-posing – we invert the skinning function
2 Generating Parametric Model of Style
We generate style variation in A-pose by computing a PCA subspace using the public 3D garments of bhatnagar2019mgn. Although the method of Bhatnagar et al. bhatnagar2019mgn allows to transfer the 3D garment to a body shape in a canonical pose and shape (), physical constraints might be violated – garments are sometimes slightly flying on top of the body, and wrinkles do not correspond to an A-pose. In order to generate style variation while satisfying physics constraints, we alternate sampling form the PCA space and running PBS on the samples. We already find good results alternating PBS and PCA two times, to obtain a sub-space of style variation in a static A-pose – with PCA coefficients . Fig. 2 shows the parametric style space for t-shirt. This is however, a model in a fixed A-pose and shape. Different garment styles will deform differently as a function of pose and shape. In Section 4.3 we explain our style-shape specific model of pose, and in Section 4.4 we describe our joint mixture model for varied shapes and styles.
3 Single Style-Shape Model
4 TailorNet
which states that the function changes over time by a scalar diffusion coefficient times its spatial Laplacian . In order to smooth mesh geometry, we apply the diffusion equation to the vertex coordinates (which are interpreted as a discretized function on the surface)
where is the discrete Laplace-Beltrami operator applied at vertex , and and the number of iterations control the level of smoothing. Eq. 7 is also known as Laplacian smoothing desbrun1999implicit; PGM. We use and 80 iterations, to obtain a smooth low-frequency mesh and a high-frequency residual . We then subtract the body shape as in Eq. 5, and predict displacement components separately as
The bandwidth is a free-parameter of our model, allowing to generate varying high-frequency detail. We find qualitatively good results by keeping small in order to combine only nearby samples. We postprocess the output to remove the garment intersections with the body.
For each chosen style-shape pair, we simulate a wide variety of poses, which is time consuming. Hence, we find prototype shape-styles such that they cover the space of static displacements in A-pose . Specifically, we want to choose style-shape pairs such that any other shape-styles can be approximated as a convex combination of prototypes with least error – this is a non-convex problem with no global optimum guarantees. While iterative methods like K-SVD aharon2006k might yield better coverage, here we use a simple but effective greedy approach to choose good prototypes.
We take a dataset of garments in different styles draped on different body shapes in canonical pose. We start with a pool of body shapes in one common style and try to fit each of the other style-shape pairs as a convex combination of this pool. Then we take the style-shape with the highest approximation error and add it to the pool. We repeat this process until we get the pool of style-shape pairs. We find all shape-styles can be well approximated when . Thus, we use here.
Dataset
We learn our model from paired data of parameters and the garment which we obtained from simulation. We use a commercial 3D cloth design and simulation tool Marvelous Designer MarvellousDesigner to simulate these garments. Instead of designing and positioning garments manually, we use the publicly available digital wardrobe bhatnagar2019mgn captured from the real world data which includes variations in styles, shapes and poses. Although we describe our dataset generation with reference to T-shirt, method remains the same for all garments.
We first retarget Pons-Moll:Siggraph2017 the 3D garments from the digital wardrobe bhatnagar2019mgn to the canonical shape() and slowly simulate them to canonical pose(). We get the dataset of garments to learn style-space as in Section 4.2. However, the learnt style-space may not be intuitive due to limited variation in the data, and may contain irregular patterns and distortions owing to the registration process. So we sample 300 styles from this PCA model, simulate them again to get a larger dataset with less distortions. With 2 iterations of PCA and simulation, we generate consistent and meaningful style variations. We find first 2 PCA components enough to represent parameters. See Figure 2.
2 Shape, Pose and Style Variations
We choose shapes manually as follows. We sample the first two shape components at equally spaced intervals, while leaving the other components to zero. To these shapes, we add canonical zero shape . We choose styles in a similar way - by sampling the first two sytle components.
We simulate all combinations of shapes and styles in canonical pose, which results in instances. We choose prototypes out of style-shape pairs as training style-shape pairs using the approach mentioned in Section 4.4. We randomly choose more style-shape pairs for testing.
3 Simulation details
For pose variations, we use static SMPL poses, including a wide range of poses, including extreme ones. For a given style-shape and poses , we simulate them in one sequence. The body starts with canonical pose and greedily transitions to the nearest pose until all poses are traversed. To avoid dynamic effects (in this paper we are interested in quasi static deformation), we insert linearly interpolated intermediate poses, and let the garment relax for few frames. PBS simulation fails sometimes, and hence we remove frames with self-interpenetration from the dataset.
For training style-shape pairs, we simulate SMPL poses with interpolated poses. For testing style-shape pairs, we simulate a subset of SMPL poses with a mix of seen and unseen poses. Finally, we get 4 splits as follows: (1) train-train : training style-shape pairs each with training poses. (2) train-test : training style-shape pairs each with unseen poses. (3) test-train : testing style-shape pairs each with training poses. (4) test-test : testing style-shape pairs each with unseen poses.
Experiments
We evaluate our method on T-Shirt quantitatively and qualitatively and compare it to our baseline, and previous works. Our baseline and TailorNet use several MLPs - each of them has two hidden layers with ReLU activation and a dropout layer. We arrive to optimal hyperparameters by tuning our baseline, and then keep them constant to train all other MLPs. See suppl. for more details.
We train single style-shape models on style-shape pairs separately. The mean per vertex test error of each model varies depending upon the difficulty of particular style-shape. The average error across all models is mm with maximum error of mm for a loose fitting, and minimum error of mm for a fit fitting.
For single style-shape model, in the initial stages of the work, we experimented with different modalities of 3D mesh learning: UV map, similar to lahner2018deepwrinkles, and graph convolutions (Graph CNN) on the garment mesh. For learning UV map, we train a decoder from the input pose parameters to UV map of the garment displacements. For Graph CNN kipf2017semi by putting the input on each node of the graph input. We report results on two style-shape pairs in Table 2, which shows that a simple MLP is sufficient to learn pose dependent deformations for a fixed style-shape .
2 Results of TailorNet
Qualitatively, TailorNet outperforms the baseline and previous works. Figure 3 shows the garment predicted by Santesteban et al. Casas19 and our mixture model. Figure 4 shows the qualitative difference between the output by TailorNet and our baseline trained on the same dataset.
To validate our choice to decompose high and low frequency details, we consider a mixture model where individual MLPs predict style-shape dependent displacements directly without decomposition. Figure 5 shows that although it can approximate the overall shape well, it looses the fine wrinkles. TailorNet retains the fine details and provides intuitive control over high frequency details.
Sequences of AMASS mahmood2019amass: TailorNet generalizes (some poses shown in Fig. 6) despite being trained on completely different poses. Notably, the results are temporally coherent, despite not modelling the dynamics. See suppl. video for visualization.
3 Multiple Garments
To show the generalizability of TailorNet, we trained it separately for 3 more garments - Shirt, Pants and Skirt. Since skirt do not follow the topology of template body mesh, we attach a skirt template to the root joint of SMPL Pons-Moll:Siggraph2017. For each of these garments, we simulate the dataset for 9 shapes with a common style and trained the model. Figure 6 shows the the detailed predictions by TailorNet. Since we use the base garments, which come from a real digital wardrobe bhatnagar2019mgn, we can also transfer the textures from real scan on our predictions.
4 Runtime Performance
We implement TailorNet using PyTorch pytorch. On a gaming laptop with an NVIDIA GeForce GTX 1060 GPU and Intel i7 CPU, our approach runs from 1 to 2 ms per frame, which is 1000 times faster than PBS it is trained from. Just on CPU, it runs 100 times faster than PBS.
Discussion and Conclusion
TailorNet is the first data-driven clothing model of pose, shape and style. The experiments show that a simple MLP approximates clothing deformations with an accuracy of mm, which is as good as more sophisticated graph-CNN, or displacements prediction in UV-space, but shares the same limitations with existing methods: when it is trained with different body shapes (and styles in our case) results are overly smooth and lack realism. To address this, we proposed a model which predicts low and high frequencies separately. Several experiments show that our narrow bandwidth mixture model to predict high-frequency preserves significantly more detail than existing models, despite having a much harder task, that is, modelling pose dependent deformation as a function of shape and style jointly.
In future work, we plan to fit the model to scans, images and videos, and will investigate refining it using video data in a self-supervised fashion, or using real 3D cloth captures Pons-Moll:Siggraph2017. We also plan to make our model sensitive to the physical properties of the cloth fabric and human soft-tissue PonsMoll2015Dyna.
Our TailorNet times faster than PBS, allows easy control over style, shape and pose without manual editing. Furthermore, the model is differentiable, which is crucial for computer vision and learning applications. We will make TailorNet and our dataset publicly available, and will continuously add more garment categories and styles to make itl even more widely useable. TailorNet fills a key missing component in existing body models like SMPL and ADAM Loper2015SMPL; joo2018total: realistic clothing, which is necessary for animation of virtual humans, and to explain the complexities of dressed people in scans, images, and video.
Acknowledgements. This work is partly funded by the Deutsche Forschungsgemeinschaft (DFG, German Research Foundation) - 409792180 (Emmy Noether Programme, project: Real Virtual Humans) and Google Faculty Research Award. We thank Bharat Lal Bhatnagar and Garvita Tiwari for insightful discussions, and Dan Casas for providing us test results of Casas19.