• Stars
    star
    488
  • Rank 90,182 (Top 2 %)
  • Language
    Python
  • License
    Apache License 2.0
  • Created over 3 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Officially unofficial re-implementation of paper: Paint Transformer: Feed Forward Neural Painting with Stroke Prediction, ICCV 2021.

Paint Transformer: Feed Forward Neural Painting with Stroke Prediction

[Paper] [Official Paddle Implementation] [Huggingface Gradio Demo] [Unofficial PyTorch Re-Implementation] [Colab]

Overview

This repository contains the officially unofficial PyTorch re-implementation of paper:

Paint Transformer: Feed Forward Neural Painting with Stroke Prediction,

Songhua Liu*, Tianwei Lin*, Dongliang He, Fu Li, Ruifeng Deng, Xin Li, Errui Ding, Hao Wang (* indicates equal contribution)

ICCV 2021 (Oral)

Prerequisites

  • Linux or macOS
  • Python 3
  • PyTorch 1.7+ and other dependencies (torchvision, visdom, dominate, and other common python libs)

Getting Started

  • Clone this repository:

    git clone https://github.com/Huage001/PaintTransformer
    cd PaintTransformer
  • Download pretrained model from Google Drive and move it to inference directory:

    mv [Download Directory]/model.pth inference/
    cd inference
  • Inference:

    python inference.py
    • Input image path, output path, and etc can be set in the main function.
    • Notably, there is a flag serial as one parameter of the main function:
      • If serial is True, strokes would be rendered serially. The consumption of video memory will be low but it requires more time.
      • If serial is False, strokes would be rendered in parallel. The consumption of video memory will be high but it would be faster.
      • If animated results are required, serial must be True.
  • Train:

    • Before training, start visdom server:

      python -m visdom.server
    • Then, simply run:

      cd train
      bash train.sh
    • You can monitor training status at http://localhost:8097/ and models would be saved at checkpoints/painter folder.

  • You may feel free to try other training options written in train.sh.

More Results

Input Animated Output

App

Citation

  • If you find ideas or codes useful for your research, please cite:

    @inproceedings{liu2021paint,
      title={Paint Transformer: Feed Forward Neural Painting with Stroke Prediction},
      author={Liu, Songhua and Lin, Tianwei and He, Dongliang and Li, Fu and Deng, Ruifeng and Li, Xin and Ding, Errui and Wang, Hao},
      booktitle={Proceedings of the IEEE International Conference on Computer Vision},
      year={2021}
    }
    

Acknowledgments

More Repositories

1

AdaAttN

Officially unofficial PyTorch re-implementation of paper: AdaAttN: Revisit Attention Mechanism in Arbitrary Neural Style Transfer, ICCV 2021.
Python
206
star
2

LinFusion

Official PyTorch and Diffusers Implementation of "LinFusion: 1 GPU, 1 Minute, 16K Image"
Python
204
star
3

Transfer-Any-Style

An interactive demo based on Segment-Anything for style transfer which enables different content regions apply different styles.
Python
95
star
4

DatasetFactorization

PyTorch implementation of paper "Dataset Distillation via Factorization" in NeurIPS 2022.
Python
61
star
5

DynaST

Pytorch implementation of paper "DynaST: Dynamic Sparse Transformer for Exemplar-Guided Image Generation", ECCV 2022.
Python
53
star
6

Paint-Anything

An interactive demo based on Segment-Anything for stroke-based painting which enables human-like painting.
Python
34
star
7

Artistic-Video-Partial-Conv-Depth-Loss

This is pytorch implementation of paper Stable Video Style Transfer Based on Partial Convolution with Depth-Aware Supervision.
Python
12
star
8

StyDeSty

PyTorch implementation of paper "StyDeSty: Min-Max Stylization and Destylization for Single Domain Generalization" in ICML 2024.
Python
11
star
9

Graph-Based-Circuit-Painter

Source Code of Paper Graph-Based Locality-Sensitive Circuit Sketch Recognition
Java
6
star
10

Improving-Reliability-for-Federated-Learning-in-Mobile-Edge-Networks

Shell
3
star
11

CircuitPainter

Circuit painter and recognizer based on handwriting, painting with MFC, recognizing with CNN based on tensorflow.
C++
1
star
12

NJU_OSlab5

ๆ–‡ไปถ็ณป็ปŸ
C
1
star