Welcome to Journal of Graphics

Journal of Graphics ›› 2026, Vol. 47 ›› Issue (2): 380-389.DOI: 10.11996/JG.j.2095-302X.2026020380

• Computer Graphics and Virtual Reality • Previous Articles     Next Articles

PDF-Sketch: layout-based sketch generation via primitive distance fields and discrete diffusion

ZHOU Jin, ZHOU Yi, XU Pengfei(), HUANG Hui   

  1. College of Computer Science and Software Engineering, Shenzhen University, Shenzhen Guangdong 518060, China
  • Received:2025-07-16 Accepted:2025-10-02 Online:2026-04-30 Published:2026-05-20
  • Contact: XU Pengfei
  • Supported by:
    National Natural Science Foundation of China(62472287);Natural Science Foundation of Shenzhen City(JCYJ20250604181519025)

Abstract:

Sketches play an important role in conceptual design, digital art, and human-computer interaction. However, existing deep learning-based sketch generation methods often rely on polylines or Bézier curves for geometric representation, which are limited in capturing complex shapes. Sequential point prediction also leads to cumulative errors, causing structural distortion and loss of details. To address these issues, sketch generation was formulated as a layout modeling problem, where a sketch was composed of multiple independent stroke primitives. A framework was proposed that integrated a discrete diffusion model with the Primitive Distance Field (PDF). The method first applied adaptive stroke decomposition and a stroke autoencoder to obtain continuous and differentiable features of stroke segments. A codebook mechanism was then employed to discretize frequently recurring stroke patterns into a finite set of items, enabling the diffusion process to gradually recover a coherent set of stroke segments while jointly modeling their positions, sizes, and shapes. Experiments on the QuickDraw dataset showed that the proposed approach outperformed Sketch-rnn and SketchKnitter in terms of Frechet Inception Distance (FID), Precision, and Recall. In tasks with fewer strokes, the model captured local geometric details more effectively and achieved higher recall, while in tasks with more strokes, it demonstrated greater structural accuracy and fidelity. Qualitative comparisons further indicated that the generated sketches exhibited stronger structural coherence, richer details, and better spatial consistency. These results confirmed that the adoption of a layout-based perspective, combined with distance field representation and discretization, effectively reduced error accumulation in sequential modeling and improves both structural integrity and diversity in sketch generation. The framework also provided directions for enhancing stroke segmentation, detail recovery, and inter-segment connectivity in more complex scenarios.

Key words: vector sketch, layout generation, stroke decomposition, stroke representation and learning, distance field, diffusion model

CLC Number: