STGAN: A Unified Selective Transfer Network for Arbitrary Image Attribute Editing

Ming Liu, Yukang Ding, Min Xia, Xiao Liu, Errui Ding, Wangmeng Zuo, Shilei Wen

Introduction

Image attribute editing, aiming at manipulating an image to possess desired attributes, is an interesting but challenging problem with many real-world vision applications. On one hand, it is impracticable to collect paired images with and without desirable attributes (e.g., female and male face images of the same person). Thus, unsupervised generative learning models, e.g., generative adversarial networks (GANs) goodfellow2014generative, have attracted upsurging attention in attribute editing. On the other hand, arbitrary attribute editing actually is a multi-domain image-to-image translation task. Learning single translation model for each specific attribute editing task may achieve limited success li2016DIAT; zhu2017unpaired; shen2017learning. But it is ineffective in exploiting the entire training data, and the learned models grows exponentially along with the number of attributes. To handle this issue, several arbitrary attribute editing approaches perarnau2016invertible; he2017arbitrary; Choi_2018_CVPR have been developed, which usually (i) use encoder-decoder architecture, and (ii) take both source image and target attribute vector as input.

Albeit their extensive deployment, encoder-decoder networks remain insufficient for high quality attribute editing. Attribute can be of either local, global, or abstract characteristic of the image. In order to properly manipulate image attribute, spatial pooling or downsampling generally are required to obtain high-level abstraction of image content and attributes. For example, auto-encoder architecture is adopted in perarnau2016invertible; lample2017fader; he2017arbitrary, and shallow encoder-decoder with residual blocks is used in zhu2017unpaired; Choi_2018_CVPR. However, the introduction of bottleneck layer, i.e., the innermost feature map with minimal spatial size, gives rise to blurry and low quality editing result. As a remedy, some researchers suggest to add one he2017arbitrary or multiple isola2017image skip connections between encoder and decoder layers. Unfortunately, as further shown in Sec. 3.1, the deployment of skip connections improves image quality of editing result but is harmful to attribute manipulation ability of learned model. Another possible solution is to employ spatial attention network to allow attribute-specific region editing zhang2018generative, which, however, is effective only for local attributes and not designed for arbitrary attribute editing.

Moreover, most existing methods exploit both source image and target attribute vector for arbitrary attribute editing. In particular, the encoders in lample2017fader; he2017arbitrary only take source image as input to produce latent code, and then the decoders utilize both latent code and target attribute vector to generate editing result. In contrast, StarGAN Choi_2018_CVPR directly takes source image and target attribute vector as input. However, for arbitrary attribute editing only the attributes to be changed are required, taking full target attribute vector as input may even have adverse effect on editing result. As shown in Fig. 2, although all attributes keep unchanged, unwanted changes and visual degradation can be observed in the results by AttGAN he2017arbitrary and StarGAN Choi_2018_CVPR, mainly ascribing to the limitation of encoder-decoder and the use of target attribute vector as input.

To address the above issues, this work investigates arbitrary attribute editing from selective transfer perspective and presents a STGAN model. In terms of selective, our STGAN is suggested to (i) only consider the attributes to be changed, and (ii) selectively concatenate encoder feature in editing attribute irrelevant regions with decoder feature. In terms of transfer, our STGAN is expected to adaptively modify encoder feature to match the requirement of varying editing task, thereby providing a unified model for handling both local and global attributes.

To this end, instead of full target attribute vector, our STGAN takes the difference between target and source attribute vectors as input to encoder-decoder. Subsequently, selective transfer units (STUs) are proposed to adaptively select and modify encoder feature, which is further concatenated with decoder feature for enhancing both image quality and attribute manipulation ability. In particular, STU is added to each pair of encoder and decoder layers, and takes both encoder feature, inner state, and difference attribute vector into consideration for exploiting cross-layer consistency and task specificity. From Figs. 1 and 2, our STGAN can generate high quality and photo-realistic results for arbitrary attribute editing, and obtain near-ideal reconstruction when the target and source attributes are the same. To sum up, the contribution of this work involves:

Instead of all target attributes, difference attribute vector is taken as input to enhance the flexible translation of attributes and ease the training procedure.

Selective transfer units are presented and incorporated with encoder-decoder for simultaneously improving attribute manipulation ability and image quality.

Experimental results show that our STGAN performs favorably against state-of-the-arts in arbitrary facial attribute editing and season translation.

Related Work

Encoder-Decoder Architecture. In their pioneer work hinton1994autoencoders, Hinton and Zemel proposed an autoencoder network, which consists of an encoder to map the input into latent code and a decoder to recover from the latent code. Subsequently, denoising autoencoders Vincent2008Extracting are presented to learn representation robust to partial corruption. Kingma and Welling kingma2013auto suggested a Variational Autoencoder (VAE), which validates the feasibility of encoder-decoder architecture to generate unseen images. Recent studies show that skip connections ronneberger2015u; isola2017image between encoder and decoder layers usually benefit the training stability and visual quality of generated images. However, as discussed in Sec. 3.1, skip connections actually improves image quality at the cost of weakened attribute manipulation ability, and should be carefully used in arbitrary attribute editing.

Generative Adversarial Networks. GAN goodfellow2014generative; radford2015unsupervised is originally proposed to generate images from random noise, and generally consists of a generator and a discriminator which are trained in an adversarial manner and suffer from the mode collapse problem. Recently, enormous efforts have been devoted to improving the stability of learning. In arjovsky2017wasserstein; gulrajani2017improved, Wasserstein-1 distance and gradient penalty are suggested to improve stability of the optimization process. In larsen2016autoencoding, the VAE decoder and GAN generator are collapsed into one model and optimized by both reconstruction and adversarial loss. Conditional GAN (cGAN) mirza2014conditional; isola2017image takes conditional variable as input to the generator and discriminator to generate image with desired properties. As a result, GAN has become one of the most prominent models for versatile image generation goodfellow2014generative; radford2015unsupervised, translation isola2017image; zhu2017unpaired, restoration ledig2017photo; Li_2018_ECCV and editing pathak2016context tasks.

Image-to-Image Translation. Image-to-image translation aims at learning cross-domain mapping in supervised or unsupervised settings. Isola et al. isola2017image presented a unified pix2pix framework for learning image-to-image translation from paired data. Improved network architectures, e.g., cascaded refinement networks chen2017photographic and pix2pixHD Wang_2018_CVPR, are then developed to improve the visual quality of synthesized images. As for unpaired image-to-image translation, additional constraints, e.g., cycle consistency zhu2017unpaired and shared latent space liu2017unsupervised, are suggested to alleviate the inherent ill-posedness of the task. Nonetheless, arbitrary attribute editing actually is a multi-domain image-to-image translation problem, and cannot be solved with scalability by aforementioned methods. To address this issue, anoosheh2018ComboGAN and hui2017unsupervised decouple generators by learning domain-specific encoders/decoders with shared latent space, but are still limited in scaling to change multiple attributes of an image.

Facial Attribute Editing. Facial attribute editing is an interesting multi-domain image-to-image translation problem and has received considerable recent attention. While several methods have been proposed to learn single translation model for each specific attribute editing task li2016DIAT; shen2017learning; Chen_2018_CVPR; zhang2018generative, they suffer from the limitation of image-to-image translation and cannot well scale to arbitrary attribute editing. Therefore, researchers resort to learning a single model for arbitrary attribute editing. IcGAN perarnau2016invertible adopts an encoder to generate latent code of an image, and a cGAN to decode latent code conditioned on target attributes. However, IcGAN first trains the cGAN model followed by the encoders, greatly restricting its reconstruction ability. Lample et al. lample2017fader trained the FaderNet in an end-to-end manner by imposing adversarial constraint to enforce the independence between latent code and attributes. ModularGAN Zhao_2018_ECCV presents a feasible solution to connect specific attribute editing to arbitrary attribute editing, but its computation time gradually increases along with the number of attributes to be changed. StarGAN Choi_2018_CVPR and AttGAN he2017arbitrary elaborately tackle arbitrary attribute editing by taking target attribute vector as input to the transform model. In this work, we analyze the limitation of StarGAN Choi_2018_CVPR and AttGAN he2017arbitrary, and further develop a STGAN for simultaneously enhancing the attribute manipulation ability and image quality.

Proposed Method

This section presents our proposed STGAN for arbitrary attribute editing. To begin with, we use AttGAN as an example to analyze the limitation of skip connections. Then, we formulate STGAN by taking difference attribute vector as input and incorporating selective transfer units into encoder-decoder structure. Finally, network architecture (see Fig. 5) and model objective of STGAN are provided.

StarGAN Choi_2018_CVPR and AttGAN he2017arbitrary adopt encoder-decoder structure, where spatial pooling or downsampling are essential to obtain high level abstract representation for attribute manipulation. Unfortunately, downsampling irreversibly diminishes spatial resolution and fine details of feature map, which cannot be completely recovered by transposed convolutions and the results are prone to blurring or missing details. To enhance image quality of editing result, AttGAN he2017arbitrary applies one skip connection between encoder and decoder, but we will show that it is still limited.

To analyze the effect and limitation of skip connections, we test four variants of AttGAN on the test set: (i) AttGAN w/o skip connection (AttGAN-ED), (ii) AttGAN model released by He et al. he2017arbitrary with one skip connection (AttGAN), (iii) AttGAN with two skip connections (AttGAN-2s), and (iv) AttGAN with all symmetric skip connections ronneberger2015u (AttGAN-UNet). Table 1 lists the PSNR/SSIM results of reconstruction by keeping target attribute vector the same as the source one, and Fig. 3 shows the reconstruction results of an image. It can be seen that adding skip connections does benefit the reconstruction of fine details, and better result can be obtained with the increase of skip connections. By setting target attribute vector different from source one, Fig. 4 further assesses the facial attribute generation accuracy via a facial attribute classification model We train the model on CelebA liu2015faceattributes dataset which can achieve 94.5%94.5\% mean accuracy on the 13 attributes we use.. While adding one skip connection, i.e., AttGAN, only slightly decreases generation accuracy for most attributes, notable degradation can be observed by adding multiple skip connections. Thus, the deployment of skip connections improves reconstruction image quality at the cost of weakened attribute manipulation ability, mainly attributing to that skip connection directly concatenates encoder and decoder features. To circumvent this dilemma, we present our STGAN to employ selective transfer units to adaptively transform encoder features guided by attributes to be changed.

2 Taking Difference Attribute Vector as Input

Both StarGAN Choi_2018_CVPR and AttGAN he2017arbitrary take target attribution vector attt\mathbf{att}_{t} and source image x\mathbf{x} as input to the generator. Actually, the use of full target attribution vector is redundant and may be harmful to editing result. In Fig. 2, the target attribution vector attt\mathbf{att}_{t} is exactly the same as on the source one atts\mathbf{att}_{s}, but StarGAN Choi_2018_CVPR and AttGAN he2017arbitrary may manipulate some unchanged attributes by mistake. From Fig. 2, after editing the face image with blond hair becomes more blond. Moreover, they even incorrectly adjust hair length of a source image with the attribute female.

For arbitrary image attribute editing, instead of full target attribute vector, only the attributes to be changed should be considered to preserve more information of source image. So we define the difference attribute vector as the difference between target and source attribute vectors,

Taking attdiff\mathbf{att}_{\mathit{diff}} as input can bring several distinctive merits. First, the attributes to be changed are only a small set of attribute vector, and the use of attdiff\mathbf{att}_{\mathit{diff}} usually makes the model easier to train. Second, in comparison to attt\mathbf{att}_{\mathit{t}}, attdiff\mathbf{att}_{\mathit{diff}} can provide more valuable information for guiding image attribute editing, including whether an attribute is required to edit or not, toward what direction an attribute should be changed. The information can then be utilized to design proper model to transform and concatenate encoder feature with decoder feature, and improve image reconstruction quality without sacrifice of attribute manipulation accuracy. Finally, in practice attdiff\mathbf{att}_{\mathit{diff}} actually is more convenient to be provided by user. When taking attt\mathbf{att}_{\mathit{t}} as input, the user is required to either manually supply all target attributes, or modify source attributes provided by some attribute prediction method.

3 Selective Transfer Units

Fig. 5 shows the overall architecture of our STGAN. Instead of directly concatenating encoder with decoder features via skip connection, we present selective transfer unit (STU) to selectively transform encoder feature, making it compatible and complementary to decoder feature. Naturally, the transform is required to be adaptive to the changed attributes, and be consistent among different encoder layers. Thus, we modify the structure of GRU cho2014learning; chung2014empirical to build STUs for passing information from inner layers to outer layers.

Without loss of generality, we use the l\mathit{l}-th encoder layer as an example. Denote by fencl\mathbf{f}_{\mathit{enc}}^{\mathit{l}} the encoder feature of the l\mathit{l}-th layer, and sl+1\mathbf{s}^{\mathit{l}+1} the hidden state from the l+1\mathit{l}+1-th layer. For convenience, the difference attribute vector attdiff\mathbf{att}_{\mathit{diff}} is stretched to have the same spatial size of sl+1\mathbf{s}^{\mathit{l}+1}. Different from sequence modeling, feature maps across layers are of different spatial size. So we first use transposed convolution to upsample hidden state sl+1\mathbf{s}^{\mathit{l}+1},

where [⋅,⋅][\cdot,\cdot] denotes the concatenation operation, and ∗T\ast_{T} denotes transposed convolution. Then, STU adopts the mathematical model of GRU to update the hidden state sl\mathbf{s}^{l} and transformed encoder feature ftl\mathbf{f}_{t}^{l},

where ∗\ast denotes the convolution operation, ∘\circ denotes entry-wise product, and σ(⋅)\sigma(\cdot) stands for the sigmoid function.

The introduction of the reset gate rl\mathbf{r}^{\mathit{l}} and update gate zl\mathbf{z}^{\mathit{l}} allows us control the contribution of hidden state, difference attribute vector, and encoder feature in a selective manner. Moreover, the convolution transform and linear interpolation in Eqns. (6) and (7) provide an adaptive means for the transfer of encoder feature and its combination with hidden state. In comparison to GRU where ftl\mathbf{f}_{\mathit{t}}^{\mathit{l}} is adopted as the output of hidden state, we take sl\mathbf{s}^{\mathit{l}} as the output of hidden state and ftl\mathbf{f}_{\mathit{t}}^{\mathit{l}} as the output of transformed encoder feature. And experiments empirically validate that such modification can bring moderate gains on attribute generation accuracy.

4 Network Architecture

Our STGAN is comprised of two components, i.e., a generator G\mathit{G} and a discriminator D\mathit{D}. Fig. 5 illustrates the network structure of G\mathit{G} consisting of an encoder Genc\mathit{G_{enc}} for abstract latent representation and a decoder Gdec\mathit{G_{dec}} for target image generation. The encoder Genc\mathit{G_{enc}} contains five convolution layers with kernel size 4 and stride 2, while the decoder Gdec\mathit{G_{dec}} has five transposed convolution layers. Besides, STU is applied right after each of the first four encoder layers, denoted by (ftl,sl)=Gstl(fencl,sl+1,attdiff)(\mathbf{f}_{\mathit{t}}^{\mathit{l}},\mathbf{s}^{\mathit{l}})=\mathit{G_{st}^{\mathit{l}}}(\mathbf{f}_{\mathit{enc}}^{\mathit{l}},\mathbf{s}^{\mathit{l}+1},\mathbf{att}_{\mathit{diff}}).

The discriminator D\mathit{D} has two branches Dadv\mathit{D_{adv}} and Datt\mathit{D_{att}}. Dadv\mathit{D_{adv}} consists of five convolution layers and two fully-connected layers to distinguish whether an image is a fake image or a real one. Datt\mathit{D_{att}} shares the convolution layers with Dadv\mathit{D_{adv}}, but predicts an attribute vector by another two fully-connected layers. Please refer to the suppl. for more details on the network architecture.

5 Loss Functions

Given an input image x\mathbf{x}, the encoder features can be obtained by,

where f={fenc1,...,fenc5}\mathbf{f}=\{\mathbf{f}^{1}_{\mathit{enc}},...,\mathbf{f}^{5}_{\mathit{enc}}\}. Then, guided by attdiff\mathbf{att}_{\mathit{diff}}, STUs are deployed to transform encoder features for each layer,

Note that we adopt four STUs, and directly pass fenc5\mathbf{f}^{5}_{\mathit{enc}} to Gdec\mathit{G_{dec}}. The STUs deployed in different layers do not share parameters due to that (i) the dimensions are different and (ii) the features of inner layers are more abstract than those of the outer layers.

Let ft={ft1,...,ft4}\mathbf{f}_{\mathit{t}}=\{\mathbf{f}^{1}_{\mathit{t}},...,\mathbf{f}^{4}_{\mathit{t}}\}. Thus, the editing result of Gdec\mathit{G_{dec}} can be given by,

In the following, we detail the reconstruction, adversarial, and attribute manipulation losses which are collaborated to train our STGAN.

Reconstruction loss. When the target attributes are exactly the same as source ones, i.e., attdiff=0\mathbf{att}_{\mathit{diff}}=\mathbf{0}, it is natural to require that the editing result approximates the source image. Thus the reconstruction loss is defined as,

Adversarial loss. When the target attributes are different from source ones, i.e., attdiff≠0\mathbf{att}_{\mathit{diff}}\neq\mathbf{0}, the ground-truth of editing result will be unavailable. Therefore, adversarial loss goodfellow2014generative is employed for constraining the editing result to be indistinguishable from real images. In particular, we follow Wasserstein GAN (WGAN) arjovsky2017wasserstein and WGAN-GP gulrajani2017improved, and define the losses for training DadvD_{adv} and GG as,

where x^\hat{\mathbf{x}} is sampled along lines between pairs of real and generated images.

Attribute manipulation loss. Even the ground-truth is missing, we can require the editing result to possess the desired target attributes. Thus, we introduce an attribute classifier Datt\mathit{D_{att}} which shares the convolution layers with Dadv\mathit{D_{adv}}, and define the following attribute manipulation losses for training Datt\mathit{D_{att}} and generator G\mathit{G},

where atts/t(i)\mathbf{att}_{\mathit{s}/\mathit{t}}^{(\mathit{i})} (Datt(i)(x)\mathit{D}_{\mathit{att}}^{(\mathit{i})}(\mathbf{x})) denotes the i\mathit{i}-th attribute value of atts/t\mathbf{att}_{\mathit{s}/\mathit{t}} (Datt(x)\mathit{D}_{\mathit{att}}(\mathbf{x})).

Model Objective. Taking the above losses into account, the objective to train the discriminator D\mathit{D} can be formulated as,

and that for the generator G\mathit{G} is,

where λ1\lambda_{1}, λ2\lambda_{2}, and λ3\lambda_{3} are the model tradeoff parameters.

Experiments

We train the model by the ADAM kingma2014adam optimizer with β1=0.5\beta_{1}=0.5 and β2=0.999\beta_{2}=0.999. The learning rate is initialized as 2×10−42\times 10^{-4} and decays to 2×10−52\times 10^{-5} for fine-tuning after 100 epochs. In all experiments, the tradeoff parameters in Eqns. (17) and (18) are set to λ1=1\lambda_{1}=1, λ2=10\lambda_{2}=10 and λ3=100\lambda_{3}=100. All the experiments are conducted in the TensorFlow abadi2016tensorflow environment with cuDNN 7.1 running on a PC with Intel(R) Xeon(R) E3-1230v5 CPU 3.40GHz and Nvidia GTX1080Ti GPU. The source code can be found at https://github.com/csmliu/STGAN.git.

Following he2017arbitrary; Choi_2018_CVPR, we first evaluate our STGAN for arbitrary facial attribute editing on the CelebA dataset liu2015faceattributes which has been adopted by most relevant works perarnau2016invertible; lample2017fader; he2017arbitrary; Choi_2018_CVPR.

Dataset and preprocessing. The CelebA dataset liu2015faceattributes contains 202,599 aligned facial images cropped to 178×218178\times 218, with 40 with/without attribute labels for each image. The images are divided into training set, validation set and test set. We take 1,000 images from the validation set to assess the training process, use the rest of the validation set and the training set to train our STGAN model, and utilize the test set for performance evaluation. We consider 13 attributes, including Bald, Bangs, Black Hair, Blond Hair, Brown Hair, Bushy Eyebrows, Eyeglasses, Male, Mouth Slightly Open, Mustache, No Beard, Pale Skin and Young, due to that they are more distinctive in appearance and cover most attributes used by the relevant works. In our experiment, the central 170×170170\times 170 region of each image is cropped and resized to 128×128128\times 128 by bicubic interpolation. Training and inference time please refer to the suppl.

Qualitative results. We compare STGAN with four competing methods, i.e., IcGAN perarnau2016invertible, FaderNet lample2017fader, AttGAN he2017arbitrary and StarGAN Choi_2018_CVPR. The qualitative results are shown in Fig. 6. The results of AttGAN are generated by the released model, and we retrain other models for a fair comparison. It can be observed from Fig. 6, all the competing methods are still limited in manipulating complex attributes, e.g., Bald, Hair, and Age, and are prone to over-smoothing results. Besides, their results are more likely to be insufficiently modified and photo non-realistic when dealing with complex and/or multiple attributes. In comparison, our STGAN is effective in correctly manipulating the desired attributes, and can produce results with high image quality. More editing results are given in the suppl.

Quantitative evaluation. The performance of attribute editing can be evaluated from two aspects, i.e., image quality and attribute generation accuracy. Due to the unavailability of editing result, we resort to two alternative measures for quantitative evaluation of our STGAN. First, we use the training set of STGAN to train a deep attribute classification model which can attain an accuracy of 94.5% for the 13 attributes on the test set. Then Fig. 7 shows the attribute generation accuracy, i.e., classification accuracy on the changed attributes of editing results. It can be seen that our STGAN outperforms all the competing methods with a large margin. For the attributes Bald, Black Hair, Brown Hair, and Eyebrows, STGAN achieves 20% accuracy gains against the competing methods.

As for image quality, we keep target attribute vector the same as the source one, and give the the PSNR/SSIM results of reconstruction in Table 2. Benefited from the STUs and difference attribute vector, our STGAN achieves much better reconstruction (>7>7 dB by PSNR) in comparison to AttGAN and STGAN. The result is consistent with Fig. 2. The reconstruction ability of IcGAN is very limited due to the training procedure. FaderNet obtains better reconstruction results, mainly ascribing to that each FaderNet model is trained to deal with only one attribute.

User study. User study on a crowdsourcing platform is conducted to evaluate the generation quality of three top-performance methods, i.e., AttGAN, StarGAN and STGAN. We consider 11 tasks for 13 attributes, as the transfer among Blond Hair, Black Hair and Brown Hair are merged into Hair Color. For each task, 50 validated people participate in and each of them is given 50 questions. In each question, people are given a source image randomly selected from test set and the editing results by AttGAN, StarGAN and STGAN. For a fair comparison, the results are shown in a random order. The users are instructed to choose the best result which changes the attribute more successfully, is of higher image quality and better preserves the identity and fine details of source image. The results are shown in Table 3, and STGAN has higher probability to be selected as the best method on all the 11 tasks.

2 Season Translation

We further train our STGAN for image-to-image translation between summer and winter using the dataset released by CycleGAN zhu2017unpaired. The dataset contains photos of Yosemite, including 1,231 summer and 962 winter images in the training set, and 309 summer and 238 winter images for testing. We also randomly select 100 images from the training set to validation. All images are used as the original size of 256×256256\times 256.

We compare our STGAN with AttGAN he2017arbitrary, StarGAN Choi_2018_CVPR, and CycleGAN released by Zhu et al. zhu2017unpaired. Note that CycleGAN uses two generators respectively for summer→\rightarrowwinter and winter→\rightarrowsummer translation, while the other three methods conduct the two tasks with a single model. Fig. 8 shows several examples of translation results. It can be seen that STGAN performs favorably against the competing methods. We also conduct a user study using the same setting for facial attribute editing. From Table 4, our STGAN has a probability of more than 50% to win among the four competing methods.

Ablation Study

Using facial attribute editing, we implement several variants of STGAN, and evaluate them on CelebA liu2015faceattributes to assess the role of difference attribute vector and STUs. Concretely, we consider six variants, i.e., (i) STGAN: original STGAN, (ii) STGAN-dst: substituting difference attribute vector with target attribute vector, (iii) STGAN-conv: instead of STU, applying a convolution operator by taking encoder feature and difference attribute vector as input to modify encoder feature, (iv) STGAN-conv-res: adopting the residual learning formulation to learn the convolution operator in STGAN-conv, (v) STGAN-gru: replacing STU with GRU in STGAN, (vi) STGAN-res: adopting the residual learning formulation to learn the STU in STGAN. We also train AttGAN and StarGAN models with difference attribute vector, denoted by AttGAN-diff and StarGAN-diff. Figs. 9 and 10 show their results on attribute manipulation. Please refer to the suppl. for qualitative results.

Difference attribute vector vs. target attribute vector. In Fig. 9, we present the comparison results of AttGAN, StarGAN and STGAN-dst with their counterparts (i.e., AttGAN-diff, StarGAN-diff and STGAN) by using difference attribute vector. One can see that difference attribute vector generally benefit attribute generation accuracy for all the three models. Moreover, empirical studies show that the use of difference attribute vector gives rise to training stability as well as image reconstruction performance. Note that while AttGAN-diff and StarGAN-diff perform better than AttGAN and StarGAN, they still suffer from the poor image quality.

Selective Transfer Unit vs. its variants. Fig. 10 reports the attribute generation accuracy of several STGAN variants for transforming encoder feature conditioned on difference attribute vector. The two convolutional methods, i.e., STGAN-conv and STGAN-conv-res, are significantly inferior to STGAN, indicating that they are limited in selective transfer of encoder feature. In comparison to STGAN-conv, STGAN-conv-res achieves relatively higher attribute generation accuracy. So we also compare STGAN with STGAN-res to check whether STU can be improved via residual learning. However, due to the selective ability of STUs, further deployment of residual learning cannot bring any gains for most attributes, and performs worse for several global (e.g., Gender, Age) and fine (e.g., Mustache, Beard) attributes. Finally, STGAN is compared with STGAN-gru by using transformed feature as hidden state. Although STGAN-gru performs better on Bald, STGAN is slightly superior to STGAN-gru for most attributes and the gain is notable for attributes Gender and Mustache.

Conclusion

In this paper, we study the problem of arbitrary image attribute editing for selective transfer perspective, and present a STGAN model by incorporating difference attribute vector and selective transfer units (STUs) in encoder-decoder network. By taking difference attribute vector rather than target attribute vector as model input, our STGAN can focus on editing the attributes to be changed, which greatly improves the image reconstruction quality and enhances the flexible translation of attributes. Furthermore, STUs are presented to adaptively select and modify encoder feature tailored to specific attribute editing task, thereby improving attribute manipulation ability and image quality simultaneously. Experiments on arbitrary facial attribute editing and season translation show that our STGAN performs favorably against state-of-the-arts in terms of attribute generation accuracy and image quality of editing results.

Acknowledgement. This work was supported in part by the National Natural Science Foundation of China under grant No. 61671182 and 61872118.

References