A power transmission line galloping detection method, a terminal device, and a storage medium
By processing power transmission line image frames using an attention-based semantic segmentation model, the problems of low efficiency and high cost in power transmission line galloping detection are solved, and high-precision detection is achieved under severe weather conditions.
Patent Information
- Application Number
- CN202410172637.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-06
- Publication Date
- 2026-11-27
- Estimated Expiration
- 2044-02-06
AI Technical Summary
Existing methods for detecting power line galloping suffer from low efficiency, high cost, and low level of intelligence. In particular, manual line inspection is difficult in severe weather, and the segmentation accuracy of traditional methods decreases when lighting conditions change.
A semantic segmentation model based on an attention mechanism is used to process the transmission line image frames. By comparing the positions of the line segment set in different image frames, it is determined whether the transmission line is galloping, thus avoiding the need for additional physical equipment.
It improves the accuracy and efficiency of power line galloping detection, reduces costs, and maintains high segmentation accuracy under different lighting conditions.
Smart Images

Figure CN118071697B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of smart grid technology, and in particular to a method for detecting power transmission line galloping, a terminal device, and a storage medium. Background Technology
[0002] With the development of society and the economy, the demand for electricity is constantly rising, making it increasingly important to ensure the reliability of power supply in the power system. Among these factors, transmission line galloping has become a major obstacle to the safe and reliable operation of the power grid. For example, in severe weather conditions such as strong winds and icing, three-phase conductors may experience low-frequency galloping. Excessive galloping can cause grid faults such as wind-induced discharge, phase-to-phase contact, and damage to insulators and fittings. In severe cases, it can lead to conductor breakage or even tower collapse, seriously affecting the safe and stable operation of the power grid.
[0003] Currently, transmission line galloping detection is mainly carried out through manual line inspection. Manual line inspection is severely affected by the weather, and transmission line galloping mostly occurs in severe weather, which brings great difficulties to the travel of inspection personnel. At the same time, manual line inspection has problems such as low efficiency, high cost and low level of intelligence. Summary of the Invention
[0004] This application provides a method for detecting power transmission line galloping, a terminal device, and a storage medium.
[0005] One technical solution adopted in this application is to provide a method for detecting power line galloping, the method comprising:
[0006] Get the current image frame and the previous image frame that contain the power transmission line;
[0007] The current image frame is input into the semantic segmentation model based on the attention mechanism to obtain the current line segment set corresponding to the power line in the current image frame, and to obtain the historical line segment set corresponding to the previous image frame.
[0008] Galloping detection of power transmission lines is performed based on the positions of historical segments in the historical segment set and the current segments in the current segment set.
[0009] Optionally, galloping detection is performed on the transmission line based on the positions of historical segments in the historical segment set and the current segment in the current segment set, including:
[0010] Based on the position of each historical line segment, a historical center point is obtained, which is used to represent the center point position of all historical line segments in the historical line segment set; and based on the position of each current line segment, a current center point is obtained, which is used to represent the center point position of all current line segments in the current line segment set.
[0011] Calculate the Euclidean distance between the historical center point and the current center point to obtain the first distance;
[0012] Based on the first distance, determine the amplitude of the transmission line variation;
[0013] The transmission line is determined to be galloping when the amplitude of the change exceeds a preset threshold.
[0014] Optionally, based on the first distance, the amplitude of the change in the transmission line is determined, including:
[0015] Calculate the Hausdorff distance between each historical segment in the historical segment set and each current segment in the current segment set to obtain multiple candidate second distances;
[0016] The minimum candidate second distance corresponding to each historical line segment is selected as the target second distance corresponding to each historical line segment.
[0017] The magnitude of the change is determined by the weighted sum of the first distance and the second distance to the target.
[0018] Optionally, the attention-based semantic segmentation model includes a backbone network, a first upsampling layer, a first self-attention module, a first network, a second upsampling layer, a second self-attention module, a second network, a third upsampling layer, a third self-attention module, and a third network, connected sequentially.
[0019] The current image frame is input into an attention-based semantic segmentation model to obtain the current line segment set corresponding to the transmission line in the current image frame, including:
[0020] The current image frame is input into the backbone network to obtain a first feature map, a second feature map, a third feature map, and a fourth feature map. The size of the first feature map is larger than the size of the second feature map, the size of the second feature map is larger than the size of the third feature map, and the size of the third feature map is larger than the size of the fourth feature map.
[0021] The fourth feature map is input into the first upsampling layer to obtain the fifth feature map, wherein the size of the fifth feature map is the same as the size of the third feature map;
[0022] The fifth feature map is fused with the third feature map to obtain the first fused feature map.
[0023] The first fused feature map is sequentially input into the first self-attention module and the first network to obtain the second fused feature map;
[0024] The second fused feature map is input into the second upsampling layer to obtain the third fused feature map, wherein the size of the third fused feature map is the same as the size of the second feature map;
[0025] The third fused feature map is fused with the second feature map to obtain the fourth fused feature map;
[0026] The fourth fused feature map is sequentially input into the second self-attention module and the second network to obtain the fifth fused feature map;
[0027] The fifth fused feature map is input into the third upsampling layer to obtain the sixth fused feature map, wherein the size of the sixth fused feature map is the same as the size of the first feature map;
[0028] The sixth fused feature map is fused with the first feature map to obtain the seventh fused feature map;
[0029] The seventh fusion feature map is sequentially input into the third self-attention module and the third network to obtain the eighth fusion feature map;
[0030] Based on the eighth fusion feature map, the current line segment set corresponding to the current image frame is determined.
[0031] Optionally, the backbone network includes a fourth network, a first downsampling layer, a fifth network, a second downsampling layer, a sixth network, a third downsampling layer, and a seventh network connected in sequence.
[0032] The current image frame is input into the backbone network to obtain the first feature map, the second feature map, the third feature map, and the fourth feature map, including:
[0033] The current image frame is input into the fourth network to obtain the first feature map;
[0034] The first feature map is input into the first downsampling layer to obtain the downsampled first feature map;
[0035] The downsampled first feature map is input into the fifth network to obtain the second feature map;
[0036] The second feature map is input into the second downsampling layer to obtain the downsampled second feature map;
[0037] The downsampled second feature map is input into the sixth network to obtain the third feature map;
[0038] The third feature map is input into the third downsampling layer to obtain the downsampled third feature map;
[0039] The downsampled third feature map is input into the seventh network to obtain the fourth feature map.
[0040] Optionally, the first, second, and third networks are convolutional decoding networks, and the fourth, fifth, sixth, and seventh networks are convolutional coding networks.
[0041] Optionally, the current image frame includes annotation information corresponding to the transmission line;
[0042] After the step of sequentially inputting the first fused feature map into the first self-attention module and the first network to obtain the second fused feature map, the following steps are included:
[0043] The second fused feature map is input into the first convolutional layer to obtain the first result;
[0044] Using the initial results and annotation information, determine the first loss;
[0045] After the step of sequentially inputting the fourth fused feature map into the second self-attention module and the second network to obtain the fifth fused feature map, the following steps are included:
[0046] The fifth fused feature map is input into the second convolutional layer to obtain the second result;
[0047] The second loss is determined using the second result and annotation information;
[0048] After the step of sequentially inputting the seventh fused feature map into the third self-attention module and the third network to obtain the eighth fused feature map, the following steps are included:
[0049] The eighth fused feature map is input into the third convolutional layer to obtain the third result;
[0050] The third loss is determined using the third result and annotation information;
[0051] The segmentation loss is determined based on the weighted sum of the first loss, the second loss, and the third loss;
[0052] We use segmentation loss to tune the parameters of an attention-based semantic segmentation model.
[0053] Optionally, the current image frame is input into an attention-based semantic segmentation model to obtain the current line segment set corresponding to the transmission line in the current image frame, including:
[0054] The current image frame is input into an attention-based semantic segmentation model to obtain several segmentation regions corresponding to the power transmission line;
[0055] Morphological processing, backbone extraction, and connected component processing are performed on several segmented regions to obtain the current line segments corresponding to several power transmission lines.
[0056] Construct a set of current line segments based on several current line segments.
[0057] Another technical solution adopted in this application is to provide a terminal device, the terminal device including a memory and a processor connected to the memory;
[0058] The memory is used to store program data, and the processor is used to execute the program data to implement the power line galloping detection method as described above.
[0059] Another technical solution adopted in this application is to provide a computer storage medium for storing program data, which, when executed by a computer, is used to implement the power line galloping detection method described above.
[0060] The beneficial effects of this application are as follows: It acquires the current image frame and the previous image frame containing the power transmission line; inputs the current image frame into a semantic segmentation model based on an attention mechanism to obtain the current line segment set corresponding to the power transmission line in the current image frame, and acquires the historical line segment set corresponding to the previous image frame; based on the positions of the historical line segments in the historical line segment set and the current line segments in the current line segment set, it performs galloping detection on the power transmission line. The power transmission line galloping detection method provided in this application, considering the characteristics of the power transmission line in the image frame being of limited texture and being long and thin, improves the accuracy of the detection of the power transmission line region by inputting the image frame into the semantic segmentation model based on an attention mechanism. Furthermore, the power transmission line galloping detection provided in this application does not require additional physical equipment, reducing the cost of galloping detection. Furthermore, it improves the accuracy of the judgment by determining whether the power transmission line has galloped based on its position in the image frame. Attached Figure Description
[0061] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0062] Figure 1 This is a flowchart illustrating an embodiment of the power transmission line galloping detection method provided in this application;
[0063] Figure 2 This is a schematic diagram of an embodiment of the current image frame;
[0064] Figure 3 This is a schematic diagram of an embodiment of the current line segment set corresponding to the current image frame;
[0065] Figure 4 This is a schematic diagram of the structure of one embodiment of the self-attention module;
[0066] Figure 5 This is a schematic diagram of one embodiment of the segmentation region;
[0067] Figure 6 This is a flowchart illustrating another embodiment of the power transmission line galloping detection method provided in this application;
[0068] Figure 7 This is a schematic diagram of the structure of an embodiment of the semantic segmentation network provided in this application;
[0069] Figure 8 This is a schematic diagram of the structure of an embodiment of the terminal device provided in this application;
[0070] Figure 9 This is a schematic diagram of the structure of an embodiment of the computer storage medium provided in this application. Detailed Implementation
[0071] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.
[0072] The terms "first," "second," etc., used in this application are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, or apparatuses.
[0073] Furthermore, although the terms "first," "second," etc., are used repeatedly in this application to describe various data (or various applications, or various instructions, or various operations), these data (or applications, instructions, or operations) should not be limited by these terms. These terms are only used to distinguish one type of data (or application, instruction, or operation) from another type of data (or application, instruction, or operation).
[0074] Through research and development, the inventors of this application have discovered that a common machine vision-based method for detecting power line galloping is limited by the indistinct and elongated texture of power lines. It primarily employs edge detection or line detection to extract the power line's position from an image frame. However, this method easily misidentifies straight edges that are not power lines within the image frame, resulting in poor accuracy. Another common machine vision-based method for detecting power line galloping uses spacers on the power line as reference points to determine if galloping has occurred; however, this method suffers from high implementation costs. Yet another common machine vision-based method for detecting power line galloping uses grayscale features to segment the power line. However, grayscale features are easily affected by lighting conditions, leading to decreased segmentation accuracy under different lighting conditions.
[0075] This application primarily designs a method to improve the accuracy of power transmission line galloping detection. Unlike traditional methods, this application inputs image frames into an attention-based semantic segmentation model to obtain a set of line segments corresponding to the power transmission line. By comparing the positions of the line segments in different image frames, it determines whether the power transmission line has galloped. This method improves the accuracy of galloping detection without requiring additional physical equipment.
[0076] Please refer to the details. Figure 1 , Figure 1 This is a schematic flowchart of an embodiment of the power transmission line galloping detection method provided in this application.
[0077] like Figure 1 As shown, the transmission line galloping detection method of this application embodiment may specifically include the following steps:
[0078] S1, obtain the current image frame and the previous image frame containing the power transmission line.
[0079] The power line galloping detection method provided in this application is mainly executed by a galloping detection device. In some embodiments, the galloping detection device may be the camera itself. In some embodiments, the galloping detection device may be a device communicatively connected to the camera. For example, the device may be any one or more of the following: a device for monitoring images, user equipment (UE), mobile device, user terminal, terminal, cellular phone, cordless phone, personal digital assistant (PDA), handheld device, computing device, in-vehicle device, wearable device, and autonomous vehicle, robot, security system, or glasses or helmets for augmented reality or virtual reality. In some possible implementations, the power line galloping detection method may be implemented by a processor calling computer-readable instructions stored in memory.
[0080] Specifically, the goof detection device acquires the current image frame and the previous image frame, which include the power transmission line.
[0081] In some embodiments, the camera captures video frames, and the motion detection device captures image frames from the video frames at preset time intervals t. That is, the current image frame and the previous image frame are separated by a preset time interval t.
[0082] S2, input the current image frame into the semantic segmentation model based on the attention mechanism to obtain the current line segment set corresponding to the power transmission line in the current image frame, and obtain the historical line segment set corresponding to the previous image frame.
[0083] Specifically, the dancing detection device inputs the current image frame into a semantic segmentation model based on an attention mechanism to obtain the current line segment set corresponding to the power line in the current image frame, as well as the historical line segment set corresponding to the previous image frame.
[0084] In some embodiments, the motion detection device inputs the current image frame I into an attention-based semantic segmentation model. The input to the semantic segmentation model is a single-frame image, and the output of the semantic segmentation model is the region containing the power lines within that single-frame image.
[0085] In some possible application scenarios, the output of the semantic segmentation model is a mask image of the power transmission line.
[0086] For example, the current image frame is as follows Figure 2 As shown, the current line segment set corresponding to the current image frame is as follows: Figure 3 As shown, in Figure 3 In the diagram, the black area represents the area excluding power transmission lines, while the white-lined area represents the area corresponding to power transmission lines.
[0087] Furthermore, based on the output of the semantic segmentation model, the goof detection device obtains the current line segment set corresponding to the power transmission line in the current image frame.
[0088] Similarly, the motion detection device inputs the previous image frame into the semantic segmentation model to obtain the historical line segment set corresponding to the previous image frame.
[0089] S3, based on the positions of historical segments in the historical segment set and the current segment in the current segment set, performs galloping detection on the transmission line.
[0090] Specifically, the galloping detection device detects the galloping of power transmission lines based on the positions of historical segments in the historical segment set and the current segments in the current segment set.
[0091] In some possible embodiments, the galloping detection device determines the changes in the transmission line within a unit of time based on the overall position of the historical line segments in the historical line segment set and the overall position of the current line segments in the current line segment set, and determines whether the transmission line has galloped.
[0092] In some possible embodiments, the galloping detection device acquires the target historical segment in the historical segment set corresponding to each power transmission line, and the target current segment in the current segment set. Based on the positions of the target historical segment and the target current segment, it further determines the changes of each power transmission line within a unit of time and judges whether the power transmission line has galloped.
[0093] The above scheme acquires the current image frame and the previous image frame containing the power transmission line; inputs the current image frame into a semantic segmentation model based on an attention mechanism to obtain the current line segment set corresponding to the power transmission line in the current image frame, and the historical line segment set corresponding to the previous image frame; based on the positions of the historical line segments in the historical line segment set and the current line segments in the current line segment set, it performs galloping detection on the power transmission line. The power transmission line galloping detection method provided in this application, considering the characteristics of the power transmission line in the image frame being of limited texture and being long and thin, inputs the image frame into the semantic segmentation model based on an attention mechanism, improving the accuracy of the region where the power transmission line is located. Furthermore, the power transmission line galloping detection provided in this application does not require additional physical equipment, reducing the cost required for galloping detection; furthermore, it determines whether the power transmission line has galloped based on its position in the image frame, improving the accuracy of the determination.
[0094] Another embodiment of the power line galloping detection method provided in this application may specifically include the following steps:
[0095] S11, obtain the current image frame and the previous image frame containing the transmission line.
[0096] S12, input the current image frame into the semantic segmentation model based on the attention mechanism to obtain the current line segment set corresponding to the power transmission line in the current image frame, and obtain the historical line segment set corresponding to the previous image frame.
[0097] S13: Based on the position of each historical line segment, obtain the historical center point. And based on the position of each current line segment, obtain the current center point.
[0098] Among them, the historical center point is used to represent the position of the center point of all historical line segments in the historical line segment set, and the current center point is used to represent the position of the center point of all current line segments in the current line segment set.
[0099] Specifically, the motion detection device obtains the historical center point based on the position of each historical line segment, and the current center point based on the position of each current line segment.
[0100] In some application scenarios, historical line segments in a historical line segment set can be represented as: ML1, ML2, ..., MLm. In some embodiments, the goof detection device acquires the center point corresponding to each historical line segment, and determines the historical center point based on the center point.
[0101] In some embodiments, the center point corresponding to the historical line segment can be represented as (x ML1 ,y ML1 ), (x ML2 ,y ML2 ), ..., (x MLm ,y MLm ), historical center point (x m,y m The following relationship must be satisfied:
[0102]
[0103]
[0104] Similarly, the current line segment in the current line segment set can be represented as: NL1, NL2, ..., NLn. The center point corresponding to the current line segment can be represented as (x... NL1 ,y NL1 ), (x NL2 ,y NL2 ), ..., (x NLn ,y NLn ), current center point (x) n ,y n The following relationship must be satisfied:
[0105]
[0106]
[0107] S14, calculate the Euclidean distance between the historical center point and the current center point to obtain the first distance.
[0108] Specifically, the motion detection device calculates the Euclidean distance between the historical center point and the current center point to obtain the first distance.
[0109] In some embodiments, the goof detection device calculates the historical center point (x m ,y m ) and the current center point (x) n ,y n The Euclidean distance between ) is used to obtain the first distance l. mn .
[0110] The first distance is used to represent the overall offset of the transmission line.
[0111] S15, based on the first distance, determine the amplitude of the change in the transmission line.
[0112] Specifically, the vibration detection device determines the amplitude of the transmission line's change based on a first distance.
[0113] In some embodiments, the amplitude of the change in the transmission line is proportional to the first distance.
[0114] Understandably, the larger the first distance, which represents the overall offset of the transmission line, the greater the amplitude of the change in the transmission line.
[0115] S16, in response to the change amplitude being greater than a preset threshold, determine that the transmission line is galloping.
[0116] Specifically, in response to a change amplitude exceeding a preset threshold, the galloping detection device determines that the power transmission line has galloped.
[0117] In some embodiments, the galloping detection device obtains the galloping frequency of the transmission line by determining the amplitude of the change in the transmission line per unit time. Further, in response to the galloping frequency of the transmission line being greater than a preset frequency, the galloping detection device determines that the transmission line has galloped.
[0118] Understandably, in response to the transmission line galloping frequency being less than or equal to a preset frequency, the motion detection device determines that the transmission line has not galloped.
[0119] The above scheme acquires the current image frame and the previous image frame containing the power transmission line; inputs the current image frame into a semantic segmentation model based on an attention mechanism to obtain the current line segment set corresponding to the power transmission line in the current image frame, and the historical line segment set corresponding to the previous image frame; based on the positions of the historical line segments in the historical line segment set and the current line segments in the current line segment set, it performs galloping detection on the power transmission line. The power transmission line galloping detection method provided in this application, considering the characteristics of power transmission lines in image frames with limited texture and being long and thin, inputs the image frame into a semantic segmentation model based on an attention mechanism, improving the accuracy of the region where the power transmission line is located. Furthermore, the power transmission line galloping detection provided in this application does not require additional physical equipment, reducing the cost required for galloping detection. Furthermore, it determines whether the power transmission line has galloped based on its position in the image frame, improving the accuracy of the determination.
[0120] Furthermore, by determining the amplitude and frequency of the transmission line's fluctuations, maintenance personnel can better assess whether there are any corresponding risks associated with the transmission line.
[0121] Another embodiment of the power line galloping detection method provided in this application may specifically include the following steps:
[0122] S21, obtain the current image frame and the previous image frame containing the power transmission line.
[0123] S22, input the current image frame into the semantic segmentation model based on the attention mechanism to obtain the current line segment set corresponding to the power transmission line in the current image frame, and obtain the historical line segment set corresponding to the previous image frame.
[0124] S23: Based on the position of each historical line segment, obtain the historical center point. And based on the position of each current line segment, obtain the current center point.
[0125] Among them, the historical center point is used to represent the position of the center point of all historical line segments in the historical line segment set, and the current center point is used to represent the position of the center point of all current line segments in the current line segment set.
[0126] S24, calculate the Euclidean distance between the historical center point and the current center point to obtain the first distance.
[0127] S25, calculate the Hausdorff distance between each historical segment in the historical segment set and each current segment in the current segment set, and obtain multiple candidate second distances.
[0128] Specifically, the dancing detection device calculates the Hausdorff distance between each historical segment in the historical segment set and each current segment in the current segment set, thus obtaining multiple candidate second distances.
[0129] In some embodiments, the goof detection device calculates the Hausdorff distance between the target historical segment in the historical segment set and each current segment in the current segment set.
[0130] S26, select the minimum candidate second distance corresponding to each historical line segment as the target second distance corresponding to each historical line segment.
[0131] Specifically, the dancing detection device selects the minimum candidate second distance corresponding to each historical line segment as the target second distance corresponding to each historical line segment.
[0132] In some embodiments, the dance detection device selects the current line segment with the shortest Hausdorff distance to the target historical line segment within the current line segment set, and uses it as the target current line segment corresponding to the target historical line segment. The target current line segment is the line segment in the current image frame that matches the target historical line segment.
[0133] Furthermore, the dancing detection device calculates the second target distance h by averaging the Hausdorff distance between each historical line segment and each current line segment of the target. mn .
[0134] In some embodiments, the target second distance is used to characterize the degree of offset of a single transmission line.
[0135] S27. Determine the magnitude of change based on the weighted sum of the first distance and the second distance to the target.
[0136] Specifically, the dancing detection device determines the amplitude of change based on the weighted sum of the first distance and the second distance to the target.
[0137] In some embodiments, the change magnitude L satisfies the following relationship:
[0138] L = al mn +bh mn
[0139] Where a is the first weight, b is the second weight, and l mn For the first distance, h mn This is the second distance.
[0140] S28, in response to the change amplitude being greater than a preset threshold, determines that the transmission line is galloping.
[0141] The above scheme acquires the current image frame and the previous image frame containing the power transmission line; inputs the current image frame into a semantic segmentation model based on an attention mechanism to obtain the current line segment set corresponding to the power transmission line in the current image frame, and the historical line segment set corresponding to the previous image frame; based on the positions of the historical line segments in the historical line segment set and the current line segments in the current line segment set, it performs galloping detection on the power transmission line. The power transmission line galloping detection method provided in this application, considering the characteristics of power transmission lines in image frames with limited texture and being long and thin, inputs the image frame into a semantic segmentation model based on an attention mechanism, improving the accuracy of the region where the power transmission line is located. Furthermore, the power transmission line galloping detection provided in this application does not require additional physical equipment, reducing the cost required for galloping detection. Furthermore, it determines whether the power transmission line has galloped based on its position in the image frame, improving the accuracy of the determination.
[0142] Another embodiment of the power line galloping detection method provided in this application may specifically include the following steps:
[0143] S31, obtain the current image frame and the previous image frame containing the transmission line.
[0144] The semantic segmentation model based on the attention mechanism includes a backbone network, a first upsampling layer, a first self-attention module, a first network, a second upsampling layer, a second self-attention module, a second network, a third upsampling layer, a third self-attention module, and a third network, connected in sequence.
[0145] In some embodiments, the first network, the second network, and the third network are convolutional networks.
[0146] S32, input the current image frame into the backbone network to obtain the first feature map, the second feature map, the third feature map and the fourth feature map.
[0147] Among them, the size of the first feature map is larger than the size of the second feature map, the size of the second feature map is larger than the size of the third feature map, and the size of the third feature map is larger than the size of the fourth feature map.
[0148] Specifically, the motion detection device inputs the current image frame into the backbone network to obtain the first feature map, the second feature map, the third feature map, and the fourth feature map.
[0149] In some embodiments, the backbone network is a Feature Pyramid Network (FPN).
[0150] For example, the size of the first feature map is 256x256, the size of the second feature map is 128x128, the size of the third feature map is 64x64, and the size of the fourth feature map is 32x32.
[0151] S33, input the fourth feature map into the first upsampling layer to obtain the fifth feature map.
[0152] The fifth feature map has the same size as the third feature map.
[0153] Specifically, the motion detection device inputs the fourth feature map into the first upsampling layer to obtain the fifth feature map.
[0154] For example, the size of the fifth feature map and the size of the third feature map are both 64x64.
[0155] S34, perform feature fusion between the fifth feature map and the third feature map to obtain the first fused feature map.
[0156] Specifically, the motion detection device fuses the fifth feature map with the third feature map to obtain the first fused feature map.
[0157] In some embodiments, the dancing detection device performs at least one of the following operations on the fifth feature map and the third feature map: weighted fusion and feature overlay, to obtain a first fused feature map.
[0158] S35, the first fused feature map is sequentially input into the first self-attention module and the first network to obtain the second fused feature map.
[0159] Specifically, the dancing detection device sequentially inputs the first fused feature map into the first self-attention module and the first network to obtain the second fused feature map.
[0160] S36, input the second fused feature map into the second upsampling layer to obtain the third fused feature map.
[0161] The size of the third fused feature map is the same as that of the second feature map.
[0162] Specifically, the dancing detection device inputs the second fused feature map into the second upsampling layer to obtain the third fused feature map.
[0163] For example, the size of the third fused feature map and the size of the second feature map are both 128x128.
[0164] S37, perform feature fusion between the third fusion feature map and the second feature map to obtain the fourth fusion feature map.
[0165] Specifically, the motion detection device fuses the third fused feature map with the second feature map to obtain the fourth fused feature map.
[0166] In some embodiments, the dancing detection device performs at least one of the following operations on the third fused feature map and the second feature map: weighted fusion and feature superposition, to obtain a fourth fused feature map.
[0167] S38, the fourth fusion feature map is sequentially input into the second self-attention module and the second network to obtain the fifth fusion feature map.
[0168] Specifically, the dancing detection device sequentially inputs the fourth fused feature map into the second self-attention module and the second network to obtain the fifth fused feature map.
[0169] S39, input the fifth fused feature map into the third upsampling layer to obtain the sixth fused feature map.
[0170] The size of the sixth fused feature map is the same as that of the first feature map.
[0171] Specifically, the motion detection device inputs the fifth fused feature map into the third upsampling layer to obtain the sixth fused feature map.
[0172] For example, the size of the sixth fused feature map and the size of the first feature map are both 256x256.
[0173] S40, perform feature fusion between the sixth fusion feature map and the first feature map to obtain the seventh fusion feature map.
[0174] Specifically, the motion detection device fuses the sixth fused feature map with the first feature map to obtain the seventh fused feature map.
[0175] In some embodiments, the dancing detection device performs at least one of the following operations on the sixth fused feature map and the first feature map: weighted fusion and feature superposition, to obtain the seventh fused feature map.
[0176] S41, the seventh fusion feature map is sequentially input into the third self-attention module and the third network to obtain the eighth fusion feature map.
[0177] Specifically, the dancing detection device sequentially inputs the seventh fused feature map into the third self-attention module and the third network to obtain the eighth fused feature map.
[0178] It should be noted that the results of the first, second, and third self-attention modules are identical. For example, the structure of a self-attention module is as follows: Figure 4 As shown.
[0179] After a period of research, the inventors of this application discovered that, due to the characteristics of power transmission lines being thin and lacking in texture, the receptive field of convolutional layers is small and cannot capture the complete features of power transmission lines in images. However, the self-attention mechanism in the Transformer network can ignore the distance between features and focus on global features through point-to-point feature correlation calculation. Therefore, a self-attention module is added to each scale in the semantic segmentation network to improve the feature extraction capability.
[0180] S42, based on the eighth fusion feature map, determine the current line segment set corresponding to the current image frame.
[0181] Specifically, the motion detection device determines the current line segment set corresponding to the current image frame based on the eighth fused feature map.
[0182] In some possible embodiments, the dancing detection process inputs the eighth fused feature map into the convolutional layer to obtain the current line segment set corresponding to the current image frame.
[0183] S43, based on the positions of historical segments in the historical segment set and the current segment in the current segment set, performs galloping detection on the transmission line.
[0184] The above scheme acquires the current image frame and the previous image frame containing the power transmission line; inputs the current image frame into a semantic segmentation model based on an attention mechanism to obtain the current line segment set corresponding to the power transmission line in the current image frame, and the historical line segment set corresponding to the previous image frame; based on the positions of the historical line segments in the historical line segment set and the current line segments in the current line segment set, it performs galloping detection on the power transmission line. The power transmission line galloping detection method provided in this application, considering the characteristics of power transmission lines in image frames with limited texture and being long and thin, inputs the image frame into a semantic segmentation model based on an attention mechanism, improving the accuracy of the region where the power transmission line is located. Furthermore, the power transmission line galloping detection provided in this application does not require additional physical equipment, reducing the cost required for galloping detection. Furthermore, it determines whether the power transmission line has galloped based on its position in the image frame, improving the accuracy of the determination.
[0185] Another embodiment of the power line galloping detection method provided in this application may specifically include the following steps:
[0186] S51, obtain the current image frame and the previous image frame containing the transmission line.
[0187] The backbone network consists of a fourth network, a first downsampling layer, a fifth network, a second downsampling layer, a sixth network, a third downsampling layer, and a seventh network, which are connected in sequence.
[0188] S52, input the current image frame into the fourth network to obtain the first feature map.
[0189] Specifically, the motion detection device inputs the current image frame into the fourth network to obtain the first feature map.
[0190] Optionally, the fourth network is a convolutional coding network.
[0191] In some embodiments, the fourth network includes a predetermined number of residual convolutional layers.
[0192] For example, the size of the first feature map is 256x256.
[0193] S53, input the first feature map into the first downsampling layer to obtain the downsampled first feature map.
[0194] Specifically, the motion detection device inputs the first feature map into the first downsampling layer to obtain the downsampled first feature map.
[0195] For example, the size of the first feature map after downsampling is 128x128.
[0196] S54, the downsampled first feature map is input into the fifth network to obtain the second feature map.
[0197] Specifically, the motion detection device inputs the downsampled first feature map into the fifth network to obtain the second feature map.
[0198] Optionally, the fifth network is a convolutional coding network.
[0199] In some embodiments, the fifth network includes a predetermined number of residual convolutional layers.
[0200] For example, the size of the second feature map is 128x128.
[0201] S55, input the second feature map into the second downsampling layer to obtain the downsampled second feature map.
[0202] Specifically, the motion detection device inputs the second feature map into the second downsampling layer to obtain the downsampled second feature map.
[0203] For example, the size of the downsampled second feature map is 64x64.
[0204] S56. The downsampled second feature map is input into the sixth network to obtain the third feature map.
[0205] Specifically, the motion detection device inputs the downsampled second feature map into the sixth network to obtain the third feature map.
[0206] Optionally, the sixth network is a convolutional coding network.
[0207] In some embodiments, the sixth network includes a predetermined number of residual convolutional layers.
[0208] For example, the size of the third feature map is 64x64.
[0209] S57, input the third feature map into the third downsampling layer to obtain the downsampled third feature map.
[0210] Specifically, the motion detection device inputs the third feature map into the third downsampling layer to obtain the downsampled third feature map.
[0211] For example, the size of the downsampled third feature map is 32x32.
[0212] S58, the downsampled third feature map is input into the seventh network to obtain the fourth feature map.
[0213] Specifically, the motion detection device inputs the downsampled third feature map into the seventh network to obtain the fourth feature map.
[0214] Optionally, the seventh network is a convolutional coding network.
[0215] In some possible embodiments, the seventh network consists of multiple convolutional coding networks connected in sequence.
[0216] For example, the size of the fourth feature map is 32x32.
[0217] S59, input the fourth feature map into the first upsampling layer to obtain the fifth feature map.
[0218] The fifth feature map has the same size as the third feature map.
[0219] S60, the fifth feature map and the third feature map are fused to obtain the first fused feature map.
[0220] S61, the first fused feature map is sequentially input into the first self-attention module and the first network to obtain the second fused feature map.
[0221] Optionally, the first network is a convolutional decoding network.
[0222] In some possible embodiments, the first network includes a predetermined number of residual convolutional layers.
[0223] S62, the second fused feature map is input into the second upsampling layer to obtain the third fused feature map.
[0224] The size of the third fused feature map is the same as that of the second feature map.
[0225] S63, perform feature fusion between the third fusion feature map and the second feature map to obtain the fourth fusion feature map.
[0226] S64, the fourth fusion feature map is sequentially input into the second self-attention module and the second network to obtain the fifth fusion feature map.
[0227] Specifically, the dancing detection device sequentially inputs the fourth fused feature map into the second self-attention module and the second network to obtain the fifth fused feature map.
[0228] Optionally, the second network is a convolutional decoding network.
[0229] In some possible embodiments, the second network includes a predetermined number of residual convolutional layers.
[0230] S65, the fifth fused feature map is input into the third upsampling layer to obtain the sixth fused feature map.
[0231] The size of the sixth fused feature map is the same as that of the first feature map.
[0232] S66, perform feature fusion between the sixth fusion feature map and the first feature map to obtain the seventh fusion feature map.
[0233] S67, the seventh fusion feature map is sequentially input into the third self-attention module and the third network to obtain the eighth fusion feature map.
[0234] Specifically, the dancing detection device sequentially inputs the seventh fused feature map into the third self-attention module and the third network to obtain the eighth fused feature map.
[0235] Optionally, the third network is a convolutional decoding network.
[0236] In some possible embodiments, the third network contains a predetermined number of residual convolutional layers.
[0237] By setting up convolutional encoding and convolutional decoding networks in the semantic segmentation network, feature maps can achieve multi-scale feature extraction and fusion during the encoding and decoding process, thereby improving the accuracy of extracting the region where the power transmission line is located.
[0238] S68, based on the eighth fusion feature map, determine the current line segment set corresponding to the current image frame.
[0239] S69, based on the positions of historical segments in the historical segment set and the current segment in the current segment set, performs galloping detection on the transmission line.
[0240] The above scheme acquires the current image frame and the previous image frame containing the power transmission line; inputs the current image frame into a semantic segmentation model based on an attention mechanism to obtain the current line segment set corresponding to the power transmission line in the current image frame, and the historical line segment set corresponding to the previous image frame; based on the positions of the historical line segments in the historical line segment set and the current line segments in the current line segment set, it performs galloping detection on the power transmission line. The power transmission line galloping detection method provided in this application, considering the characteristics of the power transmission line in the image frame being of limited texture and being long and thin, inputs the image frame into the semantic segmentation model based on an attention mechanism, improving the accuracy of the region where the power transmission line is located. Furthermore, the power transmission line galloping detection provided in this application does not require additional physical equipment, reducing the cost required for galloping detection; furthermore, it determines whether the power transmission line has galloped based on its position in the image frame, improving the accuracy of the determination.
[0241] Another embodiment of the power line galloping detection method provided in this application may specifically include the following steps:
[0242] S71, acquire the current image frame containing the power transmission line.
[0243] The current image frame includes the labeling information corresponding to the power transmission line.
[0244] In some embodiments, the current image frame includes labeled segmentation information corresponding to the transmission line.
[0245] S72, input the current image frame into the backbone network to obtain the first feature map, the second feature map, the third feature map and the fourth feature map.
[0246] Among them, the size of the first feature map is larger than the size of the second feature map, the size of the second feature map is larger than the size of the third feature map, and the size of the third feature map is larger than the size of the fourth feature map.
[0247] S73, input the fourth feature map into the first upsampling layer to obtain the fifth feature map.
[0248] The fifth feature map has the same size as the third feature map.
[0249] S74, perform feature fusion between the fifth feature map and the third feature map to obtain the first fused feature map.
[0250] S75, the first fused feature map is sequentially input into the first self-attention module and the first network to obtain the second fused feature map.
[0251] S76, the second fused feature map is input into the first convolutional layer to obtain the first result.
[0252] Specifically, the dancing detection device inputs the second fused feature map into the first convolutional layer to obtain the first result.
[0253] In some embodiments, the first result can be the segmentation result corresponding to that scale.
[0254] S77. Using the first result and annotation information, determine the first loss.
[0255] Specifically, the goof detection device uses the first result and annotation information to determine the first loss.
[0256] In some embodiments, the dancing detection device determines the first loss based on the class-balanced cross entropy loss between the first result and the annotation information.
[0257] Through research and development, the inventors of this application discovered that power transmission lines occupy a relatively small area in images, and conventional loss functions are prone to accuracy degradation due to class imbalance. Therefore, by employing class-balanced cross-entropy loss, this loss function automatically adjusts the weights based on the number of pixels in each class, thereby avoiding accuracy degradation caused by class imbalance and better balancing the loss between power transmission lines and background areas.
[0258] S78, the second fused feature map is input into the second upsampling layer to obtain the third fused feature map.
[0259] The size of the third fused feature map is the same as that of the second feature map.
[0260] S79, perform feature fusion between the third fusion feature map and the second feature map to obtain the fourth fusion feature map.
[0261] S80, the fourth fusion feature map is sequentially input into the second self-attention module and the second network to obtain the fifth fusion feature map.
[0262] S81, the fifth fused feature map is input into the second convolutional layer to obtain the second result.
[0263] Specifically, the dancing detection device inputs the fifth fused feature map into the second convolutional layer to obtain the second result.
[0264] In some embodiments, the second result can be the segmentation result corresponding to that scale.
[0265] S82, using the second result and annotation information, determine the second loss.
[0266] Specifically, the gob-movement detection device uses the second result and annotation information to determine the second loss.
[0267] In some embodiments, the goof detection device determines the second loss based on the category-balanced cross-entropy loss between the second result and the annotation information.
[0268] S83, the fifth fused feature map is input into the third upsampling layer to obtain the sixth fused feature map.
[0269] The size of the sixth fused feature map is the same as that of the first feature map.
[0270] S84, perform feature fusion between the sixth fusion feature map and the first feature map to obtain the seventh fusion feature map.
[0271] S85, the seventh fusion feature map is sequentially input into the third self-attention module and the third network to obtain the eighth fusion feature map.
[0272] S86, the eighth fused feature map is input into the third convolutional layer to obtain the third result.
[0273] Specifically, the dancing detection device inputs the eighth fused feature map into the third convolutional layer to obtain the third result.
[0274] In some embodiments, the third result can be the segmentation result corresponding to that scale.
[0275] S87, using the third result and annotation information, determine the third loss.
[0276] Specifically, the goof detection device uses third-party results and annotation information to determine the third loss.
[0277] In some embodiments, the goof detection device determines the third loss based on the category-balanced cross-entropy loss between the third result and the annotation information.
[0278] S88 determines the segmentation loss based on the weighted sum of the first loss, the second loss, and the third loss.
[0279] Specifically, the goof detection device determines the segmentation loss based on the weighted sum of the first loss, the second loss, and the third loss.
[0280] By calculating the loss at each scale, and the overall segmentation loss of the network being a weighted sum of the losses at each scale, the feature representation at each scale is balanced by adjusting the weight values of the loss at different scales.
[0281] S89 utilizes segmentation loss to adjust the parameters of an attention-based semantic segmentation model.
[0282] Specifically, the dancing detection device uses segmentation loss to adjust the parameters of the attention-based semantic segmentation model.
[0283] S90, based on the eighth fusion feature map, determine the current line segment set corresponding to the current image frame.
[0284] S91, based on the positions of historical segments in the historical segment set and the current segments in the current segment set, performs galloping detection on the transmission line.
[0285] The above scheme acquires the current image frame and the previous image frame containing the power transmission line; inputs the current image frame into a semantic segmentation model based on an attention mechanism to obtain the current line segment set corresponding to the power transmission line in the current image frame, and the historical line segment set corresponding to the previous image frame; based on the positions of the historical line segments in the historical line segment set and the current line segments in the current line segment set, it performs galloping detection on the power transmission line. The power transmission line galloping detection method provided in this application, considering the characteristics of the power transmission line in the image frame being of limited texture and being long and thin, inputs the image frame into the semantic segmentation model based on an attention mechanism, improving the accuracy of the region where the power transmission line is located. Furthermore, the power transmission line galloping detection provided in this application does not require additional physical equipment, reducing the cost required for galloping detection; furthermore, it determines whether the power transmission line has galloped based on its position in the image frame, improving the accuracy of the determination.
[0286] Another embodiment of the power line galloping detection method provided in this application may specifically include the following steps:
[0287] S101, Obtain the current image frame and the previous image frame containing the power transmission line.
[0288] S102, input the current image frame into the semantic segmentation model based on the attention mechanism to obtain several segmentation regions corresponding to the power transmission line.
[0289] Specifically, the dancing detection device inputs the current image frame into a semantic segmentation model based on an attention mechanism to obtain several segmentation regions corresponding to the power transmission line.
[0290] For example, the resulting segmented regions are as follows: Figure 5 As shown.
[0291] It should be noted that a single transmission line may correspond to multiple segmented areas, therefore, post-processing is required to obtain a complete line.
[0292] S103, perform morphological processing, backbone extraction and connected component processing on several segmented regions to obtain the current line segments corresponding to several transmission lines.
[0293] Specifically, the gobbling detection device performs morphological processing, backbone extraction, and connected component processing on several segmented regions to obtain the current line segments corresponding to several power transmission lines.
[0294] In some embodiments, the goof detection device acquires the lines corresponding to several power transmission lines in the manner described above, and stores the pixel coordinates corresponding to the lines.
[0295] S104, construct the current line segment set based on several current line segments.
[0296] Specifically, the dancing detection device constructs a set of current line segments based on several current line segments.
[0297] S105, based on the positions of historical segments in the historical segment set and the current segment in the current segment set, performs galloping detection on the transmission line.
[0298] The above scheme acquires the current image frame and the previous image frame containing the power transmission line; inputs the current image frame into a semantic segmentation model based on an attention mechanism to obtain the current line segment set corresponding to the power transmission line in the current image frame, and the historical line segment set corresponding to the previous image frame; based on the positions of the historical line segments in the historical line segment set and the current line segments in the current line segment set, it performs galloping detection on the power transmission line. The power transmission line galloping detection method provided in this application, considering the characteristics of the power transmission line in the image frame being of limited texture and being long and thin, inputs the image frame into the semantic segmentation model based on an attention mechanism, improving the accuracy of the region where the power transmission line is located. Furthermore, the power transmission line galloping detection provided in this application does not require additional physical equipment, reducing the cost required for galloping detection; furthermore, it determines whether the power transmission line has galloped based on its position in the image frame, improving the accuracy of the determination.
[0299] Please see Figure 6 , Figure 6 This is a flowchart illustrating another embodiment of the power line galloping detection method provided in this application.
[0300] like Figure 6 As shown, another embodiment of the power transmission line galloping detection method provided in this application may specifically include the following steps:
[0301] S201, Obtain the current image frame.
[0302] Specifically, the motion detection device acquires video frames captured by the camera and extracts image frames from the video frames at intervals of t, according to a set time threshold t.
[0303] In some embodiments, the motion detection device extracts the current image frame from the video.
[0304] S202, input the current image frame into the semantic segmentation network to obtain the power transmission line region corresponding to the power transmission line.
[0305] Specifically, the motion detection device inputs the current image frame I into a semantic segmentation deep neural network. The input of the semantic segmentation deep neural network is a single image, and the output of the network is the region where the power transmission line is located in the image.
[0306] Among them, semantic segmentation network / semantic segmentation deep neural network corresponds to the semantic segmentation network based on attention mechanism mentioned above.
[0307] To better capture the subtle features of power transmission lines, the semantic segmentation network in this embodiment employs a network structure with multi-scale feature fusion capabilities. Specifically, multiple feature extraction branches of different scales are introduced into the network, each responsible for capturing features at a different scale. By fusing these features at different scales, the network can capture the features of power transmission lines more comprehensively, thereby improving its accuracy. Furthermore, an attention mechanism is introduced into the network, enabling it to adaptively focus on regions of the power transmission lines, further suppressing background noise interference.
[0308] like Figure 7 As shown, Figure 7 This is a schematic diagram of the structure of an embodiment of the semantic segmentation network provided in this application.
[0309] Because power transmission lines are long and thin, the semantic segmentation network provided in this application only uses fusion at three scales. Since the texture of power transmission lines is not rich and they are long and thin, the receptive field of convolution is small and cannot capture the complete features of the power transmission lines in the image. However, the self-attention mechanism in the Transformer network calculates the feature correlation between points, ignoring the distance between features and focusing on global features. Therefore, a self-attention module is added to each scale of the network.
[0310] Furthermore, to address the issue that power transmission lines occupy a relatively small portion of the image, this application also improves the loss function to better balance the loss between power transmission lines and background areas.
[0311] Specifically, this embodiment employs Class-Balanced Cross Entropy Loss, a loss function that automatically adjusts weights based on the number of pixels in each class, thereby avoiding accuracy degradation due to class imbalance. To balance feature representation at different scales, loss training is performed at each scale, balancing the weights of the loss at each scale.
[0312] S203 processes the transmission line area to obtain the lines corresponding to a single transmission line.
[0313] Specifically, in order to determine the line corresponding to the power transmission line in the output image, the dancing detection device performs morphological processing, backbone extraction and connected component processing on the output image to obtain the line where a single power transmission line is located, and stores the pixel coordinates (x, y values) of the line one by one.
[0314] S204, Based on the position of the power transmission line in the image per unit time, determine whether the power transmission line is galloping.
[0315] Specifically, the galloping detection device calculates the distance between the nearest points of all coordinates of all power transmission lines per unit time, and this distance can be used to determine whether the power transmission lines have galloped.
[0316] In some embodiments, the dancing detection device acquires two images M and N sequentially, wherein image M contains m lines (ML1, ML2, ..., MLm) formed by coordinate points, and image N contains n lines (NL1, NL2, ..., NLn) formed by coordinate points.
[0317] Furthermore, the motion detection device acquires the center points of the lines in image M and determines the average value of the center points to obtain the historical center points (x). m ,y m Similarly, the motion detection device acquires the center points of the lines in image N, determines the average value of the center points, and obtains the current center point (x). n ,y n ).
[0318] The motion detection device calculates the Euclidean distance between the historical center point and the current center point to obtain the first distance l. mn This value reflects the overall offset of the transmission line.
[0319] Furthermore, the goof detection device calculates the Hausdorff distance between the target line in image M and all lines in image N, and selects the line in N with the shortest distance as the line that matches the target line. The goof detection device obtains the second distance h by calculating the average of the Hausdorff distances of several sets of lines. mn .
[0320] Furthermore, the amplitude L of the transmission line variation satisfies the following relationship:
[0321] L = al mn +bh mn
[0322] Where a and b are the first weight and the second weight, respectively.
[0323] The galloping detection device calculates the rate of change of amplitude L per unit time to obtain the galloping frequency of the transmission line, thereby determining whether the transmission line is galloping.
[0324] The above scheme acquires the current image frame and the previous image frame containing the power transmission line; inputs the current image frame into a semantic segmentation model based on an attention mechanism to obtain the current line segment set corresponding to the power transmission line in the current image frame, and the historical line segment set corresponding to the previous image frame; based on the positions of the historical line segments in the historical line segment set and the current line segments in the current line segment set, it performs galloping detection on the power transmission line. The power transmission line galloping detection method provided in this application, considering the characteristics of the power transmission line in the image frame being of limited texture and being long and thin, inputs the image frame into the semantic segmentation model based on an attention mechanism, improving the accuracy of the region where the power transmission line is located. Furthermore, the power transmission line galloping detection provided in this application does not require additional physical equipment, reducing the cost required for galloping detection; furthermore, it determines whether the power transmission line has galloped based on its position in the image frame, improving the accuracy of the determination.
[0325] Please continue reading Figure 8 , Figure 8 This is a schematic diagram of the structure of an embodiment of the terminal device provided in this application. The terminal device 500 of this application embodiment includes a processor 51 and a memory 52.
[0326] The processor 51 and the memory 52 are connected to the bus. The memory 52 stores program data, and the processor 51 is used to execute the program data to implement the power line galloping detection method described in the above embodiments.
[0327] In this embodiment, processor 51 can also be referred to as a CPU (Central Processing Unit). Processor 51 may be an integrated circuit chip with signal processing capabilities. Processor 51 can also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The general-purpose processor can be a microprocessor, or processor 51 can be any conventional processor.
[0328] This application also provides a computer storage medium; please refer to the following: Figure 9 , Figure 9 This is a schematic diagram of a computer storage medium according to an embodiment of the present application. The computer storage medium 600 stores program data 61, which is used to implement the power line galloping detection method of the above embodiment when executed by the processor.
[0329] When the embodiments of this application are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0330] The above description is merely an embodiment of this application and does not limit the patent scope of this application. Equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.
Claims
1. A method for detecting power transmission line galloping, characterized in that, The method includes: Get the current image frame and the previous image frame that contain the power transmission line; The current image frame is input into a semantic segmentation model based on an attention mechanism to obtain the current line segment set corresponding to the power transmission line in the current image frame, and to obtain the historical line segment set corresponding to the previous image frame. Based on the positions of the historical segments in the historical segment set and the current segments in the current segment set, the power transmission line is subjected to galloping detection. The step of detecting galloping of the power transmission line based on the positions of historical segments in the historical segment set and current segments in the current segment set includes: Based on the position of each historical line segment, a historical center point is obtained, which is used to represent the center point position of all historical line segments in the historical line segment set; and based on the position of each current line segment, a current center point is obtained, which is used to represent the center point position of all current line segments in the current line segment set. Calculate the Euclidean distance between the historical center point and the current center point to obtain the first distance; Based on the first distance, the amplitude of the change in the transmission line is determined; In response to the change amplitude being greater than a preset threshold, it is determined that the power transmission line is galloping.
2. The method according to claim 1, characterized in that, Determining the amplitude of the change in the transmission line based on the first distance includes: Calculate the Hausdorff distance between each historical segment in the historical segment set and each current segment in the current segment set to obtain multiple candidate second distances; Select the smallest candidate second distance corresponding to each historical line segment as the target second distance corresponding to each historical line segment; The magnitude of the change is determined based on the weighted sum of the first distance and the second distance to the target.
3. The method according to claim 1, characterized in that, The attention-based semantic segmentation model comprises, in sequence, a backbone network, a first upsampling layer, a first self-attention module, a first network, a second upsampling layer, a second self-attention module, a second network, a third upsampling layer, a third self-attention module, and a third network. The step of inputting the current image frame into an attention-based semantic segmentation model to obtain the current line segment set corresponding to the power transmission line in the current image frame includes: The current image frame is input into the backbone network to obtain a first feature map, a second feature map, a third feature map, and a fourth feature map, wherein the size of the first feature map is larger than the size of the second feature map, the size of the second feature map is larger than the size of the third feature map, and the size of the third feature map is larger than the size of the fourth feature map; The fourth feature map is input into the first upsampling layer to obtain the fifth feature map, wherein the size of the fifth feature map is the same as the size of the third feature map; The fifth feature map and the third feature map are fused to obtain the first fused feature map; The first fused feature map is sequentially input into the first self-attention module and the first network to obtain the second fused feature map; The second fused feature map is input into the second upsampling layer to obtain a third fused feature map, wherein the size of the third fused feature map is the same as the size of the second feature map; The third fused feature map is fused with the second feature map to obtain a fourth fused feature map; The fourth fused feature map is sequentially input into the second self-attention module and the second network to obtain the fifth fused feature map; The fifth fused feature map is input into the third upsampling layer to obtain a sixth fused feature map, wherein the size of the sixth fused feature map is the same as the size of the first feature map; The sixth fused feature map is fused with the first feature map to obtain the seventh fused feature map; The seventh fusion feature map is sequentially input into the third self-attention module and the third network to obtain the eighth fusion feature map; Based on the eighth fusion feature map, the current line segment set corresponding to the current image frame is determined.
4. The method according to claim 3, characterized in that, The backbone network comprises a fourth network, a first downsampling layer, a fifth network, a second downsampling layer, a sixth network, a third downsampling layer, and a seventh network connected in sequence. The step of inputting the current image frame into the backbone network to obtain a first feature map, a second feature map, a third feature map, and a fourth feature map includes: The current image frame is input into the fourth network to obtain the first feature map; The first feature map is input into the first downsampling layer to obtain the downsampled first feature map; The downsampled first feature map is input into the fifth network to obtain the second feature map; The second feature map is input into the second downsampling layer to obtain the downsampled second feature map; The downsampled second feature map is input into the sixth network to obtain the third feature map; The third feature map is input into the third downsampling layer to obtain the downsampled third feature map; The downsampled third feature map is input into the seventh network to obtain the fourth feature map.
5. The method according to claim 4, characterized in that, The first network, the second network, and the third network are convolutional decoding networks, and the fourth network, the fifth network, the sixth network, and the seventh network are convolutional coding networks.
6. The method according to claim 4, characterized in that, The current image frame includes the annotation information corresponding to the power transmission line; After the step of sequentially inputting the first fused feature map into the first self-attention module and the first network to obtain the second fused feature map, the following steps are included: The second fused feature map is input into the first convolutional layer to obtain the first result; Using the first result and the annotation information, determine the first loss; After the step of sequentially inputting the fourth fused feature map into the second self-attention module and the second network to obtain the fifth fused feature map, the following steps are included: The fifth fused feature map is input into the second convolutional layer to obtain the second result; Using the second result and the annotation information, the second loss is determined; After the step of sequentially inputting the seventh fused feature map into the third self-attention module and the third network to obtain the eighth fused feature map, the following steps are included: The eighth fused feature map is input into the third convolutional layer to obtain the third result; Using the third result and the annotation information, the third loss is determined; The segmentation loss is determined based on the weighted sum of the first loss, the second loss, and the third loss; The parameters of the attention-based semantic segmentation model are adjusted using the segmentation loss.
7. The method according to claim 1, characterized in that, The step of inputting the current image frame into an attention-based semantic segmentation model to obtain the current line segment set corresponding to the power transmission line in the current image frame includes: The current image frame is input into a semantic segmentation model based on an attention mechanism to obtain several segmentation regions corresponding to the power transmission line; Morphological processing, backbone extraction, and connected component processing are performed on several of the segmented regions to obtain the current line segments corresponding to several of the transmission lines; Based on several current line segments, construct the current line segment set.
8. A terminal device, characterized in that, The terminal device includes a processor and a memory connected to the processor, wherein... The memory stores program instructions; The processor is configured to execute program instructions stored in the memory to implement the method as described in any one of claims 1 to 7.
9. A computer-readable storage medium, characterized in that, The storage medium stores program instructions that, when executed, implement the method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Power line galloping monitoring system and method based on Beidou orientation
CN114383613A
Arrangement for damping out overhead line dancing
SU1432646A1
