All Projects → GlassyWing → nvae

GlassyWing / nvae

Licence: Apache-2.0 license
An unofficial toy implementation for NVAE 《A Deep Hierarchical Variational Autoencoder》

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to nvae

Pytorch Vae
A Collection of Variational Autoencoders (VAE) in PyTorch.
Stars: ✭ 2,704 (+3157.83%)
Mutual labels:  vae, pytorch-implementation
minilib
A c standard system library with a focus on size, headeronly, "singlefile", intended for static linking. 187 Bytes for "Hello World"(regular elf), compiled with the standard gcc toolchain.
Stars: ✭ 29 (-65.06%)
Mutual labels:  tiny
ClusterTransformer
Topic clustering library built on Transformer embeddings and cosine similarity metrics.Compatible with all BERT base transformers from huggingface.
Stars: ✭ 36 (-56.63%)
Mutual labels:  pytorch-implementation
keyphrase-generation-rl
Code for the ACL 19 paper "Neural Keyphrase Generation via Reinforcement Learning with Adaptive Rewards"
Stars: ✭ 95 (+14.46%)
Mutual labels:  pytorch-implementation
skillful nowcasting
Implementation of DeepMind's Deep Generative Model of Radar (DGMR) https://arxiv.org/abs/2104.00954
Stars: ✭ 117 (+40.96%)
Mutual labels:  pytorch-implementation
efficientnetv2.pytorch
PyTorch implementation of EfficientNetV2 family
Stars: ✭ 366 (+340.96%)
Mutual labels:  pytorch-implementation
vae captioning
Implementation of Diverse and Accurate Image Description Using a Variational Auto-Encoder with an Additive Gaussian Encoding Space
Stars: ✭ 58 (-30.12%)
Mutual labels:  vae
tfvaegan
[ECCV 2020] Official Pytorch implementation for "Latent Embedding Feedback and Discriminative Features for Zero-Shot Classification". SOTA results for ZSL and GZSL
Stars: ✭ 107 (+28.92%)
Mutual labels:  pytorch-implementation
ResNet-50-CBAM-PyTorch
Implementation of Resnet-50 with and without CBAM in PyTorch v1.8. Implementation tested on Intel Image Classification dataset from https://www.kaggle.com/puneet6060/intel-image-classification.
Stars: ✭ 31 (-62.65%)
Mutual labels:  pytorch-implementation
sheret
A tiny, simple static file web server.
Stars: ✭ 45 (-45.78%)
Mutual labels:  tiny
pixie
Tiny template functions.
Stars: ✭ 14 (-83.13%)
Mutual labels:  tiny
nnDetection
nnDetection is a self-configuring framework for 3D (volumetric) medical object detection which can be applied to new data sets without manual intervention. It includes guides for 12 data sets that were used to develop and evaluate the performance of the proposed method.
Stars: ✭ 355 (+327.71%)
Mutual labels:  pytorch-implementation
probabilistic nlg
Tensorflow Implementation of Stochastic Wasserstein Autoencoder for Probabilistic Sentence Generation (NAACL 2019).
Stars: ✭ 28 (-66.27%)
Mutual labels:  vae
pyroVED
Invariant representation learning from imaging and spectral data
Stars: ✭ 23 (-72.29%)
Mutual labels:  vae
Generative-Model
Repository for implementation of generative models with Tensorflow 1.x
Stars: ✭ 66 (-20.48%)
Mutual labels:  vae
Dynamic Model Pruning with Feedback
Implement of Dynamic Model Pruning with Feedback with pytorch
Stars: ✭ 25 (-69.88%)
Mutual labels:  pytorch-implementation
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 (-61.45%)
Mutual labels:  vae
tiny-editor
A tiny HTML rich text editor written in vanilla JavaScript
Stars: ✭ 58 (-30.12%)
Mutual labels:  tiny
Deep-MVLM
A tool for precisely placing 3D landmarks on 3D facial scans based on the paper "Multi-view Consensus CNN for 3D Facial Landmark Placement"
Stars: ✭ 71 (-14.46%)
Mutual labels:  pytorch-implementation
loc2vec
Pytorch implementation of the Loc2Vec with some modifications for speed
Stars: ✭ 40 (-51.81%)
Mutual labels:  pytorch-implementation

nvae

An unofficial toy implementation for NVAE 《A Deep Hierarchical Variational Autoencoder》

This implement is tiny, just for learning and validation, the model structure:

As shown in the figure above, the model architecture is very simple, the image is scaled to 64x64 size, in order to reduce the amount of calculation.

The following ops are not implemented, because they are just some tricks, but they greatly increases the computational complexity:

  • IAF
  • Discretized mix logistic distribution (Replaced with lighter Adaptive Loss)

Example

Hair and other details are still blurry, but this is mostly because the image used is a low-quality 64x64 size and the model is realy tiny.

Usage

Training

Just specify the image directory, see more with python train.py -h.

python train.py --dataset_path <img_directory> --batch_size 128

During training, the dataloader will capture the central area of the image and scale it to 64 x 64, and the checkpoints will be saved into checkpoints directory.

Generate images

Replacing the default checkpoint path in the file random_sample.py and run example as follow:

python random_sample.py

or generate a 768 x 768 image contains 144 sub-imgs:

python gen_imgs.py

Variable control experiment

The highest-level variables control advanced attributes such as face shape, hairstyle, background, gender, and direction:

Secondary variables seem to control facial muscles:

The lowest-level variables seem to be just some noise:

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].