Differentiable Stroke Planning with Dual Parameterization for Efficient and High-Fidelity Painting Creation

Jinfan Liu, Wuze Zhang, Zhangli Hu, Zhehan Zhao, Ye Chen, Bingbing Ni

TL;DR

This paper introduces a novel stroke-based rendering framework that bridges the gap between discrete stroke placement and continuous gradient descent using a dual stroke representation. By bidirectionally mapping discrete polylines to continuous Bézier curves, the method achieves structurally coherent, high-fidelity digital paintings with 30–50% fewer strokes and a 30–40% reduction in optimization time.

What Problem Does This Paper Address?

Stroke-Based Rendering (SBR) automatically translates digital images into expressive, stroke-based artwork like oil paintings or sketches. Existing SBR techniques typically fall into two flawed categories:

  1. Search-based methods: These trace strokes sequentially along local pixel gradients using discrete primitives. They easily get trapped in local minima, suffer from structural fragmentation, and require tens of thousands of strokes to achieve decent fidelity.
  2. Differentiable optimization methods: These use gradient descent to optimize stroke parameters for pixel-level color fitting. While fast, they lack explicit structural priors, resulting in visually disorganized, messy layouts that fail to capture the natural flow of image features.

The authors address this fundamental trade-off: how to combine the structural awareness of discrete search with the pixel-perfect efficiency of gradient descent.

Methods

The core innovation is a Dual Stroke Representation coupled with an iterative search-and-optimize pipeline:

Figure 2: The iterative search-and-optimize pipeline leveraging dual stroke parameterization.
  • Dual Parameterization: Every stroke is simultaneously represented in two forms: a Discrete Polyline (a sequence of ordered vertices ideal for structural tracing and proposal) and a Continuous Bézier Curve (defined by smooth control points ideal for gradient descent).
  • Bidirectional Mapping: A differentiable spline conversion layer connects the two domains. Converting a polyline to a Bézier curve uses a closed-form least-squares solution via the pseudoinverse. This mathematical formulation allows loss gradients to flow seamlessly from the continuous canvas back to influence the discrete polyline structure.
  • Two-Stage Pipeline:
    1. Structure-Aware Search: Proposes new stroke segments in under-reconstructed image regions by tracing geometry-aligned polylines along image gradients.
  • Gradient-Guided Optimization: Concurrently refines the color, shape, width, and opacity of all strokes using Adam.
  • Differentiable Polyline Renderer: Inspired by recent advances in Gaussian Splatting, the renderer treats stroke segments as soft, anisotropic splats. This allows highly parallelized rasterization of thousands of strokes simultaneously on the GPU.
  • Physical Realism (Height Fields): To simulate the tangible surface relief of real oil paintings (impasto), the framework incorporates a pre-trained monocular depth model (Depth Anything) to initialize and refine a stroke height field for realistic 3D relighting.

Datasets

The authors evaluated their approach on two complementary datasets:

  • DIV2K Validation Set: A diverse natural-image benchmark, resized to 1200×1200 pixels to evaluate consistent stroke resolution.
  • Im2Oil Gallery Dataset: A dataset featuring classical oil paintings at 600×800 pixels, specifically chosen to test complex artistic textures and styles.

Key Insights and Ideas

  • The Power of the Pseudoinverse: Using a closed-form least-squares solution to map polylines to Bézier curves makes the entire fitting process differentiable. This allows local pixel-level losses to directly reshape global stroke structures.
  • Division of Labor: Coarse exploration is handled by the discrete search (finding where strokes should go along salient edges), while fine exploitation is handled by gradients (perfecting width, color, and opacity). This prevents the continuous optimizer from collapsing into messy, unstructured layouts.
  • Gaussian Splatting Parallelism: Adapting the splatting paradigm to stroke rendering allows thousands of strokes to be optimized simultaneously from the very first iteration, bypassing the slow, sequential stroke placement of older methods.

Key Results

  • Stroke Efficiency: Reduces the required number of strokes by 30–50% while achieving higher reconstruction fidelity.
  • Speedups: Cuts total optimization time by 30–40% compared to state-of-the-art differentiable methods, often converging in under 90 seconds (87.6s on DIV2K vs. 5837s for SNP).
  • Fidelity: Delivers a substantial 4–5 dB PSNR gain on complex texture datasets (achieving 32.16 dB on DIV2K compared to the next best at 27.91 dB).
  • User Preference: A 100-participant user study ranked this method highest across all perceptual criteria, including Structural Fidelity, Textural Realism, Color Accuracy, and Overall Preference.
Figure 4: Progressive painting process with height-field relighting, showing volumetric 3D surface relief.

Limitations and Future Work

The authors note that directly splitting or pruning strokes during optimization can damage global contour coherence. To circumvent this, they rely on an adaptive strategy that only reinitializes strokes when they drop to near-zero opacity. Furthermore, the framework relies on external monocular depth estimation models to bootstrap its height-field generation, meaning any structural errors in the depth model could propagate to the final relighting phase. Future work could explore tighter integration of the depth estimation directly into the stroke optimization loop.

Summary updated

BibTeX
@inproceedings{liu2026differentiable,
  author = {Jinfan Liu and Wuze Zhang and Zhangli Hu and Zhehan Zhao and Ye Chen and Bingbing Ni},
  title = {{Differentiable Stroke Planning with Dual Parameterization for Efficient and High-Fidelity Painting Creation}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2026},
  url = {https://openreview.net/forum?id=BqvnXpuMvO},
}
Figure