An open API service indexing awesome lists of open source software.

https://github.com/drawcodeboy/vae

Variational Autoencoder (VAE), Evidence Lower Bound (ELBO) Implementation (PyTorch)
https://github.com/drawcodeboy/vae

elbo implementation pytorch vae

Last synced: 11 months ago
JSON representation

Variational Autoencoder (VAE), Evidence Lower Bound (ELBO) Implementation (PyTorch)

Awesome Lists containing this project

README

          

# VAE Implementation with PyTorch

## Description
* This is Variational Autoencoder(VAE) Implementation with PyTorch!

## Preview: CelebA
### (1) Reconstruction



### (2) Generation






## Preview: MNIST
### (1) Reconstruction



### (2) Generation






### (3) Latent Space t-SNE



## Installation
```
# Docker (Optional)
docker pull ubuntu:22.04
docker run -itd --gpus=all --shm-size=16G --name=vae ubuntu:22.04 /bin/bash

apt-get update
apt-get install sudo
sudo apt-get install git
sudo apt-get install gdown # For CelebA Dataset
sudo apt-get install unzip
sudo apt-get install -y libgl1-mesa-glx # OpenCV
sudo apt-get install -y libglib2.0-0 # OpenCV

# Download
git clone https://github.com/drawcodeboy/VAE.git
cd VAE

# Download CelebA
gdown --id 1m8-EBPgi5MRubrm6iQjafK2QMHDBMSfJ --output data/
unzip data/celeba.zip -d data/
unzip data/celeba/img_align_celeba.zip -d data/celeba/

# Install Python
sudo apt-get install python3
sudo apt-get install python3-venv

# Virtual Environment
python3 venv -m .venv
source .venv/bin/activate

# Install packages
pip install -r requirements.txt

# train MNIST
python train.py --config=vae.mnist

# train CelebA
python train.py --config=vae.celeba

# test MNIST
python test.py --config=vae.mnist

# test CelebA
python test.py --config=vae.celeba
```

## References
1. VAE: Kingma, D. P. (2013). Auto-encoding variational bayes. arXiv preprint arXiv:1312.6114.