This repository contains an implementation of a Variational Autoencoder (VAE) based on the original paper Auto-Encoding Variational Bayes by Diederik P. Kingma and Max Welling. The code is written in PyTorch and aims to generate realistic images using the VAE architecture.
The Variational Autoencoder (VAE) is a probabilistic generative model that learns a low-dimensional latent space representation of data. It combines deep learning with probabilistic inference, enabling the generation of new data samples that are similar to those in the training set.
This implementation closely follows the methodology outlined in the original "Auto-Encoding Variational Bayes" paper, though some minor changes have been made.
- Python (>=3.6)
- PyTorch (>=1.7.1)
- Other dependencies can be installed using the provided
requirements.txt
file.
- Clone the repository:
git clone https://github.com/SonnetSaif/VAE-from-scratch_PyTorch.git
- Install the required dependencies:
pip install -r requirements.txt
- Just simply execute the VAE_PyTorch.ipynb cell by cell in Google Colab/Jupyter Notebook
This project utilizes the MNIST dataset, a widely used benchmark dataset for handwritten digit recognition. MNIST contains a training set of 60,000 grayscale images of handwritten digits (0 through 9) and a test set of 10,000 images. Each image is 28x28 pixels.
- The dataset is available directly through the torchvision library in PyTorch
- Also, available at huggingface
If you'd like to contribute or have any suggestions to this project, feel free to open an issue or create a pull request. Contributions are welcome!
- This project is licensed under the MIT License.
@article{kingma2013auto,
title={Auto-encoding variational bayes},
author={Kingma, Diederik P and Welling, Max},
journal={arXiv preprint arXiv:1312.6114},
year={2013}
}