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

computer-vision deep-learning differentiable-rendering style-transfer
Last synced: 10 months ago · JSON representation

Repository

TensorFlow implementation of our CVPR 2021 Paper "Rethinking Style Transfer: From Pixels to Parameterized Brushstrokes".

Basic Info
Statistics
  • Stars: 166
  • Watchers: 16
  • Forks: 18
  • Open Issues: 1
  • Releases: 0
Topics
computer-vision deep-learning differentiable-rendering style-transfer
Created over 5 years ago · Last pushed almost 5 years ago
Metadata Files
Readme License

README.md

Rethinking Style Transfer: From Pixels to Parameterized Brushstrokes (CVPR 2021)

img

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

  1. Clone this repository: sh > git clone https://github.com/CompVis/brushstroke-parameterized-style-transfer > cd brushstroke-parameterized-style-transfer
  2. 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
  3. 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.

img

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

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

All Time
  • Total Commits: 12
  • Total Committers: 3
  • Avg Commits per committer: 4.0
  • Development Distribution Score (DDS): 0.167
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email 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

requirements.txt pypi
  • 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 *