{'fraction_non_alphanumeric': 0.025464180251607946, 'fraction_numerical': 0.012337688604829901, 'mean_word_length': 4.662276683463124, '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': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Neural Crossbreed: Neural Based Image Metamorphosis

We propose Neural Crossbreed, a feed-forward neural network that can learn a semantic change of input images in a latent space to create the morphing effect. Because the network learns a semantic change, a sequence of meaningful intermediate images can be generated without requiring the user to specify explicit correspondences. In addition, the semantic change learning makes it possible to perform the morphing between the images that contain objects with significantly different poses or camera views. Furthermore, just as in conventional morphing techniques, our morphing network can handle shape and appearance transitions separately by disentangling the content and the style transfer for rich usability. We prepare a training dataset for morphing using a pre-trained BigGAN, which generates an intermediate image by interpolating two latent vectors at an intended morphing value. This is the first attempt to address image morphing using a pre-trained generative model in order to learn semantic transformation. The experiments show that Neural Crossbreed produces high quality morphed images, overcoming various limitations associated with conventional approaches. In addition, Neural Crossbreed can be further extended for diverse applications such as multi-image morphing, appearance transfer, and video frame interpolation.

. Neural Crossbreed creates a morphing effect given two input images (middle images between the red boxes). This morphing transition can be extended to a 2D content-style transition manifold so that content and style swapped images can also be generated (green boxes).
We propose Neural Crossbreed, a feed-forward neural network that can learn a semantic change of input images in a latent space to create the morphing effect. Because the network learns a semantic change, a sequence of meaningful intermediate images can be generated without requiring the user to specify explicit correspondences. In addition, the semantic change learning makes it possible to perform the morphing between the images that contain objects with significantly different poses or camera views. Furthermore, just as in conventional morphing techniques, our morphing network can handle shape and appearance transitions separately by disentangling the content and the style transfer for rich usability. We prepare a training dataset for morphing using a pre-trained BigGAN, which generates an intermediate image by interpolating two latent vectors at an intended morphing value. This is the first attempt to address image morphing using a pre-trained generative model in order to learn semantic transformation. The experiments show

INTRODUCTION
To create a smooth transition between a given pair of images, conventional image morphing approaches typically go through the following three steps [Wolberg 1998]: establishing correspondences between the two input images, applying a warping function to make the shape changes of the objects in the images, and gradually blending the images together for a smooth appearance transition. Because the warping and blending functions can be defined separately, they can be controlled individually with fine details [Liao et al. 2014;Nguyen et al. 2015;Scherhag et al. 2019]. Thanks to various interesting transformation effects it produces from one digital image to another, image morphing has been proven to be a powerful tool for visual effects in movies, television commercials, music videos, and games.
While conventional approaches to image morphing have long been studied and received much attention for the generation of interesting effects, they still suffer from some common limitations that prevent wider adoption of the technique. For example, conventional morphing algorithms often require the specification of correspondences between the two images. In order to automate the process, most computer vision techniques assume that the two images are closely related and this assumption does not hold in many cases, so manual specification of the correspondences is usually inevitable. Another challenge is involved with occlusion of part of the object to which a warping function is applied. A visible part of one image can be invisible in the other image and vice versa. This places a constraint in that the two images must have a perceptually similar semantic structure in terms of object pose and camera view when the user selects a pair of input images. Furthermore, two target objects with different textures are likely to produce an intermediate look of superimposed appearance due to a blending operation even if their shapes are well aligned.
Recent research on learning-based image generative models has shown that high-quality images can be generated from random noise vectors [Goodfellow et al. 2014;Kingma and Welling 2014]. More recently, approaches to generating synthetic images that are indistinguishable from real ones [Brock et al. 2019;Karras et al. 2019a] have also been reported. In this line of research, by walking in a latent space the model is capable of generating images with semantic changes [Jahanian et al. 2019;Radford et al. 2016]. On the basis of this finding, we revisit the image morphing problem to overcome the limitations associated with conventional approaches by analyzing the semantic changes occurring by walking in a latent space. The manual specification of correspondences can be bypassed because semantic transformation can be learned in the latent manifold. Moreover, unlike traditional morphing techniques that sometimes distort the images to align the objects in them, the generative model creates proper intermediate images for the occluded regions in the reference images located at two different points in the latent space. In addition, unnatural blending of two textures can also be avoided.
Tackling the image morphing problems with the approach of walking in a latent space poses its own challenges. First, the generative model synthesizes images from randomly sampled high dimensional latent vectors; it is not clear how to associate user provided input images with the latent vectors that would generate the images. Second, it is extremely difficult to disentangle the vectors into each component that represents the shape and appearance separately, which is trivial in conventional morphing methods. Third, the generative model often produces low-fidelity images when the sampled latent vector is out of the range of the manifold.
In this paper, we propose Neural Crossbreed, a novel end-to-end neural network for image morphing, which overcomes the limitations of conventional morphing methods by learning the semantic changes in a latent space while walking. The contributions of our method are summarized as follows: 1) The morphing process is fully automatic and does not require any manual specification of correspondences.
2) The constraints on the object pose and camera view are much less restrictive compared to those required by conventional approaches when the user selects a pair of input images. 3) Although the morphing is performed in a latent space, the shape and appearance transitions can be handled separately for rich usability, which is similar to the benefits ensured by conventional approaches. In addition, since our method uses a deep neural network, the inference time for the morphing between two images is much faster than that required by conventional methods that typically spend a long time to optimize the warping functions. Image Morphing Over the past three decades, image morphing has been developed in a direction that reduces user intervention in establishing correspondences between the two images [Wolberg 1998]. In the late 1980s, mesh warping that uses mesh nodes as pairs of correspondences was pioneered [Smythe 1990]. Thereafter, field morphing utilizing simpler line segments than meshes was developed [Beier and Neely 1992]. A recent notable study performed the optimization of warping fields in a specific domain to reduce user intervention [Liao et al. 2014] but still required sparse user correspondences. Following this research direction, we propose an end-to-end network for automatic image morphing obviating the need for the user to specify corresponding primitives.

RELATED WORK
Image Generation via Latent Space Generative models have shown that semantically meaningful intermediate images can be produced by moving from one vector to another in a latent space [Brock et al. 2019;Radford et al. 2016]. Recently, an interesting art tool called Ganbreeder [Simon 2018] was introduced, which discovers new images by exploring a latent space randomly. Because Ganbreeder makes it necessary to associate the input image with a latent vector, it is difficult for the user to provide their own images as input, which limits practical use. To address this, a group of Overview of Neural Crossbreed. The training data is sampled from the pre-trained teacher generative model and used by the student network to learn the semantic changes of the generative model. Once training is complete, the student network can morph the real images entered by the user.
research focuses on embedding given images into the latent space of pre-trained generative models [Abdal et al. 2019a,b;Lipton and Tripathi 2017]. However, this approach often results in the loss of the details of the original image and requires a number of iterative optimizations that take a long time to embed a single image [Bau et al. 2019]. In this paper, our network learns semantic image changes produced by random walking in a latent space while taking a form consisting of an encoder and decoder to accept user images. Table 1 highlights the advantages of our method compared with previous approaches. Content and Style Disentanglement Traditional image morphing methods control the shape and appearance transitions individually by decoupling warping and blending operations [Liao et al. 2014;Nguyen et al. 2015;Scherhag et al. 2019]. A similar concept was introduced for the style transfer. For instance, it is possible to convert a photo to a famous style painting while preserving the content of the photo [Gatys et al. 2015;Huang and Belongie 2017;Kotovenko et al. 2019;Xie et al. 2007]. Inspired by this concept, we designed a network that allows the user to perform decoupled content and style transitions; in this paper, we also use the same terminology of content and style transitions, as used in the work of Xie et al. [2007].
Neural based Image Manipulation Some researchers tried to interpret the latent space of generative models to manipulate the image [Chen et al. 2016;Jahanian et al. 2019;Radford et al. 2016;Shen et al. 2019]. A challenge in this direction of research lies in how to associate user provided input images with latent vectors. One way to tackle this challenge is to manipulate images in a pre-trained feature space [Gardner et al. 2015;Lira et al. 2020;Upchurch et al. 2017]. Meanwhile, image translation [Isola et al. 2017] can also be considered as a style transfer that manipulates an image to adopt the visual style of another. Success of the style transfer often depends on how to translate the attributes of one image to those of another [Choi et al. 2020;Lee et al. 2018Lee et al. , 2020Liu et al. 2019]. There are recent studies Gong et al. 2019;Wu et al. 2019] that allow changes in the characteristics of the object such as the expression or style in a single image. Despite the success of this translation, it is not clear how to smoothly change one image into another to achieve a morphing effect.
Concurrent to our work, Viazovetskyi et al. [2020] trained an image translation model that manipulates the image with synthetic data created by a generative network. Unfortunately, their method produces only a single transition result given two input images. Therefore, the model is not appropriate for image morphing. Another concurrent work by Fish et al. [2020] suggests a way to replace the warping and blending operation of the conventional morphing with a spatial transformer and an auto-encoder network, respectively. Similar to conventional methods, this method still suffers from ghosting artifacts when the content of the two images are very different. In contrast, our network progressively changes both content and style of one image into another without such artifacts.

MORPHING DATASET PREPARATION
In the era of deep learning, using one pre-trained network to train another network has become popular. Examples include feature extraction [Johnson et al. 2016], transfer learning [Yosinski et al. 2014], knowledge distillation [Hinton et al. 2015], and data generation [Karras et al. 2018;]. Concurrent to our work, Viazovetskyi et al. [2020] showed how to train a network for image manipulation using the data created by a pre-trained generative model. Similar to their strategy, we built a morphing dataset to distill the ability for semantic transformation from a pre-trained "teacher" generative model to our "student" generator G. Figure 2 illustrates the overview of Neural Crossbreed framework.
To build a morphing dataset, we adopt the BigGAN [Brock et al. 2019] which is known to work well for class-conditional image synthesis. In addition to noise vectors sampled at two random points, the BigGAN takes a class embedding vector as input to generate an intended class image. This new image is generated by the linear interpolation of two noise vectors z A , z B and two class embedding vectors e A , e B according to control parameter α. The interpolation produces a smooth semantic change from one class of image to another.
Sampling at two random points results in different image pairs in terms of appearance, pose, and camera view of an object. This effectively simulates a sufficient supply of a pair of user selected images under weak constraints on the posture of the object. As a result, we have class labels {l A , l B } ∈ L and training data triplets {x A , x B , x α } for our generator to learn the morphing function. The triplets can be computed as follows: where α is sampled from the uniform distribution U[0,1].

.1 Formulation for Basic Transition
The aim is to train morphing generator G : {x A , x B , α } → y α that produces a sequence of smoothly changing morphed images y α ∈ Y from a pair of given images {x A , x B } ∈ X , where α {α ∈ R : 0 ≤ α ≤ 1} is a control parameter. In the training phase, generator G learns the ability to morph the images in a latent space of the teacher generative model. Note that a pair of input images {x A , x B } is sampled at two random points in the latent space, and a target intermediate image x α is generated by linearly interpolating the two sampled points at an arbitrary parameter value α. Generator G learns the mapping from sampled input space {x A , x B , α } to target morphed image x α of the teacher model by adversarially training discriminator D, where D aims to distinguish between data distribution x ∈ X and generator distribution y ∈ Y . After completion of the learning, generator G becomes ready to produce a morphing output, which reflects the semantic changes of the teacher model, The user provides trained generator G with two arbitrary images in the inference phase. Smooth transition between the two images is then possible by controlling parameter α.

Disentangled Content and Style Transition
Our basic generator G makes a smooth transition for both the content and the style of image x A into those of x B as one combined process. In this section, we describe how basic generator G can be extended to handle content and style transition separately for richer usability. For clarity, we first define the terms, content and style used in this paper. Content refers to the pose, the camera view, and the position of the object in an image. Style refers to the appearance that identifies the class or domain of the object. Now, we extend the notation described in Section 4.1 to express the content and style of an image. Specifically, training data triplets x A , x B , and x α are expanded to x AA , x BB , and x α α where the first subscript corresponds to content and the second subscript corresponds to style. The disentangled transition increases the dimension of control from a 1D transition manifold between the input images to a 2D transition manifold that spans the plane defined by content-style axes as shown in Figure 3. This extension is achieved by training generator G to additionally learn the transformation between the two images that have swapped style and content components {x AB , x BA }. Note, however, that our training data triplets {x AA , x BB , x α α } are only for basic transition, and do not contain any content and style of swapped images. Therefore, while the basic transition can be trained by the combination of a supervised and a self-supervised learning, the disentangled transitions can only be trained by unsupervised learning. Formally, we represent morphing generator G as follows: where α c and α s indicate the control parameter for the content and style, respectively. In the inference phase, by controlling α c and α s individually, the user can smoothly change the content while fixing the style of the output image, and vice versa.

Network Architecture
We based our network architecture on modern auto-encoders [Choi et al. 2020;Lee et al. 2020;Liu et al. 2019] that are capable of learning content and style space. To achieve image morphing, we added a way to adjust latent codes according to morphing parameters. The latent code adjustment allows the student network to learn the basic morphing effects of the teacher network. Moreover, by individually manipulating the latent codes in a separate content and style space, the student network can learn disentangled morphing that the teacher network cannot create. We design a convolutional neural network G that, given input images {x AA , x BB }, outputs a morphed image y α c α s , as illustrated in Figure 4. Morphing generator G consists of a content encoder E c , a style encoder E s , and a decoder F . E c extracts content code c = E c (x) and E s extracts style code s = E s (x) from input images x. The weights of each encoder are shared across different classes so that the input images can be mapped into a shared latent space associated with either content or style across all classes. F decodes content code c along with style code s that has gone through a mapping network, which is a form of a multilayer perceptrons (MLP) [Karras et al. 2019b] followed by adaptive instance normalization (AdaIN) layers [Huang and Belongie 2017] into output image y. Note that all of the components E c , E s , F , and MLP of the generator learn the mappings across different classes using only a single network.
Equation 2 can be factorized as follows: where Here, Lerp(A, B, α) is a linear function that can be expressed as (1 −α)A+αB , whose role is to interpolate the latent codes extracted from each of the two encoders before feeding them into decoder F . The adoption of the Lerp(·) operator in our network is inspired by the hypothesis presented in Bengio et al. [2013], which claims "deeper representations correspond to more unfolded manifolds and interpolating between points on a flat manifold should stay on the manifold". By interpolating the content and style features in the deep bottleneck position of the network layers, generator network G learns a mapping that produces a morphed image on the same manifold defined by the two input images. D is a multi-task discriminator [Liu et al. 2019;Mescheder et al. 2018], which produces |L| outputs for multiple adversarial classification tasks. The output of discriminator D contains a real/fake score for each class. When training, only the l-th output branch of D is penalized according to class labels Through the adversarial training, discriminator D enforces generator G to extract the content and the style of the input images, and to smoothly translate one image into another. We provide architectural details in Appendix A.

Training Objectives
Loss Functions We use two primary loss functions to train our network. The first function is an adversarial loss. Given a class label l ∈ L, discriminator D distinguishes whether the input image is real data x ∈ X of the class or generated data y ∈ Y from G. On the other hand, generator G tries to deceive discriminator D by creating an output image y that looks similar to a real image x via a conditional adversarial loss function The second function is a pixel-wise reconstruction loss. Given training data triplets x, generator G is trained to produce output image y that is close to the ground truth in terms of a pixel-wise L1 loss function. For brevity of the description, the pixel-wise reconstruction loss is simplified as follows: Identity Loss Image morphing is a linear transformation between two input images {x AA , x BB }. To achieve this, generator G should be able to convert the two input images as well as intermediate images into a representation defined on a deep unfolded manifold, and restore them back to the image domain. Generator G learns to produce the images identical to the input in a self-supervised manner as follows: where identity images {y AA , y BB } are the restored back version of input images {x AA , x BB }. These identity losses help two encoders E c and E s extract latent codes onto a flat manifold from input image x, and also help decoder F restore these two codes back in the form of input images.
Morphing Loss A result morphed from two images should have the characteristics of both of the images. To achieve this, we design a weighted adversarial loss that makes the output image have a weighted style between x AA and x BB according to the value of α. In addition, given target morphing data x α α , generator G should learn the semantic change between the two input images by minimizing a pixel-wise reconstruction loss. The two losses can be described as follows: where c α and s α are interpolated from the extracted latent codes using parameter α and Equation 4. Similar to the identity losses, these morphing losses enforce output images y α α from the generator to be placed on a line manifold connecting the two input images. Swapping Loss In order to extend the basic transition to a disentangled transition, we train generator G to output content and style swapped images {y AB , y BA }. However, since our training dataset does not include such images, the swapping loss should be minimized in an unsupervised manner as follows: This loss encourages two encoders E c , E s to separate the two characteristics from each input image in which content and style are entangled.
Cycle-swapping Loss To further enable generator G to learn a disentangled representation and also guarantee that the swapped images preserve the content of the input images, we employ a cycle consistency loss [Lee et al. 2020;Zhu et al. 2017] as follows: Here, cycle-swapped images {y ′ AA , y ′ BB } are the restored back version of input images {x AA , x BB } through reswapping the content and style of swapped images {y AB , y BA }.

Full Objective
The full objective function is a combination of the two main terms. We train generator G by solving the minimax optimization given as follows: where the role of hyperparameter λ is to balance the importance between the two primary loss terms. In summary, the identity and the morphing losses are introduced first for the basic transition described in Section 4.1, while the swapping and the cycle-swapping losses are added for the disentangled transition described in Section 4.2. Note that during training, morphing parameters α c , α s for generator G are set to the same value in Equations 7 and 8 (i.e. α c = α s = 0, α, or 1 ) to learn the basic transition, but they are set differently in Equations 9 and 10 to learn the disentangled transition. At the end of the training, the user can create a basic morphing transition by setting two parameters α c , α s to the same value between 0 and 1 in the inference phase. The values of α c and α s can also be set individually for separate control of content and style because G also learned the 2D content-style manifold.

EXPERIMENTS 5.1 Experimental Details
Training Data We created four types of morphing datasets using the images synthesized by BigGAN for experiments: Dogs (118 dog classes), Birds (39 aves classes), Foods (19 food classes), and Landscapes (8 landform classes). Each dataset corresponds to a subcategory of ImageNet [Russakovsky et al. 2015]. Note that all of the data were generated from the pre-trained BigGAN network at runtime in the training phase. The truncation of BigGAN was empirically set to 0.25 to generate training images with high fidelity and to allow the range of sample images wide enough for the effective learning by the generator. Examples of the training data generated by the teacher generative model are given in the first row of Figure  10.
Hyperparameters and Training Details All of our results were produced using the same default parameters for the training. We set hyperparameter λ = 0.1 and used Adam optimizer [Kingma and Ba 2014] with beta 1 = 0.5 and beta 2 = 0.999. To improve the rate of convergence, we employed Two Timescale Update Rule (TTUR) [Heusel et al. 2017] with learning rates of 0.0001 and 0.0004 for the generator and the discriminator, respectively. We used the hinge version of the adversarial loss [Lim and Ye 2017;Tran et al. 2017] with the gradient penalty on real data [Mescheder et al. 2018]. The batch size was set to 16 and the model was trained for 200k iterations which required approximately four days of computation on four GeForce GTX 1080 Ti GPUs.
Truncation Trick We remapped α c and α s using a truncation trick [Brock et al. 2019;Karras et al. 2019b;Kingma and Dhariwal 2018;Marchesi 2017;Pieters and Wiering 2018] to confine the output space to a reasonable range at the inference stage. This trick is known to control the trade-off between image diversity and visual fidelity. Appendix B provides detailed explanations on how the truncation trick can be performed with a parameter τ . Note that the truncation is applied only to disentangled results described in this section. In addition, τ is specified in the caption of all of the disentangled results if the truncation trick was applied.
Evaluation Protocol We used two datasets to explore effectiveness of the morphing network: ImageNet [Russakovsky et al. 2015] and AFHQ [Choi et al. 2020]. At the inference stage, we sampled images from the ImageNet dataset for visual evaluation. An ablation test and quantitative comparisons were performed using the dog images from AFHQ. Since AFHQ does not contain a label for each image, we constructed a pseudo label using a pre-trained classification model [Mahajan et al. 2018] trained on the Imagenet with the ResNeXt-101 32x16d backbone [Xie et al. 2016]. We excluded the data outside Dogs categories and further removed the data with low confidence. To measure the quality of the morphed image, we employed Frèchet Inception Distance (FID) [Heusel et al. 2017] as a performance metric and compared the statistics of the generated samples to those of real samples in AFHQ. We set the value of α = 0.5 for the morphed result given two input images. In addition, we measured the quality of the reconstructed image when α = 0 and α = 1 using the input image sampled from AFHQ as the ground truth. We utilized full-reference quality metrics, namely, Mean Squared Error (MSE), Peak Signal-to-Noise Ratio (PSNR), and Structural Similarity Index (SSIM), and a deep learning based metric, namely, Learned Perceptual Image Patch Similarity (LPIPS) [Zhang et al. 2018] Figure 5 shows several basic morphing results from Neural Crossbreed trained on the dataset of Dogs, Landscapes, Foods, and Birds. These results clearly verify that Neural Crossbreed can generate smoothly changing intermediate images according to the variation of morphing parameter α. For example, the top row shows that the entire body shot of the silky terrier is transitioned to the head shot of the golden retriever in a semantically correct way albeit no correspondences were specified. The third row shows disappearance of the beach while a stream is naturally forming in the valley as the morphing progresses. The last row shows a set intermediate birds with features from both of the input images. Their shapes and appearances are very realistic with reasonable poses and vivid colors.

Content and Style Disentangled Morphing
Warping and blending based approaches can make a decoupled shape and appearance transition. Neural Crossbreed can similarly control the content and style transition by individually adjusting α c and α s . Figure 6 visualizes the 2D transition manifold that spans the plane defined by the style and content of the two input images. Each row shows a transition from the entire body shot to the chest shot of a dog along the content axis. Note that the change in the diagonal direction corresponds to the basic transition. On the other hand, each column shows a transition from a silky terrier to a welsh springer spaniel along the style axis.

Ablation Test
Loss Ablation We performed an ablation test to analyze the impact of each objective loss. Table 2 shows that removing each of the four losses adversely affects the morphing performance of the network. A related qualitative assessment of the objectives is given in Figure  7. While the elimination of the morphing loss resulted in a slight increase of the FID score from the full setup, Figure 7b reveals that the morphing loss plays a crucial role and the network cannot learn a semantic change properly without it. For example, the top row clearly shows a wrong change in the style of the dog along the content axis.
In the reconstruction evaluation, the absence of the morphing loss and the swapping loss leads to the best performance and the second-best performance. This is because morphing loss L mr p and swapping loss L swp are directly related to the morphing effect  Fig. 6. Visualization of the 2D content-style manifold created by two input images. The red boxes indicate the input images. Here, we use the truncation trick with τ = 0.3. Results produced without using the truncation trick can be found in Appendix B. Table 2. Quantitative results from a loss ablation test and an experiment on performance according to the discriminator type. The best result in each metric is in bold; the second best is underlined. L id t , L mr p , L sw p , and L cyc represent the identity loss, the morphing loss, the swapping loss, and the cycle-swapping loss described in Section 4.4, respectively.

Morphing
Reconstruction and there is a trade-off between learning a morphing transition and restoring the input image. Despite a somewhat mid-level quantitative performance for reconstruction, the visual quality of the restored input images from the full setup is not much different from that of the images reconstructed with the elimination of each term.
On the other hand, the full setup results show more reasonably interpolated images compared with the results from other setups. For example, the content transition presented in each row in Figure  7g shows that the preservation of each dog's style is compared well with other results presented in the corresponding rows in Figures  7a-7d.
Discriminator We replaced our discriminator D with the Patch-GAN discriminator [Isola et al. 2017] and the AC-GAN discriminator [Odena et al. 2017] in our network while maintaining other conditions to analyze the effect of each type of discriminator. Similar to the loss elimination experiment, the trade-off between a morphing ability and an input image reconstruction is evident as shown in Table 2. In this case again, the qualitative evaluation in Figures 7e-7g verify that the lack in our reconstruction performance leads to the insignificant visual difference in the results, while other discriminators produce significantly inferior morphing results compared with ours. The use of the AC-GAN discriminator prevents the network from learning the basic morphing transition at all, and the Patch-GAN also adversely affects the quality of the disentangled transition compared with the full setup that uses a multi-task discriminator.

Comparison
Baselines We compared the results from our method with those from three leading baseline methods. The first one is the conventional image morphing method that utilizes structural similarity in a halfway domain (SSHD) [Liao et al. 2014]. The second one is the approach that distills the pre-trained network, which is similar to the method used by our approach. Viazovetskyi et al. [2020] trained the Pix2pixHD model [Wang et al. 2018] by feeding a pair of images to output a single intermediate image that has a morphing effect (DISTN). In the same way, we trained the Pix2pixHD model with our BigGAN data triplets 2 {x A , x B , x 0.5 } for fair comparison. The third one is the image-to-image translation method such as MUNIT , DRIT++ [Lee et al. 2020], and FUNIT [Liu et al. 2019]. Similar to our network, these image translation models map images to style and content codes. DRIT++ and FUNIT were trained as the authors had proposed, and DRIT++ accepted an additional input class code along with the input images from the dataset. Since MUNIT translates between two classes only, we assign two classes to train MUNIT. For a fair visual comparison, we retrained the model from scratch with our BigGAN dataset. At the inference stage, we linearly interpolated the style and content code of the given pair of images by adjusting α as done in our method. For all of the baselines codes, we utilized the implementation provided by the authors.
Quantitative Comparison We excluded the results from MU-NIT because it can only learn two classes and cannot handle many breeds of dogs included in AFHQ. Table 3 shows that our method outperforms all of the baseline methods. Our method achieved the best performance in FID, MSE, and PSNR, and the second best performance in SSIM and LPIPS.
Qualitative Results We qualitatively compared the results from our method with those from the baseline methods. To visualize the morphing ability of the baseline methods, we varied the value of α  from 0 to 1 as performed in our method. Figure 8 shows the morphing results. It is apparent that the combination of warping and blending cannot handle the large occlusion implied in two input images, creating strong ghosting artifacts in the mid point of the morphing regardless of use of the correspondences as evidenced by the results from SSHD. The mid point output produced by DISTN appears to be a somewhat reasonable mixture of the two input images. Unfortunately, however, the quality of the output image is low. Although the methods for image translation, such as DRIT++ and FUNIT, have been successful in style interpolation that mainly changes the appearance of an object, they are not capable of generating a semantic morphing transition that requires both content and style changes. The right hand side result from FUNIT shows a transition from one class to another, yet the mid point image still appears to be a physical blending of the two images instead of a semantic blending. In addition, FUNIT tends to alter the original input images a lot more than the other methods do. DRIT++ preserves the original input images well, but the mid point image is more like a superimposed version of the two input images. This visual interpretation is consistent with the quantitative evaluation reported in Table 3.
Because MUNIT assumes that the style space is decoupled for every class, it is impossible to change the style between the two input images. In addition, like other translation models it was not able to morph the geometry of the content successfully. In contrast to all of these baseline methods, our method can handle both content and style transfer given significantly different geometrical objects that contain occluded regions and produce visually pleasing morphing effects. In particular, as the value of α changes, the pose and appearance of the dog change semantically smoothly. This shows a sharp contrast with the most of the baseline methods, which produce a superimposed image only at α = 0.5 with no continuous semantic changes.
Comparison with Embedding Methods We additionally performed experiments to qualitatively compare the results from our method and the state-of-the-art embedding algorithm [Abdal et al. 2019b]. As Abdal et al. [2019b] suggested, we used a gradient descent algorithm [Creswell and Bharath 2018] to embed a given image onto the manifold of the pre-trained StyleGAN [Karras et al. 2019b] with the FFHQ dataset (EMBED (StyleGAN)). The optimization steps and hyperparameters of the optimizer were set as in EMBED (StyleGAN). The first and the second rows in Figure 9 show the process of embedding the input images of the first example in Figure 8 into the latent space of the StyleGAN. After 5000 iterations, the embedding result reasonably converged to the target image as shown in the images in the red box. However, when we performed a morphing process by interpolating the two latent vectors associated with the two images, the result was not at all satisfactory, as demonstrated in the third row. This might have been because the StyleGAN is currently trained only with face data.
For a fairer comparison, we used the pre-trained BigGAN (EMBED (BigGAN)) for embedding. In the initial experiment, the embedding algorithm failed to simultaneously optimize latent vector z and conditional class embedding vector e of the BigGAN. Therefore, we initialized e manually according to the target image and optimized only z. The results are shown in the fourth and fifth rows in Figure  9. As the sixth column reveals, the embedding results were not satisfactory even after 5000 iterations. For example, the pose of the spaniel is completely lost in the fourth image while the appearance details of the retriever are not fully recovered in the fifth image. Given the embedding results, EMBED (BigGAN) faithfully produced a morphing effect as shown in the sixth row.
Comparison with the Teacher Network To verify how well our student network can mimic the ability of semantic transformation of the teacher network, we compared the results from our generator with the interpolation results in the latent space of the teacher generative model. The comparisons performed on Dogs, Foods, Landscapes, and Birds are shown in Figure 10. The morphing sequence was obtained by inputting the two end images created from the teacher network into the student generator. It is clear that the quality of the morphed image produced by the generator was comparable to that produced by the interpolation in the teacher network.
We report the time spent to generate a morphing image by various methods in Table 4. Our method was much more efficient than the conventional methods that require optimization for the warping functions and the embedding methods that require iterative gradient descent steps.

EXTENSIONS AND APPLICATIONS 6.1 Multi Image Morphing
So far, we have explained morphing given two input images, but Neural Crossbreed framework is not limited to handling only two images. The generalization to handle multiple images becomes possible by replacing interpolation parameters α c and α s used in Equation 3 with the weights for M images. The modification can be expressed as follows: y w c w s = G(x 1,2, ..., M , w c 1, 2, . . ., M , w s 1, 2, . . ., M ), Here, content weight w c 1, 2, . . ., M and style weight w s 1, 2, . . ., M satisfy the following constraints: M m=1 w c m = 1 and M m=1 w s m = 1. Note that this adjustment is applied only at runtime using the same network, without any modification to the training procedure. Figure  11 shows an example of the basic transition and the disentangled transition between four input images.

Video Frame Interpolation
Assuming that the frames are closely related and share a similar camera baseline, frame interpolation produces in-between images given two neighbor frames. Because Neural Crossbreed aims to handle significantly different images, we can consider frame interpolation as a sub-problem of image morphing and produce a high frame rate video. Figure 12 shows intermediate frames created by inputting two neighbor frames into the generator. Our method does not enforce temporal coherency explicitly and therefore such a property is not guaranteed for all categories. Nonetheless, for puppy images, the results were qualitatively similar to those from a recent frame interpolation study (SuperSlowMo) [Jiang et al. 2018] in a preliminary experiment. Specifically, a smooth change of the fur pattern and the position of the snout is apparent in the enlarged area. Note that we can create as many interpolated frames as we want by changing the value of alpha. A comparison with the results from the conversion from the standard to a high frame rate video can be seen in the accompanying video.

Appearance Transfer
Disentangled outputs from the generator include images with the style and content components of the input image swapped. Therefore, just like any other image translation method, Neural Crossbreed can also be applied to create images with altered object appearances. Figure 13 shows the results from converting the source image to have the style of a target image.

DISCUSSION AND FUTURE WORK
Although Neural Crossbreed can produce a high quality morphing transition between input images, it also has some limitations. Figure  14 shows examples of the failure cases. The image classes that can Teacher Student (ours) Fig. 10. Comparison of the results from the teacher network and from the student network. The images in the red boxes created by the teacher network are used as the input image for our generator. be morphed are limited to the categories generated by a teacher network, and if the teacher network cannot generate high-quality images in the category, an example being feline animals, the network fails to learn semantic changes in that domain. The generator also failed to handle images that deviate too much from the training data distribution, such as the images that contain extreme object poses, multiple objects, or objects of a category not learned in the training phase.
We performed a preliminary test to morph human faces and found that the resulting images were blurry. For the generation of human faces for training, we tried StyleGAN2 [Karras et al. 2019a], as a teacher network. Because StyleGAN2 is not a class conditional GAN Source Source Target Target Fig. 13. Appearance transfer. The first column is the source image to be manipulated. The first and third rows contain target images with a style that will be applied to the source image. The rest are the images from the generator with the source and the target images as input.

Input A
Input B 0 1 0.5 Fig. 14. Cases of failure. Note that the first row used the feline data from the BigGAN to train the generator, the second and third rows used the Dogs data from the BigGAN, and the bottom row used the human face data from the StyleGAN2. The top row shows a case of failure caused by images with relatively low quality obtained from the BigGAN. The second row shows a case of failure caused by an extreme pose and the presence of multiple objects. The third row shows a case of failure caused by a category not contained in the training dataset. The bottom row shows a case of failure caused by a single class generative model as a teacher network. and manipulating human facial attributes are more suitable for a multi-label problem than a multi-class problem, we were not able to successfully apply StyleGAN2 directly to our framework where a multi-task discriminator plays an important role for the morphing performance (See Table 2). It will be an interesting direction to investigate a new discriminator for the multi-label problem that works in the context of image morphing. We will look into this issue in the future.
In this study, we focused only on morphing of a foreground object and did not pay attention to the background. In the future, we would also like to consider the background by integrating a pre-trained semantic segmentation network [Long et al. 2015] or a self-attention component [Zhang et al. 2019] into our framework. While Figure 8 shows that the morphing effect of our method is superior to that by the baseline methods, we acknowledge that there is room for improvement in the absolute image quality. For this, through an additional refinement network or a custom post-process can be utilized. We will leave this as another important future work.

CONCLUSION
Unlike conventional approaches, our proposed Neural Crossbreed can morph input images with no correspondences explicitly specified; it also can handle objects with significantly different poses by generating semantically meaningful intermediate content using a pair of teacher-student generators. In addition, content and style transitions are effectively disentangled in a latent space to provide the user with a tight control over the morphing results.
We proposed the first feed-forward network that learns semantic changes from the pre-trained generative model for an image morphing task. Our network exploits knowledge distillation where a student network learns from a teacher network to perform the same task with comparable or better performance. Our student network, whose purpose is to morph an image into another, learns a solution from the teacher network that maps a latent vector to an image. This concept is similar to "analogous inspiration" that helps a network widen its knowledge and discover new perspectives (image morphing) from other contexts (mapping between a latent space and realistic images). We hope that our work will inspire similar approaches for conventional image or video domain problems in the era of deep learning.

A ARCHITECTURAL DETAILS
In Table 5, we describe the layers of generator G and discriminator D in order. Except for the mapping network, which consists of five fully connected layers, most of the other networks employed preactivated residual blocks (PResBlk) [He et al. 2016]. Content encoder E c consists of three down-sampling layers and three bottleneck layers, while style encoder E s consists of six down-sampling layers and the final global sum-pooling layer. Therefore, content code c and style code s are interpolated in the form of a latent tensor and a latent vector, respectively. Decoder F has a structure symmetrical to E c and contains three bottleneck layers and three up-sampling layers. In the layers of F , we use AdaIN to insert the style code into the decoder, whereas in the layers of both of the two encoders we use instance normalization (IN) [Ulyanov et al. 2017]. All of the activation functions in G are the rectified linear unit (ReLU) [Nair and Hinton 2010] except for the final hyperbolic tangent (Tanh) layer of decoder F , which produces an RGB image. Our discriminator D predicts whether or not the image is real in|L| classes [Liu et al. 2019;Mescheder et al. 2018], and each output uses a PatchGAN [Isola et al. 2017 In areas where the distribution of training data has a low density, it is difficult to learn the true characteristics of the data space and consequently the results may contain artifacts. This remains as an important open problem in learningbased image synthesis and was also observed in our 2D contentstyle manifold of the latent space. One way to alleviate this situation is to apply a 'truncation trick' [Brock et al. 2019;Karras et al. 2019b;Kingma and Dhariwal 2018;Marchesi 2017;Pieters and Wiering 2018] in order to shrink the latent space and control the trade-off between image diversity and visual quality. We adopted a similar strategy and made some modifications to our framework to ensure reasonable outcomes.
The images generated near the basic transition axis tended to follow the distribution assumed by the training data well and consequently had good quality. On the other hand, artifacts are likely to occur near the manifold boundary away from the basic transition axis where content and style components are swapped. Therefore, our truncation strategy is to shrink the 2D content-style manifold toward the diagonal axis where the basic transition is dominant by changing parameter τ {τ ∈ R : 0 ≤ τ ≤ 1}. The shrunken manifold is illustrated in Figure 15 and can be computed as follows.
where ⇀ D = (α c , α s ) is an arbitrary vector for a disentangled transition and ⇀ B = (1, 1) is the basic transition vector from input image x A to x B on the 2D content-style manifold. ⇀ P is the projection of ⇀ D onto ⇀ B. The remapped α * c and α * s from Equation 13 are used to produce a conservatively morphed image for the disentangled transition. Figure 16 shows the results obtained before applying the truncation trick to the disentangled transition result shown in Figure 6.

Content
Style Content Style Fig. 16. Visualization of the 2D content-style manifold without applying the truncation trick. Artifacts are observed near the boundary of the manifold.