## 2 Pantograph Slide Positioning Detection Method Based on Convolutional Neural Network
### YOLO v8 Network Structure  
The main prerequisite for identifying abnormal states during the detection process is to perform object detection on the collected images of the monitoring system. Compared with traditional manual image processing methods, the features obtained by machine vision methods have stronger generalization ability and robustness, making them suitable for more complex scenes. The recognition of pantograph defects is based on image object detection, and the YOLOv8 network model is selected as the basic structure of the object detection algorithm. Then, based on the characteristics of complex images, the network structure is fine tuned to ultimately achieve intelligent recognition of pantograph defects. In the field of object detection, the YOLO series algorithms are the preferred choice for a large number of object detection tasks in the industry, as they strike a balance between accurate detection accuracy and efficient running speed. Since researchers proposed the object detection network YOLO in 2016, various versions have been derived, including improved and optimized versions from v1 to v8. The YOLOv8 algorithm has made new improvements to the previously successful detection network model to further enhance accuracy and real-time detection capability. One key feature of YOLOv8 is scalability, as it is designed as a main framework that supports all versions of YOLO, making it easy to compare their performance. In addition, in the field of image detection, this algorithm also includes other innovations. For example, the backbone network selects C2f modules with richer gradient flow and an adjusted number of channels in different scale models, forming a neural network model with stronger feature representation ability. The detection head adopts the popular decoupling head structure of classification detection separation, which can clearly separate the classification head and the detection head. A series of improvements have also been made in the calculation of loss functions and data augmentation, greatly improving the detection accuracy of the model. The first prerequisite for realizing pantograph slide defect identification is to target the pantograph in the images collected by the pantograph slide condition-monitoring device [15]. Deep learning methods are based on massive data and efficient computing resources, and realize automatic feature extraction and learning through neural network models. Compared with artificially selected image features and artificially formulated classification standards in traditional image processing methods, the features obtained by deep learning methods have better generalization and robustness and are suitable for changing and complex scenes [16]. Pantograph intelligent recognition uses image target detection based on deep learning as the basis. The traditional image target detection algorithm is discussed in Chapter 2[17]. First, the two-stage algorithm YOLO v8 network model is analyzed as the basic structure of the target detection algorithm; from there, based on the actual background of the pantograph image being complex, and the target also being large, the network structure is fine-tuned to finally realize the intelligent recognition function of the pantograph. The YOLO v8 intelligent recognition algorithm proposed in this article aims to solve the shortcomings of previous research. It is based on the success of previous YOLO versions and makes new improvements to further improve accuracy, real-time detection, etc. The Backbone and Neck parts of YOLO v8 use the C2F module with richer gradient flow, and adjust the number of channels for different scale models to form a neural network model with stronger feature representation capabilities; the Spatial Pyramid Pooling Fast (SPPF) feature is used, and the pyramid network greatly reduces the amount of calculation. The head part adopts the now popular decoupling head structure, which can clearly separate the classification head and detection head.