Power transmission line foreign matter identification method and system based on improved YOLOv10 model
By improving the YOLOv10 model, combining the ODConv dynamic convolution module and the CAFM hybrid convolution attention mechanism module, the misjudgment problem in foreign matter detection in transmission lines is solved, and higher detection accuracy and hazard evaluation capabilities are achieved.
Patent Information
- Application Number
- CN202510128093.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-05
- Publication Date
- 2025-03-04
AI Technical Summary
The prior art has a large number of misjudgments in the detection of foreign matters in transmission lines, which affects the development of foreign matter removal work.
The transmission line foreign object recognition method based on the improved YOLOv10 model is adopted, and the model structure is optimized through the ODConv dynamic convolution module and the CAFM hybrid convolution attention mechanism module, and the detection accuracy is improved using the NWD loss function.
It improves detection accuracy, reduces missed detection and missed detection, enhances the identification ability of foreign objects and components, and conducts hazard assessments to ensure the safe and stable operation of the transmission line.
Smart Images

Figure CN119559584A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of power transmission line foreign object detection, and in particular to a power transmission line foreign object recognition method and system based on an improved YOLOv10 model. Background Art
[0002] As the scale of power grids continues to expand, transmission lines are increasingly distributed. During operation, transmission lines may be affected by foreign objects such as plastic bags, kites, branches, bird nests, etc. Once these foreign objects come into contact with transmission lines, they may cause line short circuits, tripping and other faults, seriously affecting the safe and stable operation of the power system and causing great inconvenience to social production and people's lives.
[0003] In the daily operation and maintenance of transmission lines, they face a complex and changeable external environment. In fact, due to natural factors such as wind, rain, lightning, and tree branch growth, as well as human factors such as kite flying and littering, it is difficult to completely prevent foreign objects from adhering to or approaching the transmission lines. In the process of foreign objects contacting or approaching the transmission lines, it is inevitable that discharge will occur between the foreign objects and the transmission lines or the electric field distribution of the transmission lines will be affected, which will cause a certain degree of safety hazards to the transmission lines; in severe weather such as heavy rain and strong winds, if there are foreign objects on the transmission lines, it will have a serious negative impact on the stability of the transmission lines, thereby affecting the reliability, continuity and safety of the power supply, and may even affect the normal progress of industrial production and the basic electricity needs of residents. Therefore, it is very important to ensure that the transmission lines are not affected by foreign objects.
[0004] By accurately detecting foreign objects on the transmission line, timely measures can be taken to remove foreign objects, effectively avoiding power failures caused by foreign objects and ensuring stable power supply of the power system. Accurate foreign object detection can help power operation and maintenance personnel carry out inspections and maintenance work in a targeted manner, reduce unnecessary line inspections and troubleshooting, thereby reducing manpower and material costs. As part of smart grid operation and maintenance technology, it helps to improve the level of intelligent monitoring of the power grid and promote technological progress in the power industry. Summary of the invention
[0005] The purpose of the present invention is to overcome the shortcomings of the prior art. There are a lot of misjudgments in the traditional transmission line foreign body detection, which is not conducive to the removal of foreign bodies. Therefore, a transmission line foreign body identification method and system based on the improved YOLOv10 model are provided. On the basis of foreign body detection, the transmission line component detection is added. By collecting foreign body and transmission line component images to train the corresponding recognition model, the foreign body and component location information is output for subsequent foreign body hazard assessment and judgment. The detection accuracy is ensured while the hazard assessment is performed to ensure that the transmission line is not affected by foreign bodies, effectively reducing the manpower and material costs.
[0006] The purpose of the present invention is achieved through the following technical solutions: A method for identifying foreign objects in a power transmission line based on an improved YOLOv10 model specifically includes the following steps: Step S1, collecting real-time video of foreign objects and transmission line components on the transmission line, and extracting key frames from the real-time video as original images.
[0007] Step S2: construct a transmission line foreign body dataset and a transmission line component dataset, mark the foreign bodies in the images of the transmission line foreign body dataset and the transmission line components in the images of the transmission line component dataset as targets, and divide the marked transmission line foreign body dataset and the transmission line component dataset into a training set, a validation set and a test set according to a set ratio.
[0008] Step S3, using the ODConv dynamic convolution module to replace the Conv convolution module in the YOLOv10 model, adding the CAFM hybrid convolution attention mechanism module to the Neck feature fusion network of the YOLOv10 model, and replacing the loss function in the YOLOv10 model with the NWD loss function to obtain an improved YOLOv10 model; Set the training parameters, use the improved YOLOv10 model to train the transmission line foreign object detection model according to the transmission line foreign object dataset, and train the transmission line component detection model according to the transmission line component dataset; among them, the training parameters include the maximum training rounds, image input size, batch size, and initial learning rate.
[0009] Step S4: input the collected image to be detected into the trained power transmission line foreign object detection model, and output the foreign object detection result, which includes whether the output image contains foreign objects and the location of the foreign objects when foreign objects exist; if no foreign objects are detected, do not proceed to the subsequent steps; if foreign objects are detected, proceed to step S5.
[0010] Step S5, input the foreign object detection result, which is an image containing foreign objects detected, into the power transmission line component detection model, detect the power transmission line components in the image containing foreign objects, and output the power transmission line component detection result, which includes whether the output image contains power transmission line components and the position of the power transmission line components when they exist; if no power transmission line components are detected, do not proceed to the subsequent steps; if power transmission line components are detected, proceed to step S6.
[0011] Step S6: Determine the degree of danger of the foreign object by calculating the relative positional relationship between the position of the foreign object and the position of the power transmission line component and the working state of the line.
[0012] How this solution works: A method and system for identifying foreign objects in power transmission lines based on an improved YOLOv10 model is specifically designed for the specific scenario of foreign object detection in power transmission lines. Based on the existing target detection technology, the method is improved. Based on the YOLOv10 model framework, the model structure is optimized by introducing the ODConv dynamic convolution module and the CAFM hybrid convolution attention mechanism module. In the data processing stage, the image of the power transmission line is acquired by an image acquisition device, and preprocessing operations such as denoising, contrast enhancement and image segmentation are performed to construct a data set containing foreign objects and components, and the data set size is expanded by data enhancement technology. In the model training process, the influence of the diversity and complexity of foreign objects and components in the power transmission line is considered. The ODConv dynamic convolution module is used to replace some convolution modules to enhance the feature extraction capability. The CAFM hybrid convolution attention mechanism is added to the Neck feature fusion module to focus on key features, especially for large target features. At the same time, the NWD loss function is used to improve the detection accuracy of small targets. These improvements comprehensively consider the model training process to reduce the detection errors caused by foreign object size differences, occlusion and complex background factors, and provide an efficient method for foreign object recognition suitable for power transmission lines. During the detection phase, foreign objects are first identified through the foreign object detection model, and then the image containing the foreign object is input into the component detection model to determine the component position. Finally, a hazard assessment is performed and a response is made based on the relative position of the foreign object and the component.
[0013] In order to further optimize the above technical solution, in step S3, the collected image enters the Backbone feature extraction network of the improved YOLOv10 model, including sequentially connected Conv convolution module, ODConv dynamic convolution module, C2f module, ODConv dynamic convolution module, C2f module, SCDown module, C2f module, SCDown module, C2f module, SPPF module and PSA module.
[0014] After passing through the second C2f module, the features of the first size are generated and enter the Neck feature fusion module; then the features of the first size are further extracted in the Backbone feature extraction network module, and after passing through the first SCDown module and the third C2f module, the features of the second size are generated and enter the Neck feature fusion module; then the features of the second size are further extracted in the Backbone feature extraction network module, and after passing through the second SCDown module, the fourth C2f module, the SPPF module and the PSA module, the features of the third size are generated for the Neck feature fusion module.
[0015] In order to further optimize the above technical solution, in step S3, the CAFM hybrid convolution attention mechanism module is added between the C2fCIB module and the detection head in the Neck feature fusion network of the improved YOLOv10 model; the Neck feature fusion network includes an upsampling Upsample1 module, a pooling structure Concat1 module, a C2f1 module, an Upsample2 module, a Concat2 module, a C2f2 module, an ODConv dynamic convolution module, a Concat3 module, a C2f3 module, a downsampling SCDown module, a Concat4 module, a C2fCIB module, and a CAFM hybrid convolution attention mechanism module connected in sequence.
[0016] The features of the first size are input into the Concat2 module; the features of the second size are input into the Concat1 module, and the features of the third size are input into the Upsample1 module and the Concat4 module.
[0017] The C2f1 module will perform feature fusion of the up-sampled and pooled third-size features and the second-size features after pooling and output them to the Concat3 module.
[0018] The output features of the C2f1 module are fused and upsampled by the Upsample2 module, and then pooled with the features of the first size and input into the C2f2 module. The C2f2 module performs feature fusion and outputs the first target features, which are then sent to the detection head.
[0019] The first target feature is dynamically convolved through the ODConv dynamic convolution module, fused with the C2f1 module, and the output feature is pooled through the Concat3 module. After pooling, the feature fusion is output through the C2f3 module as the second target feature, and the second target feature is sent to the detection head.
[0020] The second target feature is downsampled through the SCDown module and the third size feature is pooled through the Concat4 module. After feature fusion through the C2fCIB module, the CAFM hybrid convolution attention mechanism module is added before entering the detection head to output the third target feature, which is then sent to the detection head.
[0021] In order to further optimize the above technical solution, in step S3, the CAFM hybrid convolutional attention mechanism module includes a global branch and a local branch; the target feature output by the C2fCIB module passes through the CAFM hybrid convolutional attention mechanism module output feature as the third target feature.
[0022] The global branch uses convolution to adjust to a 3-channel dimension, and uses depth-wise separable convolution in each group to obtain the query value Q, key value K, and value V.
[0023] The similarity score is calculated by performing dot product between the query value Q and the key value K. The similarity score is normalized and the attention weight is calculated by the Softmax activation function. The attention weight is weighted and summed with the corresponding value V to calculate the attention map. The attention map outputs the eigenvalue through convolution calculation. The eigenvalue is weightedly fused with the target feature output by the C2fCIB module feature to obtain the global branch target feature.
[0024] The local branch uses convolution to adjust the channel dimension to the set value and performs channel shuffling. Channel shuffling divides the input target features into multiple groups along the channel dimension, performs channel shuffling in each group, and then concatenates the output tensors of each group along the channel dimension to generate a new output target feature. Convolution is used to extract features to obtain local branch target features.
[0025] The global branch target feature and the local branch target feature are weightedly fused to obtain the third target feature.
[0026] In order to further optimize the above technical solution, in step S3, the loss function in the network training process is replaced by the NWD loss function. The NWD loss function first models the boundary frame as a two-dimensional Gaussian distribution, and uses the normalized distance measurement method to calculate the similarity of the two bounding boxes through the Gaussian distribution corresponding to the bounding box, thereby improving the small target detection accuracy.
[0027] In order to further optimize the above technical solution, step S3 also includes using precision, recall rate, and average precision mean as model performance evaluation indicators to evaluate the transmission line foreign body detection model and the transmission line component detection model.
[0028] Precision is used to evaluate the accuracy of model predictions. It indicates the proportion of truly positive samples in the prediction results where the model outputs positive examples. It is expressed as: , in, Represents the number of samples correctly predicted as positive class - true class; Represents the number of samples that are incorrectly predicted as positive - false positive.
[0029] The recall rate Recall is used to measure the model's ability to identify the target positive samples. It indicates the ratio of the number of positive samples correctly predicted as positive examples to all positive samples, expressed as: , in, Represents the number of positive samples that are mistakenly predicted as negative samples - false negatives.
[0030] The average precision is used to comprehensively evaluate the precision and recall of the model. AP represents the average precision. The average precision AP is obtained by integrating the precision Precision over the recall Recall interval from 0 to 1. The average precision AP represents the average value of the precision at different recall levels, expressed as: .
[0031] The mean average precision (mAP) is the average of the average precision AP of multiple categories, expressed as , where C represents the number of categories, Represents the average precision of the i-th category.
[0032] In order to further optimize the above technical solution, step S3 also includes selecting YOLOv10n as a pre-training model during the training process of the improved YOLOv10 model.
[0033] In order to further optimize the above technical solution, in step S1, the real-time video extracts key frames based on the fixed time interval method and the frame difference method. The key frames are extracted based on the fixed time interval method and the frame difference method respectively, and the key frames extracted by the two methods are used as the original image together, and duplicate data is deleted according to the timestamp of the key frame; the fixed time interval method is used to extract a frame as a key frame according to the set time interval; the frame difference method calculates the difference between two adjacent frames of images, and subtracts the pixel values of each frame in the real-time video from the previous frame to obtain a differential image. If the pixel value of the differential image exceeds the set threshold, the current frame is extracted as a key frame; (there is no problem with the first frame, there is a fixed time extraction) In step S1, the original image is preprocessed including image denoising and contrast enhancement to output the acquired image; the image denoising adopts Gaussian filtering algorithm to remove noise points in the image, and the contrast enhancement adopts histogram equalization method.
[0034] In order to further optimize the above technical solution, the transmission line foreign object dataset and the transmission line component dataset constructed in the transmission line foreign object dataset step S2 also include the use of data enhancement technology to expand the transmission line foreign object dataset and the transmission line component dataset respectively, so as to improve the generalization ability of the model; wherein the data enhancement technology includes random cropping, rotation, flipping, and scaling.
[0035] The present invention includes a system applicable to the above method, the system including: an image acquisition unit, a data preprocessing unit, a data set construction and annotation unit, a model improvement and training unit, a transmission line foreign body detection and identification unit, a transmission line component detection and positioning unit, and a hazard assessment and response unit; wherein: The image acquisition unit, the data preprocessing unit, the data set construction and annotation unit, and the model improvement and training unit are connected in series in sequence, and the transmission line foreign body detection and identification unit and the transmission line component detection and positioning unit are both connected to the model improvement and training unit and the hazard assessment and response unit.
[0036] The image acquisition and preprocessing unit acquires real-time video of foreign objects on the transmission line and components of the transmission line, and extracts key frames from the real-time video as original images.
[0037] The data set construction and annotation unit constructs a transmission line foreign body data set and a transmission line component data set, annotates the foreign bodies in the images of the transmission line foreign body data set and the transmission line components in the images of the transmission line component data set as targets, and divides the annotated transmission line foreign body data set and the transmission line component data set into a training set, a verification set and a test set according to a set ratio.
[0038] The model improvement and training unit adopts the ODConv dynamic convolution module to replace the Conv convolution module in the YOLOv10 model, adds a CAFM hybrid convolution attention mechanism module to the Neck feature fusion network of the YOLOv10 model, and replaces the loss function in the YOLOv10 model with the NWD loss function to obtain an improved YOLOv10 model.
[0039] Set the training parameters, use the improved YOLOv10 model to train the transmission line foreign object detection model according to the transmission line foreign object dataset, and train the transmission line component detection model according to the transmission line component dataset; among them, the training parameters include the maximum training rounds, image input size, batch size, and initial learning rate.
[0040] The power transmission line foreign object detection and identification unit inputs the collected image to be detected into the trained power transmission line foreign object detection model, and outputs the foreign object detection result, which includes whether the output image contains foreign objects and the position of the foreign objects when foreign objects exist; if no foreign objects are detected, the subsequent steps are not entered; if foreign objects are detected, the image containing the detected foreign objects is sent to the power transmission line component detection and positioning unit.
[0041] The power transmission line component detection and positioning unit inputs the foreign object detection result, which is an image containing foreign objects detected, into the power transmission line component detection model, detects the power transmission line components in the image containing foreign objects, and outputs the power transmission line component detection result, wherein the power transmission line component detection result includes whether the output image contains the power transmission line components and the position of the power transmission line components when the power transmission line components exist; if the power transmission line components are not detected, the subsequent steps are not entered; if the power transmission line components are detected, the image containing the power transmission line components is sent to the hazard assessment and response unit.
[0042] The hazard assessment and response unit determines the degree of hazard of the foreign object by calculating the relative position relationship between the position of the foreign object and the position of the power transmission line component and the working state of the line.
[0043] In summary, the present invention has the following beneficial effects compared with the prior art: 1. Improve detection accuracy. The improved YOLOv10 model can more accurately extract the features of foreign objects and components in the power transmission line through the ODConv dynamic convolution module and the CAFM hybrid convolution attention mechanism, especially focusing on key areas when dealing with large targets. At the same time, the NWD loss function improves the detection capability of small targets, thereby effectively reducing missed detections and false detections, and significantly improving the precision, recall rate, and average precision of foreign object and component detection.
[0044] 2. Enhanced hazard assessment capabilities. The present invention can not only detect foreign objects and components, but also accurately analyze the relative positional relationship between the two, thereby dividing the degree of foreign object hazard into different levels, providing a more scientific and accurate basis for decision-making for operation and maintenance personnel, and helping to take appropriate measures in a timely manner to improve the safety and stability of transmission line operation.
[0045] 3. Improve detection efficiency. The automated process from image acquisition to final decision-making, and the parallel monitoring of foreign objects and lines, greatly shorten the detection time, reduce the workload and subjectivity of manual inspections, can quickly detect foreign objects in transmission lines, reduce the probability of failures caused by foreign objects, and improve the reliability of power supply.
[0046] 4. Optimize data management and utilization. The rich data sets and data enhancement operations built have improved the generalization ability of the model. The detailed detection result records and management provide a basis for subsequent data analysis, which helps to continuously optimize model performance and improve operation and maintenance strategies, and realize intelligent and refined management of transmission line operation and maintenance. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] The drawings described herein are used to provide a further understanding of the embodiments of the present invention, constitute a part of this application, and do not constitute a limitation of the embodiments of the present invention. In the drawings: Figure 1 A schematic diagram of the steps of a method for identifying foreign objects in a transmission line based on an improved YOLOv10 model; Figure 2 It is a structural diagram of a transmission line foreign object recognition system based on an improved YOLOv10 model; Figure 3 It is a flow chart of a transmission line foreign object recognition system based on the improved YOLOv10 model; Figure 4 This is the structure diagram of the YOLOv10 network model; Figure 5 A diagram showing the structure of an improved YOLOv10 network model according to a specific embodiment of the present invention; Figure 6 This is a CAFM hybrid convolutional attention mechanism module structure diagram used in a transmission line foreign body recognition method based on the improved YOLOv10 model; Figure 7 This is a graph showing how the network performance indicators of an improved YOLOv10 foreign object detection model change with iterations for a transmission line foreign object recognition method based on the improved YOLOv10 model. DETAILED DESCRIPTION
[0048] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with embodiments and drawings. The exemplary embodiments of the present invention and their description are only used to explain the present invention and are not intended to limit the present invention.
[0049] Deep learning target detection technology faces the problem that the model has insufficient accuracy in detecting foreign objects and the analysis of the degree of harm caused by foreign objects is not accurate enough; in view of this, the present invention provides the following embodiments to solve the above technical problems.
[0050] In the examples: like Figure 1 As shown, this embodiment proposes a method for identifying foreign objects in a power transmission line based on an improved YOLOv10 model, and the specific implementation steps include: Step S1, collecting real-time video of foreign objects and transmission line components on the transmission line, and extracting key frames from the real-time video as original images; Step S2, constructing a transmission line foreign body dataset and a transmission line component dataset, marking the foreign bodies in the images of the transmission line foreign body dataset and the transmission line components in the images of the transmission line component dataset as targets, and dividing the marked transmission line foreign body dataset and the transmission line component dataset into a training set, a validation set and a test set according to a set ratio; Step S3, using the ODConv dynamic convolution module to replace the Conv convolution module in the YOLOv10 model, adding the CAFM hybrid convolution attention mechanism module to the Neck feature fusion network of the YOLOv10 model, and replacing the loss function in the YOLOv10 model with the NWD loss function to obtain an improved YOLOv10 model; Set training parameters, use the improved YOLOv10 model to train the transmission line foreign object detection model based on the transmission line foreign object dataset, and train the transmission line component detection model based on the transmission line component dataset; the training parameters include the maximum training rounds, image input size, batch size, and initial learning rate; Step S4, input the collected image to be detected into the trained power transmission line foreign body detection model, and output the foreign body detection result, which includes whether the output image contains foreign bodies and the location of the foreign bodies when foreign bodies exist; if no foreign bodies are detected, do not proceed to the subsequent steps; if foreign bodies are detected, proceed to step S5; Step S5, inputting the image containing the foreign object detected as the foreign object detection result into the power transmission line component detection model, detecting the power transmission line component in the image containing the foreign object, and outputting the power transmission line component detection result, the power transmission line component detection result including whether the output image contains the power transmission line component and the position of the power transmission line component when the power transmission line component exists; if the power transmission line component is not detected, the subsequent steps are not entered; if the power transmission line component is detected, the step S6 is entered; Step S6: Determine the degree of danger of the foreign object by calculating the relative positional relationship between the position of the foreign object and the position of the power transmission line component and the working state of the line.
[0051] like Figure 2 , 3 As shown, this embodiment also proposes a system applied to the present method, a transmission line foreign object recognition system based on an improved YOLOv10 model, which is composed of an image acquisition unit, a data preprocessing unit, a data set construction and annotation unit, a model improvement and training unit, a transmission line foreign object detection and recognition unit, a transmission line component detection and positioning unit, and a hazard assessment and response unit.
[0052] Among them: the image acquisition unit, the data preprocessing unit, the data set construction and annotation unit and the model improvement and training unit are connected in series in sequence, and the transmission line foreign body detection and identification unit and the transmission line component detection and positioning unit are both connected to the model improvement and training unit and the hazard assessment and response unit.
[0053] The image acquisition and preprocessing unit acquires real-time video of foreign objects on the transmission line and components of the transmission line, and extracts key frames from the real-time video as original images.
[0054] The data set construction and annotation unit constructs a transmission line foreign body data set and a transmission line component data set, annotates the foreign bodies in the images of the transmission line foreign body data set and the transmission line components in the images of the transmission line component data set as targets, and divides the annotated transmission line foreign body data set and the transmission line component data set into a training set, a verification set and a test set according to a set ratio.
[0055] The model improvement and training unit adopts the ODConv dynamic convolution module to replace the Conv convolution module in the YOLOv10 model, adds a CAFM hybrid convolution attention mechanism module to the Neck feature fusion network of the YOLOv10 model, and replaces the loss function in the YOLOv10 model with the NWD loss function to obtain an improved YOLOv10 model.
[0056] Set the training parameters, use the improved YOLOv10 model to train the transmission line foreign object detection model according to the transmission line foreign object dataset, and train the transmission line component detection model according to the transmission line component dataset; among them, the training parameters include the maximum training rounds, image input size, batch size, and initial learning rate.
[0057] The power transmission line foreign object detection and identification unit inputs the collected image to be detected into the trained power transmission line foreign object detection model, and outputs the foreign object detection result, which includes whether the output image contains foreign objects and the position of the foreign objects when foreign objects exist; if no foreign objects are detected, the subsequent steps are not entered; if foreign objects are detected, the image containing the detected foreign objects is sent to the power transmission line component detection and positioning unit.
[0058] The power transmission line component detection and positioning unit inputs the foreign object detection result, which is an image containing foreign objects detected, into the power transmission line component detection model, detects the power transmission line components in the image containing foreign objects, and outputs the power transmission line component detection result, wherein the power transmission line component detection result includes whether the output image contains the power transmission line components and the position of the power transmission line components when the power transmission line components exist; if the power transmission line components are not detected, the subsequent steps are not entered; if the power transmission line components are detected, the image containing the power transmission line components is sent to the hazard assessment and response unit.
[0059] The hazard assessment and response unit determines the degree of hazard of the foreign object by calculating the relative position relationship between the position of the foreign object and the position of the power transmission line component and the working state of the line.
[0060] Step S1: collect real-time video of foreign objects and transmission line components on the transmission line through monitoring cameras and patrol drones, and extract key frames from the real-time video as original images.
[0061] High-definition cameras are installed in key areas, and drones are deployed along the transmission lines to collect image data of the transmission lines and their surroundings. The cameras are installed in specific locations to take images of the transmission lines at regular intervals; drones can conduct comprehensive inspections of the transmission lines according to preset routes, and obtain real-time videos from different angles and distances.
[0062] In the step S1, the key frames extracted from the real-time video are based on a fixed time interval method and an inter-frame difference method, and the key frames are extracted based on the fixed time interval method and the inter-frame difference method respectively and used as the original image.
[0063] The fixed time interval method extracts a frame as a key frame according to the set time interval; this method is simple and direct, and is suitable for situations where the scene changes relatively slowly. For real-time monitoring videos of power transmission lines, if foreign objects appear and move relatively infrequently, this method can obtain images containing foreign object information. However, it may miss the key moments when foreign objects move quickly or appear briefly, resulting in information loss, so the inter-frame difference method is combined to jointly extract key frames.
[0064] The inter-frame difference method calculates the difference between two adjacent frames of images, and performs pixel value subtraction operation on each frame in the real-time video and the previous frame to obtain a differential image. If the pixel value of the differential image exceeds the set threshold, it is considered that a significant change has occurred between the two frames, and the current frame is extracted as a key frame. In power transmission line monitoring, when foreign objects enter the picture or move in the picture, it will cause a large change in pixel value, so that the key frame is detected and extracted. The amount of computation required to extract key frames based on the fixed time interval method and the inter-frame difference method is not large, and no additional optimization algorithm or hardware acceleration is required.
[0065] In the process of collecting original images, the shooting location and shooting time related information are automatically recorded to provide a basis for subsequent data analysis and facilitate the display and recording of results.
[0066] The original image is denoised and the contrast is enhanced to improve the image quality and then the acquired image is output.
[0067] The Gaussian filtering algorithm is used to remove noise points in the original image to improve image clarity; the histogram equalization method is used to enhance the contrast to make the features of foreign objects and transmission line components in the image more obvious.
[0068] The Gaussian filtering algorithm constructs a Gaussian kernel by selecting an appropriate template size and standard deviation, and then uses the kernel to traverse the image pixels, multiplying the pixel values in the pixel neighborhood by the kernel weight and summing them to obtain a new value, thereby removing image noise points and retaining details.
[0069] The histogram equalization method for image contrast enhancement is to first count the image grayscale histogram, calculate the cumulative distribution function to obtain a mapping table, and then redistribute the pixel grayscale values according to this mapping table to make the image grayscale distribution uniform to enhance the contrast.
[0070] Before collection, refer to inspection specifications, past inspection reports and industry specifications, use word vector models for analysis, determine the types of foreign objects and transmission line areas of focus, and determine the types of foreign objects and component types that need to be identified. Statistics are collected on foreign objects that appear in inspection reports on transmission lines in key areas of focus in recent years. According to the frequency of appearance of different foreign objects in actual scenes, the types of foreign objects with a frequency higher than the set threshold are used as targets for identification and marking, and then foreign object images are collected and transmission line foreign object data sets are constructed according to the selected foreign object types; similarly, statistics are collected on transmission line components that appear on transmission lines in key areas of focus, and component types with a frequency higher than the set threshold are used as targets for identification and marking, and then component images are collected and transmission line component data sets are constructed according to the selected component types. At the same time, relevant foreign object images and transmission line component images are collected extensively through past inspection photography records and the Internet to supplement the corresponding data sets.
[0071] Step S2: construct a data set of foreign objects in power transmission lines and a data set of power transmission line components based on the collected images after denoising and enhancement, and use data enhancement techniques, including random cropping, rotation, flipping, and scaling, to expand the data set of foreign objects in power transmission lines and the data set of power transmission line components respectively, so as to improve the generalization ability of the model; perform data enhancement operations on the data set of foreign objects in power transmission lines and the data set of power transmission line components, including randomly cropping a part of the image, with a cropping ratio between 0.5 and 1; randomly rotating the image at an angle from -45° to 45°; flipping the image horizontally or vertically; and scaling the image in a ratio within a range of 0.8 to 1.2. Through these operations, the data set scale is expanded, and the model's recognition ability of foreign objects and power transmission line components of different forms is enhanced, so as to improve the generalization ability of the model.
[0072] The target locations in the images of the transmission line foreign object dataset and the transmission line component dataset are marked, and the foreign objects in the images of the transmission line foreign object dataset and the transmission line components in the images of the transmission line component dataset are marked as targets; the foreign object categories include plastic bags, kites, branches and bird nests, and the transmission line component categories include insulators, shock-absorbing hammer clamps and transmission line cables.
[0073] The Labelimg tool is used to annotate the objects in the images in the dataset. The annotation includes marking the objects and their types in the images, that is, marking foreign objects and power transmission line components. The annotation content includes the category and location of foreign objects and the type and location of power transmission line components.
[0074] The LabelImg tool is an open source data labeling tool used for image labeling in target detection tasks. It has an intuitive graphical user interface that allows users to quickly get started and label image data.
[0075] At the same time, the labeled power transmission line foreign body dataset and power transmission line component dataset are divided into a training set, a validation set and a test set according to a set ratio; in this embodiment, the division ratio of the training set, the validation set and the test set is 8:1.5:0.5.
[0076] Step S3: Use the ODConv dynamic convolution module and the CAFM hybrid convolution attention mechanism module to improve the YOLOv10 model, and replace the loss function in the YOLOv10 model with the NWD loss function to obtain an improved YOLOv10 model.
[0077] like Figure 4 The YOLOv10 model includes a Backbone feature extraction network and a Neck feature fusion network, wherein the Backbone feature extraction network module is used to extract feature information in the image, and the extracted feature information of different sizes is fused in the Neck feature fusion network, and then the detection head is used to detect targets of different sizes; the Backbone feature extraction network and the Neck feature fusion network include Conv convolution modules.
[0078] The sub-modules in the YOLOv10 network Backbone feature extraction network are sequentially connected, including Conv convolution module, Conv convolution module, C2f module, Conv convolution module, C2f module, SCDown module, C2f module, SCDown module, C2f module, SPPF module and PSA module. The feature information in the image is extracted in turn through the above convolution modules, and the image is extracted into feature information of three different sizes through the pooling layer, which is used to fuse the features of the three feature sizes in the subsequent Neck feature fusion network and input into the detection head.
[0079] like Figure 5 ,The improvements to the YOLOv10 model include: using the ODConv dynamic convolution module to replace the Conv convolution module in the YOLOv10 model to enhance the model's feature extraction capability and improve the model's detection accuracy; adding the CAFM hybrid convolution attention mechanism module to the Neck feature fusion network of the YOLOv10 model to enhance the model's detection accuracy for large targets; replacing the loss function in the YOLOv10 model with the NWD loss function to enhance the model's detection accuracy for small targets.
[0080] In the improved YOLOv10 model, the ODConv dynamic convolution module is used to replace some Conv convolution modules in the Backbone network and the Neck feature fusion network of the YOLOv10 model to enhance the model's feature extraction capability for targets of different sizes; the ODConv dynamic convolution module and the CAFM hybrid convolution attention mechanism module are used to improve the YOLOv10 model, and the loss function is replaced by the NWD loss function. This specific model improvement method for foreign object detection in transmission lines has not been seen in the prior art.
[0081] In the Backbone feature extraction module and Neck feature fusion network of the YOLOv10 model, the ODConv dynamic convolution module is used to replace the Conv convolution module. The ODConv dynamic convolution module can dynamically adjust the convolution kernel parameters according to the input features, enhance the feature extraction capability of the network, better capture the key feature information in the image, improve the adaptability and extraction capability of different features, and provide richer feature representation for subsequent target detection. Upsample module The collected image enters the Backbone network of the improved YOLOv10 model, including sequentially connected Conv convolution module, ODConv dynamic convolution module, C2f module, ODConv dynamic convolution module, C2f module, SCDown module, C2f module, SCDown module, C2f module, SPPF module and PSA module.
[0082] After passing through the second C2f module, the features of the first size are generated and enter the Neck feature fusion module; then the features of the first size are further extracted in the Backbone feature extraction network module, and after passing through the first SCDown module and the third C2f module, the features of the second size are generated and enter the Neck feature fusion module; then the features of the second size are further extracted in the Backbone feature extraction network module, and after passing through the second SCDown module, the fourth C2f module, the SPPF module and the PSA module, the features of the third size are generated for the Neck feature fusion module.
[0083] The first size feature, the second size feature, and the third size feature are three features of different sizes.
[0084] In the Neck feature fusion network of the improved YOLOv10 model, the Conv convolution module is replaced with the ODConv dynamic convolution module, and the CAFM hybrid convolution attention mechanism module is added between the C2fCIB module and the detection head; the Neck feature fusion network includes the upsampling Upsample1 module, the pooling structure Concat1 module, the C2f1 module, the Upsample2 module, the Concat2 module, the C2f2 module, the ODConv dynamic convolution module, the Concat3 module, the C2f3 module, the downsampling SCDown module, the Concat4 module, the C2fCIB module, and the CAFM hybrid convolution attention mechanism module.
[0085] The features of the first size are input into the Concat2 module; the features of the second size are input into the Concat1 module, and the features of the third size are input into the Upsample1 module and the Concat4 module.
[0086] The C2f1 module will perform feature fusion of the up-sampled and pooled third-size features and the second-size features after pooling and output them to the Concat3 module.
[0087] The output features of the C2f1 module are fused and upsampled by the Upsample2 module, and then pooled with the features of the first size and input into the C2f2 module. The C2f2 module performs feature fusion and outputs the first target features, which are then sent to the detection head.
[0088] The first target feature is dynamically convolved through the ODConv dynamic convolution module, fused with the C2f1 module, and the output feature is pooled through the Concat3 module. After pooling, the feature fusion is output through the C2f3 module as the second target feature, and the second target feature is sent to the detection head.
[0089] The second target feature is downsampled through the SCDown module and the third size feature is pooled through the Concat4 module. After feature fusion through the C2fCIB module, the CAFM hybrid convolution attention mechanism module is added before entering the detection head to output the third target feature, which is then sent to the detection head.
[0090] Enable the model to better focus on important feature information. The feature size of the third target is larger than that of the second target, and the feature size of the second target is larger than that of the first target. Therefore, the CAFM hybrid convolutional attention mechanism module is added to enhance the model's ability to detect large targets.
[0091] like Figure 6The CAFM hybrid convolutional attention mechanism module used is composed of a global branch and a local branch, which focus on different feature information and overcome the defect that convolution is limited to local perception. The target feature output by the C2fCIB module passes through the CAFM hybrid convolutional attention mechanism module output feature as the third target feature.
[0092] The global branch uses convolution to adjust to a 3-channel dimension, and this embodiment uses a 1*1 convolution layer; depthwise separable convolution is used in each group, and this embodiment uses a 3*3 depthwise separable convolution to query Q, key K, and value V.
[0093] Query Q is the query vector of the data to be processed, which represents the content we want to focus on; key K is the key vector corresponding to all elements in the data set, which is used to match the query vector; value V is the numerical vector corresponding to all elements in the data set, which contains the actual data information. The similarity score is calculated by performing a dot product between query Q and key K. The similarity score indicates the degree of similarity between the query vector Q and each key vector K. The query vector Q represents the features of a certain area in the image, and the similarity score calculated with each key vector K reflects the similarity between the features of the area and the features of other areas in the image. The similarity score is used to measure the correlation between the query content and different elements in the data set. The higher the similarity score, the more similar the query content is to the corresponding element. In the subsequent attention mechanism, the element is given a higher weight, thus playing a more important role in information extraction and processing.
[0094] The similarity scores are normalized and the attention weight is calculated through the Softmax activation function. The attention weight is a value between 0 and 1, which represents the relative importance of each element in the attention mechanism and is used to determine the contribution of each element in the information aggregation process. The higher the attention weight of an element, the greater the influence of its corresponding numerical vector V in the weighted sum calculation of the attention map, so that the model can pay more attention to important information and ignore less relevant information, realize adaptive weighted processing of input data, and improve the model's ability to extract and process key features.
[0095] The attention weight is weighted and summed with the corresponding value V to calculate the attention map. By calculating the attention map in this way, instead of calculating the huge conventional attention map, the computational burden is reduced and image features of different levels and types are extracted. The attention map is used to extract image features of different levels and types. It contains information that has been filtered and weighted by the attention mechanism, reflects the importance distribution of the input data at different positions or different elements, and indicates the importance of each area in the image. Some areas have higher values in the attention map because they are highly related to the query content, while other areas have relatively low values. The attention map can help the model pay more attention to key objects or areas in the image, thereby improving the accuracy and efficiency of recognition.
[0096] The attention map outputs feature values through convolution calculation, which are weightedly fused with the target features output by the C2fCIB module to obtain more targeted and effective global branch target features.
[0097] The local branch uses convolution to adjust the channel dimension to the set value. This embodiment uses a 1*1 convolution layer to adjust the channel. Convolution flexibly adjusts the number of channels without changing the width and height of the feature map, which helps subsequent operations to better process feature information. Channel shuffling operation is performed. Channel shuffling divides the input target features into multiple groups along the channel dimension, performs channel shuffling within each group, and then splices the output tensors of each group along the channel dimension to generate a new output target feature; this operation further mixes and fuses channel information to enhance cross-channel interaction and information integration. Convolution is used to extract features. This embodiment uses a 3*3*3 convolution layer to obtain local branch target features; this convolution operation can comprehensively capture local feature information in spatial and spectral dimensions.
[0098] The global branch target feature and the local branch target feature are weightedly fused to obtain the third target feature.
[0099] In the Neck feature fusion module, a CAFM hybrid convolution attention mechanism module is added before the large target features enter the detection head. The CAFM hybrid convolution attention mechanism module structure includes local branches and global branches, both of which focus on different feature information. The global branch focuses on the overall feature information, and the global feature extraction capability adopts the attention mechanism. The local branch focuses on local detail features, and the local feature capture capability adopts convolution operations. The two work together to effectively model the global and local features of the image by combining global and local features, overcome the defect of convolution being limited by local perception, and enhance the detection capability of large targets. This enables the model to focus on key areas more accurately when processing large targets, thereby improving detection accuracy.
[0100] In step S3, the loss function in the network training process is replaced with the NWD loss function to improve the accuracy of small target detection. The NWD loss function first models the boundary frame as a two-dimensional Gaussian distribution, uses the normalized distance measurement method, and calculates the similarity of the two bounding boxes through the Gaussian distribution corresponding to the bounding box, thereby improving the accuracy of small target detection. For small targets in the application scenario of power line foreign object recognition, including small foreign objects and tiny power line components, it can be more accurately located and identified, reducing missed detection and false detection.
[0101] The transmission line foreign object detection model and the transmission line component detection model are trained respectively using the improved YOLOv10 model based on the transmission line foreign object dataset and the transmission line component dataset to ensure that the model can accurately identify foreign objects and components on the 10kV transmission line.
[0102] The improved YOLOv10 model is trained using the constructed training set, and the transmission line foreign body dataset and the transmission line component dataset are also trained, thereby improving the system operation speed.
[0103] The training parameters are set, and the improved YOLOv10 model is used to train the transmission line foreign object detection model according to the transmission line foreign object dataset, and the transmission line component detection model is trained according to the transmission line component dataset; wherein the training parameters include the maximum training rounds, the image input size, the batch size, and the initial learning rate; the training parameters of this embodiment are set to the maximum training rounds of 500 times, the image input size of 640*640, the batch size of 32, the initial learning rate of 0.1, and the YOLOv10n model is used as the pre-training model.
[0104] In step S3, during training, the YOLOv10n model is used as a pre-training model. YOLOv10n is a lightweight model variant in the YOLOv10 series. It uses a lightweight network structure, including a lightweight classification head and space-channel decoupled downsampling technology, which reduces inference latency while maintaining high detection accuracy.
[0105] In the training of the improved YOLOv10 model, YOLOv10n is selected as the pre-training model. Its advantages in light weight and high efficiency are utilized to reduce the amount of calculation. It is suitable for scenarios with low requirements for computing resources and can run quickly in resource-constrained environments. It provides a good starting point for subsequent model improvements and helps to further improve the detection capability and efficiency of the model in specific tasks or scenarios while maintaining performance.
[0106] When evaluating the transmission line foreign object detection model and the transmission line component detection model, precision, recall rate and average precision mean are used as model performance evaluation indicators.
[0107] Precision is used to evaluate the accuracy of model predictions, and its calculation is based on the prediction results. Specifically, precision represents the proportion of truly positive samples in the prediction results where the model outputs positive examples. The formula is as follows:
[0108] in Represents the number of samples correctly predicted as positive class - true class; Represents the number of samples that are incorrectly predicted as positive - false positive.
[0109] Recall is used to measure the model's ability to identify target positive samples. It represents the ratio of the number of positive samples correctly predicted as positive examples to all positive samples; the specific formula is as follows:
[0110] in Represents the number of positive samples that are mistakenly predicted as negative samples - false negatives.
[0111] The average precision is used to comprehensively evaluate the precision and recall of the model, and AP is used to represent the average precision.
[0112] As the recall rate increases from 0 to 1, the model needs to maintain a high precision while improving the recall rate. The average precision AP is obtained by integrating the precision Precision over the interval of the recall rate Recall from 0 to 1. The average precision AP represents the average value of the precision at different recall levels, reflecting the performance of the model in the entire recall range, expressed as: , The mean average precision (mAP) is the average of the average precision AP of multiple categories, expressed as , where C represents the number of categories, Represents the average precision of the i-th category.
[0113] This indicator is used to evaluate the overall performance of the model in multi-category tasks. It averages the mean precision AP value of each category to obtain an average precision mAP that can reflect the comprehensive performance of the model in all categories. The higher the mAP, the better the detection or classification effect of the model in multiple categories, and the more accurately it can identify objects of different categories.
[0114] Taking the improved YOLOv10 model trained on the transmission line foreign body dataset as an example, the precision Precision is recorded as the recall rate P, the recall rate Recall is recorded as the precision R, and the two average precision means mAP are recorded as average precision (mAP@0.5) and average precision (mAP@0.5:0.9). The performance indicators of the improved YOLOv10 model are shown in Table 1. The comparison of the results before and after YOLOv10 network optimization is shown in the change curve. Figure 7 As shown, Table 1 Comparison of results before and after YOLOv10 network optimization Precision P Recall R Average precision mAP@0.5 Average precision mAP@0.5: 0.9 YOLOv10 0.82750 0.72781 0.80673 0.48883 Improved YOLOv10 0.88224 0.72282 0.81514 0.50965 A high precision rate means that the model is more accurate in marking objects and has fewer false positives; the improved YOLOv10 model produces fewer false positives (false alarms) during detection, and the predicted boxes are more accurate. A high recall rate means that the model tries to find all targets, that is, there are fewer missed detections. mAP@0.5 represents the average precision in different categories, and 0.5 is used to measure the overlap between the predicted box and the true box. From the chart, we can see that the improved YOLOv10 model has a slightly improved accuracy when IoU=0.5, especially in correctly identifying larger objects. IoU is a measure of the overlap between the predicted box and the true box. It measures the accuracy of the prediction and calculates the ratio of the intersection area of the two boxes to the union area. mAP@0.5:0.9 is a variant of mAP@0.5, which represents the average precision at multiple IoU thresholds, from 0.5 to 0.9. This is a more stringent evaluation standard, indicating that the improved YOLOv10 model is more stable and accurate at different IoU thresholds.
[0115] Step S4: input the collected image to be detected into the trained power transmission line foreign object detection model, detect the foreign objects in the transmission line of the image to be detected, determine whether there are foreign objects, and output the foreign object detection result. The foreign object detection result includes whether the output image contains foreign objects and the location of the foreign objects when foreign objects exist; if no foreign objects are detected, the subsequent steps are not entered and the process ends, thereby reducing misjudgment and redundant calculations. If foreign objects are detected, step S5 is entered.
[0116] The foreign object detection model is also based on the improved YOLOv10 model and is specially trained for foreign object detection.
[0117] The image to be detected is input into the trained improved YOLOv10 foreign body detection model, and the model outputs the category, location and confidence information of the foreign body.
[0118] The detection results are screened and optimized, low-confidence detection frames are removed, and overlapping detection frames are merged to obtain the final foreign body detection results.
[0119] The transmission line image to be detected is input into the trained improved YOLOv10 foreign object detection model, and the category, location and confidence information of the foreign objects in the image are output.
[0120] The position is represented by the bounding box coordinates; the confidence level represents the model's confidence in the detection result.
[0121] The output detection results are post-processed to filter out those with confidence values lower than the set threshold and set a detection frame of 0.5 to reduce false detections. At the same time, the non-maximum suppression algorithm is used to merge detection frames with high overlap and an intersection-over-union ratio greater than 0.5 to obtain the final accurate foreign body detection results.
[0122] Step S5, input the foreign object detection result as the image containing the foreign object detected into the power transmission line component detection model, detect the power transmission line components in the image containing the foreign object, determine whether there are components, and output the power transmission line component detection result, the power transmission line component detection result includes whether the output image contains the power transmission line component and the position of the power transmission line component when the power transmission line component exists; if the power transmission line component is not detected, the subsequent steps will not be entered, and the process will end, thereby reducing misjudgment and redundant calculations. If the power transmission line component is detected, step S6 will be entered.
[0123] The image containing foreign objects is input into the component detection network, the transmission line components in the image are identified, and the type of components and their location information are output.
[0124] The transmission line component detection model is also based on the improved YOLOv10 model and is trained specifically for transmission line component detection.
[0125] The detection results are screened and optimized, low-confidence detection frames are removed, and overlapping detection frames are merged to obtain the final transmission line component detection results.
[0126] The transmission line image to be inspected is input into the trained improved YOLOv10 foreign object detection model, which outputs the category, location and confidence information of the transmission line components in the image.
[0127] The position is represented by the bounding box coordinates; the confidence level represents the model's confidence in the detection result.
[0128] The output detection results are post-processed to filter out those with confidence values lower than the set threshold, and a detection frame of 0.5 is set to reduce false detections. At the same time, a non-maximum suppression algorithm is used to merge detection frames with high overlap and an intersection-over-union ratio greater than 0.5 to obtain the final accurate transmission line component detection results, determine the specific location of the transmission line components in the image, and provide basic data for subsequent hazard assessment.
[0129] Step S6: Determine the degree of danger of the foreign object by calculating the relative positional relationship between the position of the foreign object and the position of the power transmission line component and the working state of the line.
[0130] According to the foreign body detection results and the transmission line component detection results, the relative position relationship between the foreign body and the transmission line component is analyzed, the distance threshold is set, and the degree of harm caused by the foreign body is analyzed and judged. According to the preset harm assessment rules, the degree of harm caused by foreign bodies is divided into four levels: "other, general, major, and emergency".
[0131] In this embodiment, if the foreign object is far away from the transmission line component, the distance is higher than the set first threshold, there is no contact risk, and the hazard level is "other"; if the foreign object is close to the transmission line component but not touching it, the distance is within the range of the set first threshold to the second threshold, and the hazard level is "general"; if the foreign object is in contact with the transmission line component or may cause discharge, the distance is within the range of the set second threshold to the third threshold, and the hazard level is "serious"; if the foreign object has caused line abnormality or there is a risk of immediate failure, or the distance is lower than the set third threshold, the hazard level is "emergency".
[0132] The first threshold distance length is greater than the second threshold distance length, and the second threshold distance length is greater than the third threshold distance length.
[0133] Generate corresponding processing decisions based on the hazard level. For the "emergency" level, immediately issue an alarm and dispatch maintenance personnel to handle the situation; for the "major" level, arrange to handle it as soon as possible; for the "general" level, record it and pay special attention to it during the next inspection; for the "other" level, make regular records.
[0134] For example, if the bird's nest is located within the main material of the pole tower, it is "other"; if the bird's nest is located above the insulator and there is physical contact or other physical interference, it may have abnormal discharge, etc., which is "major" and needs to be dealt with immediately.
[0135] In a specific embodiment, a method for identifying foreign objects in a transmission line based on an improved YOLOv10 model also includes: step S7, presenting foreign object detection results, transmission line component detection results, hazard assessment levels and processing decision information to operation and maintenance personnel in an intuitive manner, and displaying foreign objects and transmission line component annotations and hazard level prompts in the image through a visual interface.
[0136] At the same time, all inspection and evaluation data will be recorded and a detailed inspection report will be created, including image information, inspection time, foreign matter and transmission line component information, hazard assessment process and results, for subsequent query and analysis.
[0137] The foreign body detection results, transmission line component detection results, hazard assessment levels and treatment decision information are presented to the operation and maintenance personnel through a visual interface. On the visual interface, the transmission line image is displayed in the form of an image, the location and category of foreign bodies and transmission line components are marked, and different colors or icons are used to represent different hazard levels, so that the operation and maintenance personnel can intuitively understand the detection situation.
[0138] At the same time, all data from the inspection and evaluation process are recorded in detail and an inspection report is generated. The inspection report includes the time and location of the image shooting, the category and location of foreign objects and transmission line components and the detection confidence, the process and results of the hazard assessment, and the content of the processing decision. The inspection report is stored in the database for subsequent query, statistics and analysis, providing data support for the long-term operation and management of the transmission line.
[0139] In a specific embodiment, a power transmission line foreign object identification system based on an improved YOLOv10 model also includes a result display and recording unit, which is connected in series with a hazard assessment and response unit.
[0140] The result display and recording unit displays the shooting time and location of the image, the category and location of foreign objects and transmission line components, the detection confidence, the process and results of hazard assessment, and the information of processing decisions to the operation and maintenance personnel in an intuitive manner. It displays the foreign objects and component annotations and hazard assessments in the image through a visual interface, records all detection and evaluation data, and creates a detailed detection report for subsequent query and analysis.
[0141] In the examples: First, the data set is constructed and annotated. A drone is used to take aerial photos of 10kV transmission lines at different times and weather conditions to obtain images of the transmission lines at different angles and lighting conditions. Foreign objects and components in each image are annotated, and the training set, validation set, and test set are divided according to the annotated results.
[0142] Then the model is trained and optimized. YOLOv10 is used as the basic model, the ODConv dynamic convolution module is used to improve the backbone feature extraction capability of the network, and the CAFM hybrid convolution attention mechanism module is introduced to enhance the detection accuracy of large targets. During the training process, the NWD loss function is used to optimize the detection accuracy of small targets, and the network parameters are dynamically adjusted according to the actual performance of the training data.
[0143] Finally, the system conducts hazard assessment and response. Based on the detection results, the hazard level is assessed in combination with the relative position of the foreign object and the component. Depending on the distance between the foreign object and the transmission line component, the system will automatically identify it as a "major" or "urgent" hidden danger, prompting the inspection personnel to take emergency measures.
[0144] The transmission line foreign object recognition method and system based on the improved YOLOv10 model proposed in this embodiment is specifically aimed at the complex and critical engineering application scenario of transmission line foreign object detection. On the basis of deep integration of cutting-edge deep learning technology and power engineering expertise, methodological innovation and optimization of the existing target detection technology system are carried out.
[0145] At the beginning of the construction of the method, based on the advanced YOLOv10 model framework, the internal structure of the model was deeply optimized and the function was enhanced by introducing the innovative ODConv dynamic convolution module and CAFM hybrid convolution attention mechanism module. In the data acquisition and preprocessing stage, image acquisition equipment, including high-definition cameras and drones, was carefully deployed to obtain high-resolution image data of the transmission line from multiple angles and in all directions. Subsequently, a professional image denoising algorithm was used to refine the original image, effectively improve the image quality, and highlight the characteristic information of foreign objects and transmission line components. On this basis, a rich data set of transmission line foreign objects was constructed, including plastic bags, kites, branches, bird nests, etc., as well as a data set of transmission line components, including insulators, shock-proof hammer clamps, transmission line cables, etc., and a variety of data enhancement techniques, including random cropping, rotation, flipping, scaling, and color jittering, were used to simulate image changes under various actual working conditions, greatly expanding the scale and diversity of the data set, thereby effectively improving the adaptability and generalization ability of the model to complex environments.
[0146] In the model training phase, the key factors of diversity, complexity and interrelationship of foreign objects and components of power transmission lines in the actual operating environment are fully considered, and the ODConv dynamic convolution module is used to replace some traditional Conv convolution modules in the Backbone feature extraction network and Neck feature fusion network of the YOLOv10 model. The ODConv dynamic convolution module can automatically optimize the convolution operation according to the distribution characteristics of the input features by dynamically adjusting the convolution kernel parameters, thereby significantly enhancing the model's ability to extract features of foreign objects and components of different scales and shapes. At the same time, the CAFM hybrid convolution attention mechanism is added to the large target output of the Neck feature fusion module. This mechanism innovatively integrates global branches and local branches, and can collaboratively capture macroscopic semantic information and microscopic detail features in the image. Especially when processing large target features, it can focus on key areas and effectively improve the model's detection accuracy for large targets. In addition, in the model training process, the NWD loss function is innovatively used. This loss function is based on probability distribution theory, models the bounding box as a two-dimensional Gaussian distribution, and uses the normalized distance measurement method to more accurately characterize the similarity between bounding boxes, effectively improving the model's positioning accuracy and detection accuracy for small target foreign objects. By integrating the above series of innovative technologies into the model training process, the method can effectively reduce the detection errors caused by unfavorable factors such as small size, irregular shape, partial occlusion, and complex background interference of foreign objects, thereby constructing an intelligent and efficient detection method that is highly suitable for the task of foreign object identification on power transmission lines.
[0147] In the actual detection stage, the method first inputs the image to be detected into the carefully trained improved YOLOv10 foreign body detection model. With its powerful feature learning and reasoning capabilities, the model quickly and accurately identifies the category and location information of foreign objects in the image. Subsequently, for the image with detected foreign objects, the method automatically inputs it into a model specifically used for transmission line component detection. The model is also based on the improved YOLOv10 architecture and has been trained for targeted component detection. It can locate the transmission line components in the image and determine their categories and position coordinates. Finally, according to the relative position relationship between foreign objects and components, component types, and pre-set hazard assessment rules, the method uses complex spatial analysis algorithms and logical judgment mechanisms to accurately divide the degree of foreign object hazard into different levels, including "other, general, major, and emergency", thereby providing scientific and accurate decision-making basis for power operation and maintenance personnel, ensuring that the most appropriate measures can be taken in time to deal with foreign object hazards and effectively ensure the safe and stable operation of transmission lines.
[0148] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A method for identifying foreign objects in power transmission lines based on an improved YOLOv10 model, characterized in that: The specific steps include: Step S1, collecting real-time video of foreign objects and transmission line components on the transmission line, and extracting key frames from the real-time video as original images; Step S2, constructing a transmission line foreign body dataset and a transmission line component dataset, marking the foreign bodies in the images of the transmission line foreign body dataset and the transmission line components in the images of the transmission line component dataset as targets, and dividing the marked transmission line foreign body dataset and the transmission line component dataset into a training set, a validation set and a test set according to a set ratio; Step S3, using the ODConv dynamic convolution module to replace the Conv convolution module in the YOLOv10 model, adding the CAFM hybrid convolution attention mechanism module to the Neck feature fusion network of the YOLOv10 model, and replacing the loss function in the YOLOv10 model with the NWD loss function to obtain an improved YOLOv10 model; Set training parameters, use the improved YOLOv10 model to train the transmission line foreign object detection model based on the transmission line foreign object dataset, and train the transmission line component detection model based on the transmission line component dataset; the training parameters include the maximum training rounds, image input size, batch size, and initial learning rate; Step S4, input the collected image to be detected into the trained power transmission line foreign body detection model, and output the foreign body detection result, which includes whether the output image contains foreign bodies and the location of the foreign bodies when foreign bodies exist; if no foreign bodies are detected, do not proceed to the subsequent steps; if foreign bodies are detected, proceed to step S5; Step S5, inputting the image containing the foreign object detected as the foreign object detection result into the power transmission line component detection model, detecting the power transmission line component in the image containing the foreign object, and outputting the power transmission line component detection result, the power transmission line component detection result including whether the output image contains the power transmission line component and the position of the power transmission line component when the power transmission line component exists; if the power transmission line component is not detected, the subsequent steps are not entered; if the power transmission line component is detected, the step S6 is entered; Step S6: Determine the degree of danger of the foreign object by calculating the relative positional relationship between the position of the foreign object and the position of the power transmission line component and the working state of the line.
2. According to claim 1, a method for identifying foreign objects in a power transmission line based on an improved YOLOv10 model is characterized in that: In the step S3, the collected image enters the Backbone feature extraction network of the improved YOLOv10 model, including the Conv convolution module, ODConv dynamic convolution module, C2f module, ODConv dynamic convolution module, C2f module, SCDown module, C2f module, SCDown module, C2f module, SPPF module and PSA module connected in sequence; After passing through the second C2f module, the features of the first size are generated and enter the Neck feature fusion module; then the features of the first size are further extracted in the Backbone feature extraction network module, and after passing through the first SCDown module and the third C2f module, the features of the second size are generated and enter the Neck feature fusion module; then the features of the second size are further extracted in the Backbone feature extraction network module, and after passing through the second SCDown module, the fourth C2f module, the SPPF module and the PSA module, the features of the third size are generated for the Neck feature fusion module.
3. According to claim 2, a method for identifying foreign objects in a power transmission line based on an improved YOLOv10 model is characterized in that: In the step S3, the CAFM hybrid convolution attention mechanism module is added between the C2fCIB module and the detection head in the Neck feature fusion network of the improved YOLOv10 model; the Neck feature fusion network includes an upsampling Upsample1 module, a pooling structure Concat1 module, a C2f1 module, an Upsample2 module, a Concat2 module, a C2f2 module, an ODConv dynamic convolution module, a Concat3 module, a C2f3 module, a downsampling SCDown module, a Concat4 module, a C2fCIB module, and a CAFM hybrid convolution attention mechanism module connected in sequence; The first size of features is input into the Concat2 module; the second size of features is input into the Concat1 module, and the third size of features is input into the Upsample1 module and the Concat4 module; The C2f1 module performs feature fusion of upsampling and pooling features of the third size and pooling features of the second size and outputs them to the Concat3 module; The fused output features of the C2f1 module are upsampled by the Upsample2 module and then pooled with the features of the first size and input into the C2f2 module. The C2f2 module performs feature fusion and outputs the first target features, which are then sent to the detection head. The first target feature is dynamically convolved through the ODConv dynamic convolution module and fused with the C2f1 module. The output feature is pooled through the Concat3 module. After pooling, the feature fusion is output through the C2f3 module as the second target feature. The second target feature is sent to the detection head. The second target feature is downsampled through the SCDown module and the third size feature is pooled through the Concat4 module. After feature fusion through the C2fCIB module, the CAFM hybrid convolution attention mechanism module is added before entering the detection head to output the third target feature, which is then sent to the detection head.
4. According to claim 3, a method for identifying foreign objects in a power transmission line based on an improved YOLOv10 model is characterized in that: In step S3, the CAFM hybrid convolutional attention mechanism module includes a global branch and a local branch; the target feature output by the C2fCIB module passes through the CAFM hybrid convolutional attention mechanism module output feature as the third target feature; The global branch uses convolution to adjust to 3-channel dimensions, and uses depth-separable convolution in each group to obtain the query value Q, key value K, and value V; The similarity score is calculated by performing dot product between the query value Q and the key value K. The similarity score is normalized and the attention weight is calculated by the Softmax activation function. The attention weight is weighted and summed with the corresponding value V to calculate the attention map. The attention map outputs the feature value through convolution calculation. The feature value is weightedly fused with the target feature output by the C2fCIB module feature to obtain the global branch target feature. The local branch uses convolution to adjust the channel dimension to the set value and performs channel shuffling. Channel shuffling divides the input target features into multiple groups along the channel dimension, performs channel shuffling in each group, and then concatenates the output tensors of each group along the channel dimension to generate a new output target feature. Convolution is used to extract features to obtain local branch target features. The global branch target feature and the local branch target feature are weightedly fused to obtain the third target feature.
5. According to claim 1, a method for identifying foreign objects in a power transmission line based on an improved YOLOv10 model is characterized in that: In step S3, the loss function in the network training process is replaced with the NWD loss function. The NWD loss function first models the boundary frame as a two-dimensional Gaussian distribution, uses the normalized distance measurement method, and calculates the similarity of the two bounding boxes through the Gaussian distribution corresponding to the bounding box, thereby improving the small target detection accuracy.
6. According to claim 1, a method for identifying foreign objects in a power transmission line based on an improved YOLOv10 model is characterized in that: The step S3 also includes using precision, recall, and average precision as model performance evaluation indicators to evaluate the power transmission line foreign body detection model and the power transmission line component detection model; Precision is used to evaluate the accuracy of model predictions. It indicates the proportion of truly positive samples in the prediction results where the model outputs positive examples. It is expressed as: , in, Represents the number of samples correctly predicted as positive class - true class; Represents the number of samples that are incorrectly predicted as positive - false positive; The recall rate Recall is used to measure the model's ability to identify the target positive samples. It indicates the ratio of the number of positive samples correctly predicted as positive examples to all positive samples, expressed as: , in, Indicates the number of positive samples that are mistakenly predicted as negative - false negatives; The average precision AP is obtained by integrating the precision Precision over the recall Recall interval from 0 to 1, expressed as: ; The mean average precision (mAP) is the average of the average precision AP of multiple categories, expressed as , where C represents the number of categories, Represents the average precision of the i-th category.
7. According to claim 1, a method for identifying foreign objects in a power transmission line based on an improved YOLOv10 model is characterized in that: The step S3 also includes selecting YOLOv10n as a pre-training model during the training process of the improved YOLOv10 model.
8. The method for identifying foreign objects in a power transmission line based on an improved YOLOv10 model according to claim 1, characterized in that: In step S1, the real-time video extracts key frames using a fixed time interval method and an inter-frame difference method. The fixed time interval method and the inter-frame difference method are used to extract key frames respectively, and the key frames extracted by the two methods are used together as the original image, and duplicate data is deleted according to the timestamp of the key frame; the fixed time interval method extracts a frame as a key frame according to a set time interval; the inter-frame difference method calculates the difference between two adjacent frames of images, and subtracts the pixel values of each frame in the real-time video from the previous frame to obtain a differential image. If the pixel value of the differential image exceeds a set threshold, the current frame is extracted as a key frame; The preprocessing of the original image in step S1 includes image denoising and contrast enhancement to output the acquired image; the image denoising uses a Gaussian filtering algorithm to remove noise points in the image, and the contrast enhancement uses a histogram equalization method.
9. The method for identifying foreign objects in a power transmission line based on an improved YOLOv10 model according to claim 1, characterized in that: The power transmission line foreign body dataset and the power transmission line component dataset constructed in step S2 also include using data enhancement technology to expand the power transmission line foreign body dataset and the power transmission line component dataset respectively, so as to improve the generalization ability of the model; wherein the data enhancement technology includes random cropping, rotation, flipping and scaling.
10. A power transmission line foreign object recognition system based on an improved YOLOv10 model, characterized in that: The system applies a method for identifying foreign objects in a power transmission line based on an improved YOLOv10 model as described in any one of claims 1 to 9, and the system comprises: an image acquisition and preprocessing unit, a data set construction and annotation unit, a model improvement and training unit, a power transmission line foreign object detection and identification unit, a power transmission line component detection and positioning unit, and a hazard assessment and response unit; wherein: The image acquisition and preprocessing unit, the data set construction and annotation unit, and the model improvement and training unit are sequentially connected in series, and the power transmission line foreign body detection and identification unit and the power transmission line component detection and positioning unit are both connected to the model improvement and training unit and the hazard assessment and response unit; The image acquisition and preprocessing unit acquires real-time video of foreign objects and transmission line components on the transmission line, and extracts key frames from the real-time video as original images; The data set construction and annotation unit constructs a transmission line foreign body data set and a transmission line component data set, annotates the foreign bodies in the images of the transmission line foreign body data set and the transmission line components in the images of the transmission line component data set as targets, and divides the annotated transmission line foreign body data set and the transmission line component data set into a training set, a validation set and a test set according to a set ratio; The model improvement and training unit adopts the ODConv dynamic convolution module to replace the Conv convolution module in the YOLOv10 model, adds the CAFM hybrid convolution attention mechanism module to the Neck feature fusion network of the YOLOv10 model, and replaces the loss function in the YOLOv10 model with the NWD loss function to obtain an improved YOLOv10 model; Set training parameters, use the improved YOLOv10 model to train the transmission line foreign object detection model based on the transmission line foreign object dataset, and train the transmission line component detection model based on the transmission line component dataset; the training parameters include the maximum training rounds, image input size, batch size, and initial learning rate; The power transmission line foreign body detection and identification unit inputs the collected image to be detected into the trained power transmission line foreign body detection model, and outputs the foreign body detection result, which includes whether the output image contains foreign bodies and the location of the foreign bodies when foreign bodies exist; if no foreign bodies are detected, the subsequent steps are not entered; if foreign bodies are detected, the image containing the detected foreign bodies is sent to the power transmission line component detection and positioning unit; The power transmission line component detection and positioning unit inputs the foreign object detection result as an image containing foreign objects detected into the power transmission line component detection model, detects the power transmission line components in the image containing foreign objects, and outputs the power transmission line component detection result, the power transmission line component detection result including whether the output image contains the power transmission line component and the position of the power transmission line component when the power transmission line component exists; if the power transmission line component is not detected, the subsequent step is not entered; if the power transmission line component is detected, the image containing the power transmission line component is sent to the hazard assessment and response unit; The hazard assessment and response unit determines the degree of hazard of the foreign object by calculating the relative position relationship between the position of the foreign object and the position of the power transmission line component and the working state of the line.
Citation Information
Patent Citations
Point cloud and video combined power transmission line on-line monitoring method and system
CN115620239A
Power transmission channel safety online monitoring method based on artificial intelligence
CN115995058A
Power transmission line distance measurement method, system and device based on unmanned aerial vehicle image and medium
CN116202427A
Foreign matter identification method, device and equipment for power transmission line
CN118608990A
Convolutional neural network and attention mechanism sign language recognition method based on YOLOv8
CN119049121A
Cited By
Production environment mobile phone illegal use detection method and system based on YOLOv12 optimization
CN120689760A
A production environment mobile phone illegal use detection method and system based on YOLOv12 optimization
CN120689760B
Power transmission line foreign matter intrusion detection method and system based on machine vision
CN120953837A