Abstract
Computer-Aided Design (CAD) plays a pivotal role in industrial manufacturing, yet 2D Parametric Primitive Analysis (PPA) remains underexplored due to two key challenges: structural constraint reasoning and advanced semantic understanding. To tackle these challenges, we first propose an Efficient Hybrid Parametrization (EHP) for better representing 2D engineering drawings. EHP contains four types of atomic component i.e., point, line, circle, and arc). Additionally, we propose PHT-CAD, a novel 2D PPA framework that harnesses the modality alignment and reasoning capabilities of Vision-Language Models (VLMs) for precise engineering drawing analysis. In PHT-CAD, we introduce four dedicated regression heads to predict corresponding atomic components. To train PHT-CAD, a three-stage training paradigm Progressive Hierarchical Tuning (PHT) is proposed to progressively enhance PHT-CAD's capability to perceive individual primitives, infer structural constraints, and align annotation layers with their corresponding geometric representations. Considering that existing datasets lack complete annotation layers and real-world engineering drawings, we introduce ParaCAD, the first large-scale benchmark that explicitly integrates both the geometric and annotation layers. ParaCAD comprises over 10 million annotated drawings for training and 3,000 real-world industrial drawings with complex topological structures and physical constraints for test. Extensive experiments demonstrate the effectiveness of PHT-CAD and highlight the practical significance of ParaCAD in advancing 2D PPA research.
Introduction
While AI has made significant strides in interpreting hand-drawn sketches, real-world 2D engineering drawings present a unique set of challenges. Industrial blueprints are not merely collections of lines; they are defined by complex structural constraints—such as tangency, parallelism, and coincidence—and are accompanied by dense annotation layers containing text, dimensions, and symbols. These annotations provide the "ground truth" necessary for manufacturing.
Existing models often struggle with these drawings because they either ignore annotations entirely or fail to reason through the underlying geometric intent. Furthermore, the field has lacked a large-scale dataset that combines raw geometry with professional annotation layers. PHT-CAD addresses these gaps by leveraging the reasoning power of Vision-Language Models (VLMs) and introducing a massive new dataset, ParaCAD.
Methodology
The PHT-CAD framework is built upon three core innovations designed to bridge the gap between visual perception and engineering logic.
Efficient Hybrid Parametrization (EHP)
Instead of relying on raw pixels or relative coordinates, EHP represents drawings using four atomic components: points, lines, circles, and arcs. This parametrization simplifies the mathematical representation—for instance, defining a circle by its center and radius—making it significantly easier for the model to infer structural constraints.
The PHT-CAD Architecture
The model utilizes a Vision Transformer (ViT) encoder to process the visual input and a Qwen2.5-based text decoder for reasoning. To overcome the inherent difficulty language models face with precise numerical values, the authors added four dedicated regression heads. These heads predict the fine-grained coordinates and parameters that standard text output might miss.
Progressive Hierarchical Tuning (PHT)
To effectively train the model, a three-stage hierarchical process is employed:
- Primitive Perception: Learning to recognize individual geometric elements.
- Structural Perception: Learning how primitives connect and interact via constraints.
- Annotation-Geometry Alignment: Learning to link textual dimensions (e.g., "50mm") to specific geometric features.
The ParaCAD Dataset
A major contribution of this work is ParaCAD, the first large-scale benchmark of its kind. The training set consists of over 10 million annotated drawings, procedurally generated and enhanced with explicit dimension layers. The test set includes 3,000 real-world industrial drawings characterized by high topological complexity and strict physical constraints, providing a rigorous evaluation of the model's practical utility.
Results and Key Insights
PHT-CAD sets a new state-of-the-art (SOTA) across multiple benchmarks. On the SketchGraphs dataset, it achieved an accuracy of 81.1%, significantly outperforming previous models like PICASSO (75.1%). Its zero-shot performance reached 92.3%, indicating that the model learns general engineering principles rather than just memorizing specific data.
Key insights from the study include:
- VLMs as Reasoners: By using a VLM, the model can "reason" through the relationship between a dimension label and the geometry it describes, rather than just performing simple detection.
- Precision via P-MSE Loss: The introduction of Parametric Mean Squared Error (P-MSE) Loss ensures the model is penalized for even minor numerical deviations, which is critical for engineering accuracy.
- Hierarchical Importance: Ablation studies confirmed that the hierarchical training stages are vital; skipping the initial "Primitive Perception" stage resulted in a 12% drop in accuracy.
Conclusion
PHT-CAD represents a significant advancement in 2D Parametric Primitive Analysis. By combining VLM-based reasoning with a hierarchical training strategy and a robust new dataset, the framework achieves unprecedented accuracy in interpreting complex engineering drawings. Future research will focus on extending these capabilities to 3D CAD models and incorporating more specialized functional symbols such as surface finish and tolerance frames.
For more information, visit the project repository: GitHub - yuwen-chen616/PHT-CAD
Summary updated