HyperAI

What Will Yui Aragaki and Her Husband's Child Look Like? Let's Use BabyGAN to Predict

特色图像

"My wife is getting married", "The pain of Gen Hoshino's wife being taken away", "My youth is over"... After Gen Hoshino and Yui Aragaki officially announced their marriage, many netizens expressed the above sentiments.

The two co-starred in the Japanese drama "Escape is Shameful but Useful",The two protagonists in the play were originally "contractedly married" and eventually became a couple

Another group of netizens, after calmly accepting the current situation of "broken love", turned to care about the children of Yui Aragaki and Gen Hoshino.Afraid that the child will not look like the mother.

Weibo users showed great concern about the appearance of their child

With the help of the open source model BabyGAN, we predicted what Yui Aragaki and Gen Hoshino's future children will look like.

"Dahe" is the name of the couple's child in the drama "It's Not My Fault That I'm Popular!".According to BabyGAN’s prediction,If Yui Aragaki and Gen Hoshino's child is a girl,Then the rivers of different ages may look like this:

BabyGAN generated a picture of my daughter growing up
BabyGAN generated animation of son's growth

What is BabyGAN?

BabyGAN is a child appearance predictor based on StyleGAN.Based on the encoder and generator, you can input images of the father and mother, and after processing by the neural network, generate or predict the appearance of the future child.

Prediction Method: Using a neural network model based on the GAN architecture, the latent representation is extracted from the input parent image, and then the algorithm is used to mix it in a certain proportion to generate the child image.

Father (left), predicted appearance (middle), mother (right)

Using latency direction, we can change parameters such as age, facial orientation, emotion, and gender.

Project address: [Here]

Encoder: Here

This tutorial mainly demonstrates:

1. Load the trained BabyGAN model from local machine

2. Prepare images of both parents and obtain their latent representations

3. Generate the child’s face using the model

4. Adjust the child's gender, age and other parameters to generate a child image that meets your needs

Adjust the child's gender, age and other attributes of the schematic animation

Installation environment:Python: 3.6; TensorFlow: 1.15

Note:This tutorial is recommended to run with GPU

Tutorial address:Here

 Detailed explanation of the model training process 

1. Preparation

2. Prepare the parent image

3. Generate child images

4. Generate child images with certain characteristics

View the full tutorial:Here

StyleGAN-related high-rated open source projects

The BabyGAN model is based on StyleGAN. In addition, it is based on StyleGAN and StyleGAN2.Many high-quality open source projects have also been derived.

 StyleALAE 

StyleALAE is an adversarial implicit autoencoder based on the StyleGAN generator.Not only can it generate 1024 x 1024 face images with image quality comparable to StyleGAN, but it can also perform face reconstruction and attribute changes based on real images at the same resolution.

StyleALAE architecture diagram

The StyleALAE encoder uses an Instance Normalization (IN) layer to extract multi-scale style information.This information is combined into an implicit code w through a learnable multilinear map.

Related papers:Here

Project address:Here

StyleFlow 

While it is easy to generate high-quality, diverse, and realistic images using StyleGAN, it is not easy to control the generation process using (semantic) attributes while maintaining high-quality output.In addition, due to the entangled nature of the GAN latent space,Editing along one property can easily cause changes in other properties.

In order to solve the conditional exploration of entangled latent space,Problems with attribute-conditioned sampling and attribute-conditioned editing,Researchers proposed StyleFlow.

StyleFlow can be used to modify a certain attribute,without causing changes in other properties,For example, only change the lighting, posture, expression, gender, etc.

Use StyleFlow to perform non-sequential editing of real images.For extreme images such as the elderly and asymmetric images,The effect is better than the concurrent method.

Related papers:Here

Project address:Here

 Pixel2style2pixel (pSp) 

pSp is a StyleGAN encoder for image-to-image translation. It is based on a novel encoding network that can directly generate a series of style vectors.These style vectors are fed into the pre-trained StyleGAN generator to form the expanded w+ latent space.

In pSp, the encoder can directly embed the real image into w+ without additional optimization.And the encoder can directly solve the image-to-image conversion task and define it as an encoding problem from the input domain to the latent domain.

pSp's achievements in StyleGAN inversion, multimodal conditional image synthesis face frontalization, image restoration and super-resolution scenarios

pSp can be used without changing the structure.Handle a variety of image conversion tasks,Such as generating face images from segmentation maps, frontalizing faces, super-resolution, etc.

Related papers:Here

Project address:Here

GenForce 

GenForce is an efficient PyTorch library for deep generative models such as StyleGAN, StyleGAN2, and PGGAN.It has the following features:

1. Distributed training framework

2. Fast training speed

3. Modular design, suitable for prototyping of new models

4. Compared with the official TF version, the training of StyleGAN is highly reproduced

5. Contains many pre-trained GAN models with Colab demos

Some GenForce related projects and papers

Related papers:Here
Project address:Here

 About OpenBayes 

OpenBayes is a leading machine intelligence research institution in China.Provides a number of basic services related to AI development, including computing power containers, automatic modeling, and automatic parameter adjustment.

At the same time, OpenBayes has also launched many mainstream public resources such as data sets, tutorials, and models.For developers to quickly learn and create ideal machine learning models.

Visit openbayes.com and register now

Enjoy now 

600 minutes/week of vGPU

And 300 minutes/week of free CPU computing time

Take action now and use BabyGAN to predict what your future children will look like!

Complete tutorial portal:Here

Colab Portal:Here