Table of Contents
Fetching ...

From Engineering Diagrams to Graphs: Digitizing P&IDs with Transformers

Jan Marius Stürmer, Marius Graumann, Tobias Koch

TL;DR

This work tackles the challenge of digitizing P&ID diagrams by introducing a transformer-based Relationformer that jointly detects symbols and their interconnections, addressing limitations of modular pipelines. It provides PID2Graph, the first public dataset with real-world P&IDs annotated with full graph structures, enabling reproducible evaluation. Empirical results show the Relationformer outperforms the modular baseline across multiple datasets, with notable gains in node detection and edge prediction and robust performance on real-world diagrams. The study demonstrates the practical value of end-to-end relational modeling for complex engineering diagrams and outlines the importance of realistic training data and a standardized evaluation framework.

Abstract

Digitizing engineering diagrams like Piping and Instrumentation Diagrams (P&IDs) plays a vital role in maintainability and operational efficiency of process and hydraulic systems. Previous methods typically decompose the task into separate steps such as symbol detection and line detection, which can limit their ability to capture the structure in these diagrams. In this work, a transformer-based approach leveraging the Relationformer that addresses this limitation by jointly extracting symbols and their interconnections from P&IDs is introduced. To evaluate our approach and compare it to a modular digitization approach, we present the first publicly accessible benchmark dataset for P&ID digitization, annotated with graph-level ground truth. Experimental results on real-world diagrams show that our method significantly outperforms the modular baseline, achieving over 25% improvement in edge detection accuracy. This research contributes a reproducible evaluation framework and demonstrates the effectiveness of transformer models for structural understanding of complex engineering diagrams. The dataset is available under https://zenodo.org/records/14803338.

From Engineering Diagrams to Graphs: Digitizing P&IDs with Transformers

TL;DR

This work tackles the challenge of digitizing P&ID diagrams by introducing a transformer-based Relationformer that jointly detects symbols and their interconnections, addressing limitations of modular pipelines. It provides PID2Graph, the first public dataset with real-world P&IDs annotated with full graph structures, enabling reproducible evaluation. Empirical results show the Relationformer outperforms the modular baseline across multiple datasets, with notable gains in node detection and edge prediction and robust performance on real-world diagrams. The study demonstrates the practical value of end-to-end relational modeling for complex engineering diagrams and outlines the importance of realistic training data and a standardized evaluation framework.

Abstract

Digitizing engineering diagrams like Piping and Instrumentation Diagrams (P&IDs) plays a vital role in maintainability and operational efficiency of process and hydraulic systems. Previous methods typically decompose the task into separate steps such as symbol detection and line detection, which can limit their ability to capture the structure in these diagrams. In this work, a transformer-based approach leveraging the Relationformer that addresses this limitation by jointly extracting symbols and their interconnections from P&IDs is introduced. To evaluate our approach and compare it to a modular digitization approach, we present the first publicly accessible benchmark dataset for P&ID digitization, annotated with graph-level ground truth. Experimental results on real-world diagrams show that our method significantly outperforms the modular baseline, achieving over 25% improvement in edge detection accuracy. This research contributes a reproducible evaluation framework and demonstrates the effectiveness of transformer models for structural understanding of complex engineering diagrams. The dataset is available under https://zenodo.org/records/14803338.

Paper Structure

This paper contains 27 sections, 10 figures, 9 tables, 1 algorithm.

Figures (10)

  • Figure 1: Overview of the Relationformer Shit.2022 and the Modular Digitization to digitize engineering diagrams. The preprocessing step patches and adjusts the data, which is then fed into each method to produce a graph representation as output.
  • Figure 2: Two example patches obtained after dividing the full diagram of OPEN100 (a) and the Synthetic Test Data (b), with border nodes (pink) and bounding boxes (several colors) marking where lines exit each patch. These patches serve as input to the Relationformer for training, testing and evaluation.
  • Figure 3: Symbol class distribution: Frequency of symbol object classes among the datasets, showing relative abundance of each class type.
  • Figure 4: Edge Class Distribution: Relative frequency of each edge class across the datasets.
  • Figure 5: Description of the implemented metric for calculating the edge mAP.
  • ...and 5 more figures