Practical overview
When it fits
Use it when you want to study or experiment with an image-to-painting research workflow and are prepared to work with Python dependencies, model files or training data.
Who it is for
- Researchers exploring deep reinforcement learning and computer vision.
- Developers studying or adapting sequential brushstroke-generation methods.
- Readers who want to inspect a research implementation or try its linked Colab notebook.
Documented uses
- Render an input image as a sequence of generated painting strokes using the provided test workflow.
- Train a neural renderer and then train a paint agent using the documented CelebA image layout.
- Inspect how a model-based reinforcement-learning agent chooses stroke position and color.
Requirements & limits
The GitHub repository is public and identifies an MIT license. Its README links a Google Colab notebook and documents local Python dependencies and workflows.
- The documented dependency versions are PyTorch 1.1.0 and opencv-python 3.4.0, alongside tensorboardX.
- Testing requires renderer.pkl and actor.pkl; training instead starts with aligned CelebA images and a renderer-training stage.
- The README includes commands for generating test frames and assembling them into a video with ffmpeg.
- The repository describes a research implementation, not a hosted painting service.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Test the painting agent with pretrained files
Run the repository's documented test script on an image and create a video from its generated frames.
Before you start
- Python 3 with PyTorch 1.1.0, tensorboardX and opencv-python 3.4.0.
- The repository and an input image.
- The trained renderer.pkl and actor.pkl files linked in the README.
- ffmpeg to assemble generated frames into a video.
Steps
Install the three Python dependencies listed in the README.
Download the linked trained renderer and actor files as renderer.pkl and actor.pkl.
Run baseline/test.py with the documented max_step, actor, renderer, image and divide arguments, substituting an input image path.
Use the documented ffmpeg command to convert output/generated%d.png frames into video.mp4.
Expected outcome
The test script is configured to generate painting frames, which the ffmpeg command assembles into a painting-process video.
Guide limitations
- The README requires both model files before testing.
- The instructions do not specify additional environment or hardware requirements.
- The repository documents these commands but does not establish compatibility with other dependency versions.
Train the neural renderer and paint agent
Follow the documented two-stage training workflow, starting with the renderer and then training the agent.
Before you start
- Python 3 with PyTorch 1.1.0, tensorboardX and opencv-python 3.4.0.
- The CelebA dataset, with aligned images placed in data/img_align_celeba/.
Steps
Download CelebA and place aligned images in the documented data/img_align_celeba/ path.
Run baseline/train_renderer.py to train the neural renderer.
After the renderer looks good enough, enter the baseline directory and run train.py with the documented max_step, debug and batch_size options.
Use the TensorBoard command in the README to view the training log.
Expected outcome
The documented sequence trains a neural renderer first and then a painting agent; the README states that a default agent step contains five strokes.
Guide limitations
- Training instructions depend on preparing the dataset in the expected directory structure.
- The README provides no detailed hardware requirements or training-duration estimate.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 15 October 2026
- Original website title
- hzwer/ICCV2019-LearningToPaint · Official homepage title · retained in its source language

