## 2 Related Work  
Object detection is a technique in which object classification and object localization are performed for multiple objects in an input image. In the case of conducting object classification with image processing technique [8; 9], features are extracted from the image through the techniques such as histogram of oriented gradient (HOG) [10], scale invariant feature transform (SIFT) [11], local binary pattern (LBP) [12], and modified census transform (MCT) [13]. Then, from the distribution of the extracted features, the target object for recognition is classified using a classifier, such as a support vector machine (SVM) [14] and Adaboost [15]. In the process of performing object detection, feature sets in a specific region are selected from the set of extracted features, and classification is performed using the selected feature sets. There has been recent development of a variety of object detection methods based on convolutional neural networks (CNNs) [16]. The deep learning-based object detection method can be divided into a one-stage detector and a two-stage detector. In the two-stage detector, regional proposal and classification are performed in sequence. Here, the regional proposal searches the region where the candidate object is located in the image using methods such as a sliding window [17]. Representative examples of two-stage detectors include R-CNN [18], fast R-CNN [19], and faster R-CNN [20]. On the other hand, the one-stage detector is a method in which the regional proposal and classification are performed simultaneously. Representative examples of one-stage detectors include YOLO [21], SSD [22], and RetinaNet [23]. In general, one-stage detectors have a fast inference speed but low detection accuracy and two-stage detectors have a slow inference speed but high detection accuracy. Recently, more advanced deep neural networks have emerged with comparable detection accuracy to a two-stage detector and a comparable inference speed to a one-stage detector, such as RetinaNet and M2 Det [24]. The Hough transform [25] is a method commonly used for recognizing lines in an image, and the main application area is lane detection [26]. When performing lane detection using the Hough transform, the input image is converted into a binary image. Next, after extracting the edge by applying the canny edge detector, the lane is detected using the Hough transform. However, if the Hough transform is applied to the image in a diagram, a problem arises in which one line is recognized as multiple lines due to the thickness of the line. In order to address this problem, line thinning [27] has been employed. Line thinning indicates converting a binary image with a thickness into an image with a thickness of 1 pixel. OpenCV implements two types of Hough line transform. First, a function detects straight lines by performing the Hough transform on all pixels in an image. Second, a function detects a line segment by performing a probabilistic Hough transform on some pixels instead of all pixels. Recently, active research has been underway on lane detection in video clips using deep learning [28]. Point instance network (PINet) [29] is a representative example of deep learning-based lane detection technology. In PINet, the existence of lanes in each receptive field and offset are estimated from the images, and training on the lane classification is performed so that lanes on the same line have similar features. The datasets used for training lane detection are TuSimple [30] and CULane [31]. The main components of a P&ID include symbols, the connection between the symbols represented by a line, and the attributes assigned to the symbols and the lines through texts or signs [32]. Here, symbols and lines have engineering meanings for the relevant applications. To date, several studies [33; 34; 35] have reported the recognition of various types of diagrams, such as electrical diagrams, engineering diagrams, logic diagrams, and piping and instrumentation diagrams (P&ID).