All Projects → megvii-research → Iccv2019 Learningtopaint

megvii-research / Iccv2019 Learningtopaint

Licence: mit
ICCV2019 - A painting AI that can reproduce paintings stroke by stroke using deep reinforcement learning.

Programming Languages

python
139335 projects - #7 most used programming language
Jupyter Notebook
11667 projects

Projects that are alternatives of or similar to Iccv2019 Learningtopaint

Allenact
An open source framework for research in Embodied-AI from AI2.
Stars: ✭ 144 (-92.78%)
Mutual labels:  reinforcement-learning
Chess Alpha Zero
Chess reinforcement learning by AlphaGo Zero methods.
Stars: ✭ 1,868 (-6.37%)
Mutual labels:  reinforcement-learning
Energy Py
Reinforcement learning for energy systems
Stars: ✭ 148 (-92.58%)
Mutual labels:  reinforcement-learning
Machin
Reinforcement learning library(framework) designed for PyTorch, implements DQN, DDPG, A2C, PPO, SAC, MADDPG, A3C, APEX, IMPALA ...
Stars: ✭ 145 (-92.73%)
Mutual labels:  reinforcement-learning
Rl Book Challenge
self-studying the Sutton & Barto the hard way
Stars: ✭ 146 (-92.68%)
Mutual labels:  reinforcement-learning
Study Reinforcement Learning
Studying Reinforcement Learning Guide
Stars: ✭ 147 (-92.63%)
Mutual labels:  reinforcement-learning
Gb
A minimal C implementation of Nintendo Gameboy - An fast research environment for Reinforcement Learning
Stars: ✭ 143 (-92.83%)
Mutual labels:  reinforcement-learning
Gym Fx
Forex trading simulator environment for OpenAI Gym, observations contain the order status, performance and timeseries loaded from a CSV file containing rates and indicators. Work In Progress
Stars: ✭ 151 (-92.43%)
Mutual labels:  reinforcement-learning
Show Adapt And Tell
Code for "Show, Adapt and Tell: Adversarial Training of Cross-domain Image Captioner" in ICCV 2017
Stars: ✭ 146 (-92.68%)
Mutual labels:  reinforcement-learning
Doudizhu
AI斗地主
Stars: ✭ 149 (-92.53%)
Mutual labels:  reinforcement-learning
Articulations Robot Demo
Stars: ✭ 145 (-92.73%)
Mutual labels:  reinforcement-learning
Tensor2tensor
Library of deep learning models and datasets designed to make deep learning more accessible and accelerate ML research.
Stars: ✭ 11,865 (+494.74%)
Mutual labels:  reinforcement-learning
Open Quadruped
An open-source 3D-printed quadrupedal robot. Intuitive gait generation through 12-DOF Bezier Curves. Full 6-axis body pose manipulation. Custom 3DOF Leg Inverse Kinematics Model accounting for offsets.
Stars: ✭ 148 (-92.58%)
Mutual labels:  reinforcement-learning
Art Dcgan
Modified implementation of DCGAN focused on generative art. Includes pre-trained models for landscapes, nude-portraits, and others.
Stars: ✭ 1,882 (-5.66%)
Mutual labels:  painting
Tensorflow rlre
Reinforcement Learning for Relation Classification from Noisy Data(TensorFlow)
Stars: ✭ 150 (-92.48%)
Mutual labels:  reinforcement-learning
Data Science Question Answer
A repo for data science related questions and answers
Stars: ✭ 2,000 (+0.25%)
Mutual labels:  reinforcement-learning
Rainbow
A PyTorch implementation of Rainbow DQN agent
Stars: ✭ 147 (-92.63%)
Mutual labels:  reinforcement-learning
Mypaint
MyPaint is a simple drawing and painting program that works well with Wacom-style graphics tablets.
Stars: ✭ 2,072 (+3.86%)
Mutual labels:  painting
Tradzqai
Trading environnement for RL agents, backtesting and training.
Stars: ✭ 150 (-92.48%)
Mutual labels:  reinforcement-learning
Minimalrl
Implementations of basic RL algorithms with minimal lines of codes! (pytorch based)
Stars: ✭ 2,051 (+2.81%)
Mutual labels:  reinforcement-learning

ICCV2019-Learning to Paint

arXiv | YouTube | Reddit | Slide(中文)

Abstract

We show how to teach machines to paint like human painters, who can use a small number of strokes to create fantastic paintings. By employing a neural renderer in model-based Deep Reinforcement Learning (DRL), our agents learn to determine the position and color of each stroke and make long-term plans to decompose texture-rich images into strokes. Experiments demonstrate that excellent visual effects can be achieved using hundreds of strokes. The training process does not require the experience of human painters or stroke tracking data.

You can easily use colaboratory to have a try.

DemoDemoDemo DemoDemoDemo

Dependencies

pip3 install torch==1.1.0
pip3 install tensorboardX
pip3 install opencv-python

Testing

Make sure there are renderer.pkl and actor.pkl before testing.

You can download a trained neural renderer and a CelebA actor for test: renderer.pkl and actor.pkl

$ wget "https://drive.google.com/uc?export=download&id=1-7dVdjCIZIxh8hHJnGTK-RA1-jL1tor4" -O renderer.pkl
$ wget "https://drive.google.com/uc?export=download&id=1a3vpKgjCVXHON4P7wodqhCgCMPgg1KeR" -O actor.pkl
$ python3 baseline/test.py --max_step=100 --actor=actor.pkl --renderer=renderer.pkl --img=image/test.png --divide=4
$ ffmpeg -r 10 -f image2 -i output/generated%d.png -s 512x512 -c:v libx264 -pix_fmt yuv420p video.mp4 -q:v 0 -q:a 0
(make a painting process video)

We also provide with some other neural renderers and agents, you can use them instead of renderer.pkl to train the agent:

triangle.pkl --- actor_triangle.pkl;

round.pkl --- actor_round.pkl;

bezierwotrans.pkl --- actor_notrans.pkl

We also provide 百度网盘 source. 链接: https://pan.baidu.com/s/1GELBQCeYojPOBZIwGOKNmA 提取码: aq8n

Training

Datasets

Download the CelebA dataset and put the aligned images in data/img_align_celeba/******.jpg

Neural Renderer

To create a differentiable painting environment, we need train the neural renderer firstly.

$ python3 baseline/train_renderer.py
$ tensorboard --logdir train_log --port=6006
(The training process will be shown at http://127.0.0.1:6006)

Paint Agent

After the neural renderer looks good enough, we can begin training the agent.

$ cd baseline
$ python3 train.py --max_step=40 --debug --batch_size=96
(A step contains 5 strokes in default.)
$ tensorboard --logdir train_log --port=6006

Resources

量子位报道

Learning to Paint:一个绘画 AI

旷视研究院推出基于深度强化学习的绘画智能体

Contributors

Also many thanks to ctmakro for inspiring this work. He also explored using greedy algorithm to generate paintings - opencv_playground.

If you find this repository useful for your research, please cite the following paper:

@inproceedings{huang2019learning,
  title={Learning to paint with model-based deep reinforcement learning},
  author={Huang, Zhewei and Heng, Wen and Zhou, Shuchang},
  booktitle={Proceedings of the IEEE International Conference on Computer Vision (ICCV)},
  year={2019}
}

感谢支持 Paypal Sponsor: https://www.paypal.com/paypalme/hzwer

imageimage

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].