## 1 Introduction  
Image recognition is a technology that has been studied for a long time in the field of computer vision, as a technology for identifying information in an image. With the recent developments of artificial intelligence, deep learning-based image recognition is being applied in various industries, such as autonomous driving [1], medical diagnoses [2], facial recognition [3], and smart farms [4]. In addition, various studies using deep learning have been conducted in the engineering field, such as drawing digitization [5], manufacturability verification [6], and fault diagnosis [7]. Piping and instrumentation diagrams (P&IDs) are developed based on process flow diagram (PFD) information. A P&ID includes piping, instrumentation, equipment, and fittings, which are components of each process, and the relationship between these components and the flow of fluids are depicted in detail in the diagram. P&ID is a crucial means of storing results in the basic design stage and is used as master data in the subsequent stages of detailed design, construction, and operation. Therefore, when the need arises, the engineering information stored in P&IDs must be quickly and accurately searched. Presently, most engineering, procurement, and construction (EPC) companies use digital P&IDs. However, even in the case of a newly constructed plant, the P&IDs created in the front end engineering and design (FEED) stage or those provided by the equipment and material manufacturers are in an image format in many cases due to contractual relationships or issues of intellectual property security. Enterprises that operate plants also apply digital P&IDs, but in the case of aging plants that have been in operation for a long time, a large amount of P&IDs are stored in image format, making digitization for these image-format P&IDs necessary. In addition, these companies often undergo continuous improvements and expansion of plants in the process of plant operation, and in these cases, P&IDs are provided in image formats from external contractor companies. In this regard, conversion of P&IDs from image formats into digital P&IDs is essential. In the digitization of P&IDs, high-level objects in the image format diagram are identified, the relationship between these objects is formed, and the engineering attributes required for objects are input to create a digital diagram. The processes needed for the digitization of P&ID can be categorized into a step of recognizing information objects constituting a diagram in the image, identifying the relationship between the recognized objects, and creating a digital P&ID from the obtained information. At present, these processes are performed manually in most cases, which makes the process time-consuming and causes the problem of varying quality, depending on the person who manually performs the above operations. As part of the abovementioned research, the present study proposes a method for recognizing various types of line objects and flow arrows included in P&IDs. Lines used in the P&ID include continuous lines and lines incorporating line signs. A flow arrow is a symbol indicating the flow direction of a pipeline. In P&IDs, a flow arrow is included in the line object and shows the direction of a fluid passing through the line object. The proposed method consists of three steps. In the first step, the outer border and title box in the diagram are removed. In the second step, continuous lines are detected, and then line signs and flow arrows indicating the flow direction are detected. In the third step, using the results from the line sign detection, continuous lines that require changing of the line type are determined, and the line types are adjusted accordingly. Next, the recognized lines are merged with flow arrows. This research has the following academic contributions. First, unlike previous studies that mainly identified continuous lines in image-format P&IDs, various types of lines were recognized by combining techniques of image processing and deep learning.