# A Symbol Recognition System for Single-Line Diagrams Developed Using a Deep-Learning Approach
## 3 Proposed Method
### Dataset SLD Diagrams  
In this article, we chose to conduct experiments using single-line diagrams (SLDs), as shown in Figure 1. For evaluation purposes, our engineering partner provided a collection of 600 sheets containing various types of symbols, lines, and text, as depicted in Figure 6.  
The SLDs also came in a variety of qualities, which made the dataset appropriate for assessment. The SLD sheets can be viewed as schematic representations of the various electrical system parts and connectivity data. They are illustrations of electrical equipment (often represented as symbols) and power flow movement (represented as various kinds of lines).  
These diagrams can be found in many sectors as paper documents or scanned images. It takes a lot of time, effort, and expertise to interpret and analyze these documents [15]. Furthermore, misreading these papers can result in very serious consequences. For instance,  
Figure 5: The structure of the SLD symbol spotting system.  
Figure 6: Example of individual symbols in a typical SLD.  
if a wire in an electrical system needs to be changed after installation, an engineer must check the corresponding SLD diagram and determine which safety measures must be taken before proceeding with the task. Thus, it is crucial to understand these drawings accurately.  
We used GANs to create artificial symbol pictures as part of the data preparation process. The dataset was additionally split into two categories. The first group collection only included actual images. Both the actual images and the generated images created by the DCGAN and LSGAN were included in the second group dataset. The first group dataset only included original pictures, while the other combined the original images with GAN-generated synthetic images, as represented in Table 1.  
Analysis of SLD Data  
The large SLD sheets in the original data measured 7000 by 5000 pixels. We divided the sheet into a \(6\times 4\) grid to speed up the training, creating 24 patches of sub-images that were relatively small compared to the original pictures (\(1250\times 1300\)).  
Images and schematics must be completely annotated to prepare a deep-learning model for training. Thus, we annotated the set of SLD images using the RoboFlow tool, which can be seen in Figure 7. In the entire collection, 16 different symbols were annotated. The process of annotating a diagram is straightforward, and in this case involved employing the RoboFlow tool to note the classes of the associated symbols and their locations.  
The data that resulted from the annotation were saved in a file that represented the 16 unique classes. The center of the bounding boxes' x and y values, as well as the widths and heights of the symbols that the bounding boxes enclosed, were captured as data. The collection of 600 images, which included 1953 samples representing 16 various  
\begin{table}
\begin{tabular}{c c c c} \hline \hline \multirow{2}{*}{**Group**} & \multirow{2}{*}{**Original Images**} & \multicolumn{2}{c}{**Synthetic Images**} \\ \cline{3-4}  & & **DCGAN** & **LSGAN** \\ \hline
1 & ✓ & & \\
2 & ✓ & ✓ & ✓ \\ \hline \hline \end{tabular}
\end{table}
Table 1: Dataset combinations.  
Figure 7: Symbol annotation in part of an SLD image.  
sorts of symbols, was annotated. As can be seen in Figure 8, the original sample was incredibly unbalanced.  
The differences between symbols can be extremely great in some cases. For instance, there are 425 instances of switch symbols in the dataset, compared to just 3 and 6 occurrences of resistor and ammeter symbols, respectively. Fuses and loads only occur 10 times each, although these symbols were excluded from the original dataset due to exceptional under-representation.