Skip to content

suquark/neural-style-visualizer

Repository files navigation

Neural-Style Visualization

This project aims at visualize loss and other important metrics for analysis.

This project also implement an instance of neural-style, follows the idea of a keras example keras/examples/neural_style_transfer.py, but with a mostly different design.

Visualization is important and fun. It tells us what's going on.

Requirements

  • python 3
  • keras
  • tensorflow >= 0.9.0 / Theano
  • h5py
  • Pillow
  • requests
  • tornado

Usage

make sure you have the requirements above, or type this in your command line:

sudo pip install -r requirements.txt

if you want to use tensorflow as backend, follow the instruction to install tensorflow first

then

python neural_style.py

now you can see the neural style board in localhost:8000

Loss analysis

For example, you may find an bad output

after comparing the loss, you will found negative correlation between style loss and content loss(against the assumption of neural-style):

so a very small picture may not be very suitable for neural-style task.

Here's a better result with nearly independent loss:

A very high learning rate:

Realtime watch

Headstart

You can stop your training at any time and continue at the last epoch.

Realtime hyperparameter adjusting

You are free to adjust hyperparameter

Speed

Using TensorFlow as backend.

CPU: about 30 seconds/iter on Macbook Pro

GPU: about 0.3 s/iter on an K20

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published