Introduction
In industrial sectors such as oil and gas, manufacturing, and power generation, Piping and Instrumentation Diagrams (P&IDs) serve as the definitive "source of truth" for facility architecture. These diagrams detail every pipe, valve, sensor, and piece of equipment within a plant. However, a significant hurdle remains: most of these diagrams exist as static image files or CAD exports devoid of underlying metadata. This lack of structure makes mapping physical sensor data to specific equipment a manual, error-prone, and expensive process. This paper presents an automated pipeline designed to transform these static blueprints into machine-readable asset hierarchies, providing the essential data layer for industrial "digital twins."
The Challenge of Connectivity
The core difficulty in digitizing P&IDs is that they are not merely collections of shapes; they are complex networks where the logical connections (the lines) are as critical as the components (the symbols) themselves. Previous attempts at digitization often relied on simple proximity to guess connections, which fails in dense diagrams where symbols may be physically close but functionally unrelated.
Methodology
The researchers propose a three-stage pipeline to bridge the gap between raw pixels and a structured database:
1. Symbol Detection
Rather than employing a computationally heavy generic object detector, the team developed a custom, lightweight Convolutional Neural Network (CNN) inspired by the LeNet architecture. This model was trained to classify 100x100 pixel crops into three distinct categories: "Tags" (digital sensors), "LMIs" (locally mounted instruments), and "Not a symbol."
2. Text Recognition and Association
To assign specific IDs to detected symbols, the pipeline utilizes the EAST (Efficient and Accurate Scene Text) detector to locate text and Tesseract OCR to interpret it. The recognized text is then associated with the nearest symbol using a distance-based thresholding approach.
3. Graph-Based Connection Detection
The most significant innovation in this work is the treatment of the diagram as a pixel-level graph. Instead of assuming connectivity based on proximity, the authors use Depth-First Search (DFS) to traverse the black pixels of the lines. If a continuous path of pixels exists between Symbol A and Symbol B, they are formally recorded as connected. This ensures the digitized output respects the actual engineering logic of the drawing.
Key Results and Insights
The pipeline demonstrated impressive performance, particularly for standardized symbols:
- Digital Sensors (Tags): Achieved 100% precision and 98% recall, largely due to their distinct "circle-inside-a-square" geometry.
- Local Instruments (LMIs): Achieved 85% precision and 90% recall. These proved more challenging as their simple circular shapes were occasionally confused with other circular map elements, such as valve components.
The final output of the system is a structured "Asset Hierarchy Table" that catalogs every symbol, its type, its unique text ID, and its full connectivity map. This structured data is foundational for AI-driven industrial health monitoring; anomaly detection on a pump is only possible if the system understands which sensors are monitoring it.
Limitations and Future Directions
While the current pipeline is highly effective, the authors identify several areas for optimization. The current sliding window approach for symbol detection is computationally intensive; transitioning to a region-based detector like Faster R-CNN could improve speed. Additionally, industrial diagrams often feature unique, "one-off" symbols. Future work will explore few-shot learning to allow the model to recognize new symbols from minimal examples. Finally, integrating domain-specific dictionaries could help mitigate OCR errors caused by vertical text or line overlaps.
Summary updated