# A Symbol Recognition System for Single-Line Diagrams Developed Using a Deep-Learning Approach
## 3 Proposed Method
### Symbol Spotting Based on YOLO V5  
After merging the images of the single-line diagrams, an object detection technique based on the YOLO model was used in this study to detect and classify the one-line components. The process of YOLO V5, which is frequently used for object detection in surveillance videos, single-line images, face recognition, and other fields, is one of finding and classifying one or more targeted objects in images, as well as determining their classes and positions. The single-line symbol detection task was applied in this study, with satisfying results obtained using the YOLO V5 object recognition algorithm. The YOLO approach was favored for two key reasons. Firstly, it has a simple architecture that enables the prediction of multiple bounding boxes and class probabilities simultaneously using a single convolutional neural network. Secondly, YOLO is known for its high speed in comparison with other object detection techniques, which is essential for its practical use in testing SLDs that contain an average of 50 engineering symbols. The Structure of the YOLO V5 Network  
In this study, we used YOLO V5, one of the recent iterations of the YOLO algorithm. YOLO V5 is an efficient and quick object detection algorithm that finds items instantly. Since symbols present in SLDs are very similar to each other, a robust detection speed is also necessary. YOLO V5 is capable of fulfilling this criterion. The deep-learning framework PyTorch, which has outstanding detection performance and has made training and testing for specialized datasets easier, was used to create the algorithm. The backbone, neck, and head are the three components that makeup YOLO V5 [55]. The factors that led us to pick YOLO V5 as the detection model for this study are its simplicity and clarity. To begin with, YOLO V5 merges Darknet with the cross-stage partial network (CSPNet) [43] to produce CSPDarknet, which serves as the network's core [56; 57]. By including gradient changes in the feature map, reducing model parameters and FLOPS (floating-point operations per second), and ensuring inference speed and accuracy while also reducing model size, the CSPNet addresses the issue of recurrent gradient information in large-scale backbones. Speed and accuracy are crucial when detecting sperm cells, and the size of the model affects how well these factors can be inferred using edge devices with restricted resources. Second, to enhance information flow, YOLO V5 uses a path aggregation network (PANet) [15] as its neck. To enhance low-level feature propagation, the PANet employs a novel feature pyramid network (FPN) topology with an improved bottom-up methodology. In addition, adaptive feature sharing, which links the feature grid to all feature levels, makes sure that the subsequent sub-network receives useful information from each feature level. Additionally, the PANet enhances accurate localization signals at lower layers, which greatly increases the accuracy of the object's location. To provide multi-scale prediction, the YOLO layer, the head of YOLO V5, produces three different sizes of feature maps. The YOLO model can now manage small, medium, and large objects thanks to this. The CSPNet serves as the framework. Fewer hyper-parameters and FLOPS are produced as a consequence of the CSPNet's reduction in model complexity. Due to the complexity of the neural networks, it also addresses vanishing and exploding gradient problems. These developments increase the efficiency and precision of object recognition inference. Multiple convolutional layers, three convolutions in four CSP obstacles, and spatial pyramid sharing are all features of the CSPNet. The CSPNet is in charge of extracting features from an input picture and pooling and convolving those features together to create a feature map. As a result, in YOLO V5, the backbone serves as a feature generator. The neck, or central portion of YOLO V5, is also referred to as the PANet.