# Synthesizing 3D Gait Data with Personalized Walking Style and Appearance
## 4 Consistent Subject Appearance Variation
### Clothing Adaptation  
We initially put clothes and other accessories on a neutral human model. When a new human shape model with expected semantic attributes is generated, we also need to transfer clothes and accessories onto the new model. We design a novel surface-based deformation method to conduct the transfer. Let \(H^{0}\) (with vertices \(\{\mathbf{v}_{0}^{0},\mathbf{v}_{1}^{0},\ldots,\mathbf{v}_{n}^{0}\}\)) be the neutral human mesh model, \(A^{0}\) (with vertices \(\{\mathbf{u}_{0}^{0},\mathbf{u}_{1}^{0},\ldots,\mathbf{u}_{m}^{0}\}\)) be the mesh model of accessories (mainly clothes) attached to \(H^{0}\), and \(H^{1}\) (with vertices \(\{\mathbf{v}_{0}^{1},\mathbf{v}_{1}^{1},\ldots,\mathbf{v}_{n}^{1}\}\)) be the human mesh model with the expected semantic attributes. Our purpose is to determine the vertex coordinates \(\mathbf{u}_{i}^{0}\) on \(A^{1}\), the mesh model of accessories attached onto \(H^{1}\). Our basic idea is to firstly estimate a transformation \(\mathbf{R}_{j}\) from \(\mathbf{v}_{i}^{0}\) to \(\mathbf{v}_{j}^{1}\). For each vertex \(\mathbf{u}_{i}^{0}\), we find its k neighbors on \(H^{0}\). For each neighbor \(\mathbf{v}_{ij}^{1}\), we apply its transformation to \(\mathbf{u}_{i}^{0}\) to get the adapted position with respect to \(\mathbf{v}_{ij}^{1}\):  
\[\mathbf{u}_{ij}^{1}=\mathbf{R}_{ij}\mathbf{u}_{i}^{0}, \tag{6}\]  
and the position of \(\mathbf{u}_{i}^{1}\) can finally be calculated by weighted blending of all \(\mathbf{u}_{ij}^{1}\):  
\[\mathbf{u}_{i}^{1}=w_{0}\cdot\mathbf{u}_{i0}^{1}\oplus w_{1}\cdot\mathbf{u}_{ i1}^{1}\ldots\oplus w_{j}\cdot\mathbf{u}_{ij}^{1}\ldots \tag{7}\]  
Figure 3: Consistent subject appearance exploration: (**a**) interface for semantic human shape exploration: (**b**) source human model; (**c**) target human model; (**d**) overlap of source and target human model; (**e**) source human model with source cloth; (**f**) target human model with source cloth; (**g**) target human model with adapted cloth; (**h**) overlap of source and adapted cloth.  
where the weighting \(w_{j}\) is defined as the normalized distance between \(\mathbf{u}_{i}^{0}\) and \(\mathbf{v}_{ij}^{0}\):  
\[w_{j}=\frac{\parallel\mathbf{u}_{i}^{0}-\mathbf{v}_{ij}^{0}\parallel^{2}( \mathbf{n}_{i}^{0u}\cdot\mathbf{n}_{ij}^{0v})}{\sum_{k\in N(i)}\parallel \mathbf{u}_{i}^{0}-\mathbf{v}_{ik}^{0}\parallel^{2}}, \tag{8}\]  
where \(\mathbf{n}_{i}^{0u}\) and \(\mathbf{n}_{ij}^{0v}\) are the normals of the corresponding surfaces on \(\mathbf{u}_{i}^{0}\) and \(\mathbf{v}_{ij}^{0}\), respectively.  
The transformation is estimated in an as-rigid-as-possible manner [48] with a rotation matrix \(\mathbf{R}_{i}\) from \(\mathbf{v}_{i}^{0}\) to \(\mathbf{v}_{i}^{1}\) calculated by minimizing the least squares deviation:  
\[E(M_{i}^{0},M_{i}^{1})=\sum_{j\in O(i)}w_{ij}\parallel(\mathbf{v}_{ij}^{1}- \mathbf{v}_{i}^{1})-\mathbf{R}_{i}(\mathbf{v}_{ij}^{0}-\mathbf{v}_{i}^{0})) \parallel^{2}, \tag{9}\]  
where \(M_{i}\) consists of \(\mathbf{v}_{i}^{0}\) and its one-ring neighbors \(O(i)\). The rotation matrix \(\mathbf{R}_{i}\) can be derived from the singular value decomposition of the covariance matrix \(\mathbf{S}_{i}\):  
\[\mathbf{S}_{i}=\sum_{j\in O(i)}w_{ij}\mathbf{e}_{ij}^{0}\mathbf{e}_{ij}^{1T}, \tag{10}\]  
where \(\mathbf{e}_{ij}^{0}=\mathbf{v}_{ij}^{0}-\mathbf{v}_{i}^{0}\) and \(\mathbf{e}_{ij}^{1}=\mathbf{v}_{ij}^{1}-\mathbf{v}_{i}^{1}\). Let \(\mathbf{S}_{i}=\mathbf{U}_{i}\underline{\sum}_{i}\mathbf{V}_{i}^{T}\), then \(\mathbf{R}_{i}=\mathbf{V}_{i}\mathbf{U}_{i}^{T}\).  
For the blending operator \(\oplus\), we have tried various methods including simple linear blending, dual quaternion blending, etc. Results are reported in Section 5.4.