Skip to content
Generative bitmaps powered by deep learning. State-of-the-art implementation of various neural synthesis algorithms.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
examples
imagen
tests
.gitignore
LICENSE Initial commit Sep 8, 2018
README.rst Explanation of the repository. Nov 4, 2018
pytest.ini Configuration file for pytest, picks up prop_*.py as property tests. Oct 6, 2018
setup.py

README.rst

neural-imagen

This repository includes:

  1. A library of building blocks for state-of-the-art image synthesis.
  2. Reference implementations of popular deep learning algorithms.

Reference Implementations

In the examples folder, you'll find a documented implementation of neural style transfer based on the following:

Usage

1. Texture Synthesis

python examples/iterative.py --style texture.png --output-size 256x256 --output generated1.png

2. Image Reconstruction

python examples/iterative.py --content image.png --output generated2.png

3. Style Transfer

python examples/iterative.py --content image.png --style texture.png --output generated3.png

Options

You will likely need to experiment with the default options to obtain good results:

  • --scales=N: Coarse-to-fine rendering with downsampled images.
  • --iterations=N: Number of steps to run the optimizer at each scale.
  • --style-layers A B C D: Specify convolution layers of VGG19 manually, by default 1 6 11 20 29 for relu*_1.
  • --style-weights a b c d: Override loss weights for style layers, by default 1.0 for each.
  • --content-layers E F: Specify convolution layers of VGG19 manually, by default 20 for relu4_1.
  • --content-weights e f: Override loss weight for content layers, by default 1.0.
  • --seed image.png: Provide a starting image for the optimization.
You can’t perform that action at this time.