Neural Style Transfer - CLI
Create artificial artwork by transfering the appearance of one image (eg a famous painting) to another user-supplied image (eg your favourite photograph).
Uses a Neural Style Transfer algorithm to transfer the appearance, which you can run though a CLI program.
Neural Style Tranfer (NST) is an algorithm that applies the style of an image to the contents of another and produces a generated image. The idea is to find out how someone, with the painting style shown in one image, would depict the contents shown in another image.
NST takes a content image (eg picture taken with your camera) and a style image (eg a picture of a Van Gogh painting) and produces the generated image.
This Python package runs a Neural Style Tranfer algorithm on input content and style images to produce generated images.
build | |
---|---|
package | |
containerization | |
code quality |
Overview
This package exposes a configurable NST algorithm via a convenient CLI program.
Key features of the package:
- Selection of style layers at runtime
- Iterative Learning Algorithm using the VGG Deep Neural Network
- Selection of iteration termination condition at runtime
- Fast minimization of loss/cost function with parallel/multicore execution, using Tensorflow
- Persisting of generated images
Quick-start
mkdir art export NST_HOST_MOUNT="$PWD/art" docker-compose up # Process runs, in containerized environment, and exits.
xdg-open art/canoe_water_w300-h225.jpg+blue-red_w300-h225.jpg-100.png
Usage
Run the nst CLI with the --help option to see the available options.
docker run boromir674/neural-style-transfer:1.0.2 --help
Development
Installation
Install nst CLI and artificial_artwork python package from pypi`:
pip install artificial_artwork
Only python3.8 wheel is included atm.
Sample commands to install the NST CLI from source, using a terminal:
git clone https://github.com/boromir674/neural-style-transfer.git pip install ./neural-style-transfer