All Projects → iechevarria → lego-face-VAE

iechevarria / lego-face-VAE

Licence: other
Variational autoencoder for Lego minifig faces

Programming Languages

Jupyter Notebook
11667 projects
python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to lego-face-VAE

VAE-Latent-Space-Explorer
Interactive exploration of MNIST variational autoencoder latent space with React and tensorflow.js.
Stars: ✭ 30 (+100%)
Mutual labels:  variational-autoencoder
deep-blueberry
If you've always wanted to learn about deep-learning but don't know where to start, then you might have stumbled upon the right place!
Stars: ✭ 17 (+13.33%)
Mutual labels:  variational-autoencoder
Bagel
IPCCC 2018: Robust and Unsupervised KPI Anomaly Detection Based on Conditional Variational Autoencoder
Stars: ✭ 45 (+200%)
Mutual labels:  variational-autoencoder
AWESOME-LDraw
LDraw — awesome software, file format, parts library and model repository (3D models of LEGO® and LEGO-compatible bricks)
Stars: ✭ 30 (+100%)
Mutual labels:  lego
vae-concrete
Keras implementation of a Variational Auto Encoder with a Concrete Latent Distribution
Stars: ✭ 51 (+240%)
Mutual labels:  variational-autoencoder
lego-boost-app
React Application for controlling Lego Boost from the browser with Web Bluetooth API
Stars: ✭ 57 (+280%)
Mutual labels:  lego
soft-intro-vae-pytorch
[CVPR 2021 Oral] Official PyTorch implementation of Soft-IntroVAE from the paper "Soft-IntroVAE: Analyzing and Improving Introspective Variational Autoencoders"
Stars: ✭ 170 (+1033.33%)
Mutual labels:  variational-autoencoder
awesome-lego-universe
Useful guides, tutorials, and FAQs related to LEGO Universe and Darkflame Universe.
Stars: ✭ 34 (+126.67%)
Mutual labels:  lego
precision-recall-distributions
Assessing Generative Models via Precision and Recall (official repository)
Stars: ✭ 80 (+433.33%)
Mutual labels:  variational-autoencoder
eccv16 attr2img
Torch Implemention of ECCV'16 paper: Attribute2Image
Stars: ✭ 93 (+520%)
Mutual labels:  variational-autoencoder
svae cf
[ WSDM '19 ] Sequential Variational Autoencoders for Collaborative Filtering
Stars: ✭ 38 (+153.33%)
Mutual labels:  variational-autoencoder
normalizing-flows
PyTorch implementation of normalizing flow models
Stars: ✭ 271 (+1706.67%)
Mutual labels:  variational-autoencoder
Generative Continual Learning
No description or website provided.
Stars: ✭ 51 (+240%)
Mutual labels:  variational-autoencoder
pxt-powerfunctions
MakeCode extension for controlling your LEGO Power Functions devices with an IR-emitting LED
Stars: ✭ 44 (+193.33%)
Mutual labels:  lego
pyroVED
Invariant representation learning from imaging and spectral data
Stars: ✭ 23 (+53.33%)
Mutual labels:  variational-autoencoder
benchmark VAE
Unifying Variational Autoencoder (VAE) implementations in Pytorch (NeurIPS 2022)
Stars: ✭ 1,211 (+7973.33%)
Mutual labels:  variational-autoencoder
AC-VRNN
PyTorch code for CVIU paper "AC-VRNN: Attentive Conditional-VRNN for Multi-Future Trajectory Prediction"
Stars: ✭ 21 (+40%)
Mutual labels:  variational-autoencoder
OCDVAEContinualLearning
Open-source code for our paper: Unified Probabilistic Deep Continual Learning through Generative Replay and Open Set Recognition
Stars: ✭ 56 (+273.33%)
Mutual labels:  variational-autoencoder
Keras-Generating-Sentences-from-a-Continuous-Space
Text Variational Autoencoder inspired by the paper 'Generating Sentences from a Continuous Space' Bowman et al. https://arxiv.org/abs/1511.06349
Stars: ✭ 32 (+113.33%)
Mutual labels:  variational-autoencoder
Variational-Autoencoder-pytorch
Implementation of a convolutional Variational-Autoencoder model in pytorch.
Stars: ✭ 65 (+333.33%)
Mutual labels:  variational-autoencoder

Lego face VAE

Variational autoencoder (VAE) for Lego minifig faces. I have a writeup with more detail here: https://www.echevarria.io/blog/lego-face-vae/

Overview

This repo contains a training set of images of Lego minifig faces and code to train a VAE on them.

Much of the code defining the VAE model is derived from David Foster's excellent book Generative Deep Learning: Teaching Machines to Paint, Write, Compose, and Play and from the book's accompanying repository.

Quickstart on Google Colab

NOTE (2021-12-23): This notebook no longer works out of the box on Colab because of issues with dependencies. Such is the joy of Python package management.

Google Colab is a free environment to run Jupyter Notebooks with the option of using GPU/TPU instances.

To run the notebook in Colab, first go to https://colab.research.google.com/github/iechevarria/lego-face-VAE/blob/master/VAE_colab.ipynb.

Next, run the following commands that appear in the section "Set up Colab environment":

!git clone https://github.com/iechevarria/lego-face-VAE
cd lego-face-VAE
!unzip dataset.zip

It should now be possible to run all the sections in the notebook. If you want to experiment with the pretrained model included in the repo, skip to the notebook section titled "Do the fun stuff with the VAE". If you want to train your own VAE, run the cells in the section titled "Train VAE on Lego faces".

Contents

The following table lays out directories/files and their purposes:

directory/file description
dataset_scripts/ Scripts to pull and process dataset images
ml/utils.py Utilities for loading data and for making plots
ml/variational_autoencoder.py Defines the VAE model
trained_model/ Pretrained model params and weights
VAE_colab.ipynb Notebook to train and evaluate models
dataset.zip Zipped directory of training images

Sample Output

The following is a plot of random images that were reconstructed by the VAE. The top image is the input and the bottom image is the VAE's reconstruction:

The following are plots of the intermediate vectors between face encodings (face morph visualization):

Training set details

The training data (approximately 2600 128x128 JPEG images of Lego minifig faces) is contained in dataset.zip. These images were pulled from Bricklink.

The scripts used to pull and process the data are contained in the dataset_scripts directory. I manually removed images that were low quality or that did not contain a clear face.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].