All Projects → Naresh1318 → Adversarial_autoencoder

Naresh1318 / Adversarial_autoencoder

Licence: mit
A wizard's guide to Adversarial Autoencoders

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Adversarial autoencoder

Argus Freesound
Kaggle | 1st place solution for Freesound Audio Tagging 2019
Stars: ✭ 265 (-21.83%)
Mutual labels:  classification
Pycaret
An open-source, low-code machine learning library in Python
Stars: ✭ 4,594 (+1255.16%)
Mutual labels:  classification
Malheur
A Tool for Automatic Analysis of Malware Behavior
Stars: ✭ 313 (-7.67%)
Mutual labels:  classification
Demo Chinese Text Binary Classification With Bert
Stars: ✭ 276 (-18.58%)
Mutual labels:  classification
Cvpods
All-in-one Toolbox for Computer Vision Research.
Stars: ✭ 277 (-18.29%)
Mutual labels:  classification
Pointnet
PointNet: Deep Learning on Point Sets for 3D Classification and Segmentation
Stars: ✭ 3,517 (+937.46%)
Mutual labels:  classification
Torchsat
🔥TorchSat 🌏 is an open-source deep learning framework for satellite imagery analysis based on PyTorch.
Stars: ✭ 261 (-23.01%)
Mutual labels:  classification
Tensorflow Resources
Curated Tensorflow code resources to help you get started with Deep Learning.
Stars: ✭ 330 (-2.65%)
Mutual labels:  classification
R
All Algorithms implemented in R
Stars: ✭ 294 (-13.27%)
Mutual labels:  classification
Tianchi Medical Lungtumordetect
天池医疗AI大赛[第一季]:肺部结节智能诊断 UNet/VGG/Inception/ResNet/DenseNet
Stars: ✭ 314 (-7.37%)
Mutual labels:  classification
Misp Galaxy
Clusters and elements to attach to MISP events or attributes (like threat actors)
Stars: ✭ 276 (-18.58%)
Mutual labels:  classification
Geospatial Machine Learning
A curated list of resources focused on Machine Learning in Geospatial Data Science.
Stars: ✭ 289 (-14.75%)
Mutual labels:  classification
Mlstm Fcn
Multivariate LSTM Fully Convolutional Networks for Time Series Classification
Stars: ✭ 309 (-8.85%)
Mutual labels:  classification
Resnetcam Keras
Keras implementation of a ResNet-CAM model
Stars: ✭ 269 (-20.65%)
Mutual labels:  classification
Pywick
High-level batteries-included neural network training library for Pytorch
Stars: ✭ 320 (-5.6%)
Mutual labels:  classification
Iter Reason
Code for Iterative Reasoning Paper (CVPR 2018)
Stars: ✭ 263 (-22.42%)
Mutual labels:  classification
Go Deep
Artificial Neural Network
Stars: ✭ 303 (-10.62%)
Mutual labels:  classification
Text Classification Cnn Rnn
CNN-RNN中文文本分类,基于TensorFlow
Stars: ✭ 3,613 (+965.78%)
Mutual labels:  classification
Pytorch Randaugment
Unofficial PyTorch Reimplementation of RandAugment.
Stars: ✭ 323 (-4.72%)
Mutual labels:  classification
Code Sleep Python
Awesome Projects in Python - Machine Learning Applications, Games, Desktop Applications all in Python 🐍
Stars: ✭ 306 (-9.73%)
Mutual labels:  classification

Adversarial autoencoders

Cover

This repository contains code to implement adversarial autoencoder using Tensorflow.

Medium posts:

  1. A Wizard's guide to Adversarial Autoencoders: Part 1. Autoencoders?

  2. A Wizard's guide to Adversarial Autoencoders: Part 2. Exploring the latent space with Adversarial Autoencoders.

  3. A Wizard's guide to Adversarial Autoencoders: Part 3. Disentanglement of style and content.

  4. A Wizard's guide to Adversarial Autoencoders: Part 4. Classify MNIST using 1000 labels.

Installing the dependencies

Install virtualenv and creating a new virtual environment:

pip install virtualenv
virtualenv -p /usr/bin/python3 aa

Install dependencies

pip3 install -r requirements.txt

Note:

  • I'd highly recommend using your GPU during training.
  • tf.nn.sigmoid_cross_entropy_with_logits has a targets parameter which has been changed to labels for tensorflow version > r0.12.

Dataset

The MNIST dataset will be downloaded automatically and will be made available in ./Data directory.

Training!

Autoencoder:

Architecture:

To train a basic autoencoder run:

    python3 autoencoder.py --train True
  • This trains an autoencoder and saves the trained model once every epoch in the ./Results/Autoencoder directory.

To load the trained model and generate images passing inputs to the decoder run:

    python3 autoencoder.py --train False

Adversarial Autoencoder:

Architecture:

Cover

Training:

    python3 adversarial_autoencoder.py --train True

Load model and explore the latent space:

    python3 adversarial_autoencoder.py --train False

Example of adversarial autoencoder output when the encoder is constrained to have a stddev of 5.

Cover

Matching prior and posterior distributions.

Adversarial_autoencoder Distribution of digits in the latent space.

Supervised Adversarial Autoencoder:

Architecture:

Cover

Training:

    python3 supervised_adversarial_autoencoder.py --train True

Load model and explore the latent space:

    python3 supervised_adversarial_autoencoder.py --train False

Example of disentanglement of style and content: Cover

Semi-Supervised Adversarial Autoencoder:

Architecture:

Cover

Training:

    python3 semi_supervised_adversarial_autoencoder.py --train True

Load model and explore the latent space:

    python3 semi_supervised_adversarial_autoencoder.py --train False

Classification accuracy for 1000 labeled images:

Cover Cover

Note:

  • Each run generates a required tensorboard files under ./Results/<model>/<time_stamp_and_parameters>/Tensorboard directory.
  • Use tensorboard --logdir <tensorboard_dir> to look at loss variations and distributions of latent code.
  • Windows gives an error when : is used during folder naming (this is produced during the folder creation for each run).I would suggest you to remove the time stamp from folder_name variable in the form_results() function. Or, just dual boot linux!

Thank You

Please share this repo if you find it helpful.

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