Content uploaded by Jae-Min Cha
Author content
All content in this area was uploaded by Jae-Min Cha on Nov 07, 2019
Content may be subject to copyright.
International Congress and Conferences on Computational Design and Engineering 2019 (I3CDE 2019)
Object Detection for P&ID Images
Taekyong Leea, Jae-min Chaa, Bohyun Ryua and Shelly Salimb
aPlant Engineering Center, Institute for Advanced Engineering, Korea
bGwangju Institute of Science and Technology, Korea
E-mail: tklee@iae.re.kr
Abstract
Piping and instrumentation diagram(P&ID) is an
essential design document which is continuously
modified and managed from design phase to O&M phase.
For the ease of data transfer, P&IDs are generally
converted into PDF which is hard to be modified.
Therefore, engineering companies who need to manage
P&IDs should manually re-convert their P&ID images
into the P&IDs in CAD formats. To reduce the
inefficiency of the P&ID re-conversion, various symbols
and texts in P&ID images should be automatically
detected before the re-conversion. As the first step to the
auto P&ID conversion, in this study, we propose methods
detecting symbols and texts in P&ID image using
geometrical and deep learning-based approaches.
Keywords –
P&ID, Symbol Detection, Text Detection
1 Introduction
Piping and Instrumentation Diagram(P&ID) is a
diagram representing core information of a plant such as
equipment, pipelines, instruments and their logical,
physical connections. As P&IDs contain core
information of processes and configurations of a plant,
they are continuously modified and managed throughout
a whole engineering lifecycle. P&IDs are drawn in CAD
systems designed for P&ID such as AutoCAD P&ID,
however in some cases, P&IDs are handed over to a
customer as an image or PDF format. To modify and
manage P&ID images, they are need to be manually re-
converted to the customer company’s CAD format and
this causes great losses in time and human resources.
To reduce the inefficiency of the P&ID re-conversion,
it is required to develop a technology automatically
converting P&ID images into CAD formats. And
primarily elements of P&ID such as equipment, pipelines,
instruments and texts should be automatically detected.
Studies on detecting various engineering diagrams have
been conducted for several decades. Most of previous
studies on diagram detections[1][2] were based on
geometrical features of diagram elements, and recently
several studies have presented detection technologies
based on Convolutional Neural Network(CNN). But it is
still rare to find a study on P&ID detection.
So, in this study, we have studied on methods to
detect elements in P&ID images and have tested the
proposed geometrical and deep learning based methods
for detecting various elements in P&ID images except
pipelines.
2 P&ID Image Detection Methods and
Test Results
2.1 Pre-process
Even though a P&ID template can be changed in each
project due to owners’ requirements, the overall structure
is similar. A P&ID is generally consisted of outer boarder
and inner boarder lines, a note area at right side and a title
area at lower-right side and a main area where a diagram
located. Prior to detecting a main area of a P&ID, it is
recommended to remove boarder lines, note and title
areas for an improved recognition result.
In this study, using Python and OpenCV, we have
developed a simple algorithm to detect and remove
boarders, note and title areas. Figure 1 shows the result.
2.2 Texts
A P&ID contains a lot of text information indicating
ids, numbers and connections of equipment, pipelines
and instruments. Once texts in a P&ID are detected, their
information can be extracted through OCR technologies
and then removed from the P&ID to reduce unnecessary
noises for a deep-learning based symbol detection
training. Detecting Texts is a relatively easier task as
texts in a P&ID are generally in single font, not randomly
oriented, and written clearly in black. We have applied
Figure 1. Main area detection and cropping[3]
Object Detection for P&ID Images
Connectionist Text Proposal Network(CTPN)[4] pre-
trained with ICDAR 2013 MLT dataset to detect texts in
a sample P&ID. The result is shown in Figure 2.
In the test, 164 text elements were correctly detected
from 184 text elements in the P&ID (about 89.1%).
Once texts are localized correctly, then a non-AI
supported OCR technology such as Tesseract[5] can be
applied to recognize the localized texts.
2.3 Instrumentation Symbols
Compared to equipment symbols, Instrumentation
symbols are in simple geometrical shapes. And functions
of Instruments are distinguished by texts inside symbols.
So, as texts can be detected as explained in 2.2, the key
is to detect geometrical shapes. In this study, we have
used Hough Circle Transform[6] in OpenCV library.
With the adjusted parameters (dp=3, minDist=100,
Param2=100, minRadius = 20, maxRadius = 30), we
detected circular Instrumentation symbols as shown in
Figure 4. Though some texts and part of equipment
symbols were detected as circles, all the circular
instrumentation symbols were detected.
2.4 Equipment Symbols
We have used Faster Regional Convolutional Neural
Network(R-CNN)[7] which is widely known for its
reliability and performance, for detecting pump symbols
in P&IDs[8]. Nine P&ID images containing pump
symbols were used for training and ten P&ID images for
testing. All the 25 pumps in testing P&ID images have
been correctly detected.
3 Conclusion
In this study, several detection methods have been
proposed and tested for elements of P&ID images: texts,
instrumentation symbols and equipment symbols. The
results have showed that appropriate applications of both
geometrical and deep learning based approaches can
effectively detect various elements of P&ID images.
Acknowledgement
This work was supported by the Technology
Innovation Programs (10072058, 20000725) funded by the
Ministry of Trade, Industry & Energy(MOTIE, Korea).
References
[1] Bae, C. and Min, B.
Automatic Drawing Input by
Segmentation of Text Region and Recognition of
Geometric Drawing Element
.
The Institute of Electronics
Engineers of Korea
, 31(6):790–802, 1994.
[2] Jang, W. and Kwon, Y. An Effective Vector
Extraction Method based on Drawing Characteristics
. In
Proceedings of Korea Information Science Society
Fall Conference, pages 544–546, 2000.
[3] ISA. PIP PIC 001 Piping and Instrumentation
Diagram Documentation Criteria. Process Industry
Practices, 2008.
[4] Tian, Z. et al. Detecting Text in Natural Image with
Connectionist Text Proposal Network. European
Conference on Computer Vision, 2016.
[5] Smith, L. An Overview of the Tesseract OCR
Engine. In Proceedings of ICDAR 2007, 2007.
[6] OpenCV dev Team. Hough Circle Transform.
Accessed at https://docs.opencv.org/2.4.13.7/doc/
tutorials/imgproc/imgtrans/hough_circle, 2019.
[7] Ren, S. et al. Faster R-CNN: Toward Real-Time
Object Detection with Region Proposal Networks.
arXiv e-prints, arXiv:1506.01497, 2015.
[8] Cha, J. et al. A Preliminary Study on Recognition
of Equipment Symbols from Image P&IDs based on
Deep Learning. In Proceedings of The Korean
Society of Mechanical Engineers Conference, 2018.
Figure 2. Part of the texts localization result
Figure 3. Basic instrumentation symbols (part)
Figure 4. Instrumentation symbols detection[3]
Figure 5. Result of the pump symbols detection