A method for detecting foreign objects on a power transmission line
By improving the YOLOv8 model architecture and introducing a multi-scale lightweight detection framework based on the DMSA module, the problem of low accuracy and efficiency in foreign object detection on UAV power transmission lines was solved, achieving high-precision and real-time foreign object detection results.
Patent Information
- Application Number
- CN202411725669.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-28
- Publication Date
- 2025-12-30
- Estimated Expiration
- 2044-11-28
AI Technical Summary
Existing methods for detecting foreign objects in power transmission lines using drones are insufficient in accuracy and efficiency, making it difficult to meet the high-efficiency detection requirements in practical engineering.
The YOLOv8 model architecture was improved, and a multi-scale lightweight detection framework was designed. By introducing the DMSA module to replace the C2F module in the backbone network and neck network, a YOLOv8-based foreign object detection model for transmission lines was constructed, including a backbone network, a neck network, and a head network. The DMSA module was used for feature fusion and detection.
It improves the accuracy and real-time performance of small target detection, enhances the robustness and applicability of detection, reduces the computational load, and adapts to foreign object detection in complex environments.
Smart Images

Figure CN119625577B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image recognition technology, and more specifically, to a method for detecting foreign objects in power transmission lines. Background Technology
[0002] As a crucial component of the power transmission system, the stability of transmission lines is of paramount importance. In actual operation, transmission lines may encounter interference from various foreign objects, such as plastic film, plant debris, and bird nests. These foreign objects may not only cause physical damage to the transmission lines but may also trigger electrical problems such as short circuits and arc discharges. In extreme cases, they may induce large-scale power outages, leading to serious economic and social consequences.
[0003] With the continuous expansion and increasing complexity of power transmission lines in recent years, the daily inspection and maintenance of these lines has become increasingly important. Currently, traditional inspection methods mainly rely on manual pole climbing or ground-based telescope observation. These methods are not only inefficient but also pose significant safety risks. Furthermore, since transmission lines are often located in complex geographical environments, such as mountains, forests, or waterways, traditional inspection methods struggle to achieve comprehensive coverage and high-frequency inspections. Therefore, drone-assisted inspection technology has emerged, using drones equipped with high-resolution cameras to capture images of transmission lines, providing an efficient and safe solution for inspection. However, existing drone inspection systems largely rely on manual image analysis, making it difficult to quickly process large amounts of inspection data and identify risks in real time.
[0004] With the rapid development of deep learning and computer vision technologies, deep learning-based object detection algorithms, such as the YOLO series models, have demonstrated superior performance in various image detection tasks. However, existing object detection models still suffer from problems such as large model size, insufficient real-time performance, and low detection accuracy when applied to UAV power line inspection, making it difficult to meet the high-efficiency detection requirements in practical engineering.
[0005] A search revealed Chinese patent application No. 202211648342.5, published on July 14, 2023, which discloses a method, system, and storage medium for detecting foreign objects in transmission lines. The method includes: acquiring images of foreign objects in transmission lines and labeling the foreign objects in the images to obtain an image dataset; constructing a foreign object detection model for transmission lines based on the Yolov5 algorithm; extracting image features using the Backbone network in the foreign object detection model; performing feature aggregation using the Neck network; and performing downsampling using the Head network; training the foreign object detection model using the image dataset to obtain the trained model; finally, inputting the transmission line image to be detected into the trained foreign object detection model, and using non-maximum suppression to remove redundant detection boxes to obtain the final foreign object detection boxes that select foreign objects in the transmission line image. This method ensures the accuracy of foreign object detection while having a small number of model parameters and improving the detection speed. However, the Yolov5 version used in this method is too low, and there are too few adaptations to the main model itself. Therefore, there is still considerable room for improvement in terms of robustness, convergence, and accuracy for foreign object detection in power transmission lines. Summary of the Invention
[0006] 1. Technical problems to be solved
[0007] To address the problems of insufficient detection accuracy and low detection efficiency in existing foreign object detection methods for power transmission lines, this invention provides a foreign object detection method for power transmission lines. By improving the YOLOv8 model architecture and designing a multi-scale lightweight detection framework, the detection capability for small targets and various types of foreign objects on power transmission lines is improved, thereby enhancing detection accuracy and efficiency.
[0008] 2. Technical Solution
[0009] The objective of this invention is achieved through the following technical solutions.
[0010] A method for detecting foreign objects in power transmission lines includes the following steps:
[0011] The transmission line inspection video was collected and processed frame by frame to obtain the transmission line inspection image. The transmission line inspection image containing abnormal targets was labeled to obtain the transmission line foreign object image. The transmission line foreign object image dataset was constructed and divided into training set, validation set and test set.
[0012] A foreign object detection model for transmission lines based on YOLOv8 is constructed. The foreign object detection model for transmission lines includes a backbone network, a neck network, and a head network connected in sequence. The C2F module in the backbone network and the neck network is replaced with the DMSA module.
[0013] The foreign object detection model for transmission lines is trained based on the training set, and the trained foreign object detection model for transmission lines is evaluated based on the validation set to obtain the trained foreign object detection model for transmission lines.
[0014] The test set is input into the trained foreign object detection model for transmission lines to perform detection and obtain the detection results.
[0015] The DMSA module is formed by assembling several MSA modules.
[0016] The MSA module is represented as follows:
[0017]
[0018] Where x represents the input of the MSA module, H M×M (x) represents the output of the MSA module, M = 2t + 1, where t represents the number of CBSs in the MSA module, CBS is a 3×3 convolutional module, Concat represents the concatenation operation, and G M×M (x) represents the receptive field function, G 3×3 (x) represents the receptive field range of 3×3, G 5×5 (x) represents the receptive field range of 5×5.
[0019] The receptive field function is expressed as:
[0020]
[0021] Among them, f 3×3 (·) represents a 3×3 convolutional module, also known as a CBS, whose function is defined as follows: σ(·) represents the activation function, BN represents batch normalization, W represents the weight matrix, and t represents the number of CBSs in the MSA module. t This represents the weight matrix of the convolution in the t-th CBS module.
[0022] The DMSA module is represented as follows:
[0023]
[0024] Where Y represents the output of the DMSA module, f 1×1 (·) represents a 1×1 convolutional module, Concat represents the concatenation operation, U represents the number of modules in the stack, and D U This represents the output of the U-th MSA module.
[0025] As a further improvement of the present invention, the backbone network includes a convolutional layer, a DMSA module, and an SPPF module; after the foreign object image of the transmission line is processed by the convolutional layer, the features are output to the DMSA module, several MSA modules process the features to obtain multi-scale features, and the SPPF module performs pooling operation on the multi-scale features to generate multi-scale features.
[0026] As a further improvement of the present invention, the neck network fuses multi-scale features through the DMSA module and outputs them to the head network for detection.
[0027] A foreign object detection device for power transmission lines, comprising:
[0028] The image processing module acquires transmission line inspection videos and processes them frame by frame to obtain transmission line inspection images. It annotates transmission line inspection images containing abnormal targets to obtain transmission line foreign object images, constructs a transmission line foreign object image dataset, and divides the transmission line foreign object image dataset into training set, validation set and test set.
[0029] The model building module constructs a foreign object detection model for transmission lines based on YOLOv8. The foreign object detection model for transmission lines includes a backbone network, a neck network, and a head network connected in sequence. The C2F module in the backbone network and the neck network is replaced with the DMSA module.
[0030] The training module trains the foreign object detection model for transmission lines based on the training set and evaluates the foreign object detection model for transmission lines during the training process based on the validation set, thus obtaining the trained foreign object detection model for transmission lines.
[0031] The testing module inputs the test set into the trained transmission line foreign object detection model for detection and obtains the detection results.
[0032] The DMSA module is formed by assembling several MSA modules, and the MSA module is represented as follows:
[0033]
[0034] Where x represents the input of the MSA module, H M×M (x) represents the output of the MSA module, M = 2t + 1, where t represents the number of CBSs in the MSA module, CBS is a 3×3 convolutional module, Concat represents the concatenation operation, and G M×M (x) represents the receptive field function, G 3×3 (x) represents the receptive field range of 3×3, G 5×5 (x) represents the receptive field range of 5×5.
[0035] The receptive field function is expressed as:
[0036]
[0037] Among them, f 3×3 (·) represents a 3×3 convolutional module, also known as a CBS, whose function is defined as follows: σ(·) represents the activation function, BN represents batch normalization, W represents the weight matrix, and t represents the number of CBSs in the MSA module. t Let represent the weight matrix of the convolution in the t-th CBS module.
[0038] A computer device includes a memory and a processor, wherein the memory stores a computer program executable on the processor, and the processor executes the computer program to implement the method described in any of the preceding claims.
[0039] A computer-readable storage medium having a computer program stored thereon, the computer program being executed by a processor to perform the method described in any of the preceding claims.
[0040] 3. Beneficial effects
[0041] Compared with the prior art, the advantages of this invention are:
[0042] (1) The present invention provides a method for detecting foreign objects in transmission lines. In the backbone network and neck network of the YOLOv8-based transmission line foreign object detection model, the DMSA module is introduced to replace the original C2F module. This effectively avoids the problem of feature information loss caused by feature fusion between the high-level network and the low-level network. Furthermore, it reduces the amount of computation while ensuring that the feature information is not lost, and realizes a lightweight multi-scale feature fusion architecture. This effectively reduces the number of parameters in the YOLOv8-based transmission line foreign object detection model, improves the detection accuracy and real-time performance of small targets, and has strong practicality and wide applicability.
[0043] (2) In the foreign object detection method of the transmission line of the present invention, each mapping path in the DMSA module contains feature information of different scales. By accumulating the feature mapping of multiple receptive fields, the detection result retains more delicate multi-scale features. At the same time, the size of the receptive field can be freely adjusted, which significantly improves the foreign object detection effect of the transmission line and enhances the robustness of foreign object detection of the transmission line. Attached Figure Description
[0044] Figure 1 This is a flowchart of the detection method according to an embodiment of the present invention;
[0045] Figure 2 This is a schematic diagram of the MSA module structure according to an embodiment of the present invention;
[0046] Figure 3This is a schematic diagram showing the connection of multiple MSA modules according to an embodiment of the present invention;
[0047] Figure 4 This is a schematic diagram of the DMSA module structure according to an embodiment of the present invention;
[0048] Figure 5 This is a schematic diagram of the foreign object detection model structure for transmission lines based on YOLOv8 in an embodiment of the present invention;
[0049] Figure 6 This is a flowchart of the TensorRT deployment model according to an embodiment of the present invention;
[0050] Figure 7 This is a flowchart of the alarm mechanism of the monitoring platform in an embodiment of the present invention. Detailed Implementation
[0051] The present invention will now be described in detail with reference to the accompanying drawings and specific embodiments.
[0052] Example 1
[0053] like Figure 1 The image shows a method for detecting foreign objects in power transmission lines provided in this embodiment. The method includes the following steps: acquiring power transmission line inspection videos and processing them frame-by-frame to obtain power transmission line inspection images; annotating power transmission line inspection images containing abnormal targets to obtain power transmission line foreign object images; constructing a power transmission line foreign object image dataset; dividing the power transmission line foreign object image dataset into a training set, a validation set, and a test set; constructing a power transmission line foreign object detection model based on YOLOv8, the power transmission line foreign object detection model including a backbone network, a neck network, and a head network connected in sequence; wherein, the C2F module in the backbone network and the neck network is replaced with a DMSA module; training the power transmission line foreign object detection model based on the training set; evaluating the power transmission line foreign object detection model during the training process based on the validation set to obtain a trained power transmission line foreign object detection model; inputting the test set into the trained power transmission line foreign object detection model for detection to obtain detection results.
[0054] Specifically, in this embodiment, power transmission line inspection videos are acquired using drones. A script is then used to capture images frame-by-frame from the video, resulting in power transmission line inspection images. It's important to note that in this embodiment, ensuring complete coverage is crucial for drone-acquired power transmission line inspection videos. During flight, the drone must carefully monitor the transitions between adjacent acquisition areas to avoid missing any regions. This can be addressed by setting a certain overlap rate (e.g., 10%-20% overlap between adjacent images) to ensure data integrity. Simultaneously, background interference should be minimized during drone capture, avoiding acquisition of power transmission line inspection videos in complex backgrounds (e.g., dense areas with buildings, trees, etc.). Furthermore, the drone needs to acquire power transmission line inspection videos under varying lighting conditions (e.g., strong light in the morning or afternoon) or weak light conditions (e.g., dawn, dusk, or cloudy days with insufficient light). Training with datasets from different environments ensures the generalization ability of the power transmission line foreign object detection model. However, it's important to note that excessively strong light may lead to overexposure, while insufficient light may result in underexposure, both of which are detrimental to foreign object detection on power transmission lines.
[0055] Furthermore, the obtained transmission line inspection images are preprocessed to remove blurry and irrelevant images. In this embodiment, the preprocessing includes clarifying and annotating the transmission line inspection images, specifically including: (1) manual screening, by viewing the transmission line inspection images, manually deleting obviously blurry, overexposed, underexposed or irrelevant images; (2) automated processing, using OpenCV to detect the quality of the transmission line inspection images, for example, using existing Laplace transform or other methods to calculate the clarity of the transmission line inspection images, if it is lower than the set threshold, then consider deleting; (3) using existing Labelimg software to annotate the transmission line inspection images containing abnormal targets, and then converting the format of the annotated transmission line inspection images to obtain the transmission line foreign object image.
[0056] In this embodiment, a foreign object image dataset for transmission lines is constructed using the obtained images of foreign objects in the transmission lines. This dataset is then divided into a training set, a validation set, and a test set. The training set is used to train the foreign object detection model for transmission lines, the validation set is used to verify whether the trained foreign object detection model has been obtained, and the test set is used to test the performance of the foreign object detection model.
[0057] like Figure 2 As shown, a foreign object detection model for transmission lines based on YOLOv8 is constructed. In this embodiment, the foreign object detection model for transmission lines includes a backbone network, a neck network, and a head network connected in sequence. It is worth noting that in this embodiment, the C2F modules in the backbone network and the neck network are replaced with DMSA modules. Specifically, in this embodiment, the DMSA module is formed by splicing together several MSA modules.
[0058] Specifically, in the existing YOLOv8 convolutional neural network, a small-sized convolutional stack replaces the large-sized receptive field of the convolutions, thereby maintaining representational power while significantly reducing computational workload. Therefore, the Multiscale Stratified Aggregation (MSA) module proposed in this embodiment possesses both controllable receptive fields and one-time feature aggregation. For example... Figure 3 As shown, after the image of a foreign object in the transmission line is input to the MSA module, it passes through the CBS module and then outputs two branches. In this embodiment, the left branch continuously propagates downwards and eventually becomes the output of the MSA module, entering the next stage of the convolutional neural network. The right branch continues to perform feature extraction through the CBS module. During feature extraction, the receptive field of the MSA module continuously increases, and then it outputs two branches again, thus repeating the cycle. Therefore, the MSA module can completely preserve feature information from different stages and can also freely adjust the receptive field range.
[0059] In the MSA module, the receptive field of the structure is controlled by the number of convolutional layers *u*. The MSA module retains multi-scale features generated by multiple convolutions without increasing computational cost. The output of the MSA module uses a one-time feature aggregation method to output the multi-scale features. In this embodiment, the MSA module is represented as follows:
[0060]
[0061] Where x represents the input of the MSA module, H M×M (x) represents the output of the MSA module, M = 2t + 1, where t represents the number of CBSs in the MSA module, CBS is a 3×3 convolutional module, Concat represents the concatenation operation, and G M×M (x) represents the receptive field function, G 3×3 (x) represents the receptive field range of 3×3, G 5×5 (x) represents the receptive field range of 5×5.
[0062] In this embodiment, the receptive field function is expressed as:
[0063]
[0064] Among them, f 3×3 (·) represents a 3×3 convolutional module, i.e., a CBS module structure, whose function is defined as follows: σ(·) represents the activation function, BN represents batch normalization, W represents the weight matrix, and t represents the number of CBSs in the MSA module. t Let M represent the weight matrix of the convolution in the t-th CBS module, where the relationship between t and M is expressed as: M = 2t + 1.
[0065] In multi-scale feature extraction, foreign object detection models based on series transmission lines typically rely on deeper convolutions to capture complex features. However, increasing the depth of the YOLOv8 convolutional neural network leads to reduced computational efficiency and feature utilization. In this embodiment, the MSA modules internally provide two connection methods: Concat connection and ADD connection. Figure 3 As shown, the internal connection method between MSA modules is Concat connection. Figure 4 As shown, the internal connection method between MSA modules is ADD connection. Therefore, by constructing a variable-scale composite structure, complex mixed features and standard features in the YOLOv8 convolutional neural network can be effectively extracted.
[0066] like Figure 5 As shown, the Deep Multiscale Stratified Aggregation (DMSA) module is formed by assembling several MSA modules. In this embodiment, X is defined as... u-1 and X u As the output of stacking U times, where u=2,3,...,U,F u Let X represent the residual function of the u-th module, and add an activation function before the output. u Represented as:
[0067]
[0068] The result is derived recursively. When the DMSA module receives X as input, the output of the u-th MSA module is represented as D. (u) (X), at this time, D (u) (X) is represented as:
[0069]
[0070] In this embodiment, the DMSA module utilizes a convolution-based 1×1 projective shortcut connection, which is combined with the output of the DMSA module and then fused through a 1×1 convolutional layer. In this embodiment, the DMSA module is represented as:
[0071]
[0072] Where Y represents the output of the DMSA module, f 1×1 (·) represents a 1×1 convolutional module, Concat represents the concatenation operation, U represents the number of modules in the stack, and D U This represents the output of the U-th MSA module.
[0073] In this embodiment, the DMSA module uses feature mapping to construct a multi-path pattern during the recursive stacking of convolutions, enabling adjacent convolutional layers to intersect and pass features backward. Each mapping path in the DMSA module contains feature information at different scales. By accumulating feature mappings from multiple receptive fields, the detection results retain more refined multi-scale features. Furthermore, the size of the receptive field can be freely adjusted, significantly improving the foreign object detection effect on transmission lines and enhancing the robustness of foreign object detection.
[0074] In this embodiment, the backbone network of the transmission line foreign object detection model includes convolutional layers, a DMSA module, and an SPPF module. The backbone network is composed of several consecutive modules or convolutional layers stacked together. In this embodiment, the C2F module in the backbone network is replaced with a DMSA module, which reduces feature loss when extracting deep features and reduces the number of parameters in the transmission line foreign object detection model. Compared with the existing C2F module, the structure of the DMSA module can better preserve multi-scale features and reduce subsequent feature loss problems. Specifically, the transmission line foreign object undergoes preliminary feature extraction through convolutional layers, and then the output of the convolutional layers is used as the input to the DMSA module. In the DMSA module, the input features are processed by multiple MSA modules to obtain multi-scale features, and then a projection shortcut connection is used to merge the global features and the features output by the MSA modules, thereby avoiding the problem of feature loss during multiple convolutions. It should be noted that in this embodiment, the backbone network structure is composed of convolutional layers and DMSA modules alternately. Finally, pooling operations of different scales are introduced through the SPPF module, enabling the transmission line foreign object detection model to have better perception capabilities for features of different scales. After processing by the backbone network, multi-scale features are generated, providing rich semantic information and spatial details for the subsequent neck network stage.
[0075] Furthermore, the neck network fuses multi-scale features extracted from the backbone network, enabling the transmission line foreign object detection model to adapt to the detection needs of both small and large targets. In existing technologies, the YOLOv8 convolutional neural network uses a PAFPN structure, achieving feature interaction between upper and lower layers through path aggregation. High-level features are fused with low-level features through upsampling to enhance detail representation, while low-level features are combined with high-level features through downsampling to improve the richness of semantic information. In the process of feature fusion of multi-scale features output from the backbone network, the existing C2F module, based on a concatenated structure, fits multi-scale features through deep-level convolutions. While the feature fitting effect improves with increasing depth, it leads to reduced computational efficiency and low feature utilization. Therefore, the neck network provided in this embodiment replaces the C2F module with a DMSA module to solve the problems of unbalanced multi-scale feature fusion and semantic information discrepancies.
[0076] The head network performs detection on the fused features output by the neck network. Specifically, the head network predicts each feature point through classification, regression, and confidence branches to determine the target's category, location (center point, width and height), and presence. A specific anchoring mechanism maps the feature map predictions to the original image space for target localization. Decoding transforms the predicted bounding boxes into actual image coordinates, and non-maximum suppression (NMS) removes duplicate predicted boxes, retaining only the optimal detection result. Thus, in this embodiment, the head network ensures detection accuracy and real-time performance, while simultaneously outputting the final target bounding box, category, and confidence score, completing the target detection task for foreign object images of power transmission lines.
[0077] Therefore, in this embodiment, a YOLOv8-based foreign object detection model for transmission lines is constructed. The C2F modules in the backbone and neck networks are replaced with DMSA modules. The model is then trained using a training set. During training, hyperparameters (such as learning rate and batch size) are configured, and augmented data techniques (such as random pruning and color dithering) are used to improve the model's generalization ability. After training, the accuracy of the model's output is evaluated to ensure it meets practical application requirements. The training model is then evaluated using a validation set to obtain a well-trained foreign object detection model. The test set is then input into the trained model for detection to obtain the results. In this embodiment, replacing the C2F modules in the backbone and neck networks with DMSA modules reduces feature loss during feature fusion between higher and lower layers, reducing computational load and improving detection efficiency while ensuring no feature information loss.
[0078] Example 2
[0079] In this embodiment, the YOLOv8-based foreign object detection model for power transmission lines is improved, forming a multi-scale lightweight architecture that is more suitable for small target detection. This also reduces the number of parameters in the model and accelerates its inference. The model is deployed on a built edge computing platform, where images transmitted from drones are fed into the platform in real-time via a long-range Wi-Fi transmission module for analysis and identification, enabling real-time detection of abnormal targets on power transmission lines.
[0080] Specifically, such as Figure 6As shown, in this embodiment, the trained YOLOv8-based foreign object detection model for power transmission lines is exported in ONNX format. This universal model format facilitates compatibility with deep learning acceleration frameworks such as TensorRT. The runtime environment is configured on the Jetson TX2 edge computing platform. TensorRT is used on the edge computing platform to optimize the exported ONNX model, including quantization, weight fusion, and automatic kernel selection, to reduce computational complexity and memory usage. A deployable Engine model file (i.e., the optimized binary file) is generated using TensorRT. The optimized Engine model is deployed to the edge computing device, the model is loaded, and the inference environment is configured. The video stream captured by the drone is transmitted to the edge computing platform in real time via a long-range Wi-Fi transmission module. An efficient video decoding library is used to decode the transmitted video frame by frame. The deployed Engine model is called to perform object detection, and the detection results for each frame (such as object category, location coordinates, and confidence score) are output.
[0081] In this embodiment, the edge computing platform uses a 5G communication module to send information such as the type of the identified abnormal target to the ground monitoring system in a timely manner, which is then fed back to the safety management personnel. The safety management personnel adopt different handling methods for different types of foreign objects, providing support for safety control and significantly improving the efficiency and safety of power transmission line inspection.
[0082] Specifically, such as Figure 7 As shown, it includes: (1) Anomaly category feedback: Based on the identified anomaly target category (such as bird nests, kites, broken cables, hanging objects, etc.), the detection results are fed back to the ground monitoring system in real time through the 5G wireless communication module. (2) Data recording and alarm: The monitoring system automatically records the category, time of occurrence, and location of the detected anomaly target, and issues an alarm to relevant personnel through the alarm system. (3) Targeted handling strategy: Based on the detected anomaly target category, corresponding handling strategies are formulated. For example: For hanging objects, it is recommended to dispatch maintenance personnel to remove them. For broken cables, the emergency plan is immediately activated, and the relevant maintenance department is notified to repair them as soon as possible. For other potentially dangerous targets, it is decided whether further manual confirmation or drone re-inspection is required based on the risk level. (4) Automated report generation: The system can automatically generate inspection reports, including the identified anomaly target category, location, risk level, and handling suggestions, providing a basis for decision-making for safety control.
[0083] Therefore, in this embodiment, by improving the architecture of the YOLOv8 model and designing a multi-scale lightweight detection framework, it can better adapt to the resource constraints of the UAV edge computing platform. Furthermore, by using a long-range Wi-Fi transmission module for real-time video stream propagation, the signal weakness problem in complex environments is solved. In addition, this embodiment optimizes the data processing flow and detection algorithm for image data captured by the UAV, improving the detection capability for small targets and various types of foreign objects on power lines, further enhancing detection stability and reliability.
[0084] Example 3
[0085] This embodiment also provides a method for detecting foreign objects in power transmission lines, including an image processing module, a model building module, a training module, and a testing module. The image building module is used to acquire power transmission line inspection videos and process them frame by frame to obtain power transmission line inspection images. Images containing abnormal targets are labeled to obtain foreign object images, and a power transmission line foreign object image dataset is constructed, which is then divided into a training set, a validation set, and a test set. The model building module is used to construct a YOLOv8-based power transmission line foreign object detection model. The model includes a backbone network, a neck network, and a head network connected in sequence; wherein the C2F module in the backbone and neck networks is replaced with a DMSA module. The training module trains the power transmission line foreign object detection model based on the training set and evaluates the trained model based on the validation set to obtain a trained model. The testing module inputs the test set into the trained model to perform detection and obtain the detection results. This embodiment provides a foreign object detection device for power transmission lines that can implement any of the methods described in the foreign object detection method for power transmission lines. The specific working process of the foreign object detection device can be referenced from the corresponding process in the embodiment of the foreign object detection method for power transmission lines. The method and device provided in this embodiment can be implemented in other ways. For example, the device embodiments described above are merely illustrative; for example, the division of a module is merely a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Furthermore, the connections or communication connections shown or discussed can be indirect couplings or communication connections through some interfaces, devices, or units, or they can be electrical, mechanical, or other forms of connection.
[0086] Example 4
[0087] This embodiment also provides a computer device. A computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the aforementioned method for detecting foreign objects in power transmission lines.
[0088] Example 5
[0089] This embodiment also provides a computer-readable storage medium. A computer-readable storage medium stores a computer program, which, when executed by a processor, performs the foreign object detection method for power transmission lines described in this embodiment. The computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.
[0090] The present invention and its embodiments have been described above illustratively. This description is not restrictive, and the invention can be implemented in other specific forms without departing from its spirit or essential characteristics. The accompanying drawings are only one embodiment of the present invention, and the actual structure is not limited thereto. No reference numerals in the claims should limit the scope of the claims. Therefore, if those skilled in the art are inspired by this description and design similar structures and embodiments without departing from the spirit of the invention, such designs should fall within the scope of protection of the present invention. Furthermore, the word "comprising" does not exclude other elements or steps, and the word "a" preceding an element does not exclude the inclusion of "a plurality" of that element. Multiple elements stated in the product claims may also be implemented by a single element through software or hardware. The terms "first," "second," etc., are used to indicate names and do not indicate any specific order.
Claims
1. A method for detecting foreign objects on a power transmission line, comprising the steps of: collecting a power transmission line inspection video and processing it frame by frame to obtain a power transmission line inspection image, labeling the power transmission line inspection image containing abnormal targets to obtain a power transmission line foreign object image, constructing a power transmission line foreign object image dataset, and dividing the power transmission line foreign object image dataset into a training set, a validation set, and a test set; constructing a power transmission line foreign object detection model based on YOLOv8, the power transmission line foreign object detection model comprising a backbone network, a neck network, and a head network connected in sequence; wherein the C2F module in the backbone network and the neck network is replaced by a DMSA module; training the power transmission line foreign object detection model based on the training set, and evaluating the power transmission line foreign object detection model during the training process based on the validation set to obtain a trained power transmission line foreign object detection model; inputting the test set into the trained power transmission line foreign object detection model for detection to obtain a detection result, wherein the DMSA module is formed by splicing a plurality of MSA modules, and the MSA module is represented as: where x represents the input of the MSA module, H M×M (x) represents the output of the MSA module, M = 2t+1, where t represents the number of CBSs in the MSA module, CBS is a 3x3 convolution module, Concat represents a concatenation operation, G M×M (x) represents the receptive field function, G 3×3 (x) represents a 3x3 receptive field range, G 5×5 (x) represents a 5x5 receptive field range, wherein the receptive field function is represented as: where f 3×3 (·) denotes a 3x3 convolution module, i.e., CBS, whose function definition is , σ(·) denotes an activation function, BN denotes batch normalization, W denotes a weight matrix, t denotes the number of CBSs in the MSA module, W t denotes the weight matrix of the convolution in the tth CBS module, wherein the DMSA module is represented as: wherein Y represents the output of the DMSA module, f 1×1 (·) represents a 1x1 convolution module, Concat represents a concatenation operation, U represents the number of module stacks, D U represents the output of the Uth MSA module.
2. The method of claim 1, wherein the backbone network comprises a convolutional layer, a DMSA module, and a SPPF module; the power transmission line foreign object image is outputted to the DMSA module after feature extraction by the convolutional layer, a plurality of MSA modules process the features to obtain multi-scale features, and the SPPF module performs a pooling operation on the multi-scale features to generate multi-scale features.
3. The method of claim 2, wherein the step of detecting the foreign object on the power transmission line comprises the steps of: detecting the foreign object on the power transmission line by using a camera; and detecting the foreign object on the power transmission line by using a laser sensor. The neck network outputs the multi-scale features to the head network after fusion by the DMSA module for detection.
4. A foreign object detection device for a power transmission line, characterized by comprising: an image processing module that collects a power transmission line inspection video and processes it frame by frame to obtain a power transmission line inspection image, labels the power transmission line inspection image containing abnormal targets to obtain a power transmission line foreign object image, constructs a power transmission line foreign object image dataset, and divides the power transmission line foreign object image dataset into a training set, a validation set, and a test set; a model construction module that constructs a power transmission line foreign object detection model based on YOLOv8, the power transmission line foreign object detection model comprising a backbone network, a neck network, and a head network connected in sequence; wherein the C2F module in the backbone network and the neck network is replaced by a DMSA module; a training module that trains the power transmission line foreign object detection model based on the training set, and evaluates the power transmission line foreign object detection model during the training process based on the validation set to obtain a trained power transmission line foreign object detection model; a test module that inputs the test set into the trained power transmission line foreign object detection model for detection to obtain a detection result, wherein the DMSA module is formed by splicing a plurality of MSA modules, and the MSA module is represented as: where x represents the input of the MSA module, H M×M (x) represents the output of the MSA module, M = 2t+1, where t represents the number of CBSs in the MSA module, CBS is a 3x3 convolution module, Concat represents a concatenation operation, G M×M (x) represents a receptive field function, G 3×3 (x) represents a 3x3 receptive field range, G 5×5 (x) represents a 5x5 receptive field range, wherein the receptive field function is represented as: where f 3×3 (·) denotes a 3x3 convolution module, i.e., CBS, whose function definition is , σ(·) denotes an activation function, BN denotes batch normalization, W denotes a weight matrix, t denotes the number of CBSs in the MSA module, W t denotes the weight matrix of the convolution in the tth CBS module.
5. A computer device comprising a memory, a processor, the memory having stored thereon a computer program executable on the processor, characterized in that, the processor executes the computer program to implement the method of any one of claims 1-3.
6. A computer-readable storage medium having stored thereon a computer program, characterized in that The computer program is run by the processor to execute the method of any one of claims 1-3.
Citation Information
Patent Citations
Power transmission line foreign matter detection method and system and storage medium
CN116434051A
Railway freight foreign matter detection and identification method and system based on improved CNST-YOLOv5
CN118071707A