GithubHelp home page GithubHelp logo

anormaly-detection / gpnd Goto Github PK

View Code? Open in Web Editor NEW

This project forked from podgorskiy/gpnd

0.0 1.0 0.0 5.77 MB

Generative Probabilistic Novelty Detection with Adversarial Autoencoders

Python 100.00%

gpnd's Introduction

Generative Probabilistic Novelty Detection with Adversarial Autoencoders

Stanislav Pidhorskyi, Ranya Almohsen, Donald A Adjeroh, Gianfranco Doretto

Lane Department of Computer Science and Electrical Engineering, West Virginia University
Morgantown, WV 26508
{stpidhorskyi, ralmohse, daadjeroh, gidoretto} @mix.wvu.edu

The e-preprint of the article on arxiv.

The code is going to be cleaned up soon. The code for other datasets will be added soon.

Content

  • partition_mnist.py - code for preparing MNIST dataset.
  • train_AAE.py - code for training the autoencoder.
  • novelty_detector.py - code for running novelty detector
  • net.py - contains definitions of network architectures.

How to run

You will need to run partition_mnist.py first.

Then from train_AAE.py, you need to call main function:

train_AAE.main(
  folding_id,
  inliner_classes,
  total_classes,
  folds=5
)

Args:

  • folding_id: Id of the fold. For MNIST, 5 folds are generated, so folding_id must be in range [0..5]
  • inliner_classes: List of classes considered inliers.
  • total_classes: Total count of classes.
  • folds: Number of folds.

After autoencoder was trained, from novelty_detector.py, you need to call main function:

novelty_detector.main(
  folding_id,
  inliner_classes,
  total_classes,
  folds=5
)

Set of arguments is the same.

Generated/Reconstructed images

MNIST Reconstruction

MNIST Reconstruction. First raw - real image, second - reconstructed.



MNIST Reconstruction

MNIST Generation.



COIL100 Reconstruction

COIL100 Reconstruction, single category. First raw - real image, second - reconstructed. Only 57 images were used for training.



COIL100 Generation

COIL100 Generation. First raw - real image, second - reconstructed. Only 57 images were used for training.



COIL100 Reconstruction

COIL100 Reconstruction, 7 categories. First raw - real image, second - reconstructed. Only about 60 images per category were used for training



COIL100 Generation

COIL100 Generation. First raw - real image, second - reconstructed. Only about 60 images per category were used for training.



PDF

PDF of the latent space for MNIST. Size of the latent space - 32

gpnd's People

Contributors

syglassbuild avatar

Watchers

 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.