Giter VIP home page Giter VIP logo

sanet's Introduction

SANET

This is unofficial PyTorch implementation of "Arbitrary Style Transfer with Style-Attentional Networks".

Official paper: https://arxiv.org/abs/1812.02342v5

To run, download the weights and place them in the folder with Eval.py. Links to weights on Yandex.Disk:

Or, you can download the latest release. It contains all weights, codes and examples.

How to evaluate

To test the code, make changes to the following lines in the file Eval.py. here you need to specify the path to the image style and content. After that, save the changes to the file and run it.

parser.add_argument('--content', type=str, default = 'input/chicago.jpg',
                    help='File path to the content image')
parser.add_argument('--style', type=str, default = 'style/style11.jpg',
                    help='File path to the style image, or multiple style \
                    images separated by commas if you want to do style \
                    interpolation or spatial control')

How to train

You can train your own SANet using Train.ipynb

Examples

Original:

Content.jpg

Stylized under 1.jpg:

Content_stylized_1.jpg

Stylized under Composition-VII.jpg:

Content_stylized_Composition-VII.jpg

Stylized under Starry.jpg:

Content_stylized_Starry.jpg

Stylized under candy.jpg:

Content_stylized_candy.jpg

Stylized under la_muse.jpg:

Content_stylized_la_muse.jpg

Stylized under rain_princess.jpg:

Content_stylized_rain_princess.jpg

Stylized under seated_nude.jpg:

Content_stylized_seated_nude.jpg

Stylized under style11.jpg:

Content_stylized_style11.jpg

Stylized under udnie.jpg:

Content_stylized_udnie.jpg

Stylized under wave.jpg:

Content_stylized_wave.jpg

Stylized under wreck.jpg:

Content_stylized_wreck.jpg

Original:

chicago.jpg

Stylized under 1.jpg:

chicago_stylized_1.jpg

Stylized under Composition-VII.jpg:

chicago_stylized_Composition-VII.jpg

Stylized under Starry.jpg:

chicago_stylized_Starry.jpg

Stylized under candy.jpg:

chicago_stylized_candy.jpg

Stylized under la_muse.jpg:

chicago_stylized_la_muse.jpg

Stylized under rain_princess.jpg:

chicago_stylized_rain_princess.jpg

Stylized under seated_nude.jpg:

chicago_stylized_seated_nude.jpg

Stylized under style11.jpg:

chicago_stylized_style11.jpg

Stylized under udnie.jpg:

chicago_stylized_udnie.jpg

Stylized under wave.jpg:

chicago_stylized_wave.jpg

Stylized under wreck.jpg:

chicago_stylized_wreck.jpg

sanet's People

Watchers

 avatar

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.