/progressive_infogan

Progressive training of GANs with Mutual Information Penalty

Primary LanguageJupyter Notebook

Progressive InfoGAN

Progressive InfoGAN combines two techniques:

What it does

  • A Generator is trained on any unlabeled high-res dataset of images. For our experiments we use CelebA-HQ.
  • After training, the Generator produces novel images, similar to those in the dataset.
  • When producing an image, we can independently control its semantic feautres. In case of CelebA-HQ, semantic features include: the direction of the look, hair color, nose shape, and much more. See Summary of selected isolated features.
  • Most importantly, these semantic features are discovered during training in a completely unsupervised fashion - no human input is required.

Under the hood

The InfoGAN technique was adapted to the progressive architecture of the model by splitting the structured code to parts, and feeding each part to the network by conditioning activations in the corresponding block of the Generator. You can find a detailed description of the architecture, along with quality assessment, in my Master's Thesis text (expected defense: Q4 2018).

Running

# Training:
# Fill in src/constants.py, and run
$ cd src
$ python jonasz/experiments/2018_08_28/exp_consistency_300.py

# Working with the trained Generator:
$ cd src
$ python -m jupyter notebook --port 5088

Now you can experiment with the generator in a notebook: src/jonasz/notebooks/generator.ipynb

Summary of selected isolated features

See also the animated, extended version of the summary at: https://youtu.be/U2okTa0JGZg. Some of the subtler changes are better visible when animated. For each of the features listed below, there is a link to the exact corresponding timestamp in the animation.

Smile: upper lip
Age
Look direction
Hair color
Left / right rotation
Face oval: size
Hairstyle: background size
Lower jaw size
Forward backward inclination
Mouth: open / closed
Hair: wavy / straight
Eyebrows: up / down
Nose length
Nose: upturned tip
Eyebrows shape
Vertical face stretch
Color of the irises
Shape of the nostrils
Hair texture
Lower eyelid
Wrinkles

A comprehensive list of all isolated features is at: https://youtu.be/mOckeVkM1jU.

Smile: upper lip (animation@02m43s):

c_33_smile_upper_lip

Age (animation@04m22s):

c_53_age

Look direction (animation@03m16s):

c_57_look_direction

Hair color (animation@00m06s):

c_08_hair_color

Left / right rotation (animation@00m15s):

c_03_left_right_rotation

Face oval: size (animation@00m28s):

c_16_face_oval_size

Hairstyle: background size (animation@01m08s):

c_24_hairstyle_background_size

Lower jaw size (animation@01m51s):

c_32_lower_jaw_size

Forward / backward inclination (animation@01m41s):

c_43_forward_backward_inclination

Mouth: open / closed (animation@01m31s):

c_44_mouth_open_closed

Hair: wavy / straight (animation@02m11s):

c_45_hair_curly_straight

Eyebrows: up / down (animation@02m56s):

c_48_eyebrows_up_down

Nose length (animation@04m02s):

c_49_nose_length

Nose: upturned tip (animation@03m52s):

c_52_nose_upturned_tip

Eyebrows shape (animation@03m06s):

c_55_eyebrows_shape

Vertical face stretch (animation@03m32s):

c_60_vertical_face_stretch

Color of the irises (animation@05m07s):

c_64_color_of_the_irises

Shape of the nostrils (animation@05m18s):

c_67_shape_of_the_nostrils

Hair texture (animation@06m10s):

c_68_hair_texture

Lower eyelid (animation@05m54s):

c_72_lower_eyelid

Wrinkles (animation@05m27s):

c_75_wrinkles