Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

OpenNNG is a toolkit that offers an easy interface to generative models.

Project description

OpenNNG (Work in progress...)

OpenNNG (Open Neural Network Generator) is a general purpose data generator toolkit that uses TensorFlow 2.0. Supported architectures:

Key features

OpenNNG focuses on modularity to support advanced modeling and training capabilities:

  • usage of predefined models
  • creation of custom architectures
  • domain adaptation

Installation

Clone repository

If you want to use OpenNNG as a command line interface where the processes of training, evaluating etc. are all automated, run the following commands:

git clone https://github.com/avramandrei/OpenNNG.git
pip install -r requirements.txt

pip

If you want to use OpenNNG as an API and have more flexibility, install it via pip:

pip install opennng

Usage

OpenNNG requires:

  • Python >= 3.6
  • TensorFlow >= 2.0.0rc0
  • Pillow >=6.1

Data processing

Data must be saved in Numpy .npy files. In this example we will use the mnist dataset to generate new images. For this purpose, use the download.py script with mnist as argument. This command will automatically download mnist (raw and processed) dataset in data/ directory.

python3 download.py mnist

Configuration

To train and generate new samples, a YAML configuration file must be provided. Here is an exhaustive list of all the configuration parameters.

Train

To train, run train.py with a YAML configuration file as parameter.

python3 train.py <path_to_yaml_config_file>

This script will automatically generate 10 samples that shows how the training process evolves at evrey checkpoint. To disable this functionality, set generate_train_samples to False in YAML configuration file.

Model Samples
ConvVAESmall alt text alt text alt text alt text alt text alt text alt text alt text alt text alt text
ConvGANSmall alt text alt text alt text alt text alt text alt text alt text alt text alt text alt text

Generate

To generate a new sample, run generate.py with a YAML configuration file as parameter.

python3 generate.py <path_to_yaml_config_file>

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for opennng, version 0.1.8
Filename, size File type Python version Upload date Hashes
Filename, size opennng-0.1.8-py3-none-any.whl (11.7 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size opennng-0.1.8.tar.gz (7.4 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page