Academic Journal of Science and Technology ISSN: 2771-3032 | Vol. 13, No. 1, 2024 224 Hidden Danger Detection and Identification System of Power Transmission Tower Based on YOLOV11 Xin Zou1, 2, *, Yanru Hu1 1School of Physics and Electronic Information Engineering, Ningxia Normal University, Guyuan City, Ningxia Hui Autonomous Region 756000, China 2Laboratory of Solid Microstructure and Function, Ningxia Normal University, Guyuan 756000, Ningxia, China *Corresponding Author: zoux@nxnu.edu.cn Abstract: This study proposed a hidden danger detection and identification system of power transmission tower based on YOLOv11, aiming to introduce an intelligent detection and identification system of hidden danger of power transmission tower based on YOLOv11 algorithm, which is committed to enhancing the safety and stability of power transmission tower. YOLOv11, the latest and most advanced object detection algorithm in the YOLO family, is known for its excellent detection efficiency and accuracy. In this system, YOLOv11 is specially trained to accurately identify four potential hazards on power pylons: bird's nests, balloons, garbage and kites. The accuracy of the system is as high as 93.8%, and the recall rate has reached an excellent level of 73.3%. In order to fully verify the actual utility of the model, we carefully built a user-friendly intuitive interface (UI) using PyQt5. The system integrates image detection, video detection and real-time camera monitoring and recognition functions, can accurately identify the above four types of hidden dangers, and comprehensively record all the detection results, which provides great convenience for subsequent data analysis and processing. This system is not only easy to operate, user-friendly user interface design, but also shows excellent performance in the process of real-time monitoring and recognition, ensuring a high degree of accuracy. These characteristics have laid a solid foundation for the subsequent related work. Keywords: YOLOv11; Power pylons; A hidden danger; Target detection; GUI. 1. Introduction Safety hazards on power transmission towers may pose a serious threat to the stable operation of the power system and public safety. These hidden dangers mainly include bird nests, garbage accumulation, kites or other foreign objects, if not detected and removed in time, may lead to power tower failures or accidents, affecting the reliability and safety of power supply. Therefore, the effective detection and early warning of the safety hazards on the transmission tower is very important to ensure the stable operation of the power system. However, the traditional manual inspection method is not only inefficient, but also difficult to ensure the comprehensive detection of hidden dangers, especially in complex terrain and bad weather conditions. Therefore, the development of an automated and accurate transmission tower hidden danger detection and identification system can monitor the status of the transmission tower in real time, quickly discover and identify hidden dangers, timely warning and take appropriate maintenance measures, so as to improve the safety and reliability of the power grid. With the development of UAV technology and image processing technology, it has become possible to detect and warn hidden dangers of transmission channels based on complex scenes, which can not only improve the detection efficiency, but also reduce the risk and cost of manual inspection. 2. Research Status In recent years, with the progress of artificial intelligence and computer vision technology, machine learning and deep learning technology have been widely applied to the safety hazard detection task on the power line tower. By analyzing the image data, these technologies can identify potential hazards such as bird's nests, garbage and kites on the power pylons and issue timely warnings to ensure the stable operation of the power system and public safety. Aiming at the problems of complex background and small target proportion in aerial images of transmission line towers, Zhao Zhenbing, Lv Xuechun et al. proposed methods such as channel attention, adaptive spatial feature fusion and improved loss function to improve the detection accuracy and recall rate of YOLOx-S, especially for small targets and error- prone detection targets. It has demonstrated its superiority and practicability in the detection of hardware targets [1]. Hao Shuai, Yang Lei et al. proposed a fault detection algorithm for high-voltage transmission lines based on YOLOv5. By introducing attention mechanism and cross-scale feature fusion, the detection accuracy of multi-scale fault targets in complex environments was improved, with an average detection accuracy of 96.8%. This algorithm performs well in the verification of UAV inspection data and provides an effective solution for transmission line inspection [2]. Yang Xuecun, Pei Dong et al. proposed a lightweight YOLOv3 transmission line bird nest detection method based on depth separable convolution, aiming to improve the detection accuracy of hidden dangers such as bird nests on transmission lines. This method enhances the ability of the model to extract bird's nest features by introducing deep separable convolution, thus improving the accuracy of detection. The results show that the method can effectively detect the bird's nest on the transmission line, and the average detection accuracy reaches 96.8%, showing good detection performance. This study provides a new solution for the bird nest detection of transmission lines, which is of great significance for improving the safety and reliability of power systems [3]. Shi Yongxiang, Yang Guisheng et al. proposed a transmission line target detection method based on YOLOv3, which used 225 drones to obtain the original image of the transmission line and carried out target detection through YOLOv3 neural network. The method first preprocesses the original image, and then injects it into the YOLOv3 model for detection, and finally realizes multi-target detection, improving the detection accuracy [4]. Du Qiliang, Li Chunxiang et al. proposed a transmission line anomaly target detection method based on YOLOv3, which includes steps such as data acquisition and annotation, data enhancement, network structure improvement, training and real-time detection. This method improves the detection accuracy of multi-scale targets by improving coordinate loss function and non-maximum suppression processing, and can detect and locate potential damage targets on transmission lines in real time, such as excavators, tower cranes and cranes, to ensure the safety and stability of transmission lines [5]. Sun Jiangang, Liu Yuecan et al. proposed a bird detection method based on artificial intelligence, which uses YOLO model for small target detection, enhances image feature extraction capability through residual module in convolutional neural network, and uses multi-scale method to ensure the accuracy of small target detection. The sample images are collected by camera, the network model is constructed, and the transfer learning method is used for training. The experimental results show that the artificial intelligence bird detection method can detect birds efficiently and accurately, and effectively reduce the input of manpower and material resources [6]. Zhang Huanlong, Qi Enterprise proposed a bird's nest detection method for transmission lines based on improved YOLOv5. The method combines channel attention mechanism and spatial attention mechanism to design feature balance network, and uses channel weight and spatial weight as guidance to realize semantic and spatial information balance among features at different levels of detection network. At the same time, in order to avoid the problem of feature weakening due to the increasing number of network layers, a feature enhancement module is designed to capture the channel relationship and location information related to the bird's nest. Finally, bird's nest data set is built by using the transmission line UAV inspection images for training and testing. The experimental results show that the proposed transmission line bird nest detection method has strong generalization ability and applicability, and also provides a reference for power image defect detection technology [7]. To sum up, the research in the field of hidden danger identification is booming. 3. Materials and Methods 3.1. Data set labeling Field photos and online search of all kinds of hidden dangers on the power tower pictures, a total of more than 2000. As shown in Figure 1, cross-platform image annotation tool labelimg was used to annotate classified training pictures, annotate borders and hidden danger categories, and txt files were finally transformed and generated, as shown in Figure 2, because the files read by yolo series standards are txt types. Figure 1. Labelimg makes the data set This system marks 4 common power tower hazards, namely: 'nest', 'balloon', 'trash', 'kite', set number 0-3. The model is divided into three data sets: train data set, val (verification) data set, and test data set, which are randomly divided according to 7:1:2. Part of the image data is shown in Figure 2. 226 Figure 2. Part of the picture data The system supports the identification of image formats including 'jpg', 'png', 'jpeg' and 'bmp' four common formats. Video files are usually in the "avi", "mp4", "wmv", and "mkv" formats. The system uses cv2 module in OpenCV library to read the video stream captured by the camera, mainly through the read() method in the VideoCapture class to read the video frame, and through the imshow() function to display the captured frame. 3.2. YOLOv11 algorithm model YOLOv11 is a new generation of object detection algorithms developed by Ultralytics that features significant architectural and training method improvements over the previous YOLO version. YOLOv11 enhances feature extraction capabilities and achieves higher detection accuracy by introducing an improved backbone network and neck architecture. At the same time, it optimizes efficiency and speed, provides faster processing speeds, and maintains the best balance between accuracy and performance. In addition, YOLOv11 is adaptable across environments and supports a wide range of tasks, such as target detection, instance segmentation, image classification, attitude estimation, and directional target detection. On the COCO dataset, YOLOv11 achieves a higher average precision mean (mAP), while using 22% fewer parameters than YOLOv8, demonstrating its efficiency and accuracy. These innovations enable YOLOv11 to detect targets more accurately and efficiently in complex natural environments, such as aerial images of power pylons. 3.3. Model configuration and training In this experiment, a desktop computer equipped with Intel Core i5-12500 CPU @ 3.00GHz and NVIDIA GeForce RTX 3060 GPU was configured to run Windows 11 operating system. The experimental environment is based on Python 3.8.20 language and PyTorch 2.4.1+CUDA 11.8 deep learning framework. Create a new model configuration file data.yaml, change the number of categories nc to 4, store the English names of hidden danger categories to be detected, and store the absolute paths of train data set and val data set. Load and run the configuration file. Set the training epochs to 300 rounds, the training batch to 4, and the picture size resolution to 640*640. Run the train.py file as shown below for model training. import warnings warnings.filterwarnings('ignore') from ultralytics import YOLO if __name__ == '__main__': model=YOLO(r'E:\PowerTTFault\ultralytics\cfg\models\v11\yolov11 .yaml') model.train(data=r'E:\PowerTTFault\dataset\data.yaml', cache=False, imgsz=640, epochs=300, batch=4, close_mosaic=0, workers=4, optimizer='SGD', # using SGD project='runs/train', name='yolo11', ) 227 After the training is finished, the result file is stored in the runs/train directory, including the model and all process contents... The /weights directory has the best model weights parameter, best-pt. Use this file parameter for subsequent "detect" tasks. 3.4. Model evaluation index The model training results are stored in the Results folder, as shown in Figure 3. Three types of losses include: (1) box_loss, which measures the deviation between the model prediction boundary frame and the real calibration frame, that is, the positioning loss. With the training iteration, box_loss gradually decreases, indicating that the positioning ability of the model is improved; (2) cls_loss, which evaluates the classification accuracy of the model. The smaller the value, the more accurate the classification; (3) dfl_loss, which measures the dynamic feature adjustment ability of the model. The smaller the value, the better the detection performance. In general, the reduction of these three types of losses shows the improved performance of the model in positioning, classification and dynamic feature processing, providing guarantees for accurate detection [8]. Figure 3. Fitting curves of various loss functions Precision (P) is the accuracy of a model prediction as a positive example, calculated by Precision=TP/(TP+FP). Recall (R for short) is the ability of the model to correctly identify positive examples, calculated by the formula Recall=TP/(TP+FN) [9]. With the increase of confidence, the classification accuracy of the model is improved, but some positive examples may be missed. As the recall rate decreases, the recall rate of the model increases, but the risk of misjudgment increases. In this study, the average accuracy (mAP) and average recall (mAR) of the model on the target detection task reached 92.9% and 87.6%, respectively, indicating that the model performs well in the accuracy and coverage of target identification, and can effectively detect and identify the target while maintaining low false detection and missed detection rates. These results demonstrate the excellent performance of the model in target detection tasks and provide strong support for realizing accurate target detection. The trained model is used to make predictions on the test set to verify the model performance. As shown in Figure 4, we obtain a PR curve that visually shows the relationship between accuracy and recall, with the thin line representing the PR curve for different categories and the thick line representing the average PR curve for all categories. In order to quantify the model performance, we calculated the AP value, that is, the area surrounded by PR curve and coordinate axis. The average value of all categories is mAP, which is an important indicator to measure the model detection performance. We hope that the higher the mAP value, the better, which means the stronger the detection ability of the model [10]-[13]. In addition, IoU (intersection ratio) is also an important evaluation index. It represents the ratio of intersection and union between the predicted border and the real border. In the process of model training, we usually judge the prediction result according to the size of the IoU value. In general, when the IoU value is greater than 0.5, we consider this to be a relatively accurate prediction result. In this experiment, we calculated the average accuracy for an IoU threshold of 0.5 mAP@0.5. The results show that the average value of mAP@0.5 of the proposed model on the two types of target detection tasks is 0.938, which is a high value, indicating that the model has excellent performance in the accuracy and coverage of hidden danger identification, and can effectively detect and identify targets while maintaining a low false detection rate and missed detection rate. These results demonstrate the excellent performance of the model in target detection tasks and provide strong support for realizing accurate target detection. 228 Figure 4. PR curve The results in Table 1 show the excellent performance of the model in several categories, and the average accuracy (mAP50) is as high as 0.938, indicating the high accuracy of the model on the validation set. However, there are significant differences between the different categories. Among them, the trash category performs particularly well, with a perfect recall rate of 1, indicating that the model can identify all garbage instances without omission. The balloon category also performed well, with high accuracy and recall rates. In contrast, the nest category, while leading in accuracy, has a low recall rate, meaning that the model may have missed some instances when identifying bird nests. The kite category faces accuracy challenges, although the recall rate is 1, but the accuracy needs to be improved. The mAP50-95 metrics further reveal the model's performance differences at different IoU thresholds, highlighting the need to optimize for specific classes, such as nest and kite. In summary, the model performs well in most categories, but there is still room for improvement, especially in improving the recognition accuracy of the nest and kite categories. Table 1. Verifies the test results Class Images Instances P R mAP50 mAP50-95 all 110 110 0.929 0.876 0.938 0.733 nest 83 83 0.942 0.79 0.892 0.531 balloon 14 14 0.968 0.714 0.885 0.735 trash 3 3 0.976 1 0.995 0.863 kite 10 10 0.828 1 0.978 0.802 As shown in Table 2, the system has 2,582,932 parameters to handle complex tasks while maintaining a small model size of 5.3MB for easy storage and transfer. It can perform 6.3G floating-point operations per second, ensuring efficient processing of computationally intensive tasks. In terms of speed, the total time of pre-processing, inference, loss calculation and post-processing is short, only 14.0ms, the average delay is as low as 0.00599 seconds, and the frame rate is as high as 167.0Hz, which fully proves that the optimizer can respond quickly and process large amounts of data in real time, which is very suitable for video processing or real-time application scenarios. Table 2. Other performance results Optimizer SGD Params 2,582,932 Size/M 5.3 Flops/G 6.3 Speed rate/ms 1.6pre+9.9inf+0.0loss+ 2.5ms post Latency/s 0.00599s ±0.00130s Fps/Hz 167.0 4. System Design and Implementation 4.1. Technical Route PyQt5 This system uses Python 3.8 and PyQt5 5.15.2 framework to develop front-end visual interface. PyQt5 is an application framework tailored for Python based on the Qt5 framework, which provides a series of convenient toolkits that greatly simplify the development process of desktop applications. Qt Designer, in particular, is a tool that allows developers to quickly design user interfaces with simple drag- and-drop components and save them as.ui files. These.ui files are then converted into Python code using the pyuic5 tool for 229 further integration. [14][15] In the MainProgram.py file, we implement the integration of object detection logic with the user interface. Specifically, we wrote functions to handle button clicks, image loading, and running object detection algorithms to ensure that the system responds to user actions and presents results. Finally, the system interface size is set to 770*480 pixels, which can clearly display the detection content. In order to distinguish different types of hidden dangers, the system uses different color target boxes for marking. In addition, users can also click the "Save" button to save the detection and identification results, which is convenient for subsequent data analysis and processing. The visualization effect of the system interface is shown in Figure 5. Figure 5. Interface display 4.2. System Functions The user can obtain the information to be detected by opening the picture, video and online camera. 4.2.1. Image Detection When the user clicks the "Picture" button, he can select a single picture to be detected for uploading. If you need to detect multiple pictures at once, users can store these pictures in a specified folder, and select the folder to achieve batch image import function. As shown in Figure 6, after the detection is completed, the system interface will display the time spent in detection and the total number of target objects identified. In the case of detecting multiple target objects in a single image, the system allows users to make a second judgment. By clicking the "target selection" button, users can select and display the relevant information of a specific target. In addition, the system will also detail the category of each hidden danger, confidence and the relative position of the target object in the picture and other key information, to provide users with a comprehensive analysis of the detection results. Figure 6. Image detection 230 4.2.2. Video detection After you click the Video icon, you can import the video file that you want to check. Then, the system will quickly play the video automatically and display the recognition result information in real time. As shown in Figure 7, in the process of detecting the test video, the system successfully processed 1080 frames and was able to accurately identify the hidden danger category in each frame. Figure 7. Video detection 4.2.3. Online Camera Detection After clicking "Camera" icons, the monitoring camera is opened, as shown in Figure 8, and the video stream detection results captured by the camera can be displayed online in real time. Figure 8. Camera video stream detection 5. Conclusion This paper proposes a hidden danger detection and identification system for power transmission tower based on YOLOv11, which can accurately identify the four hidden dangers of bird's nest, balloon, garbage and kite, with an accuracy of 93.8% and a recall rate of 73.3%. Using PyQt5 to design intuitive interface, integrated picture, video and real- time camera detection function, easy to operate and excellent performance. By collecting and labeling more than 2000 hidden danger pictures, the system trains the model under high-performance hardware and PyTorch framework, and optimizes parameters to achieve high performance. Evaluation indexes show that the model performs well in mAP and mAR, and the overall performance is suitable for real-time applications. The front-end interface supports 231 multiple detection methods and provides the save function. The system effectively improves the safety and stability of the power transmission tower, and provides a guarantee for the stable operation of the power system. In the future, the model performance can be further optimized and more application scenarios can be explored. References [1] Zhao et al. Detection Method of Fittings on Power Transmission Towers Based on Improved YOLOx-S [J]. Radio Engineering, 2023, 53(11):2664-2672. [2] Hao et al. Fault Detection of Power Transmission Lines Based on YOLOv5 with Attention Mechanism and Cross-Scale Feature Fusion [J]. Proceedings of the CSEE, 2023. DOI: 10.13334/j.0258-8013.pcsee.212607. [3] Yang et al. Lightweight YOLOv3-Based Detection Method for Bird Nests on Power Transmission Lines Using Depthwise Separable Convolutions [J]. Shaanxi Electric Power, 2021 (012):049. [4] Shi et al. Target Detection Method, Device, and UAV for Power Transmission Lines Based on YOLOv3-tiny: CN202010450441.7 [P]. CN112287740A [2024-10-19]. [5] Du et al. An Abnormal Target Detection Method for Power Transmission Lines Based on Improved YOLOv3: CN202010206891.1 [P]. CN111444809A [2024-10-19]. [6] Sun et al. Bird Damage Detection Method for Power Transmission Lines Based on Artificial Intelligence [C]//2019 Annual Conference on Informatization in the Power Industry. [2024-10-19]. [7] Zhang et al. Research on Bird Nest Detection Method for Power Transmission Lines Based on Improved YOLOv5 [J]. Power System Protection and Control, 2023, 51(2):151-159. DOI: 10.19783/j.cnki.pspc.220428. [8] Wang et al. Industrial Bar Material Recognition Algorithm Based on Improved YOLOv4 [J]. Machinery & Electronics, 2022(040-001). [9] Shao et al. Overview of YOLO Target Detection Based on Deep Learning [J]. Journal of Electronics & Information Technology, 2022, 44(10):12. DOI: 10.11999/JEIT210790. [10] Mi and Lian. Review of YOLO Methods for General Object Detection [J]. Computer Engineering and Applications, 2024 (7). [11] Ning et al. Review of Target Detection Algorithms Based on Deep Learning [J]. Digital Design (Upper), 2022(005):000. [12] Wu and Zhang. Review of Target Detection Algorithms Based on Deep Learning [J]. Information and Computer, 2019(12):3. DOI: CNKI:SUN:XXDL.0.2019-12-023. [13] Zhang et al. Review of Target Detection Algorithms Based on Deep Learning [C]//Papers Collection of the 22nd Annual Conference on New Technologies and Applications of the Network of China Computer User Association Network Application Branch in 2018. 2018. [14] Willman J. Overview of PyQt5 [J]. 2021. DOI: 10.1007/978-1- 4842-6603-8_1. [15] Sang and Guo. Design of a Digital Image Processing Experimental Platform Based on PyQt5 [J]. Electronic Technology & Software Engineering, 2021, 000(018):P.129- 130.