SynthPID: P&ID digitization from Topology-Preserving Synthetic Data
Suraj Prasad Pinak Mahapatra · 2026
Read SynthPID: P&ID digitization from Topology-Preserving Synthetic Data by Suraj Prasad Pinak Mahapatra (2026) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2604-16513.txt.
Introduction
Prasad and Mahapatra tackle digitizing piping and instrumentation diagrams, where the field shares one public benchmark of just 12 annotated images. Template generators scatter symbols at random, making graphs unlike real plants and scoring only about a third correct on edge detection. Their SynthPID corpus holds 665 synthetic diagrams whose pipe topology is seeded from real drawings. With a Relationformer, a model trained on SynthPID reached about 64 percent edge accuracy without seeing a real diagram, close to the oracle, though gains flattened beyond roughly 400 images.
Catalog record
| CREATOR | Suraj Prasad Pinak Mahapatra |
|---|---|
| YEAR | 2026 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 26417 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2604.16513
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
SynthPID: P&ID digitization from Topology-Preserving Synthetic Data Suraj Prasad Pinak Mahapatra Abstract Automating the digitization of Piping and Instrumentation Diagrams (P&IDs) into structured process graphs would unlock significant value in plant operations, yet progress is bottlenecked by a fundamental data problem: engineering drawings are proprietary, and the entire community shares a single public benchmark of just 12 annotated images. Prior attempts at synthetic augmentation have fallen short because template-based generators scatter symbols at random, producing graphs that bear little resemblance to real process plants, and accordingly yield only ∼ 33 % {\sim}33\% edge detection accuracy under synth-only training. We argue the failure is structural rather than visual, and address it by introducing SynthPID, a corpus of 665 synthetic P&IDs whose pipe topology is seeded directly from real drawings. Paired with a patch-based Relationformer adapted for high-resolution diagrams, a model trained on SynthPID alone achieves 63.8 ± \pm 3.1% edge mAP on PID2Graph OPEN100 without seeing a single real P&ID during training, closing within 8 pp of the real-data oracle. These gains hold up under a controlled comparison against the template-based regime of 18 , confirming that generation quality drives performance rather than model choice. A scaling study reveals that gains flatten beyond roughly 400 synthetic images, pointing to seed diversity as the binding constraint. SynthPID, the generation code, and trained weights are available at [email protected]:LatentSpaceIITB/SynthPID.git . 1 Introduction Ask any engineer at an oil refinery or chemical plant how their facility is documented and the answer will invariably involve P&IDs, Piping and Instrumentation Diagrams that encode every valve, pump, instrument, and pipe connection in the plant. Keeping an accurate, queryable digital model of this information is increasingly important for regulatory compliance, predictive maintenance, and the growing industry interest in digital twins 21 . The difficulty is that most P&IDs exist only as raster images, and converting them into structured graphs by hand is both expensive and slow. Automating this conversion is an active research problem, but it has run into a hard constraint: data. Plant operators cannot share engineering drawings externally, as these documents contain sensitive process information, and the entire field has consequently been working from a single public benchmark of just 12 annotated real-world images 18 . Stürmer et al . 18 recently showed that an end-to-end transformer substantially outperforms classical modular pipelines on this benchmark, but their model requires 60 real P&IDs for training. They also note in passing that training on synthetic data alone “suffers significantly”, without elaborating on why. That observation deserves closer inspection. Generating synthetic training data is the natural fallback when annotated real data is scarce, and it has worked well in robotics, medical imaging, and remote sensing. Why does it fail here? Existing synthetic generators 13 ; 18 work by randomly placing symbol templates on a blank canvas and connecting them with simple lines. The output looks superficially like a P&ID, but the underlying graph topology is unrealistic: symbols cluster uniformly, junction degrees follow a narrow range, and the spatial structure of a real process flow is absent. A model trained on such data encounters real P&IDs as a genuinely foreign distribution, not merely a different visual style. We take a different approach. Rather than generating from scratch, we use real P&IDs as structural seeds. Our generation pipeline extracts the physical component graph from each seed, applies spatial and symbolic perturbations that respect topological constraints, and renders the result into a new annotated image. Coupled with Weisfeiler-Lehman and perceptual hashing to filter structurally or visually duplicate outputs, this process yields SynthPID: 665 synthetic P&IDs whose graph-level statistics match those of real drawings while remaining visually distinct from their seeds. Combining SynthPID with a patch-based adaptation of Relationformer 16 , patches are needed because P&ID symbols are too small at full-image scale for reliable detection, we achieve 63.8% edge mAP on OPEN100 without any real P&IDs in the training set. This is 30 percentage points better than training on template-generated synthetic data, 18 points above the modular baseline that does use real data, and within 8 points of training on real P&IDs directly. Adding a small number of real images to the training mix (E3) closes the remaining gap to within 2.8 pp of published state of the art. Our contributions are as follows. We release SynthPID as the first publicly available topology-preserving synthetic P&ID dataset with full graph-level annotation, together with the generation pipeline and trained models at [email protected]:LatentSpaceIITB/SynthPID.git . We provide controlled experimental evidence that generation quality, rather than model architecture, is the primary driver of synthetic-to-real performance. Finally, we establish a rigorous evaluation protocol on OPEN100, 5-fold cross-validation with 3 independent random seeds, as a reproducible benchmark for future work in this data-scarce setting. 2 Related Work P&ID digitization. The dominant paradigm for P&ID recognition has long been to chain specialist modules: a CNN detects and classifies symbols 14 ; 11 ; 3 , a text recognition stage extracts instrument tags 2 , and a Hough-based line detector reconstructs pipe connections 19 . These pipelines are fragile in practice because errors accumulate across stages and the final graph is assembled without any global spatial reasoning. Jamieson et al . 8 survey the field and point to data scarcity as the central roadblock, a view echoed across the literature. The most relevant prior work for us is Stürmer et al . 18 , who apply Relationformer end-to-end to the OPEN100 benchmark and gain more than 25 percentage points in edge detection over the modular baseline, but require 60 annotated real P&IDs to do so. Our work asks what is possible when that annotated corpus is unavailable. Synthetic data for engineering diagrams. Paliwal et al . 13 released Dataset-P&ID, a collection of 500 synthetic diagrams built by randomly scattering 32 symbol templates across a blank canvas. Stürmer et al . 18 use a similar strategy for pre-training their model, but conclude in Appendix A5 that synth-only training “suffers significantly” on real images. GAN-based augmentation 12 ; 4 can diversify the visual appearance of symbols but cannot alter graph connectivity, so it does not address the structural mismatch we identify. The core issue with random placement is that the resulting graphs look nothing like real process plants in terms of degree distribution, component clustering, or flow directionality. Our generator is specifically designed to avoid this by inheriting topology from real seeds. Synthetic-to-real transfer. Domain transfer from simulation to real data has a long history in computer vision 20 ; 6 , and lessons from that literature carry over here. Work on robotic manipulation, for instance, has shown that matching the structural properties of the simulated environment, physical dynamics, joint constraints, matters far more than photographic realism 1 . The analogy to P&IDs is direct: graph topology plays the role of physical dynamics, and getting it right is what enables transfer. Image-to-graph prediction. Relationformer 16 builds on Deformable DETR 22 by introducing a shared relation token that, combined pairwise with object queries, produces joint detections and edge predictions. More recently, EGTR 7 avoids explicit relation tokens by reading scene-graph structure from DETR’s own self-attention maps, achieving strong results on Visual Genome. We use Relationformer to keep our architecture identical to that of 18 ,