All case studies

Python + OpenCV

Engineering plan analysis

Computer vision that reads scanned engineering plans and lifted pipe-route detection from 60% to 96% accuracy, with processing time per plan dropping from 8 minutes to under 1. Built for an engineering services firm running automated pipe-route detection on scanned sanitary plans.

  • Python
  • OpenCV
  • NumPy
  • PyTorch
  • scikit-image
  • PyMuPDF
  • Pillow
  • EasyOCR
  • docTR
  • customtkinter
A scanned building-services engineering plan with detected pipe runs highlighted and separated by colour by the computer-vision pipeline.
Detected pipe runs, separated by colour
The same scanned plan with detected pipe routes highlighted across the full sheet.
Routes traced across the full sheet

Problem

The existing detector was missing brown dashed pipe lines and picking up red plan symbols as false positives. RGB-based color thresholds broke across different scan qualities. Roughly 1,000 lines of clustering logic glued dashed segments back together but sometimes connected through walls or missed valid pipes entirely.

What Inteloflow built

  • HSV-based brown mask using saturation as the key discriminator (S 15-85 for pipe lines, S above 85 for red symbols), cleanly separating pipe routes from legend text
  • Improved dash-bridging logic so dashed segments reliably merge into continuous pipe routes without false connections across empty space
  • Tighter false-positive filters that reject small non-elongated blobs: text fragments, hatch patterns, border lines
  • Legend and label OCR (EasyOCR and docTR) that reads the plan legend and pipe labels, then propagates the right pipe type and size onto each detected route
  • Centralized thresholds in config.py so the pipeline holds up across scan qualities without manual re-tuning every time
  • Human-in-the-loop correction interface so engineers can confirm, reject, or adjust detected lines without re-running the full pipeline

Outcome

  • Detection accuracy improved from 60% to 96%, with the human-in-the-loop layer catching edge cases the pipeline misses
  • Processing time per plan dropped from 8 minutes to under 1 minute
  • Detection holds across scan-quality variation without per-scan threshold tuning

Stack

Python 3.12, OpenCV, NumPy, scikit-image, PyMuPDF, Pillow, EasyOCR, docTR (PyTorch), customtkinter.

Book a callWhatsApp Vishaal