Foreign matter detection method for power transmission line tower
By installing multiple cameras on transmission poles and building a detection model with multi-scale feature fusion, the problem of limited foreign object detection time and low accuracy in the existing technology is solved, real-time and accurate foreign object detection is achieved, and the transmission line is ensured. Tower security.
Patent Information
- Application Number
- CN202410761935.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-13
- Publication Date
- 2024-09-03
AI Technical Summary
Foreign object detection in transmission poles and towers in the prior art has limited detection time, inability to monitor in real time, and limited detection accuracy, resulting in poor accuracy in determining foreign objects.
By installing multiple cameras on transmission poles and towers, the video stream is acquired and a detection model is constructed. The YOLOv8 target detection algorithm is combined with the channel attention module, spatial attention module and Shape IoU loss function to establish a multi-scale and feature fusion detection model. Detect foreign objects in real time and trigger early warning.
It achieves real-time and accurate foreign object detection, reduces equipment investment, improves the identification accuracy of foreign objects of different sizes and categories, and ensures the safe and stable operation of transmission poles and towers.
Smart Images

Figure CN118587631A
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of target detection, and in particular to a foreign body detection method for a transmission line tower. Background Art
[0002] With the development of society in recent years, electricity has become increasingly important in our daily lives. As a key component of the entire power system, the safety of transmission line towers is closely related to the power transmission of high-voltage lines. Towers are structures used to support antennas, wires or other equipment in electric poles, and are an important part of the power transmission and distribution system. In the assembly and construction of high-voltage towers, the safety and reliability of transmission line towers are very important, especially in complex mountainous terrain and changeable weather conditions.
[0003] Since transmission line towers are exposed outdoors, they are easily disturbed by foreign objects, such as birds, bird nests, kite plastic bags, etc. Therefore, foreign object detection is an important part of ensuring the safety and reliability of high-voltage transmission line towers. If foreign objects are not removed in time, it may have a negative impact on the structural stability of the towers and power transmission. In complex mountainous areas and changeable weather conditions, the traditional way of detecting and eliminating foreign objects through inspection technology is extremely inefficient. With the development of technology, the detection model based on the target detection algorithm can effectively help humans to effectively and accurately determine the category of foreign objects in real time and facilitate manual cleaning of foreign objects, reduce the possibility of short circuits in high-voltage towers, and ensure the structural stability of high-voltage towers.
[0004] The Chinese patent with publication number CN 117911898 A discloses a "method for detecting foreign objects on transmission towers that integrates an attention mechanism". This method mainly relies on manually operated drone inspections to shoot video recordings of transmission towers, and uses a foreign object detection model to detect the captured video stream. The advantage of this method is that it optimizes the focus on specific areas and improves the accuracy of foreign object recognition to a certain extent. However, this method still has certain shortcomings. First, it still relies on drones and other equipment for inspections, so it can only collect images of the towers during the inspection process. When foreign objects appear on the towers, it is difficult to detect and eliminate them in time; second, the detection accuracy of traditional target detection algorithms is limited. It is difficult to effectively identify objects of different sizes under long-distance observation, resulting in poor accuracy in judging foreign objects. Summary of the invention
[0005] In view of the deficiencies in the prior art, the present invention provides a method for detecting foreign objects in a transmission line tower, which solves the problems in the prior art of limited detection time, inability to monitor in real time, limited detection accuracy, and poor accuracy in judging foreign objects.
[0006] According to an embodiment of the present invention, a method for detecting foreign objects on a transmission line tower comprises the following steps:
[0007] S1. Install cameras at different positions on multiple transmission line towers, and obtain videos of the transmission line towers through the cameras;
[0008] S2. Acquire a first sample data set through video, where the first image set is a historical image of a transmission line tower;
[0009] S3. Acquire a second sample data set through video, where the second image set is an image of a transmission line tower containing foreign objects;
[0010] S4, constructing a detection model, and training the detection model using the first sample data set and the second sample data set;
[0011] S5. Perform target detection on the video stream of the transmission line tower acquired in real time through the trained detection model to determine whether a foreign object is detected and process it;
[0012] S6. After the foreign matter is processed, the system continues to monitor and continuously inputs the video stream of the transmission line tower for detection to ensure the safe and stable operation of the transmission line tower.
[0013] Compared with the prior art, the present invention has the following beneficial effects:
[0014] 1. The present invention uses multiple cameras on the transmission line tower to shoot real-time images from multiple perspectives, avoiding the investment of additional equipment and infrastructure, thereby saving costs; in addition, the present invention puts the real-time image into the foreign object detection model for foreign object detection, which can timely detect abnormal conditions on the line tower. Once an abnormality is detected, the corresponding early warning and alarm mechanism can be immediately triggered so that relevant staff can take measures in time to achieve end-to-end real-time detection;
[0015] 2. The present invention establishes a detection model by respectively collecting historical images of transmission line towers and images of transmission line towers containing foreign objects, and adopts multi-scale and feature fusion, which can effectively detect foreign objects of different sizes and categories, and has higher detection accuracy than traditional detection algorithms. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 The figure is a flowchart of an embodiment of the present invention.
[0017] Figure 2 Schematic diagram of the principle of the hybrid attention structure in an embodiment of the present invention.
[0018] Figure 3 Flow chart of the channel attention module in an embodiment of the present invention.
[0019] Figure 4 Flow chart of the spatial attention module in an embodiment of the present invention.
[0020] Figure 5 It is a principle flow chart of the decoupling head in an embodiment of the present invention. DETAILED DESCRIPTION
[0021] The technical solution of the present invention is further described below in conjunction with the accompanying drawings and embodiments.
[0022] The present invention proposes a method for detecting foreign matter on a transmission line tower, comprising the following steps:
[0023] S1. Install cameras at different positions on multiple transmission line towers, and obtain videos of the transmission line towers through the cameras.
[0024] S2. Acquire a first sample data set through video, where the first image set is historical images of transmission line towers.
[0025] Furthermore, step S2 also includes the following sub-steps:
[0026] S2.1. Extracting frames of the video to obtain images of transmission line towers, and extracting at least 500 images containing transmission line towers to establish a first sample data set;
[0027] S2.2, denoising each image in the first sample data set;
[0028] S2.3. Use the Label Img labeling tool to label the transmission line towers in each image in the first sample data set after denoising, and save the labeling information; the labeling information includes the coordinates of the four vertices of the labeling box and the category information of the labeling box.
[0029] S3. Acquire a second sample data set through video, where the second image set is images of transmission line towers containing foreign objects.
[0030] Furthermore, step S3 also includes the following sub-steps:
[0031] S3.1. Acquire images of transmission line towers containing foreign objects by extracting frames from the video, and establish a second sample data set;
[0032] S3.2, performing a denoising operation on each image in the second sample data set;
[0033] S3.3, use the Label Img annotation tool to annotate the foreign objects in each image of the second sample data set after denoising, and save the annotation information; the annotation information includes the coordinates of the four vertices of the annotation box and the category information of the annotation box. Foreign objects include birds, bird nests, balloons, kites, and other garbage such as plastic bags.
[0034] S4. Construct a detection model, and train the detection model using the first sample data set and the second sample data set.
[0035] Specifically, in step S4, the detection model is constructed using the following method:
[0036] Based on the YOLOv8 target detection algorithm, the channel attention module and the spatial attention module are introduced to form a hybrid attention structure, which is added to the C2f structure of the backbone neural network to improve the generalization and expressiveness of the network; at the same time, the Shape-IoU loss function is introduced to calculate the IoU loss. Based on the IoU loss of the auxiliary border, the bounding box itself and the scale are paid attention to, which improves the accuracy of small target detection. Finally, the predicted box for foreign objects is output.
[0037] Among them, channel attention performs attention weighting on the channel dimension of the input graph. The network can automatically learn the importance between different channels and pay more attention to channels with important information, improving the network's expression ability and performance. The construction process of the channel attention module is as follows:
[0038] S4.11. Perform global average pooling on the input feature map (h, w, c). The pooling size is (h, w), and the output feature map is (1×1×c).
[0039] S4.12. Connect the average and maximum values, and perform mapping and Sigmoid activation operations through a fully connected layer to obtain a channel attention map;
[0040] S4.13. Consider the channel attention feature map and the input feature map to obtain the weighted feature map.
[0041] Among them, the spatial attention module enables the network to adaptively learn the importance of different spatial positions in the feature map, and pay more attention to the areas that contribute to the characters, helping the network to better capture the details of the space and improve the network's perception and performance. The construction process of the spatial attention module is as follows:
[0042] S4.21. Perform a series of convolution operations on the input feature map X to obtain a set of feature vectors V = {v1, v2, ..., v n}, where v i is the eigenvector of the ith spatial position, and n represents the number of eigenvectors;
[0043] S4.22, use cosine similarity to calculate the similarity between feature vectors; let the similarity between feature vectors vi and vj be S ij , then the elements of the similarity matrix S are:
[0044] S ij =sim(ν i , ν j )
[0045]
[0046] Where sim(·) represents similarity;
[0047] S4.23. Normalize the similarity matrix S to obtain the spatial attention map A:
[0048]
[0049] Among them, A ij represents the value of position (i, j) in the spatial attention map, is the sum of the i-th row of the similarity matrix;
[0050] S4.24. Multiply the spatial attention map A with the input feature map X to obtain the weighted feature map X':
[0051] X' ij =X ij ·A ij .
[0052] In addition, the existing bounding box regression usually only considers the collective relationship between the real box and the predicted box, and calculates the loss by the relative position and relative shape between the bounding boxes, ignoring the inherent properties of the bounding box itself, such as shape and size. The Shape IoU loss function calculates the loss by aggregating the shape and scale of the bounding box itself, allowing the model to predict the bounding box more focused on the foreign object target. The detection model of the present invention uses the Shape IoU loss function to calculate the positioning loss, and the calculation method is as follows:
[0053]
[0054] Where IoU is the intersection of the predicted box B and the real box B gt The absolute value of the ratio of intersection to union;
[0055]
[0056] Where ww represents the weight coefficient in the horizontal direction, and hh represents the weight coefficient in the vertical direction. Both values are consistent with the real frame B gt The scale is the scaling factor, which is related to the size of the object in the dataset;
[0057] The corresponding border regression loss is as follows:
[0058] L shape-IoU =1-IoU+distance shape+0.5×Ω shape
[0059] The distance between the center point of the real box and the anchor box in the x and y directions is calculated and weighted according to the width and height of its own box to obtain the distance shape ,Ω shape , the calculation steps are as follows:
[0060]
[0061] The foreign objects on the transmission line towers may be small targets such as plastic bags or bird nests. The point distances for small target detection are as follows:
[0062]
[0063] Where D represents the Euclidean distance between the center point of the ground truth box Bgt and the anchor box, S represents the average size of the target in the dataset, M represents the number of images, Ni represents the number of annotated bounding boxes in the i-th image, and wij and hij represent the width and height of the j-th bounding box in the i-th image.
[0064] The NWD is as follows:
[0065]
[0066] Among them, weight w = 2, C is a constant related to the data set; DotD is the dot distance, and NWD is the loss function Normalized Wasserstein Distance, both of which are used to overcome the sensitivity to IoU values. Using the Shape IoU loss function combined with the YOLOv8 target detection algorithm makes the detection model pay more attention to bounding boxes with high shape similarity, improving the accuracy and robustness of detection.
[0067] In addition, in the decoupled head (Detect) of the detection model, each scale has an independent detector, and each detector consists of a set of convolutional and fully connected layers to predict the bounding box at that scale.
[0068] Among them, CBL: It consists of Conv (convolution) + BN + Leaky relu.
[0069] DFL: It is used to fuse feature maps of different scales to improve the accuracy of target detection and the ability to detect small targets. In the YOLOv8 target detection algorithm, DFL achieves feature fusion by connecting or stacking feature maps of different levels, so that the network can obtain rich feature information at different scales and better adapt to targets of different sizes.
[0070] VFL: used to verify detected targets to reduce false positives. In the YOLOv8 target detection algorithm, VFL extracts more detailed feature information for each prediction box and uses this feature information to verify the target. This allows more accurate feature descriptions to be used to determine whether the target actually exists, thereby reducing false positives.
[0071] S5. Perform target detection on the video stream of the transmission line tower acquired in real time through the trained detection model to determine whether foreign objects are detected and process them.
[0072] Furthermore, step S5 also includes the following sub-steps:
[0073] S5.1. Determine whether a prediction box appears on the image processed by the detection model. If a prediction box appears on the image, return the coordinates of the upper left corner of the prediction box and the length and width of the prediction box as the location information of the foreign object. At the same time, preliminarily determine the type of the foreign object through the detection model.
[0074] S5.2. If no foreign matter is present, proceed with the subsequent actions as normal.
[0075] S6. After the foreign matter is processed, the system continues to monitor and continuously inputs the video stream of the transmission line tower for detection to ensure the safe and stable operation of the transmission line tower.
[0076] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the purpose and scope of the technical solution of the present invention, which should be included in the scope of the claims of the present invention.
Claims
1. A method for detecting foreign matter on a transmission line tower, characterized in that: The steps include: S1. Install cameras at different positions on multiple transmission line towers, and obtain videos of the transmission line towers through the cameras; S2. Acquire a first sample data set through video, where the first image set is a historical image of a transmission line tower; S3. Acquire a second sample data set through video, where the second image set is an image of a transmission line tower containing foreign objects; S4, constructing a detection model, and training the detection model using the first sample data set and the second sample data set; S5. Perform target detection on the video stream of the transmission line tower acquired in real time through the trained detection model to determine whether a foreign object is detected and process it; S6. After the foreign matter is processed, the system continues to monitor and continuously inputs the video stream of the transmission line tower for detection to ensure the safe and stable operation of the transmission line tower.
2. A method for detecting foreign matter on a transmission line tower as claimed in claim 1, characterized in that: The step S2 further comprises the following sub-steps: S2.
1. Extracting frames of the video to obtain images of transmission line towers, and extracting at least 500 images containing transmission line towers to establish a first sample data set; S2.2, denoising each image in the first sample data set; S2.3, labeling the transmission line tower in each image in the first sample data set after denoising, and saving the labeling information; The annotation information includes coordinates of four vertices of the annotation box and category information of the annotation box.
3. A method for detecting foreign matter on a transmission line tower as claimed in claim 1, characterized in that: The step S3 also includes the following sub-steps: S3.
1. Acquire images of transmission line towers containing foreign objects by extracting frames from the video, and establish a second sample data set; S3.2, performing a denoising operation on each image in the second sample data set; S3.3, marking the foreign matter in each image in the second sample data set after denoising, and saving the marking information; The annotation information includes coordinates of four vertices of the annotation box and category information of the annotation box.
4. A method for detecting foreign matter on a transmission line tower as claimed in claim 1, characterized in that: In step S4, the detection model is constructed by the following method: Based on the YOLOv8 target detection algorithm, the channel attention module and the spatial attention module are introduced to form a hybrid attention structure, which is added to the C2f structure of the backbone neural network. At the same time, the Shape-IoU loss function is introduced to calculate the IoU loss. Based on the IoU loss of the auxiliary border, the bounding box itself and the scale are paid attention to, and finally the prediction box for the foreign object is output.
5. A method for detecting foreign matter on a transmission line tower as claimed in claim 4, characterized in that: In step S4, the channel attention module construction process is as follows: S4.
11. Perform global average pooling on the input feature map (h, w, c). The pooling size is (h, w), and the output feature map is (1×1×c). S4.
12. Connect the average and maximum values, and perform mapping and Sigmoid activation operations through a fully connected layer to obtain a channel attention map; S4.
13. Consider the channel attention feature map and the input feature map to obtain the weighted feature map.
6. A method for detecting foreign matter on a transmission line tower as claimed in claim 4, characterized in that: In step S4, the spatial attention module construction process is as follows: S4.
21. Perform a series of convolution operations on the input feature map X to obtain a set of feature vectors V = {v1, v2, ..., v n }, where v i is the eigenvector of the ith spatial position, and n represents the number of eigenvectors; S4.22, use cosine similarity to calculate the similarity between feature vectors; let the similarity between feature vectors vi and vj be S ij , then the elements of the similarity matrix S are: S ij =sim(ν i ,n j ) Where sim(·) represents similarity; S4.
23. Normalize the similarity matrix S to obtain the spatial attention map A: Among them, A ij represents the value of position (i, j) in the spatial attention map, is the sum of the i-th row of the similarity matrix; S4.
24. Multiply the spatial attention map A with the input feature map X to obtain the weighted feature map X': X' ij =X ij ·A ij 。 7. A method for detecting foreign matter on a transmission line tower as claimed in claim 4, characterized in that: In step S4, the calculation method of Shape-IoU loss function is as follows: Where IoU is the intersection of the predicted box B and the real box B gt The absolute value of the ratio of intersection to union; Where ww represents the weight coefficient in the horizontal direction, and hh represents the weight coefficient in the vertical direction. Both values are consistent with the real frame B gt The scale is the scaling factor, which is related to the size of the object in the dataset; The corresponding border regression loss is as follows: L shape-IoU =1-IoU+distance shape +0.5×Ω shape The distance between the center point of the real box and the anchor box in the x and y directions is calculated and weighted according to the width and height of its own box to obtain the distance shape ,Ω shape , the calculation steps are as follows: The foreign objects on the transmission line towers may be small targets such as plastic bags or bird nests. The point distances for small target detection are as follows: Where D represents the Euclidean distance between the center point of the ground truth box Bgt and the anchor box, S represents the average size of the target in the dataset, M represents the number of images, Ni represents the number of annotated bounding boxes in the i-th image, and wij and hij represent the width and height of the j-th bounding box in the i-th image. The NWD is as follows: Among them, the weight w=2, C is a constant related to the data set; DotD is the point distance Dot Distance, and NWD is the loss function Normalized Wasserstein Distance, both of which are used to overcome the sensitivity to IoU values.
8. A method for detecting foreign matter on a transmission line tower as claimed in claim 4, characterized in that: The step S5 further comprises the following sub-steps: S5.
1. Determine whether a prediction box appears on the image processed by the detection model. If a prediction box appears on the image, return the coordinates of the upper left corner of the prediction box and the length and width of the prediction box as the location information of the foreign object. At the same time, preliminarily determine the type of the foreign object through the detection model. S5.
2. If no foreign matter is present, proceed with the subsequent actions as normal.
9. A method for detecting foreign matter on a transmission line tower as claimed in claim 4, characterized in that: In the decoupled head of the detection model, each scale has an independent detector, and each detector consists of a set of convolutional and fully connected layers to predict the bounding box at that scale.
Citation Information
Patent Citations
Power transmission tower foreign matter detection method fusing attention mechanism
CN117911898A
Power transmission line foreign matter detection method and device, storage medium and terminal equipment
CN113670929A
Method for detecting foreign matters on tower pole of transformer substation
CN117495825A
