Chemical Engineering6 min read

P&ID Recognition

Extracting structured engineering data from flowsheet images using object detection and topology exploration

The Problem

P&IDs and process flowsheets contain critical information about how a plant is designed — every unit operation, instrument, valve, and the connections between them. But in practice, most of this information is locked inside static images: scanned paper drawings, PDFs, or old CAD exports.

When engineers need to work with this data — for safety reviews, plant modifications, or simulation setup — they end up manually reading diagrams and re-entering information into spreadsheets or databases. This is slow, error-prone, and does not scale.

Example of a chemical process P&ID diagram


What We Do

Our goal is flowsheet digitization: extracting the topology of a P&ID or PFD from its image and saving it as structured, machine-readable data in a graph format.

This means identifying:

  • What is on the diagram (equipment, instruments, valves, piping)
  • Where each component is located
  • How they connect to each other (the process topology)
  • What the text says (tag numbers, line numbers, annotations, tables)

The output is not just a list of detected symbols — it is a graph that captures the connectivity and relationships between components, which is what makes the data actually useful for downstream engineering work.


How It Works

1. Upload & Preprocessing

Upload P&ID drawings in PDF, TIFF, DWG, PNG, or scanned paper formats. The preprocessing pipeline handles deskewing, noise removal, multi-page splitting, and resolution normalization.

2. Object Detection

Machine learning models identify the position and type of each unit operation, instrument, and valve on the flowsheet. We train on a large, labeled dataset of chemical process flowsheets and P&IDs from diverse sources, covering ISA 5.1, ISO 14617, and various proprietary symbol sets.

The models detect:

  • Equipment — vessels, tanks, columns, heat exchangers, reactors, pumps
  • Instruments — pressure transmitters, flow meters, temperature indicators, control loops
  • Valves — control valves, check valves, relief valves, manual valves
  • Piping — process lines, utility lines, instrument signal lines

3. Text & Table Recognition

OCR extracts tag numbers, line numbers, equipment labels, spec breaks, and tabular data (title blocks, equipment schedules). These are linked back to their corresponding symbols.

4. Topology Extraction

This is the core step. A pathway exploration algorithm traces the connections between detected components — following pipe lines, signal lines, and process flows to reconstruct the full topology of the flowsheet as a graph.

The result: each component is a node, each connection is an edge, and the graph captures the actual process structure.

Operon P&ID recognition demo — detected components with tag numbers and confidence scores

5. Export

The digitized data can be exported in multiple formats:

  • Graph formats for engineering databases and knowledge systems
  • CSV / JSON / XML for integration with existing tools
  • DEXPI-compatible formats for interoperability with standards-based systems

Our Approach

Object Detection Architecture

At the core of our system is a deep convolutional neural network trained for object detection — the task of simultaneously locating and classifying multiple objects within an image. This is fundamentally different from image classification (which asks "what is this image of?"). Object detection answers "where is everything, and what is each thing?" in a single pass.

Modern object detection architectures work by dividing the image into a grid of regions and predicting, for each region, whether it contains an object, what class that object belongs to, and the precise bounding box coordinates. The network learns hierarchical features: early layers detect low-level patterns like edges and corners, while deeper layers combine these into higher-level representations that correspond to engineering symbols like valves, instruments, and equipment.

We use an anchor-based detection framework that generates candidate regions at multiple scales, which is critical for P&IDs where a small instrument tag and a large vessel can appear on the same sheet. The model outputs a confidence score for each detection, allowing us to filter results and flag uncertain cases for human review.

Building the Training Dataset

The biggest bottleneck in applying deep learning to P&ID recognition is not the model architecture — it is the data. Unlike natural image datasets (where millions of labeled photos exist), there is no large public dataset of labeled engineering drawings.

We built our own dataset by collecting and annotating P&IDs from diverse sources — different industries, different standards (ISA 5.1, ISO 14617, company-specific symbol libraries), different time periods, and different output formats (CAD exports, scanned paper, PDF prints). Each symbol on each sheet is manually labeled with a bounding box and a class label.

This diversity is intentional. P&IDs exhibit high intra-class variability — the same type of equipment can be drawn in many different ways depending on the standard, the company, or the individual drafter. Training on a narrow dataset produces a model that only works on diagrams similar to its training data. Training on a broad, diverse dataset produces a model that generalizes.

We also apply data augmentation techniques — rotation, scaling, noise injection, contrast variation — to further improve robustness, particularly for degraded scanned documents where image quality is poor.

Handling the Unique Challenges of P&IDs

P&IDs present several challenges that standard object detection models are not designed for:

  • Dense, overlapping symbols — Unlike natural images where objects are typically separated by background, P&IDs pack symbols tightly with intersecting lines. The model must distinguish overlapping elements without confusing one symbol for another.
  • Small text and tags — Tag numbers like "FIC-13310" are critical information but occupy very few pixels. We use a separate text detection and OCR pipeline tuned for engineering annotation styles.
  • Class imbalance — Some symbol types (like pipe lines) appear thousands of times per sheet, while others (like relief valves) may appear only once or twice. We use weighted loss functions and sampling strategies during training to prevent the model from ignoring rare classes.
  • Line connectivity — Detecting symbols is only half the problem. Understanding which symbols connect to which requires tracing pipe lines and signal lines through the image. We handle this with a separate pathway exploration algorithm that operates on the detected symbol locations and the underlying line geometry.

Continuous Improvement

The model improves over time. As we process more P&IDs for more clients across more industries, we expand and refine the training dataset. Detections that are corrected during human review are fed back into the training pipeline — a standard active learning loop that systematically addresses the model's weaknesses.


Why This Matters

Manual P&ID review is one of the most time-consuming tasks in process engineering. A single project can involve hundreds or thousands of sheets, each requiring careful reading by experienced engineers.

Digitization changes this:

  • Speed — Process hundreds of sheets in the time it takes to manually review a few
  • Consistency — The same detection criteria applied to every sheet, every time
  • Searchability — Once digitized, you can query your equipment, instruments, and connections across your entire drawing library
  • Foundation for automation — Structured P&ID data enables automated compliance checks, change tracking across revisions, and integration with simulation models

Get Started

If you are interested in digitizing your P&ID library, reach out to our team. We work with your existing drawings and engineering standards to configure the system for your specific needs.

Want to see it in action? Try our P&ID Recognition Beta →

Ready to get started?

Our on-site engineers can have you up and running within your first week.