A method and system for detecting foreign objects on a power transmission line and a storage medium
Patent Information
- Application Number
- CN202211648342.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-21
- Publication Date
- 2026-09-25
- Estimated Expiration
- 2042-12-21
AI Technical Summary
[0006]为解决当前输电线路异物检测方式检测精度不足、效率较低的问题,本发明提出一种输电线路异物检测方法、系统及存储介质,对原Yolov5算法进行了优化,在保证输电线路异物检测精度的同时,拥有较小的模型参数量,提高了检测速度
本发明提出一种输电线路异物检测方法、系统及存储介质,首先采集输电线路异物图像并对图像中的异物进行标注,得到图像数据集,然后基于Yolov5算法构建输电线路异物检测模型,输电线路异物检测模型包含依次连接的Backbone网络、Neck网络和Head网络,利用Backbone网络提取图像特征,利用Neck网络对提取到的图像特征进行特征聚合,利用Head网络进行下采样;基于图像数据集进行训练,得到训练好的输电线路异物检测模型;最后将待检测的输电线路图像输入训练好的输电线路异物检测模型,利用非极大值抑制去除冗余的检测框,得到最终的输电线路异物检测框并框选出输电线路图像中的异物,在保证输电线路异物检测精度的同时,拥有较小的模型参数量,提高了检测速度。
Smart Images

Figure CN116434051B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the technical field of image recognition for power transmission lines, and more specifically, to a method, system, and storage medium for detecting foreign objects in power transmission lines. Background Technology
[0002] High-voltage transmission lines form the backbone of the high-voltage power grid. As an important component of the power system, their condition directly affects the safe and stable operation of the entire power system. Large-scale failures in transmission lines will seriously affect people's normal lives.
[0003] Among the types of transmission line faults, besides common issues such as lightning tripping, line icing, line flashover due to pollution, and external damage, the problem of foreign objects on transmission lines deserves special attention. Transmission line conductors are mostly bare conductors, therefore requiring that no conductive materials exist around them. However, because transmission lines are exposed to the natural environment, foreign objects such as kites, balloons, and household plastic bags often adhere to them. These adhered objects can cause grounding, short circuits, and other issues, leading to power outages and incalculable losses. If the adhered objects are flammable, they can also cause fires, endangering the lives of people near the transmission lines.
[0004] Power transmission lines are typically located in sparsely populated and inaccessible areas. Traditional manual inspections are not only time-consuming and labor-intensive, but also fail to promptly and comprehensively inspect small foreign objects that are difficult to see with the human eye. In recent years, with the rapid development of drone inspections, drone inspections have saved manpower and resources. However, although drone inspections provide a massive amount of inspection images, these images still require manual analysis and interpretation, and both inspection efficiency and accuracy need to be improved.
[0005] Existing technology discloses a feature fusion-based method for target detection and recognition of power transmission lines. This method optimizes the YOLOv5 network structure used for feature extraction according to usage requirements, employing a dense residual network to improve feature utilization and a path aggregation network to reduce feature transfer loss. The optimized YOLOv5 network is pre-trained using the ImageNet dataset. The training and validation sets of the power transmission line image dataset are then input into the pre-trained network for further training and validation. The trained YOLOv5 network model performs target detection and recognition on test set images, obtaining classification information, regression location, and accuracy, and finally selecting the detection boxes. However, in this approach, the trained network model can only detect circuit component faults and cannot detect foreign objects on the power transmission line; furthermore, the detection accuracy and speed need improvement. Summary of the Invention
[0006] To address the issues of insufficient detection accuracy and low efficiency in current foreign object detection methods for power transmission lines, this invention proposes a foreign object detection method, system, and storage medium for power transmission lines. The original Yolov5 algorithm is optimized, which maintains the accuracy of foreign object detection while having a smaller number of model parameters and improving the detection speed.
[0007] To achieve the above-mentioned technical effects, the technical solution of the present invention is as follows: A method for detecting foreign objects in power transmission lines, comprising: S1. Collect images of transmission lines, label the location and type of foreign objects in the images, obtain prior label boxes of different sizes, construct an image dataset from the images with prior label boxes, and divide the image dataset into training set, validation set and test set; S2. A foreign object detection model for transmission lines is constructed based on the Yolov5 algorithm. The foreign object detection model for transmission lines includes: a Backbone network, a Neck network, and a Head network connected in sequence. The Backbone network consists of CSPDarkNet and SPP structures. The Neck network contains multiple multi-scale channel attention modules and attention feature fusion modules. The Head network contains three branches, each of which contains a convolutional layer and a Prediction module. S3. Train the foreign object detection model for transmission lines using the training set, then evaluate the foreign object detection model during the training process using the validation set, and test the effectiveness of the foreign object detection model using the test set to obtain the trained foreign object detection model for transmission lines. S4. Input the image of the transmission line to be detected into the trained transmission line foreign object detection model to obtain the detection box coordinates, confidence level and probability of detected foreign object category, and generate the corresponding detection box; S5. Use nonmaximum suppression to remove redundant detection boxes, obtain the final foreign object detection box for the transmission line, and select the foreign objects in the transmission line image.
[0008] In this technical solution, the constructed foreign object detection model for transmission lines optimizes the Yolov5 algorithm, which ensures the accuracy of foreign object detection while having a smaller number of model parameters and improving the detection speed.
[0009] Preferably, in step S1, the K-means algorithm is used to perform cluster analysis on the prior bounding boxes, and the specific steps include: a. Randomly select k points from the marked prior bounding boxes as the initial cluster centers. :
[0010] b. Label the prior annotation box samples as Calculate the distance from each prior labeled box sample in the dataset image to each initial cluster center, and assign each sample to the class of the cluster center closest to the cluster center; c. For each class, update the cluster centers for that class. The calculation formula is as follows:
[0011] Where I represents the number of categories; d. Repeat steps b to c until the positions of the cluster centers no longer change.
[0012] Preferably, in step S2, the Backbone network is used to extract image features. After the dataset image is input into the Backbone network, each convolutional layer in CSPDarkNet extracts features from the dataset image to obtain feature maps. The SPP structure includes three pooling kernels of different sizes. The three pooling kernels of different sizes in the SPP structure are used to perform pooling operations on the feature maps output by the previous network layer to obtain three sets of pooled image features, and connection operations are performed in the channel dimension.
[0013] Here, average pooling is used instead of max pooling in the original Yolov5 algorithm, focusing more on each feature information; the added SPP structure improves the detection performance, effectively increases the receptive field of the feature map, and helps to solve the alignment problem between the anchor and the feature map.
[0014] Preferably, the image features extracted by the Backbone network are aggregated using the Neck network; Each multi-scale channel attention module in the Neck network includes two branches, each branch being sequentially connected to a first 1x1 convolutional layer, a first batch normalization (BN) layer, a first hardswish activation function layer, a second 1x1 convolutional layer, and a second BN layer. The first 1x1 convolutional layer is also connected to an average pooling layer and a second hardswish activation function layer. The two branches are connected through a sigmoid activation function layer. Image features As input to the multi-scale channel attention module, where C represents the number of channels, and H and W represent the height and width of the image features, the pooling size is changed through an average pooling layer to obtain channel attention at both global and local scales. The global channel... Represented as:
[0015]
[0016] Where i and j represent the coordinates of the feature map, This indicates global average pooling, which compresses the input feature map; The first 1x1 convolutional layer and the second 1x1 convolutional layer are used as local channel context aggregators to apply channel interactions to each spatial location, resulting in a feature map that is consistent with the input feature map. X Local channel contexts with the same shape L (X), the formula for calculating the local channel context is:
[0017] The convolution kernel parameters of Conv1 and Conv2 are respectively , r is the channel reduction ratio, BN represents Batch Normalization, and Hs represents the Hardswish activation function. Here, the rich details in the low-level features are preserved and highlighted, and the small target information that is more widely distributed in the local area is more effectively focused on.
[0018] Combination and The output of the multi-scale channel attention module is obtained. The calculation formula is as follows:
[0019] in, This represents the weights output by the multi-scale channel attention module. This represents the Sigmoid activation function.
[0020] Here, the multi-scale channel attention module mechanism is used to effectively improve the feature inconsistency between different scales of foreign objects.
[0021] Preferably, based on the introduction of a multi-scale channel attention module, an attention feature fusion module is used to replace the convolutional layer in the original Yolov5s network structure that is connected to the output of the multi-scale channel attention module; let the output of the attention feature fusion module be... Z , Z The calculation formula is as follows:
[0022] in, Represents the low-level semantic feature map. Represents a high-level semantic feature map; Here, the attention feature fusion module is used to better capture contextual information from different convolutional layers, enabling the power transmission line detection model to achieve better detection performance.
[0023] Preferably, in step S3, the following is adopted:CIOU _ LOSS As the loss function for the detection box, CIOU_LOSS Represented as:
[0024]
[0025] in, The Euclidean distance between the detection box and the predicted center point coordinates. The diagonal distance of the smallest box encompassing the detection bounding box and the prior bounding box is given by v, which measures the consistency of the aspect ratio. IoU = A∩B / A∪B represents the overlapping area of objects A and B divided by the sum of their areas. w and h represent the length and width of the detection bounding box, respectively. and These represent the length and width of the prior bounding box, respectively. This solves the problem in the original Yolov5 algorithm where the distance between the prior bounding box and the detection box is not predictable when they do not intersect.
[0026] Preferably, in step S3, a loss function is constructed to perform regression classification on the prediction results, and its expression is:
[0027] in, Represents the loss function; For the real goal, Let x represent the probability of the predicted target and y represent the probability of the actual target, representing other targets that are closest to the true target. J is the set of negative classes. The threshold value is set. This reduces the false detection rate of foreign objects with similar color and texture information in the transmission line model.
[0028] Preferably, in step S5, redundant detection boxes are removed using non-maximum suppression, and the specific steps are as follows: S51. Sort all detection boxes by confidence level and select the detection box with the highest confidence level and its corresponding detection box; S52. Set an overlap area threshold, traverse the remaining prior label boxes. If the overlap area between the prior label box and the current box with the highest confidence is greater than the threshold, delete the prior label box; otherwise, keep the prior label box until all prior label boxes have been traversed. S53. Select the one with the highest confidence from the unselected prior label boxes, and return to step S52 until only the prior label box with the lowest confidence remains unselected.
[0029] This application also proposes a computer storage medium for computer-readable storage, wherein the computer storage medium stores a program for detecting foreign objects in transmission lines, and when the program for detecting foreign objects in transmission lines is executed by a processor, it is used to implement the steps of the method for detecting foreign objects in transmission lines.
[0030] This application also proposes a system for detecting foreign objects in transmission lines, the system comprising: The image processing module is used to acquire a certain number of transmission line images, mark foreign objects in the transmission line images with prior bounding boxes of different sizes, construct an image dataset with images with prior bounding boxes, and divide the image dataset into training set, validation set and test set. The foreign object detection model module for power transmission lines is used to construct foreign object detection models for power transmission lines. The training module trains the foreign object detection model for transmission lines using the training set, evaluates the model during the training process using the validation set, and tests the effectiveness of the model using the test set, thus obtaining a well-trained foreign object detection model for transmission lines. The foreign object detection module is used to input the image of the transmission line to be detected into the trained transmission line foreign object detection model to generate a detection box for foreign objects in the transmission line. The redundancy suppression module is used to remove redundant detection frames.
[0031] Compared with the prior art, the beneficial effects of the technical solution of the present invention are: This invention proposes a method, system, and storage medium for detecting foreign objects in power transmission lines. First, images of foreign objects in the power transmission lines are acquired and labeled to obtain an image dataset. Then, a foreign object detection model is constructed based on the Yolov5 algorithm. The model comprises a Backbone network, a Neck network, and a Head network connected sequentially. The Backbone network extracts image features, the Neck network aggregates the extracted features, and the Head network performs downsampling. The model is trained based on the image dataset to obtain a trained foreign object detection model. Finally, the image of the power transmission line to be detected is input into the trained model. Non-maximum suppression is used to remove redundant detection boxes, resulting in the final foreign object detection bounding box, which selects the foreign objects in the power transmission line image. This method maintains high accuracy in foreign object detection while having a small number of model parameters, thus improving detection speed. Attached Figure Description
[0032] Figure 1 A flowchart illustrating the foreign object detection method for power transmission lines proposed in Embodiment 1 of the present invention; Figure 2This is a schematic diagram of the structure of the foreign object detection model for transmission lines proposed in Embodiment 1 of the present invention; Figure 3 A schematic diagram showing the computer device proposed in Embodiment 2 of the present invention; Figure 4 This is a schematic diagram of the structure of the foreign object detection system for power transmission lines proposed in Embodiment 3 of the present invention. Detailed Implementation
[0033] The accompanying drawings are for illustrative purposes only and should not be construed as limiting the scope of this patent. To better illustrate this embodiment, some parts of the accompanying drawings may be omitted, enlarged, or reduced, and do not represent the actual dimensions; It is understandable to those skilled in the art that some well-known details may be omitted from the accompanying drawings.
[0034] The technical solution of the present invention will be further described below with reference to the accompanying drawings and embodiments.
[0035] The positional relationships depicted in the accompanying drawings are for illustrative purposes only and should not be construed as limiting this patent. Example 1 like Figure 1 As shown in the figure, this embodiment proposes a method for detecting foreign objects in transmission lines, the method including the following steps: S1. Collect images of transmission lines, label the location and type of foreign objects in the images, obtain prior label boxes of different sizes, construct an image dataset from the images with prior label boxes, and divide the image dataset into training set, validation set and test set; In this embodiment, the K-means algorithm is used to perform cluster analysis on the prior bounding boxes. The specific steps include: a. Randomly select k points from the marked prior bounding boxes as the initial cluster centers. :
[0036] b. Label the prior annotation box samples as Calculate the distance from each prior labeled box sample in the dataset image to each initial cluster center, and assign each sample to the class of the cluster center closest to the cluster center; c. For each class, update the cluster centers for that class. The calculation formula is as follows:
[0037] Where I represents the number of categories; d. Repeat steps b to c until the positions of the cluster centers no longer change.
[0038] S2. Construct a foreign object detection model for transmission lines based on the Yolov5 algorithm. (See [link]) Figure 2 The foreign object detection model for power transmission lines includes: a Backbone network, a Neck network, and a Head network connected in sequence; the Backbone network consists of CSPDarkNet and SPP structures, the Neck network contains multiple multi-scale channel attention modules and attention feature fusion modules, and the Head network contains three branches, each containing a convolutional layer and a Prediction module. The Backbone network is used to extract image features. After the dataset images are input into the Backbone network, each convolutional layer in CSPDarkNet extracts features from the dataset images to obtain feature maps. The SPP structure includes three pooling kernels of different sizes. The feature maps output by the previous network layer are pooled using the three pooling kernels of different sizes in the SPP structure to obtain three sets of pooled image features, and connection operations are performed in the channel dimension.
[0039] Feature aggregation is performed on the image features extracted by the Backbone network using the Neck network; Each multi-scale channel attention module in the Neck network includes two branches, each branch being sequentially connected to a first 1x1 convolutional layer, a first batch normalization (BN) layer, a first hardswish activation function layer, a second 1x1 convolutional layer, and a second BN layer. The first 1x1 convolutional layer is also connected to an average pooling layer and a second hardswish activation function layer. The two branches are connected through a sigmoid activation function layer. Image features As input to the multi-scale channel attention module, where C represents the number of channels, and H and W represent the height and width of the image features, the pooling size is changed through an average pooling layer to obtain channel attention at both global and local scales. The global channel... Represented as:
[0040]
[0041] Where i and j represent the coordinates of the feature map, This indicates global average pooling, which compresses the input feature map; The first 1x1 convolutional layer and the second 1x1 convolutional layer are used as local channel context aggregators to apply channel interactions to each spatial location, resulting in a feature map that is consistent with the input feature map. X Local channel contexts with the same shape L (X), the formula for calculating the local channel context is:
[0042] The convolution kernel parameters of Conv1 and Conv2 are respectively , r is the channel reduction ratio, BN represents Batch Normalization, and Hs represents the Hardswish activation function; Combination and The output of the multi-scale channel attention module is obtained. The calculation formula is as follows:
[0043] in, This represents the weights output by the multi-scale channel attention module. This represents the Sigmoid activation function.
[0044] Based on the introduction of a multi-scale channel attention module, an attention feature fusion module is used to replace the convolutional layer in the original Yolov5s network structure that is connected to the output of the multi-scale channel attention module; let the output of the attention feature fusion module be... Z , Z The calculation formula is as follows:
[0045] in, Represents the low-level semantic feature map. Represents a high-level semantic feature map; S3. Train the foreign object detection model for transmission lines using the training set, then evaluate the foreign object detection model during the training process using the validation set, and test the effectiveness of the foreign object detection model using the test set to obtain the trained foreign object detection model for transmission lines. In this embodiment, the training process employs... CIOU _ LOSS As the loss function for the detection box, CIOU_LOSS Represented as:
[0046]
[0047] in, The Euclidean distance between the detection box and the predicted center point coordinates. The diagonal distance of the smallest box encompassing the detection bounding box and the prior bounding box is given by v, which measures the consistency of the aspect ratio. IoU = A∩B / A∪B represents the overlapping area of objects A and B divided by the sum of their areas. w and h represent the length and width of the detection bounding box, respectively. and These represent the length and width of the prior annotation box, respectively; In this embodiment, a loss function is constructed to perform regression classification on the prediction results, and its expression is:
[0048] in, Represents the loss function; For the real goal, Let x represent the probability of the predicted target and y represent the probability of the actual target, representing other targets that are closest to the true target. J is the set of negative classes. The threshold value is set.
[0049] S4. Input the image of the transmission line to be detected into the trained transmission line foreign object detection model to obtain the detection box coordinates, confidence level and probability of detected foreign object category, and generate the corresponding detection box.
[0050] S5. Redundant detection boxes are removed using non-maximum suppression to obtain the final foreign object detection box for transmission lines and to select foreign objects in the transmission line image. This includes the following steps: S51. Sort all detection boxes by confidence level and select the detection box with the highest confidence level and its corresponding detection box; S52. Set an overlap area threshold, traverse the remaining prior label boxes. If the overlap area between the prior label box and the current box with the highest confidence is greater than the threshold, delete the prior label box; otherwise, keep the prior label box until all prior label boxes have been traversed. S53. Select the one with the highest confidence from the unselected prior label boxes, and return to step S52 until only the prior label box with the lowest confidence remains unselected.
[0051] Example 2 See Figure 3 This application also proposes a computer device, including a processor, a memory, and a computer program stored in the memory. The processor is labeled 1, the memory is labeled 2, and the processor 1 is connected to the memory 2. The processor 1 executes the computer program stored in the memory 2 to implement the foreign object detection method for transmission lines described in Embodiment 1.
[0052] The memory 2 can be a disk, flash memory, or any other non-volatile storage medium, see [link to documentation]. Figure 3 The processor 1 is connected to the memory 2 and can be implemented as one or more integrated circuits, specifically a microprocessor or microcontroller. When executing a computer program stored in the memory, it implements a foreign object detection method for power transmission lines for a global model.
[0053] This application also proposes a computer-readable storage medium storing computer program instructions that, when executed by a processor, implement the steps of the method described.
[0054] This computer-readable storage medium, by executing the computer program instructions described above, stores the collected data on the user terminal itself, thus preventing data leakage.
[0055] Example 3 In this embodiment, as Figure 4 As shown, a system for detecting foreign objects in power transmission lines is proposed, the system comprising: Image processing module 101 is used to acquire a certain number of transmission line images, mark foreign objects in the transmission line images with prior bounding boxes of different sizes, construct an image dataset with prior bounding boxes, and divide the image dataset into training set, validation set and test set. Transmission line foreign object detection model module 102 is used to construct a transmission line foreign object detection model; Training module 103 trains the transmission line foreign object detection model using the training set, evaluates the transmission line foreign object detection model during the training process using the validation set, and tests the effectiveness of the transmission line foreign object detection model using the test set, thus obtaining the trained transmission line foreign object detection model. The foreign object detection module 104 is used to input the image of the transmission line to be detected into the trained transmission line foreign object detection model to generate a detection box for foreign objects in the transmission line. Redundancy suppression module 105 is used to remove redundant detection frames.
[0056] Overall, the process begins with the image processing module 101 acquiring images of the transmission line. A clustering analysis algorithm is then used to annotate foreign objects in the images with prior bounding boxes of different sizes. These images, now containing the prior bounding boxes, form an image dataset. Next, the transmission line foreign object detection model module 102 constructs a model based on the Yolov5 algorithm. This model comprises a Backbone network, a Neck network, and a Head network connected in sequence. The training module 103 then trains the model using the image dataset, resulting in a trained model. The foreign object detection module 104 inputs the image of the transmission line to be detected into the trained model, generating detection boxes for the foreign objects. Finally, the redundancy suppression module 105 removes redundant detection boxes, identifying the foreign objects in the transmission line images.
[0057] Obviously, the above embodiments of the present invention are merely examples for clearly illustrating the present invention, and are not intended to limit the implementation of the present invention. Those skilled in the art can make other variations or modifications based on the above description. It is neither necessary nor possible to exhaustively describe all embodiments here. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the claims of the present invention.
Claims
1. A method for detecting foreign objects in power transmission lines, characterized in that, include: S1. Collect images of transmission lines, label the location and type of foreign objects in the images, obtain prior label boxes of different sizes, construct an image dataset from the images with prior label boxes, and divide the image dataset into training set, validation set and test set; S2. A foreign object detection model for transmission lines is constructed based on the Yolov5 algorithm. The foreign object detection model for transmission lines includes: a Backbone network, a Neck network, and a Head network connected in sequence. The Backbone network consists of CSPDarkNet and SPP structures. The Neck network contains multiple multi-scale channel attention modules and attention feature fusion modules. The Head network contains three branches, each of which contains a convolutional layer and a Prediction module. S3. Train the foreign object detection model for transmission lines using the training set, then evaluate the foreign object detection model during the training process using the validation set, and test the effectiveness of the foreign object detection model using the test set to obtain the trained foreign object detection model for transmission lines. S4. Input the image of the transmission line to be detected into the trained transmission line foreign object detection model to obtain the detection box coordinates, confidence level and probability of detected foreign object category, and generate the corresponding detection box; S5. Use non-maximum suppression to remove redundant detection boxes, obtain the final foreign object detection box for transmission lines, and select foreign objects in the transmission line image. Feature aggregation is performed on the image features extracted by the Backbone network using the Neck network; Each multi-scale channel attention module in the Neck network includes two branches, each branch being sequentially connected to a first 1x1 convolutional layer, a first batch normalization (BN) layer, a first hardswish activation function layer, a second 1x1 convolutional layer, and a second BN layer. The first 1x1 convolutional layer is also connected to an average pooling layer and a second hardswish activation function layer. The two branches are connected through a sigmoid activation function layer. Image features As input to the multi-scale channel attention module, where C represents the number of channels, and H and W represent the height and width of the image features, the pooling size is changed through an average pooling layer to obtain channel attention at both global and local scales. The global channel... Represented as: Where i and j represent the coordinates of the feature map, This indicates global average pooling, which compresses the input feature map; The first 1x1 convolutional layer and the second 1x1 convolutional layer are used as local channel context aggregators to apply channel interactions to each spatial location, resulting in a feature map that is consistent with the input feature map. X Local channel contexts with the same shape L (X), the formula for calculating the local channel context is: in, , The convolution kernel parameters are respectively , r is the channel reduction ratio, BN represents Batch Normalization, and Hs represents the Hardswish activation function; Combination and The output of the multi-scale channel attention module is obtained. The calculation formula is as follows: in, This represents the weights output by the multi-scale channel attention module. This represents the Sigmoid activation function; Based on the introduction of a multi-scale channel attention module, an attention feature fusion module is used to replace the convolutional layer in the original Yolov5 network structure that is connected to the output of the multi-scale channel attention module; let the output of the attention feature fusion module be... Z , Z The calculation formula is as follows: in, Represents the low-level semantic feature map. Represents a high-level semantic feature map.
2. The method for detecting foreign objects in transmission lines according to claim 1, characterized in that, In step S1, the K-means algorithm is used to perform cluster analysis on the prior bounding boxes. The specific steps include: a. Randomly select k points from the marked prior bounding boxes as the initial cluster centers. : b. Label the prior annotation box samples as Calculate the distance from each prior bounding box sample in the image dataset to each initial cluster center, and assign each sample to the class of the cluster center closest to the cluster center; c. For each class, update the cluster centers for that class. The calculation formula is as follows: Where I represents the number of categories; d. Repeat steps b to c until the positions of the cluster centers no longer change.
3. The method for detecting foreign objects in transmission lines according to claim 1, characterized in that, In step S2, the Backbone network is used to extract image features. After the dataset images are input into the Backbone network, each convolutional layer in CSPDarkNet extracts features from the dataset images to obtain feature maps. The SPP structure includes three pooling kernels of different sizes. The feature maps output by the previous network layer are pooled using the three pooling kernels of different sizes in the SPP structure to obtain three sets of pooled image features, and connection operations are performed in the channel dimension.
4. The method for detecting foreign objects in transmission lines according to claim 1, characterized in that, In step S3, the following is adopted: CIOU _ LOSS As the loss function for the detection box, CIOU_LOSS Represented as: in, The Euclidean distance between the detection box and the predicted center point coordinates. The diagonal distance of the smallest box encompassing the detection bounding box and the prior bounding box is given by v, which measures the consistency of the aspect ratio. IoU = A∩B / A∪B represents the overlapping area of objects A and B divided by the sum of their areas. w and h represent the length and width of the detection bounding box, respectively. and These represent the length and width of the prior annotation box, respectively.
5. The method for detecting foreign objects in transmission lines according to claim 1, characterized in that, In step S3, a loss function is constructed to perform regression classification on the prediction results, and its expression is: in, Represents the loss function; For the real goal, Let x represent the probability of the predicted target and y represent the probability of the actual target, representing other targets that are closest to the true target. J is the set of negative classes. The threshold value is set.
6. The method for detecting foreign objects in transmission lines according to claim 1, characterized in that, In step S5, redundant detection boxes are removed using non-maximum suppression. The specific steps are as follows: S51. Sort all detection boxes by confidence level and select the detection box with the highest confidence level; S52. Set an overlap area threshold, traverse the remaining prior label boxes. If the overlap area between the prior label box and the current box with the highest confidence is greater than the threshold, delete the prior label box; otherwise, keep the prior label box until all prior label boxes have been traversed. S53. Select the one with the highest confidence from the unselected prior label boxes, and return to step S52 until only the prior label box with the lowest confidence remains unselected.
7. A computer storage medium, characterized in that, The computer storage medium stores a program for detecting foreign objects in transmission lines. When the program for detecting foreign objects in transmission lines is executed by the processor, it is used to implement the steps of the method for detecting foreign objects in transmission lines according to any one of claims 1 to 6.
8. A computer system for detecting foreign objects in power transmission lines, characterized in that, The method for detecting foreign objects in transmission lines according to any one of claims 1 to 6 includes: The image processing module is used to acquire a certain number of transmission line images, and to annotate foreign objects in the transmission line images with prior bounding boxes of different sizes. The images with prior bounding boxes are used to construct an image dataset, which is then divided into a training set, a validation set, and a test set. The foreign object detection model module for power transmission lines is used to construct foreign object detection models for power transmission lines. The training module trains the foreign object detection model for transmission lines using the training set, evaluates the model during the training process using the validation set, and tests the effectiveness of the model using the test set, thus obtaining the trained foreign object detection model for transmission lines. The foreign object detection module is used to input the image of the transmission line to be detected into the trained transmission line foreign object detection model to generate a detection box for foreign objects in the transmission line. The redundancy suppression module is used to remove redundant detection frames.
Citation Information
Patent Citations
Power transmission line conductor foreign matter identification method and device
CN114724091A
Road vehicle detection system and method based on YOLOv4
CN114821492A