A method and device for detecting the trajectory of a transmission line

The transmission line trajectory detection model performs feature extraction and area division of transmission line images, combined with main branch and auxiliary branch training, solves the accuracy of transmission line trajectory detection, especially in the accurate positioning of the bending position, which improves the detection accuracy.

CN113850841BActive Publication Date: 2025-07-29SHANDONG SENTER ELECTRONICS
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110987633.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-08-26
Publication Date
2025-07-29
Estimated Expiration
2041-08-26

AI Technical Summary

Technical Problem

The prior art is difficult to ensure the accuracy of the detection of transmission line trajectory, especially in the bending part, the accurate position cannot be obtained through the linear detection method.

Method used

The transmission line trajectory detection model is used to extract the image feature map through the feature extraction module, and divide the image into multiple same areas. The region coordinates of the transmission line characteristics are obtained by scanning progressively, and the main branch and auxiliary branch are used for training and auxiliary judgment, and the transmission line trajectory is output.

Benefits of technology

It improves the accuracy of transmission line trajectory detection, can accurately locate at the bending position, and solves the problem of difficult edge detection in fuzzy scenes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113850841B_ABST
    Figure CN113850841B_ABST
Patent Text Reader

Abstract

An embodiment of the present application discloses a method and device for detecting the trajectory of a transmission line to solve the problem that it is difficult to accurately detect the trajectory of a transmission line in the prior art. Input the image of the transmission line to be measured into the transmission line trajectory detection model; through the feature extraction module of the transmission line trajectory detection model, extract the feature map of the image of the transmission line to be measured; through the row prediction module of the transmission line trajectory detection model, divide the feature map into multiple regions of the same size, and perform a row-by-row scan on the multiple regions to obtain the coordinates of the multiple regions containing the transmission line features; through the transmission line trajectory detection model, divide the output multiple coordinates to determine the transmission line trajectory in the image of the transmission line to be measured. Through the above method, the accuracy of the transmission line trajectory detection is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image processing, and in particular, to a method and device for detecting the trajectory of a transmission line. Background Art

[0002] The power system plays an increasingly important role in modern social life and development. Transmission lines are responsible for connecting power plants, substations, and users, playing an irreplaceable role as a link. Therefore, ensuring the safety and stability of transmission lines is of great importance.

[0003] Currently, in order to ensure the stable operation of transmission lines, it is usually necessary to detect the trajectory of the transmission line. One existing method first detects the set of pixel points on the edge of the transmission line through an edge detection method, and then determines the position of the transmission line through a line detection method. However, traditional image processing methods rely only on the pixel value table when extracting edge information, resulting in a low accuracy of edge extraction. Secondly, transmission lines are not always straight, and most have a certain curvature at the sag point, and the curved part of the transmission line cannot be obtained through the line detection method. Therefore, it is difficult for the existing technology to ensure the accuracy of detecting the trajectory of the transmission line. Summary of the Invention

[0004] Embodiments of this application provide a method and device for detecting the trajectory of a transmission line to solve the following technical problem: It is difficult for the existing technology to ensure the accuracy of detecting the trajectory of the transmission line.

[0005] Embodiments of this application adopt the following technical solutions:

[0006] Embodiments of this application provide a method for detecting the trajectory of a transmission line. The method includes: inputting an image of the transmission line to be measured into a transmission line trajectory detection model; extracting a feature map of the image of the transmission line to be measured through a feature extraction module of the transmission line trajectory detection model; dividing the feature map into multiple regions of the same size through a row prediction module of the transmission line trajectory detection model, and performing a row-by-row scan on the multiple regions to obtain the coordinates of multiple regions containing the features of the transmission line; and dividing the output multiple coordinates through the transmission line trajectory detection model to determine the trajectory of the transmission line in the image of the transmission line to be measured.

[0007] Embodiments of this application detect the position of the transmission line through a transmission line trajectory detection model, which can solve the problem that it is difficult to detect the edge of the transmission line in a fuzzy scenario and improve the detection accuracy. Secondly, embodiments of this application divide the image of the transmission line to be measured into multiple identical regions, and detect each region row by row to obtain the coordinates of the regions containing the features of the transmission line, so as to obtain the coordinate set of the transmission line, thus avoiding the method of obtaining the position of the transmission line through edge detection. Therefore, embodiments of this application can accurately locate even the curved position of the transmission line, thereby improving the accuracy of detecting the trajectory of the transmission line.

[0008] In an implementation manner of the present application, before inputting the image of the transmission line to be measured into the transmission line trajectory detection model, it further includes: performing sample enhancement on the collected transmission line labeled data set, and training the main branch and the auxiliary branch in the neural network model according to the enhanced transmission line labeled data set to obtain the transmission line trajectory detection model.

[0009] In an implementation manner of the present application, training the main branch and the auxiliary branch in the neural network model specifically includes: inputting the enhanced transmission line labeled data set into the main branch in the neural network model, extracting the training feature map corresponding to the transmission line labeled data set through the main branch, and dividing the training feature image into multiple identical regions to output the coordinates of the region containing the transmission line; and outputting the mask image corresponding to the transmission line through the training feature map and at least one auxiliary branch to assist in training the main branch.

[0010] In the embodiment of the present application, the coordinates of the region of the transmission line are output through the main branch, and the mask image corresponding to the transmission line is output through the auxiliary branch to judge the accuracy of the coordinates of the transmission line region through the mask image. The output coordinate set is divided through the mask image of the transmission line to determine the trajectory of each transmission line, thereby improving the accuracy of the transmission line trajectory detection.

[0011] In an implementation manner of the present application, outputting the mask image corresponding to the transmission line image through the training feature map and at least one auxiliary branch specifically includes: through the auxiliary branch, magnifying the training feature maps output by multiple residual modules in the main branch to the same scale, and splicing the magnified training feature maps together; through the auxiliary branch, inputting the connected training feature maps into the convolutional layer, and outputting the region mask image corresponding to the transmission line through the convolutional layer; and distinguishing the trajectories corresponding to multiple transmission lines through the region mask image.

[0012] In an implementation manner of the present application, before constructing the transmission line labeled data set according to the collected transmission line image with the key points of the transmission line marked, it further includes: in the case that there are more than one transmission line in the transmission line image, calculating the slope and the intercept of the transmission line, and numbering the transmission line according to the slope and the intercept to determine the trajectories corresponding to multiple transmission lines respectively.

[0013] In an implementation manner of the present application, slope calculation and intercept calculation are performed on the power transmission line, and the power transmission line is labeled according to the slope and the intercept. Specifically, in the power transmission line image, a coordinate axis is established with the intersection of the left edge boundary line and the upper edge boundary line of the power transmission line image as the origin; the power transmission lines with positive slopes are determined, the slope and the intercept of the coordinate axis are calculated, the power transmission line with the smallest intercept is labeled as the initial label, and the power transmission lines are incrementally labeled according to the increase of the intercept; and the power transmission lines with negative slopes are determined, the intercepts of the power transmission lines with negative slopes and the coordinate axis are calculated, the power transmission line with the smallest intercept is labeled as the end label, and the power transmission lines are decrementally labeled according to the increase of the intercept.

[0014] By labeling the power transmission lines in the embodiments of the present application, the coordinates corresponding to each power transmission line can be clearly planned, so that in the case of multiple power transmission lines in an image, the trained power transmission line trajectory detection model can accurately judge the trajectory of each power transmission line.

[0015] In an implementation manner of the present application, after training the main branch and the auxiliary branch in the neural network model, it further includes: calculating the accuracy rate of the coordinates of the power transmission lines output by the main branch according to the cross-entropy loss function; and determining the area of the power transmission line trajectory that presents a straight line shape, and calculating the second-order derivative of the power transmission line trajectory in the straight line shape area to tend to 0 to determine the straightness of the power transmission line trajectory; detecting the error of the neural network model through the accuracy rate and the straightness.

[0016] In an implementation manner of the present application, after training the main branch and the auxiliary branch in the neural network model, it further includes: setting the pixel point area belonging to the power transmission line feature in the mask image as the first label and the pixel point area belonging to the background as the second label according to the mask image output by the auxiliary branch; inputting the number of the first labels and the number of the second labels into a preset verification function to obtain the accuracy rate of the mask image, and determining whether the neural network model meets the preset requirements according to the accuracy rate of the mask image.

[0017] In an implementation manner of the present application, sample enhancement is performed on the power transmission line labeled data set, specifically including: randomly compressing the power transmission line labeled image according to the JPEG algorithm to obtain power transmission line distribution images with different compression ratios and different degrees of blurring; and performing linear transformation on the pixels of the power transmission line labeled image in the RGB space and the HSL space to obtain images with different features; where the features include at least one or more of the brightness feature, the contrast feature, the saturation feature, and the hue feature; and performing a random offset operation on the power transmission line labeled image to obtain images with different power transmission line positions.

[0018] An embodiment of the present application provides a transmission line trajectory detection device, including: at least one processor; and a memory communicatively connected to the at least one processor; wherein, the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to: input an image of a transmission line to be measured into a transmission line trajectory detection model; extract a feature map from the image of the transmission line to be measured through a feature extraction module of the transmission line trajectory detection model; divide the feature map into multiple identical regions through a row prediction module of the transmission line trajectory detection model, and perform a row-by-row scan on the multiple regions to determine the coordinates of the region containing the transmission line features; divide the coordinates of the region through the transmission line trajectory detection model to determine the transmission line trajectory in the image of the transmission line to be measured.

[0019] The above at least one technical solution adopted in the embodiment of the present application can achieve the following beneficial effects: The embodiment of the present application detects the position of the transmission line through the transmission line trajectory detection model, which can solve the problem that it is difficult to detect the edge of the transmission line in a fuzzy scene and improve the detection accuracy. Secondly, in the embodiment of the present application, the image of the transmission line to be measured is divided into multiple identical regions, and each region is detected row by row to obtain the coordinates of the region containing the transmission line features, so as to obtain the coordinate set of the transmission line. Therefore, the embodiment of the present application can accurately locate even the bent position of the transmission line, thereby improving the accuracy of the transmission line trajectory detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments recorded in the present application. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings. In the drawings:

[0021] Figure 1 It is a flowchart of a transmission line trajectory detection method provided by an embodiment of the present application;

[0022] Figure 2 It is a transmission line trajectory diagram provided by an embodiment of the present application;

[0023] Figure 3 It is a marked diagram of key points of a transmission line trajectory provided by an embodiment of the present application;

[0024] Figure 4 It is a structure diagram of a transmission line trajectory detection model provided by an embodiment of the present application;

[0025] Figure 5 It is a structure diagram of a residual module in a transmission line trajectory detection model provided by an embodiment of the present application;

[0026] Figure 6 A power line trajectory diagram after area division provided by an embodiment of the present application;

[0027] Figure 7 A schematic structural diagram of a power line trajectory detection device provided by an embodiment of the present application. Specific embodiments

[0028] An embodiment of the present application provides a power line trajectory detection method and device.

[0029] In order to enable those skilled in the art to better understand the technical solutions in the present application, the following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments of this specification, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.

[0030] The power system plays an increasingly important role in current social life and development. The power transmission line is responsible for connecting power plants, substations and users, playing an irreplaceable role as a link. Ensuring its safety and stability is very important.

[0031] Currently, in order to ensure the stable operation of the power line, the power line trajectory is usually detected. The existing method first detects the set of pixel points on the edge of the power line through an edge detection method, and then determines the position of the power line through a line detection method. However, when the traditional image processing method extracts edge information, it only depends on the pixel value table, and the accuracy of edge extraction is relatively low.

[0032] Secondly, the power line is not always straight, and most of it has a certain curvature at the sag point. The curved part of the power line cannot be obtained through the line detection method. Therefore, it is difficult for the existing technology to ensure the accuracy of the power line trajectory detection.

[0033] To solve the above problems, an embodiment of the present application provides a power line trajectory detection method and device. By using a power line trajectory detection model to detect the position of the power line, it can solve the problem that it is difficult to detect the edge of the power line in a fuzzy scene and improve the detection accuracy. Secondly, in the embodiment of the present application, the power line image to be measured is divided into multiple identical regions, and each region is detected row by row to obtain the region coordinates containing the power line features, so as to obtain the coordinate set of the power line. Therefore, the embodiment of the present application can accurately locate even the curved position of the power line, thereby improving the accuracy of the power line trajectory detection.

[0034] The following will detail the technical solutions proposed in the embodiments of the present application with reference to the accompanying drawings.

[0035] Figure 1 This is a flowchart of a transmission line trajectory detection method provided by an embodiment of the present application. As Figure 1 shown, the transmission line trajectory detection method includes the following steps:

[0036] S101. The transmission line trajectory detection device trains a neural network model to obtain a transmission line trajectory detection model.

[0037] In an embodiment of the present application, a transmission line marking data set is constructed according to the collected transmission line images with marked key points of the transmission line.

[0038] Specifically, after the sample set collected by the transmission line trajectory detection device, the images in the sample set are marked with key points. Since there may be one or more transmission lines in each transmission line image, it is necessary to distinguish the key points corresponding to each transmission line.

[0039] In an embodiment of the present application, when there are more than one transmission line in the transmission line image, the slope and the intercept of the transmission line are calculated, and the transmission line is numbered according to the slope and the intercept to determine the trajectories corresponding to the multiple transmission lines respectively.

[0040] It should be noted that the trajectories corresponding to the transmission lines in the embodiments of the present application are sets of coordinate positions corresponding to each transmission line.

[0041] Specifically, in the transmission line image, the transmission line with a positive slope is determined, and the intercept of the transmission line with the coordinate axis is calculated. The transmission line with the smallest intercept is marked with the initial label, and the transmission line is incrementally labeled according to the increase of the intercept. And the transmission line with a negative slope is determined, and the intercept of the transmission line with a negative slope with the coordinate axis is calculated. The transmission line with the smallest intercept is marked with the end label, and the transmission line is decrementally labeled according to the increase of the intercept.

[0042] Specifically, Figure 2 This is a transmission line trajectory diagram provided by an embodiment of the present application. As Figure 2 shown, the figure contains multiple transmission lines, and the positions and trajectories corresponding to each transmission line are different. Figure 3 This is a transmission line trajectory key point marking diagram provided by an embodiment of the present application. As Figure 3As shown, the image is divided into rows from top to bottom, and the points where the specified rows intersect the transmission lines are marked as key points. Then, a coordinate system is established for the image. For example, the intersection point of the left side and the upper edge of the image can be used as the origin of the coordinate system, the direction extending to the right is used as the horizontal axis of the coordinate system, and the direction extending downward is used as the vertical axis of the coordinate system. The starting and ending points of each transmission line in the image are determined, and corresponding straight lines are connected based on the starting and ending points. In the established coordinate system, the slope of each straight line and the x-intercept of each straight line with the horizontal axis are calculated. The transmission line with a positive slope and the smallest x-intercept is marked as No. 1, the one with the second smallest x-intercept is marked as No. 2, and so on. The transmission lines with positive slopes are numbered in ascending order of the x-intercept. Similarly, the transmission line with a negative slope and the smallest x-intercept is marked as the last number, and the transmission lines with negative slopes are numbered from largest to smallest in increasing order of the x-intercept.

[0043] For example, as Figure 3 shown, from top to bottom in the figure, a specified row is obtained every 5 pixels. The points where each specified row intersects the transmission line trajectory are marked as key points. It can be seen that there are multiple key points in the figure. To distinguish the key points corresponding to each transmission line, the transmission lines need to be numbered. First, it can be obtained from the image that there are a total of 6 transmission lines. After calculation, it can be concluded that the slopes of the first to the third transmission lines from the left are positive, and the x-intercept of the first transmission line from the left is the smallest. Therefore, the first transmission line is marked as No. 1. The x-intercepts of the second and third transmission lines from the left increase in sequence. Therefore, the second and third transmission lines are marked as No. 2 and No. 3 respectively. Similarly, after calculation, the slopes of the first to the third transmission lines from the right are negative, and the x-intercept of the first transmission line from the right is the largest. Therefore, this transmission line is marked as No. 4. The x-intercepts of the second and third transmission lines from the right decrease in sequence. Therefore, the second and third transmission lines are marked as No. 5 and No. 6 respectively.

[0044] It should be noted that the digital numbering of the transmission lines and the numbering rules in the embodiments of this application can be changed according to actual application requirements, and this application does not limit this.

[0045] In an embodiment of this application, the server performs sample enhancement on the transmission line marking dataset.

[0046] Specifically, according to the JPEG algorithm, the power line marked image is randomly compressed to obtain power line distribution images with different compression ratios and different degrees of blurring. And within the RGB space and the HSL space, linear transformation is performed on the pixels of the power line marked image to obtain images with different features. Among them, the features include at least one or more of brightness feature, contrast feature, saturation feature, and hue feature. And a random offset operation is performed on the power line marked image to obtain images with different power line positions.

[0047] Specifically, in order to enhance the diversity of training data, a combined data augmentation strategy is adopted. The image is randomly compressed by the JPEG (Joint Photographic Experts Group) algorithm, enabling the trainable model to adapt to power line distributions under different compression ratios and different degrees of blurring. By performing linear transformation on the image pixels within the RGB space and the HSL space, features such as the brightness, contrast, saturation, and hue of the image are randomly transformed. By performing random offset operations on the image, such as translation and rotation, the diversity of the power line positions in the image is enhanced.

[0048] In the embodiment of the present application, the diversity of training data is enhanced by augmenting the training samples, and the convolutional neural network is trained with more data to improve the accuracy of model training.

[0049] In an embodiment of the present application, the power line trajectory detection device trains the main branch and the auxiliary branch in the neural network model according to the enhanced power line marked data set to obtain a power line trajectory detection model.

[0050] In an embodiment of the present application, the enhanced power line marked data set is input into the main branch of the neural network model. The main branch extracts the training feature map corresponding to the power line marked data set, and divides the training feature image into multiple regions of the same size to output the coordinates of the regions containing the power lines. And through the training feature map and at least one auxiliary branch, a mask image corresponding to the power line is output to assist in training the main branch.

[0051] Specifically, the enhanced power line marked data set is input into the neural network model. The residual module of the main branch extracts the feature map of the input power line image and divides the image into multiple identical regions according to the specified rows. Each region is scanned row by row to determine the region with power line features, and the coordinates of this region are output as the power line position. The auxiliary branch converts the feature map extracted by the residual module into a mask image corresponding to the power line region to determine the trajectory region of the power line, so that the trajectories of each power line can be determined through the mask image, and the coordinates output by the main branch can be divided to determine the coordinate set corresponding to each power line.

[0052] Figure 4 This is a structural diagram of a transmission line trajectory detection model provided by an embodiment of the present application. As Figure 4 shown, the neural network model includes a main branch and an auxiliary branch. Among them, the main branch of the neural network model includes multiple residual modules, a fully connected layer, a convolutional layer, and a predicted anchor row transmission line module.

[0053] Figure 5 This is a structural diagram of a residual module in a transmission line trajectory detection model provided by an embodiment of the present application. As Figure 5 shown, the residual module is composed of a residual branch and an identity branch. The residual branch is mainly composed of a convolutional layer, an activation layer, and a batch normalization layer. The convolutional layer completes feature map extraction through convolution operations. The activation layer activates some features on the feature map while suppressing some unimportant features. The batch normalization layer normalizes the activated output feature map to stabilize model training. Among them, there is also an identity branch in the residual module. This branch directly passes the original input of the residual module to the module output, and adds the output of the residual branch to the result of the identity branch to obtain the output of the residual module.

[0054] The embodiment of the present application can greatly alleviate the problem of gradient disappearance caused by an overly deep model. The feature extraction backbone network reduces the size of the feature map and aggregates features through the pooling layer, which can reduce the computational amount.

[0055] Further, the residual module is specifically y = B(f(C(x)) + x, which is composed of a residual branch and an identity branch. Among them, x is the input feature, y is the output feature, C is the convolutional layer, f is the activation function, and B is the batch normalization layer. The row prediction module is specifically y * = R(F(y)), where F is the fully connected layer and R is the Reshape operation.

[0056] Further, the end of the main branch is a row prediction module. This module receives the last feature map of the feature extraction backbone network and is converted into an output tensor through the fully connected layer and the convolutional layer. The output tensor is a matrix of num_rows * num_lines * num_grids. Among them, num_rows is the number of rows of the positions of the transmission lines to be predicted specified, num_lines is the number of transmission lines to be predicted, and num_grids is the number of blocks into which the feature map is divided on the horizontal axis.

[0057] Figure 6A power line trajectory map after region division provided by an embodiment of the present application. The image is divided into num_rows along the vertical axis and num_grids blocks along the horizontal axis. For a certain row, the model predicts whether there is a power line in this row. If so, it predicts the position of the power line, and in this method, the coordinate set of the power line is determined by predicting the block where the power line is located.

[0058] In an embodiment of the present application, through the auxiliary branch, the training feature maps output by multiple residual modules in the main branch are enlarged to the same scale, and the enlarged training feature maps are spliced together. Through the auxiliary branch, the connected training feature maps are input into the convolutional layer, and the convolutional layer outputs the region mask image corresponding to the power line. Through the region mask image, the trajectories corresponding to multiple power lines are distinguished.

[0059] As Figure 4 shown, the auxiliary branch in the neural network model includes some residual modules and a convolutional layer. Considering that the power line target is slender, the auxiliary branch enlarges the feature maps output by the last three residual modules in the main branch to the same scale and splices them together, and outputs the region mask through the convolutional layer to complete the prediction of the power line region. It shares the same feature extraction backbone network with the main branch. The auxiliary branch predicts the power line region trajectory through the region mask image, and can divide the regions of multiple power lines through the region mask image, thereby improving the accuracy of the main branch in dividing the regions of multiple power lines.

[0060] In an embodiment of the present application, according to the cross-entropy loss function, the accuracy rate of the coordinates of the power line output by the main branch is calculated. And, the region where the power line trajectory is linear is determined, and the second-order differential of the power line trajectory in the linear region is calculated to tend to 0 to determine the straightness of the power line trajectory. Through the accuracy rate and the straightness, the error detection of the neural network model is carried out.

[0061] Specifically, for the power line trajectory detection model, two loss functions are used to calculate the accuracy of the model. The accuracy of the prediction of the block region where the power line is located is calculated through the cross-entropy loss function, specifically where P i,j,: is a (ω + 1)-dimensional vector, representing the probability that the selected point in the i-th row and the j-th column is a power line, T i,j,: is the one-hot form of the correct label, and L CE is the cross-entropy loss function. The second loss function calculates the second-order differential of the power line trajectory and forces the second-order differential to tend to 0, because most positions of the power line are linear, and the smaller the second-order differential of the predicted curve, the straighter it is, so as to determine whether the prediction of the power line trajectory in the linear part is accurate. Specifically where Loc i,jis the j-th column position of the i-th transmission line.

[0062] In an embodiment of the present application, according to the mask image output by the auxiliary branch, the pixel point region belonging to the transmission line feature in the mask image is set as the first mark, and the pixel point region belonging to the background is set as the second mark. The number of the first marks and the number of the second marks are input into a preset verification function to obtain the accuracy rate of the mask image, and it is determined whether the neural network model meets the preset requirements according to the accuracy rate of the mask image.

[0063] Specifically, the transmission line image is converted into pixel-level point classification. The predicted label of the pixel point region belonging to the transmission line is marked as 1, and the predicted label of the pixel point belonging to the background region is marked as 0. Through the function Calculate the accuracy of the output transmission line region. Where N is the number of pixel points, y i is the true category of pixel point i, is the probability that the predicted pixel point i belongs to category 1.

[0064] S102. The transmission line trajectory detection device inputs the to-be-detected transmission line image into the transmission line trajectory detection model.

[0065] In an embodiment of the present application, after the transmission line trajectory detection model is trained, the to-be-detected transmission line image is input into the transmission line trajectory detection model to detect the transmission line trajectory.

[0066] S103. The feature extraction module of the transmission line trajectory detection model extracts a feature map from the to-be-detected transmission line image.

[0067] In an embodiment of the present application, the feature extraction module of the transmission line trajectory detection model extracts a feature map from the received to-be-detected transmission line image. The feature extraction module reduces the size of the feature map and aggregates features through the pooling layer, which can reduce the calculation amount.

[0068] S104. The row prediction module of the transmission line trajectory detection model divides the feature map into multiple regions of the same size, and scans the multiple regions row by row to obtain the coordinates of the multiple regions containing the transmission line features.

[0069] In an embodiment of the present application, the row prediction module of the transmission line trajectory detection model divides the feature map corresponding to the to-be-detected image into multiple identical regions according to the specified size. The row prediction module scans each row in the to-be-detected image for the transmission line feature to determine the region with the transmission line feature. According to the preset coordinate system, the coordinates of this region are determined, and the coordinates of this region are output as the coordinates of the transmission line key points.

[0070] S105. The power line trajectory detection model divides the multiple output coordinates to determine the power line trajectory in the power line image to be measured.

[0071] In an embodiment of the present application, after scanning the power line image to be measured line by line, multiple coordinate points will be obtained. The power line trajectory detection model will divide the obtained coordinate points according to the number of power lines in the image to determine the multiple coordinate points corresponding to each power line. Connecting the coordinate points corresponding to each power line can obtain the power line trajectory in the power line image to be measured.

[0072] Figure 7 It is a schematic structural diagram of a power line trajectory detection device provided by an embodiment of the present application. As Figure 7 shown, the power line trajectory detection device includes:

[0073] At least one processor; and,

[0074] A memory communicatively connected to the at least one processor; wherein,

[0075] The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to:

[0076] Input the power line image to be measured into the power line trajectory detection model;

[0077] Extract a feature map from the power line image to be measured through the feature extraction module of the power line trajectory detection model;

[0078] Divide the feature map into multiple regions of the same size through the row prediction module of the power line trajectory detection model, and scan the multiple regions line by line to determine the coordinates of the regions containing the power line features;

[0079] Divide the coordinates of the regions through the power line trajectory detection model to determine the power line trajectory in the power line image to be measured.

[0080] Each embodiment in the present application is described in a progressive manner. The same or similar parts among the embodiments can be referred to each other, and the key points of each embodiment are the differences from other embodiments. In particular, for the device, equipment, and non-volatile computer storage medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can refer to the partial description of the method embodiments.

[0081] The above description has been made of specific embodiments of the present application. Other embodiments are within the scope of the appended claims. In some cases, the acts or steps recited in the claims may be performed in a different order than in the embodiments and still achieve the desired result. Additionally, the processes depicted in the figures do not necessarily require the particular order or sequential order shown to achieve the desired result. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0082] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, various changes and modifications can be made to the embodiments of the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the embodiments of the present application shall be included within the scope of the claims of the present application.

Claims

1. A method for detecting the trajectory of a transmission line, characterized in that, The method includes: Inputting the power transmission line image to be measured into a power transmission line trajectory detection model; Extracting a feature map from the power transmission line image to be measured through a feature extraction module of the power transmission line trajectory detection model; Through a row prediction module of the power transmission line trajectory detection model, dividing the feature map into multiple regions of the same size, and performing a row-by-row scan on the multiple regions to obtain the coordinates of the multiple regions containing the power transmission line features; the row prediction module receives the last feature map of the feature extraction backbone network and is converted into an output tensor through a fully connected layer and a convolutional layer, and the output tensor is a matrix of num_rows*num_lines*num_grids; where num_rows is the number of rows of the power transmission line positions to be predicted, num_lines is the number of power transmission lines to be predicted, and num_grids is the number of blocks into which the feature map is to be divided on the horizontal axis; Outputting a mask image corresponding to the power transmission line through a training feature map and at least one auxiliary branch to assist in training the main branch; where the training feature map is output by multiple residual modules in the main branch; Dividing the output multiple coordinates through the power transmission line trajectory detection model to determine the power transmission line trajectory in the power transmission line image to be measured; Determining the trajectories of each power transmission line through the mask image, dividing the coordinates output by the main branch to determine the coordinate set corresponding to each power transmission line.

2. The method for detecting the trajectory of a power transmission line according to claim 1, wherein Before inputting the power transmission line image to be measured into the power transmission line trajectory detection model, the method further includes: Performing sample enhancement on the collected power transmission line labeled data set, and training the main branch and the auxiliary branch in the neural network model according to the enhanced power transmission line labeled data set to obtain a power transmission line trajectory detection model.

3. The method for detecting the trajectory of a power transmission line according to claim 2, wherein The training of the main branch and the auxiliary branch in the neural network model specifically includes: Inputting the power transmission line labeled data set into the main branch of the neural network model, extracting a training feature map corresponding to the power transmission line labeled data set through the main branch, and dividing the training feature map into multiple regions of the same size to output the coordinates of the regions containing the power transmission line.

4. The method for detecting the trajectory of a transmission line according to claim 1, wherein The outputting of the mask image corresponding to the power transmission line through the training feature map and at least one auxiliary branch specifically includes: Through the auxiliary branch, magnifying the training feature maps output by multiple residual modules in the main branch to the same scale, and splicing the magnified training feature maps together; Inputting the spliced training feature maps into a convolutional layer through the auxiliary branch, and outputting a regional mask image corresponding to the power transmission line through the convolutional layer; Distinguishing the trajectories corresponding to multiple power transmission lines through the regional mask image.

5. The method for detecting the trajectory of a power transmission line according to claim 2, wherein Before training the main branch and the auxiliary branch in the neural network model, the method further includes: In the case where there are more than one power transmission line in the power transmission line image, calculating the slope and the intercept of the power transmission line, and numbering the power transmission line according to the slope and the intercept to determine the trajectories corresponding to the multiple power transmission lines respectively.

6. The method for detecting the trajectory of a power transmission line according to claim 5, wherein, Calculating the slope and the transverse intercept of the transmission line, and labeling the transmission line according to the slope and the transverse intercept, specifically includes: In the transmission line image, a coordinate axis is established with the intersection of the left edge boundary line and the upper edge boundary line of the transmission line image as the origin; Determining the transmission lines with positive slopes, and calculating the intercepts of the slopes with the coordinate axes, marking the transmission line with the smallest intercept as the initial number, and increasing the number of the transmission lines according to the increasing intercepts; and Determine the transmission lines with negative slopes, and calculate the transverse intercepts between the transmission lines with negative slopes and the coordinate axis. Mark the transmission line with the smallest transverse intercept as the last number, and decrement the number of the transmission lines according to the increasing transverse intercepts.

7. A method for detecting the trajectory of a transmission line according to claim 2, characterized in that, After training the main branch and the auxiliary branch in the neural network model, the method further includes: Calculating the accuracy of the coordinates of the transmission line output by the main branch according to a cross entropy loss function; and Determining a straight area in the transmission line trajectory, and calculating the second-order differential of the transmission line trajectory in the straight area tending to 0 to determine the straightness of the transmission line trajectory; Error detection is performed on the neural network model through the accuracy and the straightness.

8. The method for detecting the trajectory of a power transmission line according to claim 2, wherein After training the main branch and the auxiliary branch in the neural network model, the method further includes: According to the mask image output by the auxiliary branch, a pixel region belonging to the transmission line feature in the mask image is set as a first marker, and a pixel region belonging to the background is set as a second marker; The number of the first marks and the number of the second marks are input into a preset verification function to obtain the accuracy of the mask image, and whether the neural network model meets the preset requirements is determined based on the accuracy of the mask image.

9. A method for detecting the trajectory of a transmission line according to claim 2, characterized in that, The sample enhancement of the collected power line labeling dataset specifically includes: Randomly compress the power line marker image according to the JPEG algorithm to obtain power line distribution images with different compression ratios and different blur levels; and In RGB space and HSL space, linearly transforming the pixels of the power line marker image to obtain images with different characteristics; wherein the characteristics include at least one or more of brightness characteristics, contrast characteristics, saturation characteristics, and hue characteristics; and A random offset operation is performed on the power line marker image to obtain images with different power line positions.

10. A transmission line trajectory detection device comprising: at least one processor; as well as, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to: Inputting the image of the transmission line to be tested into the transmission line trajectory detection model; Extracting a feature map of the image of the transmission line to be tested by using a feature extraction module of the transmission line trajectory detection model; Through the row prediction module of the transmission line trajectory detection model, the feature map is divided into multiple regions of the same size, and multiple such regions are scanned row by row to determine the coordinates of the regions containing the transmission line features; the row prediction module receives the final feature map of the feature extraction backbone network and is converted into an output tensor through a fully connected layer and a convolutional layer, and the output tensor is a matrix of num_rows * num_lines * num_grids; where num_rows is the number of rows of the positions of the transmission lines to be predicted, num_lines is the number of transmission lines to be predicted, and num_grids is the number of blocks into which the feature map is to be divided on the horizontal axis. Through the training feature map and at least one auxiliary branch, a mask image corresponding to the transmission line is output to assist in training the main branch; where the training feature map is output by multiple residual modules in the main branch. Through the transmission line trajectory detection model, the coordinates of the region are divided to determine the transmission line trajectory in the image of the transmission line to be measured. Through the mask image, the trajectories of each transmission line are determined to divide the coordinates output by the main branch to determine the coordinate set corresponding to each transmission line.

Citation Information

Patent Citations

  • Expressway pavement detection method based on lane lines

    CN108280450A

  • Power transmission line wire defect detection method based on machine vision

    CN111402248A