TL;DR
This paper introduces a deep learning framework that automates the interpretation of 2D engineering drawings by converting raster images into vectorized component graphs. By applying Graph Convolutional Networks (specifically GraphSAGE), the system successfully categorizes drawing elements into contours, dimensions, and text, significantly outperforming traditional pixel-based computer vision methods.
What Problem Does This Paper Address?
In modern manufacturing, designers frequently share 2D engineering drawings as raster images (like PDFs or scans) to protect intellectual property and ensure cross-platform compatibility. However, this creates a major bottleneck for manufacturers: engineers must manually read these drawings to estimate costs, plan processes, and understand topological requirements.
While deep learning has revolutionized semantic segmentation for natural images, standard convolutional neural networks (CNNs) fail miserably on engineering drawings. This is due to severe pixel sparsity—drawings consist mostly of empty white space and thin black lines, meaning grid-based convolutions waste immense computation on empty pixels. Furthermore, engineering drawings are highly context-dependent; a single straight line could represent a part's physical boundary or merely a dimension extension line depending entirely on what it connects to.
Methods
The authors propose a three-step pipeline called EDGNet (Engineering Drawing Graph Network) to move from pixels to semantic meaning:
- Drawing Vectorization: The raster image is thinned to a single-pixel skeleton using parallel thinning algorithms. The system traces these pixel paths, detects corners by analyzing the second derivative of the vectors' cosine angles, splits them accordingly, and fits cubic Bezier curves to the traces using least squares.
- Graph Construction: Instead of pixels, the basic elements are now these vectorized curves, which become nodes in a graph. Edges are automatically drawn between nodes that physically touch or intersect. For each node, domain-specific features are calculated, including shape (sampled coordinates), length, angle, and curvature.
- Graph Segmentation: The task is framed as a node-classification problem. The authors utilize GraphSAGE, a Graph Convolutional Network (GCN) variant that excels at aggregating features from a node’s local neighborhood, allowing the model to leverage the crucial contextual information missing in pixel-level approaches.
Datasets
The framework was trained and evaluated on a new, practical dataset:
- 430 real engineering part drawings (including sheet metal, lathing, and general machining parts) sourced from a large mechanical component e-commerce platform.
- Each drawing contains between 500 and 3,000 vectorized components.
- Ground Truth Generation: To train the network, the authors modified a DXF batch renderer (
EZDXF) to parse the original vector files and paint each component type (contour, text, dimension, etc.) a unique color, establishing ground truth labels via a majority vote of sampled points.
Key Insights and Ideas
- Graphs Over Grids: Shifting the problem domain from image space (pixels) to graph space (vector components) completely bypasses the pixel sparsity problem. The network only computes features where information actually exists.
- Context is King: By defining edges based on connectivity, the GCN naturally learns topology. It understands that a line segment connected to text is likely a dimension line, whereas the same line segment forming a closed loop is a contour.
- Data Efficiency and Stability: Graph-based representations prove to be significantly more stable than image-based models. When trained on restricted dataset sizes, the graph models exhibited much lower performance variance, implying better feature extraction stability.
Key Results
The authors evaluated their model against standard image-based segmentation networks (PSPNet, DeepLabV3) and a sketch-specific graph baseline (SketchGNN) across multiple tasks.
In the most challenging 3-class segmentation task (separating Contours vs. Text vs. Dimensions), the proposed EDGNet achieved an accuracy of 90.82%, dramatically outperforming the baselines:
- EDGNet (Ours): 90.82%
- SketchGNN: 84.37%
- DeepLabV3: 81.64%
- PSPNet: 79.54%
For simpler 2-class text vs. non-text segmentation, the model achieved a near-perfect 98.48% accuracy.
Limitations and Future Work
Despite the strong results, the authors highlight two primary failure modes:
- Isolated Components: Small, disconnected elements (like dashed lines, diameter symbols, or through-hole symbols) lack edge connections in the graph. Without neighborhood context, the GCN struggles to classify them solely on geometry. Solution: Future iterations will generate proximity-based edges for nearest neighbors.
- Intersection Boundaries: The model occasionally misclassifies regions where different types meet (e.g., where a contour line touches a dimension extension line) because the current graph design lacks explicit edge features to distinguish between line-line vs. line-curve intersections.
Future work will focus on integrating edge attributes (angles and curvature changes between connected nodes) and expanding the framework to detect complex manufacturing symbols and geometric tolerances.
Summary updated