Skip to content

maheshmeleti/brushstroke-parameterized-style-transfer-pytorch

Repository files navigation

Brushstroke Parameterized Style Transfer

Content Image

                          Content Image                                                                     Style image

Style Image

                        10000 Brush Strokes                                                        after pixel optimization

This project is a pytorch implementation of the paper Rethinking Style Transfer: From Pixels to Parameterized Brushstrokes.This paper was originally implemented in TensorFlow and reproduced in Pytorch for research purposes. The results of this repo are very close to the original paper.

Installation

pip install -r requirements.txt

To run this code

python main.py --content golden-gate-bridge.jpg --style starry_night.jpg --nstrokes 1000

images should be present in images folder

--content is the content image needs to be stylized

--style is target style image

--nstrokes is number of strokes you want on canvas

You can change default settings in the main.py file for things like canvas color, size and other hyperparameters.

References

Tensorflow implementation

Citation

@article{kotovenko_cvpr_2021,
    title={Rethinking Style Transfer: From Pixels to Parameterized Brushstrokes},
    author={Dmytro Kotovenko and Matthias Wright and Arthur Heimbrecht and Bj{\"o}rn Ommer},
    journal={CVPR},
    year={2021}
}

About

Implementation of brush stroke parameterized style transfer

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published