Abstract
Power safety is closely related to people’s well-being. Electric power sectors regularly inspect and maintain power lines to guarantee people’s safe and stable use of electricity, and the current mainstream inspection method is to use UAVs for power inspection. Traditional inspection and detection methods have many shortcomings, such as high labor costs, slow inspection speed, low detection efficiency, and single detection targets. In this paper, a set of smart power inspection systems based on YOLOv7 was designed to check the common potential security risks of power lines such as bird nests, insulators, garbage, and hardware. After the detection, the detection report could be generated. The system adopted the YOLOv7 target detection algorithm. The accuracy rate of all detection targets was up to 93.9%, and the mAP @.5% reached 95.9%. Therefore, the algorithm could greatly improve the detection efficiency and greatly facilitate the electric power sectors to check power lines, so it has a high use value.
Access provided by Autonomous University of Puebla. Download conference paper PDF
Similar content being viewed by others
Keywords
1 Introduction
As the industrialization process progresses, the people’s demand for electricity is also increasing, and their requirements for the reliability, safety, and stability of power lines are also increasing. Since power safety is closely related to people’s well-being, thousands of power towers and ultra-high-voltage power lines have been built in China. Power lines and power towers are the key media for transmitting power [1]. Nevertheless, given that the majority of high-voltage lines are built in the wild and are exposed to the weather for a long time, there are numerous potential security risks, such as bird nests, insulator shedding, garbage on lines, and damper damage [2,3,4]. Electric power sectors are required to regularly inspect and maintain power towers and power lines to ensure that people can use electricity stably. However, there are tens of thousands of kilometers of power lines in China, and if only relying on manual inspection, there will be a large workload and low efficiency, and they are also susceptible to harsh environments. In the “Twelfth Five-Year” smart grid development strategy, the state proposed to improve the intelligence standard of the power grid. Consequently, it is necessary to replace part of the manual inspection with smart algorithms and equipment in order to respond to the national strategy and meet people’s happy lives.
As time goes by, UAV technology is widely used in various aspects of people’s lives, and electric power sectors have also begun to use UAVs to inspect power lines[5]. The combination of UAV technology and existing communication technology can realize automatic cruise. Compared with manual and helicopter inspection schemes, UAV inspection is characterized by low maintenance costs and high inspection efficiency [6, 7]. A large number of photos will be taken when the inspection is conducted by UAVs, and then the detection software will identify these photos to determine whether there are targets to be detected.
To this end, a set of smart power inspection systems based on YOLOv7 was designed to detect whether there are power safety hazard targets in the photos taken by UAVs during inspection. Compared with the traditional detection methods, this system has many advantages, such as high detection accuracy, fast detection speed, and diversified detection targets.
2 YOLOv7 Detection Model
YOLOv7 is one of the target detection algorithms with the best comprehensive performance[8]. The YOLOv7 model was proposed by the former staff of the YOLOv4 team. The network of the YOLOv7 is mainly composed of Input, Backbone, and Head.
The Input reuses the logic of YOLOv5 as a whole. The role of Input is to preprocess the input image and enhance the data. YOLOv7 uses Mosaic data enhancement [9], adaptive anchor frame calculation, and adaptive image scaling. Backbone mainly uses CBS, ELAN, and MP structures. The ELAN structure, designed based on ELAN, uses expand, shuffle, and merge cardinality to realize the ability to continuously enhance network learning ability without destroying the original gradient path. The MP structure is composed of conventional convolution and maxpool dual paths, and it aims to increase the model’s ability to extract and fuse features. The Head is composed of the SPPCSPC module, PAFPN structure, and REP module (Fig. 1).
3 Research on Target Detection Algorithm of Hidden Power Safety Hazard
3.1 Experimental Environment and Parameters
The operating system is Windows 10, the processor is Intel(R) Xeon(R) Bronze 3104 CPU @1.70GHZ, the memory is 32G, and the graphics card is NVIDIA GeForce RTX 3060. The CUDA version is 12.1, the torch version is 2.0.1, and the Python version is 3.10. The batch-size is set to 16, the epoch is set to 100, and the remaining parameters are default values.
3.2 Dataset Selection and Processing
During the UAV inspection of a power line in Guangxi, 300 photos of bird nest data were captured, encompassing 290 photos of Insulator defect data, 70 photos of garbage data, and 300 photos of hardware data. Then, the data set was expanded by data enhancement methods such as translation, deformation, random cropping, and random rotation. Finally, there were 1178 pictures in the bird nest picture training set, and 112 were tested; 1157 pictures in the missing insulator picture training set, and 117 were tested; 280 pictures in the garbage picture training set, and 25 were tested; 1153 pictures in the hardware picture training set, and 113 were tested. The LabelImg annotation tool was adopted to label the dataset. Some of the labeled data sets are shown in Fig. 2 below. Where Fig. 2(a) is the bird’s nest, Fig. 2(b) is the insulator, Fig. 2(c) is the hardware, and Fig. 2(d) is garbage.
3.3 Evaluation Indexes
Precision, Recall, and average accuracy mAP@0.5 were used as evaluation indexes to display the model effect[10].
The calculation formula of Precision is as follows:
The calculation formula of Recall rate is as follows:
When calculating mAP, the average accuracy of a single category should be calculated first, and the calculation formula is as follows:
where TP represents true positive; FP represents false positive; FN represents false negative; P (r) represents the curve drawn with recall rate and accuracy; n represents the total number of classes for target detection; mAP @ 0.5 is the average mAP when the intersection ratio is 0.5.
3.4 Analysis of Experimental Results
The test data sets in different detection targets were taken to verify the model. The accuracy-recall curves of different detection targets are shown in Fig. 3 below.
From Fig. 3, a and b, it can be seen that the model has high detection accuracy for large targets such as bird nests and garbage, with the detection accuracy of map@.5 for bird nests reaching 97.9% and map@.5 for garbage detection reaching 98.7%. From Fig. 3, c and d, it can be seen that the detection accuracy of the model for dense small targets such as insulator and hardware is slightly lower. The detection rate of all types of insulators map@.5 was 95.3%, and that of all types of hardware map@.5 was 91.9%.
To compare the effect of the model, the YOLOv7 and YOLOv5 models were used to compare the test sets of different detection target data sets, respectively. The comparison results are shown in Table 1.
The comparison shows that the average accuracy of YOLOv7 is 3.3% higher than that of YOLOv5, and the average recall rate is 1.5% higher than that of YOLOv5. The average mAP@.5% of all detection targets is up to 95.9%, which is 1.1% higher than that of YOLOv5, proving that the detection method used in this paper has better detection ability.
4 System Design and Implementation
4.1 Overall Design of System
The design of the smart power inspection system based on YOLOv7 aims to design a set of safe, efficient, convenient, and concise systems that can allow users to find bird nests, hardware, missing insulators, garbage, and other power safety hazards more quickly.
The system interface was developed and designed by Python language combined with PyQt5. The smart power inspection system based on YOLOv7 mainly includes the inspection target detection module, the search and detection result display module, and the detection report generation module. It mainly consists of an interaction layer, a logic processing layer, and a data layer. The interaction layer is open to users and can operate relevant data, freely select detection targets, and display relevant information to users. The logic processing layer receives the request from the interaction layer and completes the corresponding business logic processing operation. The operation performed by users must be processed by the business logic layer before it can be displayed to the users, including the function implementation in the target detection module, file searching and detection result statistics, and detection report generation. The data layer includes the processing of the data to be detected, the data generation after detection, and the storage of the detection report. The system architecture is shown below (Fig. 4).
4.2 Function Module Design and Effect Display
The function module mainly includes the target detection module, the search and detection result display module, and the detection report generation module. The specific design of the system module is as follows (Fig. 5):
-
(1)
Target detection module: It mainly detects various common power safety hazards such as bird nests, hardware, garbage, and insulators in power inspection. During the detection, statistics and detection will be performed according to different lines and different power towers. The system will call sub-threads to query and receive the running status of the program and update the front-end progress bar in real time. After the detection starts, the system will call the YOLOv7 target detection algorithm trained in the back end to automatically mark the targets contained in the photo, including bird nests, hardware, garbage, and insulator defect, and then save the photos containing the targets in the specified folder.
-
(2)
Search and detection result display module: It counts the number of photos detected and the number of power towers containing targets, and display the photos containing the detection targets on the front-end interface so that users can view the photos freely.
-
(3)
Detection report generation module: It mainly realizes report generation, counts the detection results and the photos with targets, and summarizes the statistical results to generate the report documents.
4.3 System Operation Effect
Running the program, after entering the system, target detection categories and the target to be detected, such as bird nest detection, and hardware detection can be chosen freely. After the selection, the folder of photos to be detected and the output path of the detection result can be chosen. The running effect is as follows (Fig. 6):
After completing the detection, the detection results will be output to the front end, and the number of photos detected and the number of fault power towers, including target photos, will be automatically counted. The specific effect is as follows (Fig. 7):
After completing the detection or when there has already been local data containing the detection results, report generation can be selected, and the report generation module can freely choose to generate what kind of detection target report. The specific effect is as follows (Fig. 8).
Taking the detection of bird nests as an example, the following diagram displays the style of the generated report, including line information, date information, fault details, and list (Fig. 9).
5 Conclusion
In this paper, a set of smart power inspection systems based on YOLOv7 was designed to rapidly detect various power safety hazards, including but not limited to multiple bird nests, insulator defect, garbage, and hardware. The average accuracy of all detection targets is 93.9%, and the mAP @.5% is up to 95.9%. Upon the completion of the detection, a detection report can be generated directly. The design of the smart inspection system can significantly improve the detection efficiency of power line targets and guarantee the safe and stable power consumption of the people.
References
Li, N., et al.: Detection of defects in transmission line based on the unmanned aerial vehicle image recognition technology. Electr. Des. Eng. 27(10), 102–106 (2019)
Sheng, L., et al.: Research and implementation of birds and floating objects target detection technology in transmission lines. In: 2022 IEEE 10th Joint International Information Technology and Artificial Intelligence Conference (ITAIC), vol. 10, pp. 2528–2532). IEEE (2022)
Liu,Y., Dong, S., Chen, Z., Lv, D., Yu, B.: Research on bolt visual recognition of high voltage transmission line shockproof hammer resetting robot. In: 2022 IEEE 6th Information Technology and Mechatronics Engineering Conference (ITOEC), Chongqing, China, pp. 1329-1333 (2022).https://doi.org/10.1109/ITOEC53115.2022.9734637
Cao, G., et al.: Research on small-scale defect identification and detection of smart grid transmission lines based on image recognition. In: 2021 IEEE 4th International Conference on Automation, Electronics and Electrical Engineering (AUTEEE), Shenyang, China, pp. 423–4272021. https://doi.org/10.1109/AUTEEE52864.2021.9668671
Jinju, Q., Zhengwei, H., Lin, Y.: Application of image processing technology in UAV power line inspection. Electr. Technol. Softw. Eng. 15, 72–73 (2017)
Yao, P.F., Geng, B., Yang, M., Cai, Y.M., Wang, T.: Research on technology of autonomous inspection system for UAV based on improved Yolov4. In: 2020 5th International Conference on Mechanical, Control and Computer Engineering (ICMCCE), Harbin, China, pp. 664–668 (2020). https://doi.org/10.1109/ICMCCE51767.2020.00146
Liu,K., Zhong, L.: Object detection of UAV power line inspection images based on federated learning. In: 2022 IEEE 5th International Electrical and Energy Conference (CIEEC), Nangjing, China, pp. 2372-2377 (2022). https://doi.org/10.1109/CIEEC54735.2022.9846340
Wang, C.Y., Bochkovskiy, A., Liao, H.Y.M.: YOLOv7: Trainable bag-of-freebies sets new state-of-the-art for real-time object detectors. arXiv 2022. arXiv preprint: arXiv:2207.02696 (2022)
Bochkovskiy, A., Wang, C.Y., Liao, H.Y.M.: YOLOv4: optimal speed and accuracy of object detection (2020). https://doi.org/10.48550/arXiv.2004.10934
Padilla, R., Netto, S.L., Da Silva, E.A.: A survey on performance metrics for object-detection algorithms. In: 2020 International Conference on Systems, Signals and Image Processing (IWSSIP). IEEE (2020)
Acknowledgments
This work was partially supported by the National Natural Science Foundation of China (No.6202780103), by the Guangxi Science and Technology Project (No.AB22035052), Guangxi Key Laboratory of Image and Graphic Intelligent Processing Project (Nos. GIIP2211, GIIP2308).
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2024 The Author(s), under exclusive license to Springer Nature Singapore Pte Ltd.
About this paper
Cite this paper
Liang, Y., Li, X., Deng, Z. (2024). Smart Power Safety Hazard Inspection System Based on YOLOv7. In: Huang, DS., Premaratne, P., Yuan, C. (eds) Applied Intelligence. ICAI 2023. Communications in Computer and Information Science, vol 2015. Springer, Singapore. https://doi.org/10.1007/978-981-97-0827-7_12
Download citation
DOI: https://doi.org/10.1007/978-981-97-0827-7_12
Published:
Publisher Name: Springer, Singapore
Print ISBN: 978-981-97-0826-0
Online ISBN: 978-981-97-0827-7
eBook Packages: Computer ScienceComputer Science (R0)