欢迎访问《图学学报》

图学学报 ›› 2026, Vol. 47 ›› Issue (2): 380-389.DOI: 10.11996/JG.j.2095-302X.2026020380

• 计算机图形学与虚拟现实 • 上一篇    下一篇

PDF-Sketch:基于笔画段距离场与离散扩散的布局式草图生成方法

周金, 周一, 徐鹏飞(), 黄惠   

  1. 深圳大学计算机与软件学院广东 深圳 518060
  • 收稿日期:2025-07-16 接受日期:2025-10-02 出版日期:2026-04-30 发布日期:2026-05-20
  • 通讯作者:徐鹏飞,E-mail:xupengfei.cg@gmail.com
  • 基金资助:
    国家自然科学基金(62472287);深圳市自然科学基金(JCYJ20250604181519025)

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 Published:2026-04-30 Online:2026-05-20
  • Contact: XU Pengfei,E-mail:xupengfei.cg@gmail.com
  • Supported by:
    National Natural Science Foundation of China(62472287);Natural Science Foundation of Shenzhen City(JCYJ20250604181519025)

摘要:

草图在概念设计、数字艺术和人机交互等领域具有重要价值,但现有基于深度学习的生成方法常依赖折线或贝塞尔曲线进行几何表征,难以刻画复杂形态,且逐点预测机制易产生累计误差,导致结构偏移与细节缺失。为此,将草图建模为由多个独立笔画段构成的布局结构,提出一种结合离散扩散模型与笔画段距离场(PDF)的生成框架。首先通过自适应笔画分解与笔画自编码器获取笔画段的连续可微特征表示,再利用编码词典机制将高频相似的笔画形态离散化为有限词项,使扩散过程能逐步恢复出结构合理的笔画段集合,实现对笔画段位置、尺寸和形态的联合建模。在QuickDraw数据集上的实验结果表明,该方法在FID,Precision和Recall等指标上均优于对比方法Sketch-rnn与SketchKnitter。在少笔画任务中,模型更好地学习局部几何特征,召回率提升显著;在多笔画任务中,则展现出更高的结构精度和整体保真度。定性结果显示,生成草图在整体一致性、局部细节还原和空间布局协调性方面均明显优于现有方法。研究表明,从布局生成角度出发并结合距离场与离散化机制,能够有效缓解传统序列建模中的误差累积问题,提升草图生成的结构完整性与多样性,为进一步改进笔画段分割、细节恢复及段间连接一致性提供了新的方向。

关键词: 矢量草图, 布局生成, 笔画分解, 笔画表示与学习, 距离场, 扩散模型

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

中图分类号: