Skip to content

Repository files navigation

VAE-GAN with U-Net Discriminator

Generated Faces

Key Features

  • U-Net Discriminator: Skip connections enable multi-scale feedback for fine facial details
  • L1 + Perceptual Loss: Combines edge preservation (L1) and semantic coherence (VGG19)
  • 25-Epoch Training: Achieves stable results on CelebA (64×64)

Architecture

Hybrid Framework

  1. VAE Encoder: Ensures that the image is not derived from a purely random latent dimension but instead encapsulates probabilistic features that help maintain consistency with the training image dataset. Encoder
  2. Decoder: Reconstructs images from latent vectors through upsampling layers and tanh activation, trained with combined L1 and perceptual losses to preserve sharp features and semantic consistency. Decoder
  3. U-Net Discriminator: Integrates both a global score for distinguishing between real and fake samples, and a PatchGAN output at the final layer with sigmoid activation which help capture both local and global features effectively. Discriminator
  4. Balanced Losses: Ensures high-level semantic consistency
    • Adversarial loss (GAN)
    • L1 reconstruction (λ=100)
    • Perceptual loss (λ=0.3)

Results

Reconstruction Comparison

  1. Original: These serve as reference for evaluating the model’s ability to preserve identity, texture, and structure. Original

  2. Reconstructed: Displays reconstructions generated by encoding and decoding the test images using the trained VAE-GAN. Reconstructed

  3. Generated Samples: Displays a grid of images generated by sampling random noise vectors from a standard Gaussian distribution & decodes them via generator Generated Faces

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages