ty625911724 / texture_generation_master

A tensorflow Implementation of paper: Incorporating long-range consistency in CNN-based texture generation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

texture_generation_master

Implementation of paper: Incorporating long-range consistency in CNN-based texture generation (https://arxiv.org/pdf/1606.01286.pdf) by Tensorflow.

Requirements

Generating

Need to download the vgg19 model and put it with main.py

python main.py

This command will generate the texture with only the style loss, without the long-range loss in the paper.
This code will generate the texture with a noisy image.

python main.py --cc_loss

This command will generate the texture with the style loss and the long-range loss in the paper.

python main.py --content --content_path ./images/content.jpg --style_path ./images/brick2.jpg --iteration 3000 --cc_loss

This command will use the content imageA and style imageB, which means generate images with the content in imageA and style in imageB.
This command will not use the long-range loss in the paper.

python main.py --content --content_path ./images/content.jpg --style_path ./images/brick2.jpg --iteration 3000

This command has same function about the last command, but it will use the long-range loss.

Examples


The left is style image,the right is content Input.

The left is Output without cc_loss, the right is the Output with cc_loss.

Without the cc_loss, the generated texture is mixed and disorderly.
With the help of the long-range loss, the rendering of regular textures is better.


The left is style image,the right is content Input.


The left is Output without cc_loss, the right is the Output with cc_loss.

The regular texture is also generated better when combining the content image and style image.

You could change the hyperparameters to get better peformance.

About

A tensorflow Implementation of paper: Incorporating long-range consistency in CNN-based texture generation

License:MIT License


Languages

Language:Python 100.0%