{'fraction_non_alphanumeric': 0.0320659642693541, 'fraction_numerical': 0.010928604148943132, 'mean_word_length': 5.164582492940702, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Towards Using Clothes Style Transfer for Scenario-aware Person Video Generation

Clothes style transfer for person video generation is a challenging task, due to drastic variations of intra-person appearance and video scenarios. To tackle this problem, most recent AdaIN-based architectures are proposed to extract clothes and scenario features for generation. However, these approaches suffer from being short of fine-grained details and are prone to distort the origin person. To further improve the generation performance, we propose a novel framework with disentangled multi-branch encoders and a shared decoder. Moreover, to pursue the strong video spatio-temporal consistency, an inner-frame discriminator is delicately designed with input being cross-frame difference. Besides, the proposed framework possesses the property of scenario adaptation. Extensive experiments on the TEDXPeople benchmark demonstrate the superiority of our method over state-of-the-art approaches in terms of image quality and video coherence.


INTRODUCTION
Inspired by the huge success of Deep Neural Networks, during this decade, the realm of Clothes Style Transfer has attracted intensive attention from the research community, which aims to generate realistic person scenes satisfying the demands of diverse attributes [1,2,3]. Due to alluring application prospects in controllable person manipulation, virtual try-on clothes texture editing, etc., lots of efforts have been made to improve its performance [2,3,4,5]. More importantly, video format is a finer carrier for delivering visual experience than static images in many tasks (e.g. person pose animation [4]). However, the video-based person generation has not been investigated in depth yet by far [6].
Existing approaches for clothes style transfer can be roughly divided into two classes: warping-based [2,3,7,8,9,10] and image generation-based models [1,4,5]. The former type of methods benefit from preserving informative and detailed features of the clothes. Zhang et al. [3] attempt to estimate a thin plate spline (TPS) transformation for warping the clothing items and refine the coarse results by using a composition mask. Meanwhile, and Yu et al. [2] devise a body segmentation map prediction module to delineate body parts and warped clothing regions. Despite the constant progress achieved by them, it is still difficult to directly transform the spatially misaligned body parts into the desired shapes due to the non-rigid nature of human body. Hence, these approaches are unable to attain satisfactory performance. To mitigate this issue, several approaches [7,8,9,10] probe into the paradigm of transferring clothes from one person to another by estimating a complicated 3D human mesh and warping the textures to cater for the body topology. Nevertheless, these approaches fail to capture the sophisticated interplay of the intrinsic shape and appearance, and thus results in unrealistic synthesis with deformed textures.
Profiting from the invention of GANs [11,12,13], image generation-based approaches have prevailed in image synthesis task, such as [1,4,5,14,15,16,17]. A core driving force behind these methods is to impose the pose guidance on the image generation process. Hence, the photo-realistic people images with arbitrary poses are rendered, whereas the clothes styles are controlled simultaneously by utilizing various valuable human attributes. Early models [14,15,16,17] only focus on keeping the posture and identity without providing user manipulation of human attributes, e.g. head, pants and upper clothes, whereas several recent works [1,4,5] treat the clothes as a type of texture style and try to encode it. Especially, thanks to the high flexibility and strong generalization ability to other clothes styles [5,18], the de facto standard of Adaptive Instance Normalization (AdaIN) and its variants [19] have witnessed remarkable improvements in extracting appearance features [1,5]. While obtaining acceptable performance, they have obvious drawbacks: they can often only perform coarse-grained feature extraction, and cannot restore fine-grained details well, which easily causes blurry clothes and the shortage of identity information. In the field of videobased generation, existing methods formulate this problem as a generation process of image sequence and produce results in a frame-by-frame manner. For example, resorting to a set of sparse trajectories, studies [20] and [21] leverage zeroth-order and first-order Taylor expansions such that the complex transformations are approximated. However, they rarely consider the video spatio-temporal coherence and thus affects the consistency of movements. Albeit the relatively smooth videos, a sequential generator proposed by Wang et al. [13] is solely applied in tasks of single-person pose transfer.
Such limitations and drawbacks drive our exploration of clothes style transfer for person video generation to improve the quality and consistency of the generated video. In this paper, we propose a novel framework for person video generation towards using clothes style transfer. It consists of four components: Pose Landmark Encoder, Characteristic Identity Encoder, Clothes Style Encoder and a Shared Decoder, as illustrated in Figure 1. In specific, we formulate the task of feature learning as three disentangled sub-tasks to avoid the learning conflicts existing in the single-column structures. The disentangled multi-branch scheme is inspired by the natural insight that different salient areas correspond to varying degrees of responses to multiple tasks [22]. Furthermore, to guarantee the spatio-temporal consistency in generated videos and implicitly capture the local frames dependencies, we delicately devise a variant of discriminator, named as inner-frame discriminator, which takes the cross-frame difference as input. Besides, it is worth noting that background/scenarios replacement has also been a new trend for video person generation since it has higher values of privacy and entertainment [23]. Unfortunately, existing approaches [1,5] are scenario-agnostic. Motivated by this observation, we design a strategy to expand our framework's capability of being scenario-aware and improve the flexibility of video generation. To our knowledge, this method provides the first investigation into spatio-temporal consistency and scenario awareness simultaneously for person video generation with clothes style transfer. Extensive experiments are conducted on TEDXPeople benchmark [24] and demonstrate that our proposed method outperforms existing popular approaches in terms of image quality, similarity to realistic images and video smoothness, while embracing the merit of scenario awareness for matting.

Disentangled Multi-branch Encoders
To prevent the model from suffering from learning conflicts often occurring in single-column structure and capture finegrained cues for the downstream decoder, we disentangle different spatial information from the main input and construct a multi-branch structure, which takes the pose landmark images I t p , characteristic identity images I t i and clothes style images I c as input. Note the pose landmark images I t p are obtained using a commonly-used human pose estimation method proposed by [25]. Following previous works [1,4,5], we build our pose landmark encoder upon a three-layer down-sampling network to encode the pose frame sequence. The characteristic identity encoder aims to boost the identity information and get rid of possible distortion, especially in the face region. Specifically, the identity images I t i are disentangled by leveraging a human segmentation method in [26]. Unlike the pose landmark encoder with demands of extracting more abundant and sophisticated features, the identity encoder plays a role of providing weak cues for identity information, and thus we narrow the network width to half of the pose encoder while reducing the number of parameters. For the clothes style encoder, the same segmentor [26] is also employed to generate the clothes input images I c . Besides, during the training phrase, a stochastic regularizer of geometric transformation is adopted to strengthen the model's generalization ability to arbitrary clothes input. In addition, to further increase model's capacity of learning representations, the combination of spatial and channel attention mechanisms [27] is involved in each layer of encoders to adaptively emphasize the informative filters or regions by softly recalibrating corresponding units.

Shared Decoder with Scenario Awareness
After flowing through multi-branch encoders in parallel, the disentangled sources are converted into the fine-grained feature representations. Then, these features are integrated and further processed in the high-level shared decoder. It is worth noting that skip connections are used here to fuse multi-level features while avoiding the issue of gradient vanishing [28]. To let the framework possess higher flexibility of arbitrarily changing scenarios, we design an auxiliary output branch to predict the scenario mask α. The final composition result can be formulated as I composite = αI out + (1 − α)I bg , where I out and α denote the generated frame and the alpha matte for new scenarios, respectively, whereas I bg represents the arbitrary scenario image.

Inner-frame Discriminator
In general, two kinds of discriminators (D P and D I ) are prevailing in current algorithms for pose-guided person image generation, such as [5,17,29]. In detail, D P is leveraged to guarantee the consistency between the pose of generated im-ageÎ t s , and the target pose I t P , while D I concentrates on the quality and reality of the generated images. To make full use of merits of both discriminators, both of them are adopted in our framework.
As described in Section 1, spatio-temporal consistency of generated videos is short of being considered in existing approaches. To alleviate this issues, we devise a inner-frame discriminator D if in parallel with D P and D I , which takes the cross-frame difference as the input and contributes to better video smoothness. In other words, it operates as an strong constraint imposed on adjacent frames to suppress suddenly drastic changes. Formally, given two adjacent framesÎ t s and I t+1 s in the same video, the inner-frame discriminator can be denoted as: . Besides, the sequence discriminator D t in [4,13] is also incorporated into our method to enhance the visual quality of the generated videos since

Inner-frame Discriminator
Difference Fig. 2: The overview of the proposed inner-frame discriminator for spatio-temporal consistency in generated videos, which is accompanied by the sequence discriminator.
it enables the framework to implicitly consider the innerrelationships among frames. Figure 2 delineates the designed scheme of these two discriminators.

Objective Functions
The entire training objective is to supervise the optimization of our proposed framework for the sake of high-quality person videos generation conforming to the input clothes style as well as the identity. Additionally, the posture of the generated person should be compatible with that of input pose images. The elaborate loss function of the whole network is formulated as: where λ adv , λ r , λ s , λ v , λ l are the weights which are used to control the influence of different loss items. L adv indicates the adversarial loss implemented by the LSGAN [30] loss. Following [31], the reconstruction loss L r provides the supervision to impel the generated frames to be close to the ground truths following [31] and [32] while style loss L s aims to maintain style coherence. More importantly, the video loss L v is achieved by discriminators D t and D if illustrated in Section 2 to facilitate the video quality, especially for spatiotemporal coherence. Finally, it is worth noting that the truthfulness degree and identity preservation of generated images heavily rely on the synthesis quality of a family of key positions, such as head and hands parts. Therefore, to aid in improving comprehensive generation quality, we introduce a type of local characteristic discriminator which takes the head/hands segmentation results as input and computes the local characteristic loss term L l .

Dataset and Implementation Details
We evaluate our method on the TEDXPeople dataset provided in [24]. This dataset contains 48,188 videos of TED and TED-X talks. We randomly select 5,000 videos from the entire dataset with a resolution of 256×256. 85% of the dataset is used as training data. The rest is used to validate the performance of clothes style transfer during the inference phase. Besides, images of ImageNet dataset [33] are used as random scenario inputs during training process. The weights for the loss terms are set to λ adv = 1, λ r = 5, λ s = 50, λ v = 1.5, λ l = 2. We adopt Adam optimizer [34] with the momentum set to 0.5 to train our model for around 100k iterations.

Comparison with SOTA Models
In our experiments, Structured similarity (SSIM) [35] and Peak Signal-to-Noise Ratio (PSNR) are employed to measure the similarity between the generated images and the ground truths, whereas Fréchet Inception Distance (FID) [36] is used to assess the realism and consistency of generated images [1,4]. We evaluate the spatio-temporal consistency of the generated videos via the Fréchet Video Distance (FVD) [37]. We compare our method with two existing popular approaches MUST [1] and ADGAN [5]. The quantitative results are demonstrated in Table 1 while the visualization examples are also provided in Figure 3(a). Both quantitative results and visualization examples demonstrate the superiority of our proposed framework. Meanwhile, we further validate the scenario awareness of our framework and several example results are given in Figure 3(b). As it can be observed, the identity of the generated videos remain the same as the source persons, and our approach can manipulate clothes styles and background scenarios flexibly. Video demos are available at https: //github.com/XSimba123/demos-of-csf-sa/

Ablation Study
To better understand each component in our model, we conduct ablation studies on TEDXPeople benchmark (see Table 2), which demonstrates that the multiple encoders structure (I) and attention module (II) have a great contribution to visual quality. The FVD metric shows that two spatiotemporal constraints (III) brings a significant improvement to Method SSIM ↑ PSNR ↑ FID ↓ FVD ↓ ADGAN [5] 0  Table 2: Ablation on disentangled multi-branch encoders (I), attention mechanism (II), spatio-temporal constraints (III) and local characteristic loss (IV).

CONCLUSION
In this work, we propose an approach to tackle scenario-aware clothes style transfer for person videos, which is shown to outperform baseline and recent approaches. This is because our model uses a multi-encoder framework to handle different types of features. And an inner-frame discriminator is proposed to greatly enhance the video temporal coherence. Moreover, we design a framework to support scenario-aware video generation. Experimental results on TEDXPeople dataset confirmed the effectiveness and robustness of our proposed framework.