DGPose: Deep Generative Models for Human Body Analysis

Deep generative modelling for human body analysis is an emerging problem with many interesting applications. However, the latent space learned by such approaches is typically not interpretable, resulting in less flexibility. In this work, we present deep generative models for human body analysis in which the body pose and the visual appearance are disentangled. Such a disentanglement allows independent manipulation of pose and appearance, and hence enables applications such as pose-transfer without specific training for such a task. Our proposed models, the Conditional-DGPose and the Semi-DGPose, have different characteristics. In the first, body pose labels are taken as conditioners, from a fully-supervised training set. In the second, our structured semi-supervised approach allows for pose estimation to be performed by the model itself and relaxes the need for labelled data. Therefore, the Semi-DGPose aims for the joint understanding and generation of people in images. It is not only capable of mapping images to interpretable latent representations but also able to map these representations back to the image space. We compare our models with relevant baselines, the ClothNet-Body and the Pose Guided Person Generation networks, demonstrating their merits on the Human3.6M, ChictopiaPlus and DeepFashion benchmarks.


Introduction
Human body analysis has been a long-standing goal in computer vision, with many applications in human-machine interaction, health-care, shopping, sports, entertainment and gaming (Achilles et al. 2016;Moeslund et al. 2011;Seemann et al. 2004;Shotton et al. 2011;von Marcard et al. 2017).Popular approaches to this problem have focused on supervised learning of discriminative models (Bulat and Tzimiropoulos 2016;Cao et al. 2017;Chu et al. 2017;Wei et al. 2016), which map visual inputs (images or videos) to suitable abstract representations (e.g.human body pose).While these approaches do exceptionally well on their prescribed task, as evidenced by their performance on pose estimation benchmarks (Andriluka et al. 2014;Ionescu et al. 2014;Johnson and Everingham 2010), they fall short due to: (a) reliance on fully-labelled data, and (b) the inability to generate novel data from the abstractions.
The former is a fairly onerous shortcoming, particularly when one is dealing with real-world visual data, as it requires a substantial amount of human time and effort to annotate.Thus, being able to relax the reliance on labelled data is a highly desirable goal.The latter, states a rather significant limitation, the incapacity to manipulate abstractions directly with the aim of generating novel visual data.For instance, changes in the pose of an arm cannot be used for the generation of images or videos in which that arm is correspondingly displaced.
Generative models, in contrast to discriminative ones, enable the analysis-by-synthesis of the human body.With them, ideally, one could generate images of humans in diverse combinations of body poses and appearances, i.e. clothing, skin colours, hairstyles, and scenarios.This has many potential applications.For instance, it can be used for performance capture and reenactment of RGB videos, as already showcased for faces (Thies et al. 2016), and still incipient for human bodies (Balakrishnan et al. 2018;Chan et al. 2018).It can also be used to generate images in user-specified poses, to enhance and augment datasets with minimal annotation effort.
Recently, such approaches have been commonly formulated as deep generative models (DGMs) (Goodfellow et al. 2014;Kingma and Welling 2013;Rezende et al. 2014)an extension of standard generative models that incorporate neural networks as flexible function approximators.These models are particularly effective in complex perceptual domains such as computer vision (Kulkarni et al. 2015), language (Massiceti et al. 2018), and robotics (Wang et al. 2017), effectively delegating bottom-up feature learning to neural networks, while simultaneously incorporating topdown probabilistic semantics into the model.They solve both the deficiencies of discriminative methods discussed above by (a) employing unsupervised learning, thereby removing the need for labels, and (b) embracing a fully generative modelling.
However, DGMs introduce a new problem-the learnt abstractions, or latent variables, are not human-interpretable.This lack of interpretability is a by-product of the unsupervised learning of representations from data.The learnt latent variables, usually represented as a smooth high-dimensional manifold, do not have the consistent semantic meaning as different sub-spaces in this manifold can encode arbitrary variations in the data.This is particularly unsuitable for our purposes as we would like to view and manipulate the latent variables, e.g. the body pose.
In order to ameliorate the issue mentioned above, while still eschewing reliance on fully-labelled data, we rely on a structured semi-supervised variational autoencoder (VAE) framework (Kingma et al. 2014;Siddharth et al. 2017).Here, the model structure is assumed to be partially specified, with consistent semantics imposed on some interpretable subset of the latent variables (e.g.pose), and the rest is left to be non-interpretable, although referred by us here as appearance.Weak (semi) supervision acts as a means to constrain the pose latent variables to actually encode the pose.This gives us the full complement of desirable features, allowing (a) semi-supervised learning, relaxing the need for labelled data, (b) generative modelling through stochastic computation graphs (Schulman et al. 2015), and (c) interpretable subset of latent variables defined through the model structure.
In this context, we present a structured semi-supervised VAEGAN architecture, the Semi-DGPose, in which we further extend structured semi-supervised models (Kingma et al. 2014;Siddharth et al. 2017) with a discriminatorbased loss function from generative adversarial networks (GANs) (Goodfellow et al. 2014;Larsen et al. 2016), formulating it as a principled and unified probabilistic framework.
To our knowledge, it is the first structured semi-supervised deep generative model of people directly learned in the natural image (or natural scene) space.This allows the method to directly learn the intricacies in the formation of natural (i.e.real) images.However, it is important to mention that natural images, in contrast to artificial visual stimuli (e.g.segmentation masks, binary masks, or pose vectors), have complex statistical structure and are much more challenging to parameterised (Geisler 2008;Kay et al. 2008;Simoncelli et al. 2001).Consequently, methods that work well with the latter may not succeed when tackling the former (Fei-Fei and Perona 2005;Krizhevsky et al. 2010).In contrast to previous work (Lassner et al. 2017;Ma et al. 2017Ma et al. , 2018;;Siarohin et al. 2018;Walker et al. 2017), our model directly enables: (i) semi-supervised pose estimation; and (ii) indirect posetransfer without specific training for such a task, both of which are tested and verified by experimental evidence.
Additionally, as an intermediate step in the investigation towards our main contribution, we propose a conditional-VAEGAN model, dubbed Conditional-DGPose.It is less distinct from previous art (Lassner et al. 2017;Ma et al. 2017), however, still differently from earlier work in the literature, it has: (i) allowed pose manipulation on extreme cases, e.g. by performing cross-domain pose-transfer and by hallucinating multiple people, in a variety of unseen or even unrealistic poses; and (ii) achieved state-of-the-art results on image reconstruction conditioned on pose, outperforming the closest related comparable baseline (Lassner et al. 2017).We illustrate some capabilities of our models in Fig. 1.
The present paper builds upon our previous approaches (de Bem et al. 2018(de Bem et al. , 2019) ) with further theoretical and technical details, evaluation, and discussion.Here, we present in full our comprehensive deep generative model framework for human body analysis in images.Along with an overview of VAEGAN models, this enables us to shed light on differences and similarities between conditional-VAEGANs and structured semi-supervised VAEGANs.More precisely, we provide additional evaluations of our Conditional-DGPose and Semi-DGPose models on the most relevant bench- marks in the literature, the Human3.6M(Ionescu et al. 2014), the ChictopiaPlus (Lassner et al. 2017), and the DeepFashion (Liu et al. 2016) datasets.We also provide new qualitative and quantitative comparisons with the Pose Guided Person Generation (PG 2 ) baseline (Ma et al. 2017).The application of our models to real images and the results obtained are essential to show the relevance of interpretable and structured modelling.This emphasise the effectiveness of the proposals, despite the significant challenge of jointly aim for understanding and generating people in images.In summary, our main contributions are: (i) a comprehensive framework for the joint understanding and generation of people in images, not only capable of mapping images to interpretable latent representations but also capable of mapping these representations back to the image space; (ii) a real-world application of structured deep generative models of images, disentangling pose from appearance in the analysis of the human body; (iii) a thorough quantitative and qualitative evaluation of the capabilities of our models; and (iv) a demonstration of its principal utilities by performing semi-supervised pose estimation, pose-transfer and pose manipulation.

Analysing Humans in Images: Overview
The analysis of people in visual data has been actively investigated as a computer vision and machine learning topic lately (Balakrishnan et al. 2018;Chan et al. 2018;Hattori et al. 2018Hattori et al. , 2015;;Rogez andSchmid 2016, 2018;Thies et al. 2016;Varol et al. 2017;Wang et al. 2018).Historically, the process of synthesising virtual humans (Hilton et al. 1999;Magnenat-Thalmann andThalmann 2005, 2006) is a computer graphics undertake since its origins in the '60s, with Boeing's "first man" (Boeing 2018;Fetter 1982).Therefore, the geometric and photometric intricacies in the formation of digital images depicting people are well-known in computer graphics, as demonstrated by the existence of many commercial and academic specialised engines (3Lateral  2018).Moreover, to produce accurate images of people is harder since humans seem to be very familiarised to corporal traits (e.g.faces) even since their early ages (MacDorman et al. 2009;Valenza et al. 1996).Over time, the generation of humans in images was also embraced by the computer vision community.Aiming for less manual intervention, image-based techniques were successfully adopted on matters like rendering and modelling (Blanz et al. 1999;Borshukov et al. 2005;Ezzat and Poggio 1996;Kanade et al. 1997;Starck and Hilton 2007).For instance, a large body of work has relied on geometric 3D models for generating synthetic images of faces (Ichim et al. 2015;Pighin et al. 2006), bodies (Bogo et al. 2014;Starck et al. 2005), and hands (de La Gorce et al. 2011;Romero et al. 2017;Rosales et al. 2001).Despite that, to automatically synthesise artificial images indistinguishable from real ones may be considered as equivalent to succeed in a visual Turing test (Shan et al. 2013).Hence, a substantially complicated and consequently yet unsolved challenge (Fan et al. 2018).
Another line of approaches, following the machine learning methodologies closely, had modelled the image formation by designing and learning probabilistic generative models (Enzweiler and Gavrila 2008;Fleuret et al. 2007;Fossati et al. 2007;Franco and Boyer 2005;Lee and Elgammal 2005;Wang et al. 2004;Yuille and Kersten 2006).However, it is highly complex and constrained due to intractable probability distributions and the high variability of latent factors.Often, simplifying assumptions are made in practice, such as independence between different factors of variation, leading to weak generative models that fail to capture statistical subtleties.
Recently, the advent of the deep generative models (DGMs) (Goodfellow et al. 2014;Kingma and Welling 2013;Rezende et al. 2014) somehow gathers the three lines of methods mentioned above.Bringing together characteristics from computer graphics, computer vision, and machine learning makes the DGMs a powerful analysis-by-synthesis framework.We discuss the DGM-based approaches related to our work in the following section.

Analysing Humans in Images with DGMs
Generally, in classical DGMs, such as standard VAEs and GANs, pose representation is non-interpretable and unsupervised, entangled with the visual appearance in the latent space.This is similarly employed by some image-to-image translation networks, however, in contrast to the relatively low-dimensional manifolds learned by the DGMs, in the latter case high-dimensional abstractions are learned and used strictly for direct mapping from and to the image space.On the other hand, conditional DGMs usually define part of the abstract data representation, i.e. body pose, to be an interpretable and observable random variable, while the rest of the representation (visual appearance) is kept non-interpretable and latent, still subjected to unsupervised learning.Finally, in structured DGMs approaches, as the Semi-DGPose, the latent space can be simultaneously composed by interpretable and non-interpretable random variables.In the former case, the variables may be fully or semi-supervised, while in the latter group they are still maintained unsupervised.Below, we describe related literature gathering the methods according to their adopted type of approach.
Image-to-image networks.Ma et al. (2017) introduce the Pose Guided Person Generation Network (PG 2 ), a two stage image-to-image translation model which is trained on pairs of images of the same person in different poses, scales and points of view.The authors admit the difficulty of generating poses and detailed appearance simultaneously in an end-to-end fashion.Their model, which is conditioned on images rather than poses, does not allow sampling, thus in its essence, it is not a generative model, which is again in contrast to our single-stage approaches.In a second proposal, Ma et al. (2018) present a GAN-based model for learning image embeddings of foreground, background and pose variables encoded as interpretable variables.The method is still limited to training and testing with cross-pose/scale pairs for posetransfer, however, it allows sampling, differently from the PG 2 .In contrast to our Semi-DGPose model, it is not capable of performing either pose estimation or semi-supervised learning, relying on off-the-shelf pose estimators to perform pose-transfer.
Recently, Esser et al. (2018) present a conditional imageto-image translation network based on the U-Net (Ronneberger et al. 2015).The model is conditioned on an appearance encoding obtained using a VAE architecture.It is more versatile than (Ma et al. 2017(Ma et al. , 2018)), although still not capable of producing either an interpretable encoding of pose (pose estimation) or performing semi-supervised learning.Similarly, Balakrishnan et al. (2018) also propose a U-Net-based approach.In this case, the authors make use of three U-Nets which tackle foreground segmentation and synthesis, as well as background synthesis.The model is trained with video sequences of the same person performing a limited set of activities.Therefore, it is limited to translating images of the same person to different poses.Other very recent approaches (Chan et al. 2018;Neverova et al. 2018) have to be explicitly trained for pose-transfer, i.e. using images pairs, and do not have the capability of predicting pose.This is in sharp contrast to our Semi-DGPose approach, in which we learn pose estimation, while pose-transfer is achieved as a by-product.In the method by Trumble et al. (2018), pose is estimated from multiple views, although it does not allow semi-supervised learning.Rhodin et al. (2018) learn 3D pose estimation from multiview images of the same person acquired from synchronised and calibrated cameras.In contrast to our approach, their method explicitly uses the rotation matrix between cameras during training for the unsupervised learning of a geometryaware latent representation.From such representation, the 3D pose is estimated posteriorly with a shallow network.The authors do not define their method as a generative model, but as a 3D pose estimator, although it can perform novel viewpoint synthesis.Another work by Zanfir et al. (2018) focus uniquely on the specific task of appearance transfer, also based on 3D pose.In contrast, our closely related task of pose-transfer is just one among all the tasks our DGMs can perform (e.g.sampling, pose estimation, direct manipulation) employing only 2D pose representations.Lastly, Zhang et al. (2018) focus on a slightly different task.They propose the unsupervised discovery of 2D landmarks using optical flows from Human3.6M videos as a short-term self-supervision.Such landmarks are an intermediate representation of pose since they do not correspond explicitly to specific body parts.In contrast, we employ single still images using directly and explicitly interpretable pose representations.
Finally, it is essential to differentiate such image-to-image translation methods from our DGMs.The former depends upon input images at test time, while the latter effectively allow sampling from the latent structured representations learned during training.This subtle difference means that such structured representations are responsible for learning the underlying factors of variations in image generation, without relying on information from input images for generating outputs at test time.
Classical DGMs.Lassner et al. (2017) have proposed the ClothNet-full model, in which a VAE model is used to learn a latent representation of segmentation masks of people in given poses.The reconstructed masks are mapped back to the image space by an image-to-image translation module based on Isola et al. (2016).In contrast, we learn our generative models directly on the raw image data without the need for body parts segmentation.Moreover, pose is interpretable in both of our methods.Siarohin et al. (2018) propose a GAN model with skip connection in the generator and a discriminator conditioned on pose.Similarly to Ma et al. (2017), the model is restricted to pose-transfer on pairs of images of the same person.The body pose is always given to the model and non-interpretable in the learned latent encoding.Apart from this, Walker et al. (2017) proposed a hybrid architecture, associating a VAE and a GAN for forecasting future poses in a video.Here, a low-dimensional pose representation is learned using a VAE, and once the future poses are predicted, they are mapped to images using a GAN generator.Considering GAN based generative models, Tulyakov et al. (2018) present a GAN network that learns motion and content in two separate latent spaces in an unsupervised manner.However, it does not allow explicit manipulation over the human pose.
Conditional DGMs.Lassner et al. (2017) present a second model, the ClothNet-Body, which is a CVAE conditioned on human pose.This model is closely related to our Conditional-DGPose, but it also uses low-dimensional segmentation masks and an auxiliary image-to-image transfer network, based on Isola et al. (2016), to generate realistic images.Pumarola et al. (2018) propose an unsupervised image synthesis based on a conditional GAN method, yet it is also not capable of performing pose prediction.
In summary, there are methods in the literature closely related to our Conditional-DGPose, mainly due to its conditional nature.Although, to our knowledge, no other method gathers the capabilities of our Semi-DGPose as a structured DGM.The novelty in the Semi-DGPose largely relies on how the body pose is handled, differing it from related work.Moreover, the capacity for performing pose estimation, indirect pose-transfer, and semi-supervised learning, while aiming for joint understanding and generation of people in images is peculiar to our model.Following Larsen et al. (2016), we use a discriminator in our training to improve the quality of the generated images.However, in contrast to Larsen et al. (2016), the latent space of our approach is interpretable, which enables us to sample different poses and appearances.

Preliminaries
Deep generative models (DGMs) come in two broad flavours-Variational Autoencoders (VAEs) (Kingma and Welling 2013;Rezende et al. 2014), and Generative Adversarial Networks (GANs) (Goodfellow et al. 2014).In both cases, the goal is to learn a generative model p θ (x, z) over data x and latent variables z, with parameters θ .Typically the model parameters θ are represented in the form of a neural network.
VAEs express an objective to learn the parameters θ that maximise the marginal likelihood (or evidence) of the model denoted as p θ (x) = p θ (x|z) p θ (z)dz.They introduce a conditional probability density q φ (z|x) as an approximation to the unknown and intractable model posterior p θ (z|x), employing the variational principle in order to optimise a surrogate objective L(φ, θ ; x), called the evidence lower bound (ELBO), as The conditional density q φ (z|x) is called the recognition or inference distribution, with parameters φ also represented in the form of a neural network.Lastly, VAEs also admit an extension to conditional generative models (CVAEs) (Sohn et al. 2015), simply by incorporating a conditioning variable y, to derive On the other hand, in the context of structured semisupervised learning, one can factor the latent variables into unstructured or non-interpretable variables z and structured or interpretable variables y without loss of generality (Kingma et al. 2014;Siddharth et al. 2017).For learning in this framework, the objective can be expressed as the combination of supervised and unsupervised objectives.Let D u and D s denote the unlabelled and labelled subset of the dataset D, and let the joint recognition network factorise as q φ (y, z|x) = q φ (y|x)q φ (z|x, y).Then, the combined objective summed over the entire dataset corresponds to where L u and L s are defined as L s (θ, φ; x s , y s ) = E q φ (z|x s ,y s ) log p θ (x s , z|y s ) q φ (z|x s , y s ) + α log q φ (y s |x s ), (5) respectively.Here, the hyper-parameter γ (Eq. 3) controls the relative weight between the supervised and unsupervised dataset sizes, and α (Eq.5) controls the relative weight between generative and discriminative learning.Note that by the factorisation of the generative model, VAEs necessitate the specification of an explicit likelihood function p θ (x|z), which can often be difficult.GANs, on the other hand, attempt to sidestep this requirement by learning a surrogate to the likelihood function, while avoiding the learning of a recognition distribution.Here, the generative model p θ (x, z), viewed as a mapping G : z → x, is setup in a two-player minimax game with a "discriminator" D : x → {0, 1}, whose goal is to correctly identify if a data point x came from the generative model p θ (x, z) or the true data distribution p(x).Such objective is defined as In fact, in our structured model, generation is defined as a function of pose and appearance as G(y, z).Crucially, learning a customised approximation to the likelihood can result in a much higher quality of generated data, particularly for the visual domain (Karras et al. 2018).
A more recent family of DGMs, VAEGANs (Larsen et al. 2016), bring together these two different approaches into a single objective that combines both the VAE and GAN objectives directly as This marries better the likelihood learning with the inferencedistribution learning, providing a more flexible family of models.

Our Approach
As set out in the preliminaries (Sect.3), we use the VAEGAN framework as the basis for our generative models (Larsen et al. 2016).Note that, in incorporating semi-supervised learning, the semi-supervised VAEGAN includes two distinct tasks.First, it involves learning a recognition network that can estimate pose y and appearance z for any given RGB image x.Second, it involves learning a generative network that combines a given pose with an appearance to generate visual data (RGB image) corresponding to those variables.
From discriminative modelling, we know that the first task, i.e. predicting pose, is eminently plausible up to learning an appearance model.However, learning the full generative model is something that can be fraught with difficulties.For one, pose and appearance can exhibit a large degree of information imbalance-pose can be distilled into a set of (x, y) coordinates, whereas appearance can encode a vast swathe of information (e.g.texture, colour, shapes) about the given input.
Given a generative model that takes both appearance z and pose y as inputs to produce an RGB image x, a reasonable first step can be just to evaluate the performance of a conditional generative model, where the conditioning variable is taken to be the interpretable pose y.We refer to this setup as Conditional-DGPose, with reference to the fact that it is a conditional-VAEGAN model.Its lower bound is given by Eq. 2, and its final objective function is defined as in contrast to the standard VAEGAN objective (Eq.7).Here, all data is "labelled" with pose, but the goals were: (i) primarily, to verify qualitatively if a low-dimensional conditioning variable would affect the conditional generative model; (ii) secondly, to evaluate the accuracy of the reconstructed images quantitatively w.r.t. the human body poses and the image quality.
Once verified through experiments that the conditional approach works, we could then proceed towards our structured semi-supervised VAEGAN, referred to as Semi-DGPose, as its main difference from the previous setup is that the encoding distribution is no longer conditioned on the pose, but instead predicts it as per Eq.3-6.In contrast to the standard VAEGAN objective (Eq.7), the structured semi-supervised VAEGAN final objective function is given by, We describe the details and implementations of our models in the rest of this section.Next, we start defining the adopted pose representations, which are common for both, the Conditional-DGPose and the Semi-DGPose architectures.

Pose Representation
In our DGMs, the random variable y corresponds to an abstraction of the human body pose.Therefore a suitable concrete representation must be adopted in the implementation of the models.As mentioned in our literature review, many methods which define a generative model in the pose space would simply encode J joints defining the body as a vector y v , such that y v ∈ R 2J .Others employ extended versions of it, in which positions of R rigid parts and B whole body are derived from the annotated joints (Yang and Ramanan 2011), such that y v ∈ R 2(J +R+B) .Both cases are illustrated in Fig. 2.
On the other hand, the mapping of 2D joints positions to heatmaps has shown to be very effective in several pose estimation approaches (Chu et al. 2017;Newell et al. 2016;Tompson et al. 2014;Wei et al. 2016).The Gaussian heatmaps represent the underlying probability distribution of body parts' locations.In our method, the heatmap representation y h consists of P body elements, in a way that y h ∈ R P×H ×W , where H and W are the heatmap height and width, respectively.In the simplest case P = J , however, as the set of joints is reasonably sparse, to cover the entire area of the bodies, joints, rigid parts and the whole body might be used as an extended case, in which P = J + R + B (de Bem et al. 2018), as illustrated in Fig. 3.In this way, each body element p is represented using a 2D Gaussian around its centre µ p = (i p , j p ), with diagonal covariance matrix R p , computed as follows: Joints.Since joints have a limited spatial extent, we follow previous approaches (Chu et al. 2017;Newell et al. 2016;Tompson et al. 2014;Wei et al. 2016) in modelling them as isotropic Gaussians that are centred at the ground-truth joint location and have a small standard deviation (e.g.σ p,i = σ p, j = 1.5 pixel for a 64 × 64 heatmap).
Rigid Parts.The centre µ p of a rigid part p is defined as the mean point of the centres µ k and µ l of the joints it connects.We orient the Gaussian representing the rigid part to Body.The body centre is defined to be the mean of the annotated joint centres.Principal component analysis (PCA) of the joint centres is used to obtain the orientation of the body in the image plane.We define σ p,i and σ p, j to be proportional to the distance between the extreme projections of the joint centres onto, respectively, the principal and secondary axes of variation.
In our both models, as detailed in the next sections, we make use of both forms of pose representation, taking advantage of their particular characteristics in each case.In the Conditional-DGPose, only the heatmap representation y h is employed, since, as shown later in our experiments, it can be seamlessly concatenated to feature maps, helping on the generation of accurate output images.On the other hand, in the Semi-DGPose model, we additionally employ the vectorbased form y v , as a way of maintaining a low-dimensional latent representation of pose.

DGPose Architectures
We have tested several variations of deep CNN architectures for implementing our models, culminating in our best performing ones, which are described here.All its modules are deep CNNs, and full implementation definitions are given in Appendix A and referred adequately in the text.Due to the generality of generative models, the architectures may be employed in different ways according to the aimed tasks.Thus, we describe separately training and test phases, dividing the latter into reconstruction, pose-transfer, sampling and pose-estimation, for both models.Thus, the Conditional-DGPose and the Semi-DGPose are described following.Appearance is sampled z ∼ q φ (z|x, y h ), using the reparametrization trick (Kingma and Welling 2013), and passed to the Decoder, as well as the conditioning pose y h , which is concatenated to the Decoder feature maps.The Decoder then generates a reconstructed image G(y h , z).The loss function (see Eq. 8, Sect.4) is composed by the following terms, highlighted in red: the L1-norm L1(x, G(y h , z)) which is computed between the original and the reconstructed image; the KL-divergence KL[q φ (z|x, y h )|| p θ (z|y h )], which is used to regularise the posterior distribution; and the GAN Discriminator cross-entropy loss used to learn how to discern between real and generated images (Color figure online)

Conditional-DGPose
Our conditional-VAEGAN model learns the parameters of four deep CNN networks simultaneously: (i) a recognition network (Encoder), which estimates appearance z conditioned to pose y h and to a given RGB image x; (ii) a Prior network, which estimates appearance z conditioned to pose y h alone; (iii) a generative network (Decoder), which combines appearance z and the conditioning pose y h , to generate corresponding RGB images G(y h , z); and (iv) a Discriminator network, which differentiates between real images x and generated images G(y h , z).Learning is pursued by the minimisation of the loss function L = L CVAE + L GAN (Eq.8, Sect.4), composed by the CVAE evidence lower bound (ELBO) L CVAE and by the GAN cross-entropy discriminator loss L GAN .An overview of our model is shown in Fig. 4 and implementation details are provided in Table 6 (Appendix A).Below, we describe further the training and the test phases, dividing the latter into reconstruction, posetransfer and sampling.
Training.Given an image x, the corresponding heatmap labels (conditioning pose) are concatenated to it as per x ⊕ y h (Encoder, Layer 1, Table 6).Then, the Encoder estimates the conditional posterior distribution q φ (z|x, y h ).The heatmap labels y h alone are the input of the Prior module, which estimates the distribution p θ (z|y h ).Appearance is sampled from the posterior z ∼ q φ (z|x, y h ), using the reparametrisation trick (Kingma and Welling 2013).The sample z, along with the conditioning pose y h (Decoder, Layer 7, Table 6), are passed through the Decoder which generates a reconstructed  x, G(y h , z)); the KLdivergence, which acts as a regulariser, between the posterior and the prior distributions, KL[q φ (z|x, y h )| p θ (z|y h )]; and the cross-entropy Discriminator loss (Eq.6, Sect.3).
Reconstruction and Direct Pose-transfer.At test time, when an image x 1 and its corresponding pose y h 1 are given as input, the reconstructed image G(y h 1 , z 1 ) is obtained as the Decoder output.However, if x 1 is used as input along with a different pose y h 2 , the person in the reconstructed image G(y h 2 , z 1 ) will keep the appearance of x 1 , with the body pose defined by y h 2 , as illustrated in Fig. 5. Similarly, as shown later in our experiments, the same procedure may be adopted to directly manipulate the reconstructed image, such as changing body size and aspect ratio, moving or suppressing body parts or even hallucinating multiple people.
Sampling.At test time, sampling is obtained when no RGB image is given as input.In this case, as illustrated in Fig. 6, only a conditioning pose y h is given as the input of the Prior module, which defines p θ (z|y h ).From this Prior distribution,

Semi-DGPose
Differently from the Conditional-DGPose, our structured semi-supervised VAEGAN model (Fig. 7) learns the parameters of three deep CNN networks simultaneously: (i) a recognition network (Encoder), which estimates appearance z and pose y v from a given RGB image x; (ii) a generative network (Decoder), which combines appearance z and pose y v , to generate corresponding RGB images G(y v , z); and (iii) a Discriminator network, which differentiates between real images x and generated images G(y v , z).Learning is pursued by the minimisation of the loss function L = L SS + L GAN (Eq.9, Sect.4), composed by the structured semi-supervised VAE evidence lower bound (ELBO) L SS and by the GAN cross-entropy discriminator loss L GAN .A fourth module, called Mapper, is introduced by us to overcome a peculiarity caused by the inclusion of pose in the latent space.Such a module, trained separately, is described next.
The Mapper Module.Our preliminary experiments with the Conditional-DGPose showed that heatmaps led to bet-ter quality reconstructions, in contrast to the vector-based representation.On the other hand, a low-dimensional representation is more suitable and desirable as a latent variable, since human pose lies in a low-dimensional manifold embedded in the high-dimensional image space (Elgammal and Lee 2004;Goodfellow et al. 2016).To cope with this mismatch, we introduce the Mapper module, which maps pose-vectors y v to heatmaps y h .Ground-truth heatmaps are constructed from manually annotated 2D joints labels, using a simple weak annotation strategy (de Bem et al. 2018).The Mapper module is then trained to map 2D joints to heatmaps, minimising the L2-norm between predicted and groundtruth heatmaps.This module is trained separately with the same training hyper-parameters used for our full architecture, described later in Sect.5.5.In the training of the full Semi-DGPose architecture, the Mapper module is integrated to it with its weights kept fixed, since the mapping function has been learned already.The Mapper allows us to keep a low-dimensional representation y v in the latent space, at the same time that a dense high-dimensional "spatial" heatmap representation y h facilitates the generation of accurate images by the Decoder.As it is fully differentiable, the module allows the gradients to be backpropagated normally from the Decoder to the Encoder, when it is required during the training of the full architecture.
In the rest of this section, we describe further the training and the test phases, dividing the latter into reconstruction, indirect pose-transfer, sampling and pose estimation.An overview of our model is shown in Fig. 7 and implementation details are provided in Table 7 (Appendix A).Fig. 7 Semi-DGPose architecture.At the training, the Encoder receives x as input and learns the posterior distribution q φ (y v , z|x).In the unsupervised routine, samples of appearance z and pose y v are obtained using the reparametrisation trick (Kingma and Welling 2013).These samples are passed to the Decoder, which generates a reconstructed image G(y v , z).The unsupervised loss function is composed by the following terms, highlighted in red: the L1-norm L1(x, G(y v , z)) between the original and the reconstructed images; the KL-divergence losses between the posterior distribution q φ (y v , z|x) and the weak priors p(y v ) and p(z), which work as regularisers (see Eq. 4, Sect.3); and the crossentropy Discriminator loss (Eq.6, Sect.3).In the supervised routine (not shown above for simplicity), the only difference is that a regression loss between the estimated pose and the pose ground-truth label substitutes the KL-divergence over the pose posterior distribution (see Eq. 5, Sect.3).In both, supervised and unsupervised training routines, the low-dimensional pose vector y v is mapped to a heatmap representation y h by the Mapper module and concatenated to the Decoder.Eq. 3 (Sect.3) shows the overall loss function Training.The terms of Eq. 3 (Sect.3) correspond to two training routines which are alternately employed, according to the presence or absence of ground-truth labels.
In the unsupervised case, when no label is available, it is similar to the standard VAE (see Eq. 4, Sect.3).Accurately, given the image x, the Encoder estimates the posterior distribution q φ (y v , z|x), where both appearance z and pose y v are assumed to be independent given the image x.Then, pose y v and appearance z are sampled from the posterior, using the reparametrization trick (Kingma and Welling 2013), and passed to the Decoder to generate a reconstructed image.Finally, the unsupervised loss function minimised during training is composed of the L1-norm reconstruction loss L1(x, G(y v , z)); the KL-divergences, which act as regularisers, between the posterior and the prior distributions, KL[q φ (y v |x)| p(y v )] and KL[q φ (z|x)| p(z)]; and the crossentropy Discriminator loss (Eq.6, Sect.3).
In the supervised case, when the pose label is available, the KL-divergence between the posterior pose distribution and the pose prior, KL[q φ (y v |x)| p(y v )], is replaced with a regression loss between the estimated pose and the given label (see Eq. 5, Sect.3).Now, only the appearance z is sampled from the posterior distribution and passed to the Decoder, along with the ground-truth pose label.Finally, the supervised loss function minimised during training is composed of the L1-norm reconstruction loss, the KL-divergence over the appearance distribution, the regression loss over the pose vector, and the cross-entropy Discriminator loss.In this case, gradients are not backpropagated from the Decoder to the Encoder, through the pose posterior distribution, since pose was not estimated.
In both unsupervised and supervised cases, the Mapper module, which is trained offline, is used to map the posevector y v in the latent space to a dense heatmap representation y h , as illustrated in Fig. 7.
Reconstruction.At test time, only an image x is given as input, and the reconstructed image G(y v , z) is obtained from the Decoder, as illustrated in Fig. 8.In the reconstruction process, direct manipulation of the pose representation y v allows image generations with varying body poses and sizes while the appearance is kept the same.
Indirect Pose-transfer.Our method allows us to do indirect pose-transfer without specific training for such a task.As illustrated in Fig. 9, an image x 1 is first passed through the Encoder network, from which the target pose y v 1 is estimated and kept.In the second step, another image x 2 is propagated  through the Encoder, from which the appearance encoding z 2 is kept.Finally, z 2 and y v 1 are jointly propagated through the Decoder, and an image x 3 is reconstructed, containing a person in the pose y v 1 estimated from the first image, but with the appearance z 2 defined by the second image.This is a novel application that our approach enables.In contrast to the prior art, our network neither relies on any external pose estimator nor on conditioning labels to perform pose-transfer.
Sampling.When no image is given as input, we can jointly or separately sample pose y v and appearance z from the posterior distribution.They may be sampled at the same time, or one may be kept fixed while the other distribution is sampled.In all cases, the encodings are passed through the Decoder network to generate a corresponding RGB image, as illustrated in Fig. 10.
Pose Estimation.One of the main differences between our approach and the prior art is the ability of our model to estimate human-body pose as well.In this case, as illustrated in Fig. 11, given an input image x, it is possible to perform pose estimation by regressing to the pose representation vector y v .Thus, the appearance encoding z is disregarded, and the Decoder, Mapper, and Discriminator networks are not used.

Experiments and Results
We have performed a large number of experiments to evaluate our models.In this section, we present the datasets, metrics, and training hyper-parameters used in our work.Finally, quantitative and qualitative results show the effectiveness and novelty of our Conditional-DGPose and Semi-DGPose architectures.

Human3.6M Dataset
Human3.6M (Ionescu et al. 2014) is a widely used benchmark for human body analysis.It contains 3.6 million images acquired by recording 5 female and 6 male actors performing a diverse set of motions and poses corresponding to 15 activities, under 4 different viewpoints.We followed the standard protocol and used sequences of 2 out of 11 actors as our test set, while the rest of the data was used for training.We use a subset of 14 (out of 32) body joints represented by their (x, y) 2D image coordinates as our ground-truth data, neglecting minor body parts (e.g.fingers).Due to the high frequency of video acquisition (50 Hz), there is a considerable level of practically redundant images.Thus, out of images from all 4 cameras, we subsample frames in time, producing subsets for training and testing, with 317,989 and 1280 images, respectively.All the original images have a resolution of 1000 × 1000 pixels.

ChictopiaPlus Dataset
ChictopiaPlus (Lassner et al. 2017) is an extension of the Chictopia dataset (Liang et al. 2015).It augments the original per-pixel annotations for body parts with pose annotation (Insafutdinov et al. 2016)

DeepFashion Dataset
The DeepFashion dataset (In-shop Clothes Retrieval Benchmark) (Liu et al. 2016) consists of 52,712 images of people in a variety of clothing and poses.We follow Ma et al. (2017), using their joints' annotations obtained with an off-the-shelf pose estimator (Cao et al. 2017), and divide the dataset into training (44,950 images) and testing (6560 images) subsets.Images with wrong pose estimations were suppressed and all original images have 256 × 256 pixels.Importantly, we aim to learn a complete generative model of people in images, which is significantly more complex, compared to models focusing on a particular task, such as pose-transfer.For this reason, we use images individually in our training set, instead of employing pairs of images of the same person as in Ma et al. (2017) and Siarohin et al. (2018).

Metrics
Quantitative evaluation of generative models is inherently difficult (Theis et al. 2016).Since our models explicitly represent appearance and body pose as separate variables, we evaluate their performance w.r.t.three different aspects.(i) Image quality of reconstructions is evaluated using the standard Peak Signal-to-Noise Ratio (PSNR) and Structural Similarity Index (SSIM) metrics (Wang et al. 2004).(ii) Accuracy of the reconstructed poses is evaluated using a protocol introduced by us as follow.To set a common ground for comparing an original test set, with a reconstructed one, we start using a well-established (discriminative) human pose estimator (Newell et al. 2016), and initially estimating all 2D poses in the original test set.In our protocol, we assume that such estimations are the ground-truth poses of the test set.Subsequently, we apply the same discriminative estimator over the reconstructed test images, produced by the trained generative models.Finally, we use the Percentage of Correct Keypoints (PCK) metric (Yang and Ramanan 2011), which computes the percentage of 2D joints correctly located by a pose estimator, given the ground-truth and a normalised distance threshold corresponding to the size of the person's torso.Thus, we assume that any degradation in the PCK metric is caused by imperfections on the reconstructed images, since a PCK score of 100% would correspond to having all the estimated joints, in the original and the reconstructed images, at the same locations, up to the distance threshold.We illustrate this metric in

Training
All models were trained with mini-batches consisting of 64 images.We used the Adam optimiser (Kingma and Ba 2015) with an initial learning rate set to 10 −4 .The weight decay regulariser was set to 5 × 10 −4 .Network weights were initialised randomly for fully-connected layers and with robust initialisation (He et al. 2015) for convolutional and transposed-convolutional layers.Except when stated differently, for all images and all models, we used a 64 × 64 pixels crop, centring the person of interest.We did not use any form of data augmentation or preprocessing except for image normalisation to zero mean and unit variance.All models were implemented in Caffe (Jia et al. 2014), and all experiments ran on an NVIDIA Titan X GPU.

Conditional-DGPose
As mentioned earlier (Sect.4), the Conditional-DGPose is taken by us as an intermediate step in the investigation towards our Semi-DGPose model.To better evaluate and understand its capabilities, we start our experiments by validating it qualitatively with the Human3.6Mbenchmark, since this dataset is composed of images in a controlled environment.Initially, in Sect.5.6.1, we evaluate different pose representations, with the best performance presented by the heatmap representation.In Sect.5.6.2,we show the effectiveness of the Conditional-DPGose architecture, illustrating reconstruction and sampling tasks.Besides that, we particularly stress the effects of pose manipulation, by performing pose-transfer and hallucinating multiple people in a variety of unseen or even unrealistic poses, still on the Human3.6Mdataset.After that, we present qualitative and quantitative results on the ChictopiaPlus dataset (Lassner et al. 2017) (2017).

Pose Representation
We perform experiments with the two pose representations mentioned in Sect.4.1 and with their respective extensions.We highlight the difficult for capturing the spatial extent of some body parts, particularly extremities far from the torso, when the vector representations are adopted.In this example, the use of joints' heatmaps is already sufficient to improve the reconstruction.However, the extended version (with rigid parts and body) turns the model more robust to more complex poses, since the 14 joints are fairly sparse We executed end-to-end training with the Conditional-DGPose architecture, which converged in approximately 15 epochs.The qualitative evaluation was performed by the inspection of the reconstructed images, shown in Fig. 13.As can be observed, the vector representations, even the extended one, fail to capture some parts of the body.This problem is particularly evident concerning the extremities of the limbs.On the other hand, the additional heatmaps for rigid parts and whole body have shown a positive impact in the reconstructions.The quantitative measurements, shown in Table 1, support our qualitative evaluation.In all experiments, the heatmaps had the same dimension of the images (64 × 64).

Conditional-DGPose Results on Human3.6M
Initially, in Fig. 14, we show our heatmap pose representation along with reconstructions, to demonstrate that realistic images with accurate poses can be generated.Furthermore, we illustrate sampling in Fig. 15, in which the separation between pose and appearance is made evident by the independent change of each variable.Next, we stress the pose-transfer and compositionality capabilities of the model, pushing it beyond what is usually done in related methods.Regarding pose-transfer, we demonstrate the capability of our model to learn pose and appearance as separate variables which allows direct control over the two at test time.To this end, we generate images in which we maintain the appearance of the input image, yet the generated person is "moved" into the required target pose.The target pose may be composed manually, extracted from another image with an off-the-shelf pose estimator or provided interactively by a user.This is illustrated in Fig. 16, in which we employ target poses from the LSP dataset (Johnson and Everingham 2010), that have completely different poses in a drastically different environment compared to our training set.The quality of the generations shows that our generative model could disentangle pose and appearance and generate images with poses that do not exist in the training data.
Concerning manipulation, we show in Fig. 17 how our model can be used to "compose" images that have never been seen in the training data.For instance, we can generate images with multiple people in the same (replicated) pose simply by conditioning on a respective heatmap.In fact, we can go one step further and generate an image where all people are in the same pose, but one of them is, e.g.shorter and another thinner, as shown in Fig. 18a.In an extreme case, we can even generate "unreal" images containing only certain body parts (e.g.heads) or disconnecting them from the rest of the body, as in Figs.18b and 18c, respectively.Note that the training dataset is composed of only single person images.Thus the model has never seen an image with multiple people or only some separate body parts.This demonstrates that the learned latent space of our model is indeed disentangled.To the best of our knowledge, this capability has not been demonstrated by any other work in the literature.

Conditional-DGPose Results on ChictopiaPlus
We compare our method with Lassner et al. ( 2017), the closest related work from the literature.We employ the PSNR and the SSIM metrics to evaluate image quality, and the PCK metric to provide a quantitative evaluation of pose reconstructions, as described previously (see Sect. 5.4).In Table 2, we initially show that our method outperforms the ClothNetbody network (Lassner et al. 2017) regarding both, the PSNR and the SSIM metrics.Qualitative results are shown in Fig. 19.Moreover, our model reports 95.14% of accuracy, with

Conditional-DGPose Results on DeepFashion
Here we show qualitative and quantitative experiments on the DeepFashion dataset (Liu et al. 2016).The baseline on this dataset is the image-to-image pose guided generation (PG 2 ) by Ma et al. (2017).Thus, we use their same training and test sets.However, as our model is not an image-to-image translation architecture, we do not use pairs of images for training.Instead, we use individually 44,950 training images and 6560 test images.Again, we employ the PSNR and the SSIM metrics to evaluate image quality, and the PCK metric to provide a quantitative evaluation of pose reconstructions, as described previously (see Sect.5.4).In Table 3, we initially show that even not being trained on images pairs and tackling the significantly more complex task of learning a generative model, instead of executing image-to-image translation, our method achieves scores only slightly below the ones by the PG 2 network on image reconstruction.A similar observation can be done regarding pose reconstruction, since our model reports 74.94% of accuracy, with PCK score at 0.5, against 78.27% from Ma et al. (2017).The overall PCK curve is shown in Fig. 21.Concretely, the learning of a full generative model, instead of image-to-image translation, allows for the execution of tasks, such as sampling from the learned latent space, which are just not feasible with architectures purely trained on image pairs.To illustrate this, in Fig. 22 we traverse the appearance manifold learned on the DeepFashion dataset.Using only our heatmap pose representation as input, for a given pose, we smoothly vary the values of the latent appearance representation, generating samples with different visual aspect for the same body posture.Such kind of direct sampling is not feasible with the PG 2 (Ma et al. 2017) architecture.
Finally, the Conditional-DGPose performs 3.06% and 4.82% worse than the PG 2 (Ma et al. 2017) regarding, respectively, the PSNR and the SSIM metrics (see Table 3).Despite that, it produces reasonable results in comparison with the ones from Ma et al. (2017).A qualitative evaluation is shown in Fig. 23.

Semi-DGPose
Here, we initially evaluate our Semi-DGPose model on the Human3.6M(Ionescu et al. 2014) dataset.The Human3.6M is more suitable than both, the ChictopiaPlus and the Deep-Fashion, for pose estimation evaluations, since the former has joints' annotations obtained by an accurate motion capture system.While the two other datasets are augmented 2D pose labels obtained using an off-the-shelf pose estimator, consequently resulting in more errors in the ground-truth annotations.We show quantitative and qualitative results, focusing particularly on the pose estimation and the indirect pose-transfer capabilities, described later in this section.Our experiments and results show the effectiveness of the Semi-DGPose method on the Human3.6M.
To show the generality of the model, we present additional results on the DeepFashion dataset.We now use our Conditional-DGPose architecture and the image-to-image translation network PG 2 (Ma et al. 2017) as baselines, despite to their relevant differences with the Semi-DGPose.However, to our knowledge, there are no closer related methods in the literature, i.e. that simultaneously pursue the understanding and the generation of people directly in the image space.Since our Conditional-DGPose method outperforms the ClothNet-body (Lassner et al. 2017) architecture, we do not carry out a direct comparison with the latter.

Semi-DGPose Results on Human3.6M
To evaluate the efficacy of our model, we perform a "relative" comparison.In other words, we first train our model with full supervision (i.e.all data points are labelled) to evaluate performance in an ideal case and then we train the model with other setups, using labels only for 75%, 50%, and 25% data points.Such an evaluation allows us to decouple the efficacy of the model itself and the semi-supervision to see how the gradual decrease in the level of supervision affects the final performance of the method on the same validation set.
With full supervision, we first cross-validated the hyperparameter α which weights the regression loss (see Eq. 5, in Sect.3) and found that α = 100 yields the best results, as shown in Fig. 24a.Following Siddharth et al. (2017), we keep γ = 1 in all experiments (see Eq. 3, in Sect.3).In Fig. 24b, we show reconstructed images along with the heatmap pose representation, which are realistic and comparable with the ones obtained with the Conditional-DGPose (see Fig. 14).Direct manipulation, when pose representation is changed during the reconstruction process while appearance is kept the same, is illustrated in Fig. 25.Still with full supervision, we show the pose estimation accuracy for different samples in Fig. 26.The Semi-DGPose achieves 93.85% PCK score, normalised at 0.5, in the fully-supervised setup (see Fig. 28).This pose estimation accuracy is on par with the state-of-  Quantitative evaluations of the Semi-DGPose with different levels of supervision using the PSNR and SSIM metrics the-art pose estimators on unconstrained images (Yang et al. 2017).However, since the Human3.6Mwas captured in a controlled environment, a standard (discriminative) pose estimator is expected to perform better.Subsequently, we evaluate it across different levels of supervision, with the PSNR and SSIM metrics and show results in Table 4.In Fig. 27, we show reconstructed images obtained with such different levels.It allows us to observe how image quality is affected when we gradually reduce the availability of labels.Furthermore, we also evaluate the pose estimation accuracy with semi-supervision.The overall PCK curves corresponding to each percentage of supervision in the training set is shown in Fig. 28.Note that, even with only 25% of labels available, our model still obtains 88.35% PCK score, normalised at 0.5, showing the effectiveness of the semi-supervised approach.Qualitative samples are shown in Fig. 29.Again, aiming to illustrate how the gradual decrease of supervision in the training set affects the quality of pose estimation on the test images.
Concerning indirect pose-transfer, as both latent variables corresponding to pose and appearance can be inferred by the model's Encoder (recognition network) at test time, latent variables extracted from different images can be combined in a subsequent step, and employed together as inputs for the Decoder (generative network).The result of that is a generated image combining appearance and body pose, extracted from two different images.The process is done in three phases, as illustrated in Fig. 30.Firstly, the latent pose representation y v 1 is estimated from the first input image   Step 2: the image from which the latent appearance z 2 is estimated (Encoder).
Step 3: the output image generated as a combination of y v1 and z 2 (Decoder).The people's outfits in the output images are approximated to the ones in the original images.However, restricted by the low diversity of outfits observed in Human3.6Mtraining data.Note that, to highlight the separation of appearance and pose, we chose the image on Step 1 to be from camera 2, while the original images are from cameras, 1, 3 and 4, respectively.As can be seen, the background scene is totally defined by the original images   The same hyper-parameters reported previously were used in training.In Table 5, we compare the image quality of reconstructions, while in Fig. 32 we show the comparison concerning the quality of pose reconstructions.Although the Semi-DGPose presents less accurate results, it is important to highlight that it is also tackling the pose estimation task, which is not performed by either one of the other two methods, i.e. the Conditional-DGPose and the PG 2 .To pursue, simultaneously, the understanding, i.e. estimation of pose and appearance in the latent space, and the generation of people directly in images, shows to be indeed a significantly more complex task.Nevertheless, the justification for seeking such a challenging goal, as mentioned before, mainly lie on its important capability of allowing for semi-supervised learning, that is not present in the comparable methods.In Fig. 33, we show comparisons between input and reconstructed images.In some of the samples, we can observe small differences between the original and the reconstructed body postures, mainly regarding the positions of the limbs.This illustrates the higher complexity involved in simultaneously estimating pose and appearance in our latent space.For instance, inaccurate predictions of pose, performed by the Encoder, may have effects into the final reconstructed appearance, and vice-versa, when the latent representations are mapped back to the image space, by the Decoder.Such interdependency does not exist when pose is a given observable variable, as in the case of the conditional models or image-to-image translation networks.
Finally, we highlight indirect pose-transfer in the Deep-Fashion dataset, which is a distinctive capability of the Semi-DGPose, in comparison to related methods.In Fig. 34, we compare the indirect pose-transfer results, from our single-stage structured generative model, the Semi-DGPose, with the results from the image-to-image translation baseline, the PG 2 network (Ma et al. 2017).It is important to notice that our Semi-DGPose model was not trained specifically for pose-transfer, i.e. it was not trained on pairs of images.On the other hand, the PG 2 architecture is trained on pairs of images of the same person, in different poses, scales or point of views (first two images of each set in Fig. 34).
Moreover, in the Semi-DGPose the body pose is estimated by the Encoder network (illustrated in every second image of each set in Fig. 34), along with appearance, while in the PG 2 pose is given as an observable variable to the model.Despite such critical competitive disadvantages, we can observe that the Semi-DGPose produce reasonable results in comparison to the ones from PG 2 .Lastly, it is crucial to call attention for the capabilities of our Semi-DGPose approach such as, interpretability of the latent space, pose estimation, sampling and semi-supervised learning, which are not jointly present in the PG 2 or in the related work from the literature.These features justify our approach for learning a deep generative model of people in images and, to our knowledge, significantly differentiate the Semi-DGPose model from prior art.

Limitations of the Models
Here, we discuss two important limitations common to the Conditional-DGPose and the Semi-DGPose.The first refers to the modelling of appearance in both models.As we mention in Sect. 1, our latent representation of appearance encodes all the visual information in the images (e.g.cloth-ing, skin colours, hairstyles, and background) except for the body pose of the subjects.However, such a strategy does not separate the individual visual characteristics in the latent representation.In Fig. 22 (Sect.5.6.4),we can observe that as the appearance manifold is traversed, the visual features gradually change altogether.A disentangled representation for appearance itself would be needed for allowing control over specific visual features.Another aspect concerning appearance regards limitations to approximate clothing "seen" few times or "unseen" during training.Interestingly, the extrapolation capabilities shown for unseen poses (see Fig. 18 in Sect.5.6.2) is not observed for appearance.For example, in the Human3.6Mdataset, the low diversity of subjects' outfits may eventually prevent the clothing in the reconstructed images to be precisely equal to the ones in the original images, as can be observed in Fig. 30 (Sect.5.7.1).Other works in the literature refer to this same problem concerning the Human3.6Mdataset, e.g.Rhodin et al. (2018).
The second relevant limitation refers to our pose representation.Aiming to investigate and explore the capabilities of simple body representations, we have worked only with 2D pose in our models.Such option turns our approaches more general since they are not dependent on 3D information (e.g.3D models, camera calibration, or multi-view images).It allows, for example, their application on ordinary monocular images.Moreover, this strategy is also less susceptible to body shape variations in comparison to segmentations mask or 3D body meshes, which might not be directly transferable from one person to another.However, such simplicity creates some limitations.An important one concerns the lack of depth information in the body model.Despite the reasonable results obtained with single people in relatively "well-behaved" poses, the models might face difficulties in the presence of stronger self-occlusions associated with particular body postures.In the absence of depth, it is hard to infer, for instance, which one of two overlapping limbs is closer to the camera.Without such explicit information in the body representation, the correct reconstruction might present flaws.
To analyse such issues here, which are present in our both models, we have employed the Conditional-DGPose, trained on the Human3.6Mdataset, to perform crossdomain pose-transfer over single images from short video sequences.Employing a sequence of frames allow us to observe how the performance of the model changes according to the concurrent presence of self-occlusion and different poses.In the current experiments, we have used short videos from the JHMDB dataset (Jhuang et al. 2013).Each "in-the-wild" video depicts a single person performing one activity.The dataset provides 2D pose annotations per frame for all videos.Such annotations are used as inputs for the Conditional-DGPose cross-domain posetransfer.We crop the images maintaining the subjects centralised.
In Fig. 35a, a sequence of frames shows a boy batting a ball while playing baseball (top row) and the correspondent pose-transfer outputs (bottom row).Although the reenacted frames present the gist of the original sequence, already it is possible to observe that overlapping arms and legs appear to be blended in some of the output images (e.g.frames 1 and 5), making evident the problem we have mentioned earlier.Fig. 35b (top row) depicts a football player kicking a ball towards the goal.We call attention for frame 5, in which the self-occluded arm of the original subject turns the upper body of the reconstructed person wider.In frame 9, the concurrent overlapping legs and the unusual pose contribute for an ambiguous posture of the person in the output image, which might be facing forwards or backwards.The particular body pose in frame 25 provokes the misalignment of head, torso and arms in of the body in the output.Finally, even without a task-specific training, we believe that the use of a 3D body representation, which would explicitly encode depth, may be beneficial to mitigate the main issues mentioned above.

Conclusions
In this paper, we have presented a comprehensive deep generative model framework for human pose analysis in images.Our models are based on a principled VAEGAN approach and allow the disentanglement of body posture and visual appearance, aiming for the independent manipulation of such factors.With our conditional-VAEGAN model, the Conditional-DGPose, differently from previous art, we have taken such manipulation to extreme cases, e.g. by performing cross-domain pose-transfer and by hallucinating multiple people in a variety of unseen or even unrealistic poses.Moreover, we have achieved state-of-the-art results on image reconstruction conditioned on pose, outperforming the closest related comparable baseline (Lassner et al. 2017).With a single-stage structured semi-supervised VAE-GAN architecture, the Semi-DGPose, we pursued the joint understanding and generation of people in images, not only mapping images to partially interpretable latent representations but also mapping these representations back to the image space.Importantly, such an approach simultaneously allows for reconstruction, direct manipulation, sampling, pose estimation, indirect pose-transfer, and semi-supervised learning.These joint capabilities differentiate the Semi-DGPose from other methods in the literature and demonstrate a real-world application of structured deep generative models with the highly relevant potential of being less dependable of fully-labelled data.We have systematically evaluated our methods on well-known benchmarks, the Human3.6M, the ChictopiaPlus, and the DeepFashion datasets, comparing our results with the closest related baseline methods in the literature (Lassner et al. 2017;Ma et al. 2017).Such results and comparisons highlight the novelty and effectiveness of our approaches and its capabilities, despite the significant challenge posed by our aimed goal.We believe that we have shown and reinforced the relevance of employing an interpretable and structured latent space, which allows for semi-supervised learning, as well as the importance of tackling the problem with single-stage end-to-end architectures.
intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.To view a copy of this licence, visit http://creativecomm ons.org/licenses/by/4.0/.

A DGPose Architectures Details
Here, we provide implementation details of our both architectures considering the following inputs: images x (batch_size = 64, channels = 3, height = 64, width = 64) and heatmaps y h (batch_size = 64, channels = 24, height = 64, width = 64).Regarding the heatmap labels, the channels correspond to: (i) 14 joints (head top, neck, right shoulder, right elbow, right wrist, right hip, right knee, right ankle, left shoulder, left elbow, left wrist, left hip, left knee, left ankle); (ii) 9 rigid parts (head, right upper arm, right lower arm, right upper leg, right lower leg, left upper arm, left lower arm, left upper leg, left lower leg); (iii) 1 whole body.Finally, in Tables 6 and 7, we show the full definition of both, the Conditional-DGPose and the Semi-DGPose, respectively.We use the following abbreviations: N for the number of kernels/neurons, K for kernel size, S for stride and P for zero padding.
Concerning the layers, CONCAT means concatenation layer, CONV means convolutional layer, BN means batch normalization layer with running average coefficient β = 0.9 and learnable affine transformation, DECONV means transpose convolutional layer, FC means fully connected layer, SUM corresponds to element-wise sum layer and RESIDUAL denotes a residual block, detailed at Table 8.The additional layers can be clearly understood.Finally, particular parameters for specific layers are defined between parenthesis after the layers' names  We use the following abbreviations: N for the number of kernels/neurons, K for kernel size, S for stride and P for zero padding.
Concerning the layers, CONCAT means concatenation layer, CONV means convolutional layer, BN means batch normalization layer with running average coefficient β = 0.9 and learnable affine transformation, DECONV means transpose convolutional layer, FC means fully connected layer, SUM corresponds to element-wise sum layer and RESIDUAL denotes a residual block, detailed at Table 8.The additional layers can be clearly understood.Finally, particular parameters for specific layers are defined between parenthesis after the layers' names

Fig. 1
Fig. 1 Sampled results from our deep generative models for images of people.(a) For a given pose (first image), we show some samples of appearance.(b) For a given appearance (first image), samples of different poses.(c) For an estimated pose (first image) and a given appearance

Fig. 2
Fig. 2 Vector representation.(a) J = 14 joints which compose a 2D pose vector y v ∈ R 2J .(b) An extended 2D vector composed by 24 body parts (J = 14 annotated joints, R = 9 intermediate points between joints and B = 1 central point), such that y v ∈ R 2(J +R+B)

Fig. 3
Fig. 3 Heatmap representation.Heatmaps superimposed corresponding to (a) J = 14 annotated joints, (b) R = 9 rigid parts, and (c) B = 1 whole body; such that y h ∈ R P×H ×W .Right, left and central body parts are denoted by the colours green, blue and red, respectively, in the person-centric representation (Color figure online)

Fig. 4
Fig.4Conditional-DGPose architecture.At the training, the Encoder receives x ⊕ y h as input and learns the posterior q φ (z|x, y h ).The Prior module receives y h alone and learns the distribution p θ (z|y h ).Appearance is sampled z ∼ q φ (z|x, y h ), using the reparametrization trick(Kingma and Welling 2013), and passed to the Decoder, as well as the conditioning pose y h , which is concatenated to the Decoder feature maps.The Decoder then generates a reconstructed image G(y h , z).The

Fig. 5
Fig. 5 Conditional-DGPose direct pose-transfer and manipulation at test time

Fig. 6
Fig. 6 Conditional-DGPose sampling at test time the sampled appearance z and the conditioning pose y h are passed to the Decoder network.In this manner, for a given pose, different appearances can be randomly created from the learned generative model.

Fig. 9
Fig. 9 Semi-DGPose indirect pose-transfer at test time , 3D shape (Loper et al. 2015), and facial segmentation.In contrast to the Human3.6Mdataset, in which each actor always wears the same outfit, it contains 23,011 training, 2913 validation, and 2873 testing images of segmented people (without background) dressed in a great variety of clothes.All the images have an original resolution of 286 × 286 pixels.
Fig. 12. (iii) Accuracy of pose estimation, obtained by the Semi-DGPose model, is measured using the PCK metric with real 2D annotated labels as ground-truths.

Fig. 12
Fig. 12 Accuracy of the reconstructed poses.Samples illustrating best and worst pose reconstructions on the Human3.6Mdataset.Each pair of images shows the pose estimation over the original image (left) and the reconstructed image (right).Lines connect the estimated joints for visualisation purposes.Right limbs, left limbs, and head are shown, respectively, by green, red and blue lines.(a) It illustrates the best reconstructed poses, with PCK@0.5 = 1.00.(b) It illustrates the worst reconstructed poses, with PCK@0.5 = 0.00.All images are 64 × 64 pixels (Color figure online)

Fig. 13
Fig.13Reconstructed images, obtained with each one of the four representations of human pose evaluated: (a) 2D vector, (b) 2D vector extended, (c) heatmaps and (d) heatmaps extended.We highlight the difficult for capturing the spatial extent of some body parts, particularly extremities far from the torso, when the vector representations are adopted.In this example, the use of joints' heatmaps is already sufficient to improve the reconstruction.However, the extended version (with rigid parts and body) turns the model more robust to more complex poses, since the 14 joints are fairly sparse

Fig. 14
Fig. 14 Reconstructions on Human3.6M.From left to right columns we have: joints, rigid parts and body heatmaps; original image and finally, the reconstructed image.In the heatmaps, right parts are shown in green, left parts in red and central parts in blue.Human3.6Mimages are 64 × 64 pixels (Color figure online)

Fig. 16
Fig. 16 Cross-domain pose-transfer on Human3.6M.Here we illustrate the pose-transfer capability of our Conditional-DGPose.On the leftmost column, we show test images from the LSP dataset (Johnson and Everingham 2010), along with their corresponding ground-truth 2D pose annotations, composed of 14 joints.These are taken as conditioners

Fig. 17
Fig. 17 Hallucinating multiple people on Human3.6M.Conditional-DGPose model was trained with images containing only one person.The output images are generated keeping the appearance of the original images but conditioned to the manipulated heatmap pose representation (left).Heatmaps of rigid parts and whole body are not shown for simplicity

Fig. 18
Fig. 18 Generating "unreal" images on Human3.6M.We illustrate the versatility of the model extrapolating the generation of images to unseen scenes.(a) Sampled image in which the pose representation in the centre was manually translated and scaled, producing two additional bodies: one shorter and chunkier (left) and one taller and thinner (right).(b) Reconstructed image in which all the body parts were suppressed, except the head.(c) Pose-transfer in which the position of the head was manually changed, disconnecting it from the rest of the body.Heatmaps of rigid parts and whole body are not shown for simplicity

Fig. 19
Fig. 19 Reconstructions on ChictopiaPlus.In each trio of images we have, respectively: original image (256 × 256), Conditional-DGPose and ClothNet-body (Lassner et al. 2017) reconstructions.Notice that the images generated by our model are much closer to the originals in

Fig. 20
Fig. 20 Accuracy of Poses on ChictopiaPlus.The PCK scores over reconstructed images of our Conditional-DGPose (blue) significantly outperforms the ClothNet-body (Lassner et al. 2017) (red).Detection rate represents the percentage of joints correctly relocated in the reconstructions (Color figure online)

Fig. 21
Fig. 21 Accuracy of Poses on DeepFashion.The PCK scores over reconstructed images of our Conditional-DGPose (blue) performs only slightly below the PG 2 network (Ma et al. 2017) (red), despite the fact it is tackling a significantly more complex problem than image-to-image translation.Detection rate represents the percentage of joints correctly relocated in the reconstructions (Color figure online)

Fig. 22
Fig. 22 Conditional-DGPose Appearance Manifold.Illustration of the appearance manifold on the DeepFashion dataset.We smoothly traverse the manifold a given pose, causing changes in the visual appearance of the person in the image.No image is used as input, Fig. 24 (a) PCK scores for the cross-validation adjustment of the regression loss weight α.(b) Qualitative reconstructions with full supervision

Fig. 26
Fig. 26 Pose Estimation on Human3.6M.Pairs of ground-truth and predicted joints superimposed on the original images.Below each pair, we show the PCK score normalised at 0.5 times the torso size, as usual for the PCK metric.Such normalised distance explains the high scores

Fig. 30
Fig. 30 Indirect pose-transfer on Human3.6M.Step 1: the latent target pose representation y v1 is estimated (Encoder).Step 2: the image from which the latent appearance z 2 is estimated (Encoder).Step 3: the output image generated as a combination of y v1 and z 2 (Decoder).The people's outfits in the output images are approximated to the ones in the original images.However, restricted by the low diversity of outfits observed in Human3.6Mtraining data.Note that, to highlight the separation of appearance and pose, we chose the image on Step 1 to be from camera 2, while the original images are from cameras, 1, 3 and 4, respectively.As can be seen, the background scene is totally defined by the original images

Fig. 29
Fig. 29 Qualitative results of semi-supervised pose estimation.Original image (a), followed by predictions, over the original image, with: (b) 100%, (c) 75%, (d) 50% and (e) 25% of supervision.The figure aims to illustrate how the decrease in supervision affects pose estimation.

Fig. 32 Fig. 33
Fig. 32 Accuracy of Poses on DeepFashion.Quantitative evaluation of Semi-DGPose PCK scores over reconstructed poses.The Semi-DGPose (green) shows less accurate results, however, in contrast to the Conditional-DGPose (blue) and the PG 2 network (Ma et al. 2017) (red), it performs a significantly more complex task, simultaneously executing pose estimation and allowing for semi-supervised learning.Detection rate represents the percentage of joints correctly relocated in the reconstructions

Fig. 34
Fig. 34 Indirect pose-transfer in DeepFashion dataset.In each set of images, we have, respectively: the original image, the target image with the superimposed target pose predicted by the Semi-DGPose, the pose-

Table 1
Average reconstruction errors obtained with the Conditional-DGPose architecture using L1-norm for our validation set

Table 2
Image quality on ChictopiaPlus SSIM

Table 3
Image quality on DeepFashion

Table 5
Image quality on DeepFashionBest result is shown in bold Quantitative evaluation of Semi-DGPose using PSNR and SSIM measures comparing the image quality of reconstructions.The Semi-DGPose shows less accurate results, yet in contrast to the other methods, it performs a significantly more complex task, simultaneously executing pose estimation, and also allowing for semi-supervised learning

Table 8
Architecture of the residual block employed in the DGPose encoder