Skip to content
Learning to Paint with Model-based Deep Reinforcement Learning
Branch: master
Clone or download
Latest commit 14106d2 Mar 15, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
baseline Clean codes Mar 11, 2019
image Update demo Mar 15, 2019
.gitignore Create repo Mar 11, 2019 Update Mar 15, 2019

Stroke-based Artistic Rendering Agent with Deep Reinforcement Learning


---> Reddit Welcome to suggest our work!


CelebA paintings stroke by stroke.


Excellent painters can use only a few strokes to create a fantastic painting, which is a symbol of human intelligence and art. Inverting a renderer or generator to interpret images is also a challenging task of computer vision in recent years. In this paper, we present SARA, a stroke-based artistic rendering agent that combines the neural renderer and deep reinforcement learning (DRL), allowing the machine to learn the ability to deconstruct images using strokes and create amazing visual effects. Our agent is an end-to-end program that converts natural images into paintings. The training process does not require the experience of human painting or stroke tracking data.


Use anaconda to manage environment

$ conda create -n py36 python=3.6
$ source activate py36



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/
$ tensorboard --logdir ./train_log --port=6006
(The training process will be shown at

RL Agent

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

$ python3 baseline/ --max_step=40
(A step contains 5 strokes in default.)
$ tensorboard --logdir ./train_log --port=6006

We will provide you some trained parameters soon. We really hope someone will use these code to reproduce the results.


ImageNet paintings

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

  title={Stroke-based Artistic Rendering Agent with Deep Reinforcement Learning
  author={Huang, Zhewei and Heng, Wen and Zhou, Shuchang},
  journal={arXiv preprint arXiv:1903.04411},
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.