1 of 51

Lighting Estimation using GANs

Bhushan Sonawane

2 of 51

Agenda

  • Timeline
  • Ideas on GANs
  • Stepping into light estimation
  • Dataset
  • LDAN
  • AutoLighting

3 of 51

Timeline

Feb

Feb

Feb

Feb

March

March

March

March

PyTorch And CNN

AutoEncoders and VAEs

Vanilla GAN

DC GAN

CelebA on GAN

Co-operative

GAN

LDAN Understanding

April

April

April

April

April

May

May

LDAN Prototype

SIRFS Bug fixing and Data Generation scripts

Prototype LDAN

LDAN on CelebA

LDAN on SfSNet

Results and bug fixing

Results and NN based Lighting

Data generation

4 of 51

Ideas on GANs - 1. Co-Operative GANs

  • Train multiple GANs and copy weights of one performing well
  • Experimented with same architecture and same hyperparameters
  • TODOs-
    • Same architecture and different hyperparameters
    • Different architecture ??
  • Source - https://github.com/bhushan23/GAN/tree/master/Co-Operative-GAN

5 of 51

Ideas on GANs - 2. Designing NN using GANs

  • Design NN for any deep learning task
  • Design Discriminator which is Task specific
  • One approach for Generator -
    • Separate Generator for feature of Network
      • Number of layers
      • Activation functions
      • Hidden layer size
      • …….

6 of 51

Lighting Estimation

  • Problem - Lack of Ground Truth

7 of 51

Dataset

  • Synthetic Dataset used in LDAN
  • Synthetic Dataset used in SfSNet
  • Noisy SH, Normal generated using SIRFS
    • SIRFS implementation of Jon Barron with some bug fixes
    • CelebA
    • SfSNet Synthetic dataset
    • Source - https://github.com/bhushan23/SIRFS

8 of 51

Label Denoising Adversarial Network (LDAN)

  • Fills the gap of Synthetic Images and Real Images
  • Use existing methods to gather SH of real images and train the network
    • Here, Author used SIRFS
  • Maps Real Images into Synthetic Images to get accurate SH

9 of 51

LDAN - Architecture

10 of 51

Loss functions

  • Training Feature net and Lighting Net using
  • GAN loss

11 of 51

Experiment 1 - CelebA images as Real images

  • Synthetic dataset - LDAN
    • Two frontal pose images having same SH
  • Real Images - CelebA
    • SH and Normal generated using SIRFS

12 of 51

Experiment 1 - CelebA dataset used as Real Images

13 of 51

Experiment 1 results - SIRFS vs LDAN Shading

14 of 51

Experiment 1 - mean MSE loss of SH on Validation set duing GAN training

15 of 51

LDAN Results - Experiment 2

  • Synthetic dataset - LDAN dataset
    • Two frontal pose images having same SH
  • Real image dataset - Synthetic images of SfSNet
    • Have ground truth and noisy SIRFS SH
  • Used Synthetic data from SfSNet paper as Real Images
    • Why? - We wanted to verify against ground truth.

16 of 51

Experiment 2 Dataset - Synthetic Images used for training FeatureNet

17 of 51

Experiment 2 Dataset - Synthetic Images used for training as Real Images

18 of 51

Experiment 2 Results - Expected vs Predicted Shading

19 of 51

Experiment 2 Results - Ground Truth SH vs Predicted SH Shading

20 of 51

21 of 51

22 of 51

23 of 51

24 of 51

25 of 51

26 of 51

27 of 51

28 of 51

Experiment 2 Results - SIRFS shading vs LDAN shading

29 of 51

Experiment 2 Results - GAN training to adapt Synthentic Lighting

Mean MSE of SH

30 of 51

Experiment 2 Results - Comparison with SIRFS

LDAN Original SIRFS

31 of 51

AutoLighting - Using AE to denoise SH

32 of 51

AutoLighting Architecture

33 of 51

AutoLighting - Experiment

  1. Train Synth_Net with Synthetic Images
    1. Training Image-SH network with Synthetic Images and True SH
  2. Train AutoEncoder to denoise SH using Synthetic Image
    • Input: Lighting Features from Step 1 and SIRFS SH
    • Output: Lighting Features from Step 1 and True SH
    • Goal: Denoise SH given Lighting features
  3. Denoise SH of Real images using AE trained in step 2
    • We already have generated SIRFS SH for Real Images
  4. Train Real_Net with Real Images
    • Training Image-SH network with Real Images and Denoised SH (step 3)

34 of 51

AutoLighting Results - SIRFS vs Predicted Shading

35 of 51

AutoLighting Results - MSE loss training Network with Real Images

36 of 51

Reference

  • LDAN
  • SIRFS
  • GAN

37 of 51

New findings

38 of 51

2. Training GAN with SIRFS SH

39 of 51

2. True Normal

40 of 51

2. Without GAN

41 of 51

2. Expected Shading

42 of 51

2. Predicted SH

43 of 51

2. SIRFS shading

44 of 51

2. Validation MSE

45 of 51

3. Training GAN with ground truth SH

46 of 51

3. True Normal

47 of 51

3. Without GAN

48 of 51

3. True Shading

49 of 51

3. Predicted SH

50 of 51

3. SIRFS

51 of 51

3. Validation plot