https://github.com/compvis/brushstroke-parameterized-style-transfer
TensorFlow implementation of our CVPR 2021 Paper "Rethinking Style Transfer: From Pixels to Parameterized Brushstrokes".
https://github.com/compvis/brushstroke-parameterized-style-transfer
Science Score: 10.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
○codemeta.json file
-
○.zenodo.json file
-
○DOI references
-
✓Academic publication links
Links to: arxiv.org, scholar.google -
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (10.9%) to scientific vocabulary
Keywords
Repository
TensorFlow implementation of our CVPR 2021 Paper "Rethinking Style Transfer: From Pixels to Parameterized Brushstrokes".
Basic Info
- Host: GitHub
- Owner: CompVis
- License: mit
- Language: Python
- Default Branch: tensorflow_v1
- Homepage: https://compvis.github.io/brushstroke-parameterized-style-transfer/
- Size: 53.3 MB
Statistics
- Stars: 166
- Watchers: 16
- Forks: 18
- Open Issues: 1
- Releases: 0
Topics
Metadata Files
README.md
Rethinking Style Transfer: From Pixels to Parameterized Brushstrokes (CVPR 2021)

Project page | Paper | Colab | Colab for Drawing App
Rethinking Style Transfer: From Pixels to Parameterized Brushstrokes.
Dmytro Kotovenko*, Matthias Wright*, Arthur Heimbrecht, and Björn Ommer.
* denotes equal contribution
Implementations
We provide implementations in Tensorflow 1 and Tensorflow 2. In order to reproduce the results from the paper, we recommend the Tensorflow 1 implementation.
Installation
- Clone this repository:
sh > git clone https://github.com/CompVis/brushstroke-parameterized-style-transfer > cd brushstroke-parameterized-style-transfer - Install Tensorflow 1.14 (preferably with GPU support).
If you are using Conda, this command will create a new environment and install Tensorflow as well as compatible CUDA and cuDNN versions.sh > conda create --name tf14 tensorflow-gpu==1.14 > conda activate tf14 - Install requirements:
sh > pip install -r requirements.txt
Basic Usage
```python from PIL import Image import model
contentimg = Image.open('images/content/goldengate.jpg') styleimg = Image.open('images/style/vangoghstarrynight.jpg')
stylizedimg = model.stylize(contentimg, styleimg, numstrokes=5000, numsteps=100, contentweight=1.0, styleweight=3.0, numsteps_pixel=1000)
stylized_img.save('images/stylized.jpg') ``` or open Colab.
Drawing App
We created a Streamlit app where you can draw curves to control the flow of brushstrokes.

Run drawing app on your machine
To run the app on your own machine: ```sh
CUDAVISIBLEDEVICES=0 streamlit run app.py ```
You can also run the app on a remote server and forward the port to your local machine: https://docs.streamlit.io/en/0.66.0/tutorial/runstreamlitremotely.html
Run streamlit app from Colab
If you don't have access to GPUs we also created a Colab from which you can start the drawing app.
Other implementations
PyTorch implementation by justanhduc.
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}
}
Owner
- Name: CompVis - Computer Vision and Learning LMU Munich
- Login: CompVis
- Kind: organization
- Email: assist.mvl@lrz.uni-muenchen.de
- Location: Germany
- Website: https://ommer-lab.com/
- Repositories: 33
- Profile: https://github.com/CompVis
Computer Vision and Learning research group at Ludwig Maximilian University of Munich (formerly Computer Vision Group at Heidelberg University)
GitHub Events
Total
- Watch event: 4
- Issue comment event: 1
Last Year
- Watch event: 4
- Issue comment event: 1
Committers
Last synced: 11 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Matthias Wright | m****t@y****e | 10 |
| Duc Nguyen | j****c | 1 |
| Dmitry Kotovenko | d****5@g****m | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 11 months ago
All Time
- Total issues: 4
- Total pull requests: 1
- Average time to close issues: 28 days
- Average time to close pull requests: 20 minutes
- Total issue authors: 4
- Total pull request authors: 1
- Average comments per issue: 2.75
- Average comments per pull request: 1.0
- Merged pull requests: 1
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- AK391 (1)
- francisrod01 (1)
- justanhduc (1)
- Radium98 (1)
Pull Request Authors
- justanhduc (1)
Top Labels
Issue Labels
Pull Request Labels
Dependencies
- Pillow ==7.2.0
- numpy ==1.19.1
- requests ==2.24.0
- scikit-image ==0.17.2
- scikit-learn *
- stqdm *
- streamlit ==0.82.0
- streamlit-drawable-canvas *
- tqdm *