diffusion-gan-vae-pytorch

A PyTorch implementation of various deep generative models, including Diffusion (DDPM), GAN, cGAN, and VAE.

Stars
2

🎨 Deep Generative Models in PyTorch

Welcome to the Diffusion-GAN-VAE-PyTorch repository! This project contains PyTorch implementations (from scratch) of various deep generative models, including Variational Autoencoders (VAE), Generative Adversarial Networks (GAN), Conditional GANs, Diffusion Models, and Conditional Diffusion Models. Explore the power of these models through code and stunning visualizations!


🌠 Results

Fashion MNIST

Conditional Diffusion Model

Diffusion Model

Conditional GAN

GAN

VAE


🛠️ Requirements

To get started, ensure you have the following dependencies installed:

  • Python 3: The language of choice for deep learning.
  • PyTorch: The core framework for building and training the models.
  • NumPy: For numerical operations.
  • Matplotlib: To visualize the results.
  • tqdm: For progress bars.

You can install these dependencies via pip:

pip install torch numpy matplotlib tqdm

🔍 Models Overview

🔹 Variational Autoencoder (VAE)

The VAE is a powerful generative model that learns a latent representation of the input data, which can be used to generate new, unseen data samples. VAEs are particularly useful for unsupervised learning and data generation tasks.

🔹 Generative Adversarial Network (GAN)

The GAN framework consists of two neural networks—the generator and the discriminator—that compete against each other. The generator creates fake data samples, while the discriminator tries to distinguish between real and fake samples. Through this adversarial process, the generator improves its ability to create realistic data.

🔹 Conditional Generative Adversarial Network (cGAN)

The cGAN extends the GAN by conditioning the data generation process on additional information, such as class labels. This allows for more controlled generation of images, enabling the creation of samples with specific attributes or belonging to a particular class.

🔹 Diffusion Models

Diffusion Models are a class of generative models that learn to simulate the diffusion process, a gradual transformation of data through a stochastic system. These models are particularly powerful for generating high-quality samples that follow a complex distribution.

🔹 Conditional Diffusion Models

Conditional Diffusion Models take the idea of diffusion models further by conditioning the generation process on auxiliary information, similar to cGANs. This enables the model to generate data that adheres to specific conditions or classes, making it a versatile tool for controlled data generation.


Explore the repository to dive deep into these models, experiment with the provided implementations, and witness the power of deep generative models in action!


📜 License

This project is licensed under the MIT License. See the LICENSE file for more details.