GithubHelp home page GithubHelp logo

lhang33 / painttransformer Goto Github PK

View Code? Open in Web Editor NEW

This project forked from huage001/painttransformer

0.0 0.0 0.0 12.57 MB

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

License: Apache License 2.0

Python 99.76% Shell 0.24%

painttransformer's Introduction

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

painttransformer's People

Contributors

huage001 avatar lhang33 avatar ak391 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.