Giter Site home page Giter Site logo

bvae-tf's Introduction

BVAE-tf

Disentangled Variational Auto-Encoder in TensorFlow (Beta-VAE)

โญ ๐Ÿ’ฅ THE UNLICENSE ๐Ÿ’ฅ โญ

Example Reconstructed Image

alt text

What has been done

  • darknet 19 (fully convolutional & fast) encoder and decoder
  • Custom keras sampling layer for sampling the distribution of variational autoencoders
  • Custom loss in sampling layer for latent space regularization
    • Options are no reg, vae reg (kl divergence), or bvae reg (beta*kl-divergence)
    • You can also set a target capacity for dimension usage of the latent space
  • Simple interface for setting up your own VAE or B-VAE

Enviroment Setup

I am using conda to ensure the enviroment is easy to install

  1. Install Anaconda or Miniconda (the python 3 version) for your platform
  2. Recreate the conda environment from the yml: conda env create -f environment.yml
  3. Active the enviroment
    1. Windows: go to cmd and activate bvae-tf
    2. Linux: source activate bvae-tf
  4. If you want to use CPU only, run pip uninstall tensorflow-gpu followed by pip install tensorflow==1.4.0 after you activate the environment.

If you do not want to / cannot use conda, I am using tensorflow 1.4.0; see the environment.yml for more package info.

Demo

For a simple demonstration, run ae.py in your terminal. This will cause the autoencoder to run on the included demo image.

Note: The demo takes a few minutes on my 1060 6GB, so it will take a while on a CPU...

bvae-tf's People

Contributors

stoplime avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.