Top AI Repos — open-source AI, indexed and scored
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
A simple, concise tensorflow implementation of style transfer (neural style)
| Date | Stars |
|---|---|
| 2026-07-24 | 293 |
| 2026-07-25 | 293 |
| 2026-07-28 | 293 |
| 2026-07-30 | 293 |
| 2026-08-06 | 293 |
Today
— stars today
This week
— stars this week
This month
— stars this month
Momentum
0.0
growth rate 0.00%/day
# Style Transfer (Neural Style) A tensorflow implementation of style transfer (neural style) described in the papers: * [A Neural Algorithm of Artistic Style](https://arxiv.org/pdf/1508.06576v2.pdf) : *submitted version* * [Image Style Transfer Using Convolutional Neural Networks](http://www.cv-foundation.org/openaccess/content_cvpr_2016/papers/Gatys_Image_Style_Transfer_CVPR_2016_paper.pdf) : *published version* by Leon A. Gatys, Alexander S. Ecker, Matthias Bethge The implementation is coincided with the paper both in variable-names and algorithms so that a reader of the paper can understand the code without too much effort. ## Usage ### Prerequisites 1. Tensorflow 2. Python packages : numpy, scipy, PIL(or Pillow), matplotlib 3. Pretrained VGG19 file : [imagenet-vgg-verydeep-19.mat](http://www.vlfeat.org/matconvnet/models/imagenet-vgg-verydeep-19.mat) * Please download the file from link above. * Save the file under `pre_trained_model` ### Running ``` python run_main.py --content <content file> --style <style file> --output <output file> ``` *Example*: `python run_main.py --content images/tubingen.jpg --style images/starry-night.jpg --output result.jpg` #### Arguments *Required* : * `--content`: Filename of the content image. *Default*: `images/tubingen.jpg` * `--style`: Filename of the style image. *Default*: `images/starry-night.jpg` * `--output`: Filename of the output image. *Default*: `result.jpg` *Optional* : * `--model_path`: Relative or absolute directory path to pre trained model. *Default*: `pre_trained_model` * `--loss_ratio`: Weight of content-loss relative to style-loss. Alpha over beta in the paper. *Default*: `1e-3` * `--content_layers`: *Space-separated* VGG-19 layer names used for content loss computation. *Default*: `conv4_2` * `--style_layers`: *Space-separated* VGG-19 layer names used for style loss computation. *Default*: `relu1_1 relu2_1 relu3_1 relu4_1 relu5_1` * `--content_layer_weights`: *Space-separated* weights of each content layer to the content loss. *Default*: `1.0` * `--style_layer_weights`: *Space-separated* weights of each style layer to loss. *Default*: `0.2 0.2 0.2 0.2 0.2` * `--max_size`: Maximum width or height of the input images. *Default*: `512` * `--num_iter`: The number of iterations to run. *Default*: `1000` * `--initial_type`: The initial image for optimization. (notation in the paper : x) *Choices*: content, style, random. *Default*: `'content'` * `--content_loss_norm_type`: Different types of normalization for content loss. *Choices*: [1](https://arxiv.org/pdf/1508.06576v2.pdf), [2](https://arxiv.org/abs/1604.08610), [3](https://github.com/cysmith/neural-style-tf). *Default*: `3` ## Sample results ### The Neckarfront in Tübingen, Germany Results were obtained from default setting. An image was rendered approximately after 4 mins on GTX 980 ti. <p align="center"> <img src="images/tubingen.jpg" height="192px"> <img src="samples/tubingen_shipwreck.jpg" height="192px"> <img src="samples/tubingen_starry-night.jpg" height="192px"> <img src="samples/tubingen_seated-nude.jpg" height="192px"> <img src="samples/tubingen_the_scream.jpg" height="192px"> <img src="samples/tubingen_kandinsky.jpg" height="192px"> </p> ### The Gyeongbokgung Palace in Seoul, South Korea Results were obtained from default setting except `--max_size 1200`. An image was rendered approximately after 19.5 mins on GTX 980 ti. <p align="center"> <img src="images/gyeongbokgung.jpg" height="172px"> <img src="samples/gyeongbokgung_shipwreck.jpg" height="172px"> <img src="samples/gyeongbokgung_starry-night.jpg" height="172px"> <img src="samples/gyeongbokgung_seated-nude.jpg" height="172px"> <img src="samples/gyeongbokgung_the_scream.jpg" height="172px"> <img src="samples/gyeongbokgung_kandinsky.jpg" height="172px"> </p> ## References The implementation is based on the projects: #### https://github.com/Hvass-Labs/TensorFl
Excerpt of 5,954 characters
Read on GitHubWould you bet a product on this? Bounded 0–100 and slow moving.
matched fp:06a79af59d1746f1, topic:tensorflow