Git Product home page Git Product logo

neural-style-transfer-windows's Introduction

Neural Style Transfer Windows

Windows Form application written in C# to allow easy changing of Neural Style Transfer scripts (Network.py and INetwork.py)

  • Upon first run, it will request the python path. Traverse your directory to locate the python.exe of your choice (Anaconda is tested)

Benefits

  • Automatically executes the script based on the arguments.
  • Easy selection of images (Content, Style, Output Prefix)
  • Easy parameter selection
  • Easily generate argument list, if command line execution is preferred.
  • Logs to see older settings of the script

Parameters

--image_size : Allows to set the Gram Matrix size. Default is 400 x 400, since it produces good results fast. 
--num_iter : Number of iterations. Default is 10. Test the output with 10 iterations, and increase to improve results.
--init_image : Can be "content" or "noise". Default is "content", since it reduces reproduction noise.
--pool_type : Pooling type. AveragePooling ("ave") is default, but smoothens the image too much. For sharper images, use MaxPooling ("max").
--preserve_color : Preserves the original color space of the content image, while applying style. Post processing technique on final image.
--min_improvement : Sets the minimum improvement required to continue training. Default is 0.0, indicating no minimum threshold. Advised values are 0.05 or 0.01.

--content_weight : Weightage given to content in relation to style. Default if 0.025
--style_weight : Weightage given to style in relation to content. Default is 1. 
--style_scale : Scales the style_weight. Default is 1. 
--total_variation_weight : Regularization factor. Smaller values tend to produce crisp images, but 0 is not useful. Default = 1E-5

--rescale_image : Rescale image to original dimensions after each iteration. (Bilinear upscaling)
--rescale_method : Rescaling algorithm. Default is bilinear. Options are nearest, bilinear, bicubic and cubic.
--maintain_aspect_ratio : Rescale the image just to the original aspect ratio. Size will be (gram_matrix_size, gram_matrix_size * aspect_ratio). Default is True
--content_layer : Selects the content layer. Paper suggests conv4_2, but better results can be obtained from conv5_2. Default is conv5_2.
--cpu: Works on CPU if True. Default is False.

Requirements

Windows .NET 4.5 and above to run.

Script requirements :

  • TensorFlow/Theano
  • Keras
  • CUDA (GPU)
  • CUDNN (GPU)
  • Scipy + PIL
  • Numpy

Tested on Windows 10, Python 3.8, TensorFlow 2.4, CUDA 11.2, CuDNN 8.0.5.

neural-style-transfer-windows's People

Contributors

dependabot[bot] avatar ryletko avatar supertobi avatar titu1994 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

neural-style-transfer-windows's Issues

Preserve Color switch does not work - CPU switch does not work

  • Ticking the "Preserve Color" switch will just lead to noise output, running the application without Preserve Color works normally.

  • The "CPU" switch does not work as my GPU could not be found. Changing os.environ["CUDA_VISIBLE_DEVICES"] = "-1" to os.environ["CUDA_VISIBLE_DEVICES"] = "0" makes the CPU switch work for me.

This is awesome ๐Ÿ˜ Could I ask a few questions?

this tool is really cool ๐Ÿ˜€

a couple quick questions if that's okay?

  1. does it make a quality difference or speed difference to be on vgg16 vs vgg19?
  2. is there a reason to keep my textures the same size or aspect ratio as my bases?
  3. are grams just pixels? is a 600 gram matrix a 600x600 image?
    1. if so, how big of a gram matrix is a 400x500 image?
  4. how do i calculate the maximum image size that will fit in my card's memory?
  5. will this split across multiple cards, to do larger images? (i already know about waifu)

Awesome

And how to launch this?
Where exe? Build? Something?

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.