Power line tree obstacle detection method and system based on AI image recognition
By setting up a camera on the power line to acquire video images, combining the Snake model and deep learning model, optimizing wire profile detection, the problem of inaccurate wire extraction is solved, and high-precision and efficient tree barrier detection is achieved.
Patent Information
- Application Number
- CN202510329919.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-20
- Publication Date
- 2025-07-18
- Estimated Expiration
- 2045-03-20
AI Technical Summary
In the power line tree barrier detection, there is a problem that wire extraction is inaccurate, affecting the accuracy of tree barrier detection. Especially in the complex background, traditional Snake models are easily disturbed.
Using an AI image recognition method, a camera is set up at the top of the tower to collect video images, a Snake model is used to detect wire profiles with deep learning models, and a linear prior energy and scene constraint energy are introduced to optimize the Snake model, and a tree barrier recognition is combined with vegetation pixel detection.
It improves the accuracy and speed of wire extraction, enhances the accuracy and real-time nature of tree barrier detection, and reduces the possibility that wire profiles deviate from the real position.
Smart Images

Figure CN120339901A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image processing technology, and particularly to a method and system for detecting tree obstacles in power lines based on AI image recognition. Background Art
[0002] In the power system, power lines are the key channels for power transmission, and their safe and stable operation is crucial for ensuring social production and life. However, power lines are often threatened by the hidden danger of tree obstacles. The contact between branches and conductors may cause a decrease in the insulation performance between conductors, and then a short-circuit phenomenon may occur.
[0003] In the literature "Research on Tree Obstacle Analysis Technology for Transmission Lines Based on Monocular Vision", a monocular vision detection method is proposed. By using online monitoring and image processing technology, real-time early warning is achieved, and the inspection cost is effectively reduced. However, when extracting conductors, although the improved Canny edge detection algorithm is used, irrelevant straight lines will still be detected, interfering with the accuracy of vanishing point detection, and thus affecting the accuracy of tree obstacle detection. Summary of the Invention
[0004] In order to solve the above technical problems, the purpose of this application is to provide a method and system for detecting tree obstacles in power lines based on AI image recognition. The specific technical solutions adopted are as follows:
[0005] In the first aspect, an embodiment of this application provides a method for detecting tree obstacles in power lines based on AI image recognition. The method includes the following steps:
[0006] Collect video images of the conductors between the poles and towers to obtain each frame of image, where the image includes the pole and tower images connected to both sides of the conductor;
[0007] Based on the edge line features in each frame of image, obtain the suspected conductor lines in each frame of image;
[0008] In the current frame of image, determine the initial contour of the Snake model according to the position of the conductor in the image; determine the straight line prior energy of the Snake model based on the directions of all suspected conductor lines in the current frame of image; calculate the scene constraint energy of the current iteration of the Snake model based on the proximity between the contour of the current iteration of the Snake model and the suspected conductor lines;
[0009] Based on the straight line prior energy and the scene constraint energy, obtain the optimized energy function of the current iteration, calculate the gradient of the total energy of the current iteration; determine the evolution equation of each iteration based on the gradient of the total energy, and perform iterations in combination with the Snake model to obtain the contour of each conductor in the current frame of image, and use the neighborhood of the conductor contour as the detection area;
[0010] Obtain the vegetation pixels in each frame of the image; detect the tree obstacles on the power line based on the occurrence of the vegetation pixels in the detection area of each frame of the image.
[0011] In one of the embodiments, the process of obtaining the suspected wire lines in each frame of the image is as follows:
[0012] Perform edge detection on the grayscale images of each frame to obtain each edge image, and perform line detection on each edge image to obtain each line in each edge image;
[0013] Set the standard lines in each frame of the image;
[0014] Take the lines whose length is greater than the preset length threshold and the angle with the standard line is less than the preset angle threshold as the suspected wire lines.
[0015] In one of the embodiments, the process of setting the standard line is as follows:
[0016] In the area of any tower in the first frame of the image, randomly select a pixel point, denoted as A1(u1, v1); in the area of another tower in the first frame of the image, obtain the pixel point corresponding to A1(u1, v1), denoted as A2(u2, v2), and the line connecting point A1(u1, v1) and point A2(u2, v2) is denoted as the standard line; take the position of the standard line in the first frame of the image as the position of the standard line in each frame of the image.
[0017] In one of the embodiments, the process of obtaining the prior energy of the line is as follows:
[0018] Take the angle between the i-th suspected wire line and the standard line as the direction angle of the i-th suspected wire line, denoted as Denote the prior energy of the line as E line , E line The expression of is: In the formula, M is the number of suspected wire lines in the current frame of the image, and cos 2 () is to calculate the square of the cosine function.
[0019] In one of the embodiments, the expression of the scene constraint energy of the current iteration is:
[0020]
[0021] In the formula, E prior is the scene constraint energy of the current iteration; M is the number of suspected wire lines in the current frame of the image; N is the number of pixel points on the contour of the current iteration; D[] is to calculate the Euclidean distance function; (x k , y k ) is the coordinate of the k-th pixel point on the contour of the current iteration; (xHi , y Hi ) is the coordinate of the midpoint on the suspected line of the i-th wire in the current frame image.
[0022] In one embodiment, the expression of the optimized energy function for the current iteration is:
[0023] E total = α × E grad + β × E curve + γ × E line + δ × E prior
[0024] In the formula, E total is the optimized energy function for the current iteration, α, β, γ, and δ are all preset energy weights, and E grad , E curve are respectively the gradient energy and the curvature energy in the energy function of the original Snake model, E line is the straight line prior energy, and E prior is the scene constraint energy for the current iteration; where α > β > γ > δ, and the sum of α, β, γ, and δ is 1.
[0025] In one embodiment, the process of obtaining the gradient of the total energy for the current iteration is as follows:
[0026] Take the optimized energy function for the current iteration as the energy function in the Snake model at the current iteration, and calculate the gradient of the total energy for the current iteration.
[0027] In one embodiment, the evolution equation for each iteration is:
[0028]
[0029] In the formula, represents the k-th point on the contour at the (t + 1)-th iteration; represents the k-th point on the contour at the t-th iteration; η represents the learning rate; is the gradient of the total energy for the current iteration.
[0030] In one embodiment, the power line tree obstacle detection based on the occurrence of vegetation pixels in the detection area of each frame image is specifically as follows:
[0031] For each detection area in each frame image, take the pixel at the average value of the coordinates of a preset number of vegetation pixels closest to the edge of the detection area as the detection point. If the detection point is within the detection area, it means that there is a tree obstacle in the power line corridor, and an alarm is issued; otherwise, there is no tree obstacle in the power line corridor.
[0032] In a second aspect, an embodiment of the present application further provides a power line tree obstacle detection system based on AI image recognition, including a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, the steps of the method described in any one of the above are implemented.
[0033] The embodiments of the present application at least have the following beneficial effects:
[0034] In the present application, by setting a camera at the top of the pole tower for video monitoring, real-time detection can be achieved through the video collected by the camera, which does not depend on the inspection time and increases the real-time nature of detection; by using wire features to screen the detected straight lines in the image, the influence of irrelevant straight lines in the background information is reduced; by optimizing the energy function during each iteration through the directions of all suspected wire lines in the current frame image and the degree of proximity to the contours during each iteration of the Snake model, the Snake model is improved. Through the improved Snake model, wire contour detection is performed, and power line tree obstacle detection is carried out based on the appearance of vegetation pixels near the detected wires, reducing the possibility that the Snake model deviates from the true wire position when obtaining the wire contour, improving the extraction accuracy and speed of the wires, and thus improving the accuracy of tree obstacle detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0036] Figure 1 It is a flowchart of the steps of a power line tree obstacle detection method based on AI image recognition provided by an embodiment of the present application;
[0037] Figure 2 It is a schematic diagram of the acquisition process of suspected wire lines. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0038] In order to further elaborate on the technical means and effects adopted by the present application to achieve the intended invention purpose, the following, in combination with the drawings and preferred embodiments, details the specific implementation manners, structures, features, and effects of a power line tree obstacle detection method and system based on AI image recognition proposed according to the present application. In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. In addition, the specific features, structures, or characteristics in one or more embodiments can be combined in any suitable form.
[0039] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the technical field to which this application belongs.
[0040] The following specifically describes the specific solutions of a power line tree fault detection method and system based on AI image recognition provided by this application in conjunction with the accompanying drawings.
[0041] Please refer to Figure 1 , which shows a flowchart of the steps of a power line tree fault detection method based on AI image recognition provided by an embodiment of this application. The method includes the following steps:
[0042] Step S1, collect video images of the conductors between the poles and towers to obtain each frame of image, where the image includes the images of the poles and towers connected to both sides of the conductor.
[0043] When detecting tree faults within the power line corridor, install an optical camera at the highest point of each pole and tower to collect video images of the conductors between the poles and towers. Among them, the video images of the conductors include the images of the poles and towers connected to both sides of the conductor. It should be noted that for the placement position of the optical camera, this application only provides one placement method, and the implementer can also set the placement method of the camera according to the actual situation, and this application does not make specific restrictions.
[0044] Perform frame-by-frame processing on the collected video images to obtain each frame of image. Among them, video frame division is a well-known technology, and the specific process will not be elaborated.
[0045] Since there is perspective distortion in the images captured by the camera, there will be a large error in judging the distance and position directly on the images captured by the camera. Therefore, perform inverse perspective transformation on each frame of image to obtain the corrected each frame of image, as well as the corresponding relationship between the world coordinate system and the coordinate system of each frame of image. Among them, inverse perspective transformation is a well-known technology, and the specific process will not be elaborated. It should be noted that in the embodiments of this application, the corrected each frame of image can be regarded as a top view of the conductor between adjacent poles and towers.
[0046] Step S2, obtain the suspected conductor lines in each frame of image based on the edge line features in each frame of image; in the current frame of image, determine the initial contour of the Snake model according to the position of the conductor in the image; determine the straight line prior energy of the Snake model based on the trends of all suspected conductor lines in the current frame of image; calculate the scene constraint energy of the current iteration of the Snake model based on the proximity between the contour of the current iteration of the Snake model and the suspected conductor lines.
[0047] Due to the influence of factors such as gravity and wind, the shape of the conductor in the power line is not completely straight and may have certain bends. By using the Snake model, the conductor contour can be extracted. However, in the actual power line scene image, the background is relatively complex. In addition to the conductor, there may be tree obstacles, as well as tower poles and other power equipment. When the traditional Snake model faces a complex background, it may be interfered by the edges of other objects in the background, resulting in inaccurate contour extraction. For example, some parts of the tower pole may overlap with the conductor in the image, and the traditional Snake model may mistakenly include the edge of the tower pole in the conductor contour. Therefore, this application improves the Snake model according to the actual application scenario.
[0048] (1) For each corrected frame image, since it is a color image, it is converted into a grayscale image of the color image; further, the edge image of the grayscale image is obtained through the Canny edge detection algorithm, and each straight line in the edge image is obtained through the Hough detection algorithm. Among them, the grayscale conversion, Canny edge detection algorithm, and Hough detection algorithm are well-known technologies, and the specific process will not be elaborated here.
[0049] It should be noted that for the acquisition of the edge image and the straight lines in the image, this application only provides an edge detection algorithm and a straight line detection algorithm. There are many existing edge detection algorithms and straight line detection algorithms, and implementers can also use other edge detection algorithms and straight line detection algorithms to obtain the edge image and the straight lines in the image respectively. This application does not make specific restrictions.
[0050] (2) Screen the straight lines in the edge image to obtain the suspected conductor lines, specifically:
[0051] In the area of any tower pole in the first frame image, a pixel point is randomly selected and denoted as A1(u1, v1); in the area of another tower pole in the first frame image, the pixel point corresponding to A1(u1, v1) is obtained and denoted as A2(u2, v2). Preferably, in the embodiment of this application, the connection points of the same conductor with the two side tower poles are used as point A1(u1, v1) and point A2(u2, v2) respectively; the straight line connecting point A1(u1, v1) and point A2(u2, v2) is obtained and denoted as the standard straight line; since the position of the tower pole in the video image is basically unchanged, the position of the standard straight line in the first frame image is used as the position of the standard straight line in each frame image.
[0052] For each straight line in the edge image, a straight line with a length greater than the preset length threshold and an angle less than the preset angle threshold with the standard straight line is obtained as the suspected conductor line. Preferably, in the embodiment of this application, the length threshold is set to 200 pixels, and the angle threshold is set to 15°. As other embodiments of this application, implementers can set the length threshold and the angle threshold according to the actual situation.
[0053] The conductors in the power line have a certain length feature in the image. Setting the length to be greater than 200 pixels is to exclude the interference of some short lines in the image. These short lines may be noise or the edges of other small objects. Because the real conductors will present relatively long line segments within the camera's field of view, through this length screening, the line segments that are more likely to be conductors can be initially screened out, improving the accuracy of detection. The conductors of the power line are usually laid approximately horizontally, and the straight lines with an angular deviation limited within 15° further narrow the screening range and exclude the interference of line segments in other directions.
[0054] (3) In the current frame image, according to the lateral length of the pole tower and the distance between adjacent pole towers, construct the initial contour of the Snake model. Among them, take the lateral length of the pole tower as the width of the initial contour and the distance between adjacent pole towers as the length of the initial contour, so as to obtain the initial contour of the Snake model. It should be noted that for the setting of the width and length of the initial contour, it is necessary to ensure that the initial contour includes all the conductors between adjacent pole towers. As other embodiments of the present application, the implementer can set the width and length of the initial contour according to the actual situation.
[0055] (4) In the image, the edges of objects usually show a sharp change in pixel values, and this change can be quantified by the image gradient. The image gradient is a vector, the magnitude of which reflects the severity of the pixel value change, and the direction points to the direction where the pixel value changes fastest. In each frame of the image, the difference in pixel values between the conductor and the background forms an obvious gradient change at the edge of the conductor.
[0056] In the power line scenario, although the conductors may be bent to a certain extent due to factors such as gravity and wind, overall they still have an approximate straight-line trend. Introduce an energy term related to the theoretical trend of the conductor into the model, so that the contour can refer to this prior information during the evolution process and optimize in the direction that conforms to the conductor's trend.
[0057] In the current frame image, first, for each suspected conductor line, take the included angle between the suspected conductor line and the standard straight line as the direction angle of the suspected conductor line; further, obtain the straight-line prior energy of the Snake model, and the expression is:
[0058]
[0059] In the formula, E line is the straight-line prior energy of the Snake model, M is the number of suspected conductor lines in the current frame image, cos 2 () is to calculate the square of the cosine function, represents the direction angle of the i-th suspected conductor line.
[0060] The value range of [direction angle] is [0, 1]. When the direction angle is smaller, the direction of the suspected line of the i-th wire is closer to the theoretical wire direction. The value of [a certain variable] is closer to 1. On the contrary, when the direction angle is larger, E line The value of [a certain variable] is closer to 0. When the direction of a certain part of the contour deviates from the theoretical wire direction, in order to minimize the total energy, the model will adjust the contour so that the direction of this part of the contour changes towards the direction close to the theoretical wire direction, thereby guiding the entire contour to evolve in the direction that conforms to the wire direction.
[0061] The line prior energy can, on the one hand, make full use of the prior knowledge of the wire direction in the power line, provide strong constraints for the model, reduce the uncertainty of the model in searching for the wire contour in a complex image environment, and improve the convergence speed and accuracy of the algorithm. On the other hand, it enhances the robustness of the model to noise and local interference. Even in the case of image noise, partial occlusion of the wire, or poor image quality, the line prior information can help the model maintain the judgment of the overall wire direction, making the extracted wire contour closer to the real situation and improving the reliability and stability of the model in practical applications.
[0062] (5) In the detection of power line tree obstacles, the Hough transform can quickly detect the straight lines in the image and can initially locate the approximate position of the wire in wire detection. However, the Hough transform has limitations in the detection of curved wires and cannot accurately outline the wire contour. By introducing a scene constraint term to fuse the rough positioning result of the Hough transform, this application enables the model to refer to the existing preliminary position information when optimizing the contour, avoiding deviating too far from the real wire position during the search process, effectively utilizing the advantages of the Hough transform, and improving the overall detection accuracy.
[0063] Therefore, in the current frame image, the scene constraint energy of the current iteration of the Snake model is determined by the proximity between the suspected wire line and the contour of the current iteration of the Snake model. The expression is:
[0064]
[0065] In the formula, E prior is the scene constraint energy of the current iteration of the Snake model; M is the number of suspected wire lines in the current frame image; N is the number of pixel points on the contour of the current iteration of the Snake model; D[] is the Euclidean distance calculation function; (x k , y k ) is the coordinate of the k-th pixel point on the contour of the current iteration of the Snake model; (x Hi , y Hi ) is the coordinate of the midpoint of the i-th suspected wire line in the current frame image. Among them, the midpoint coordinates of the suspected wire line are used to replace the overall position of the suspected wire line.
[0066] The sum of the squares of the Euclidean distances between the suspected points on the current wire and the Hough transform positioning points reflects the degree of difference between the current Snake model contour and the rough positioning result of the Hough transform. The greater the difference, the prior greater the value of E. During the model iteration process, when E prior is large, it means that the current contour deviates greatly from the rough positioning result of the Hough transform, which will have a greater impact on the total energy, prompting the model to adjust the contour to approach the wire position located by the Hough transform, so as to converge to the true wire contour faster.
[0067] The scene constraint energy effectively reduces the blindness of the model during the contour optimization process, making the finally extracted wire contour closer to the real situation. Especially when the wire is partially occluded or the image quality is poor, it can rely on the preliminary result of the Hough transform to improve the reliability of detection. In terms of efficiency, due to the rough positioning guidance of the Hough transform, the Snake model does not need to perform a comprehensive search in the entire image range, greatly reducing the search space, reducing the number of iterations, accelerating the speed of contour extraction, improving the running efficiency of the algorithm, and being more suitable for the real-time requirements of actual power line tree fault detection.
[0068] Step S3: Obtain the optimized energy function of the current iteration based on the straight-line prior energy and the scene constraint energy, and calculate the gradient of the total energy of the current iteration; determine the evolution equation of each iteration based on the gradient of the total energy, and perform iteration in combination with the Snake model to obtain the contour of each wire in the current frame image, and use the neighborhood of the wire contour as the detection area.
[0069] For the current frame image, optimize the energy function in the original Snake model through the straight-line prior energy and the scene constraint energy. The expression is:
[0070] E total = α × E grad + β × E curve + γ × E line + δ × E prior
[0071] In the formula, E total is the optimized energy function of the current iteration, α, β, γ, and δ are all preset energy weights, and E grad , E curve are the gradient energy and curvature energy in the energy function of the original Snake model respectively, E line is the straight-line prior energy of the Snake model, and E prior is the scene constraint energy of the current iteration of the Snake model. Among them, the calculation of the gradient energy and curvature energy in the energy function of the original Snake model is a well-known technology, and the specific process will not be elaborated here.
[0072] It should be noted that for the setting of each energy weight, preferably, in the embodiments of the present application, each energy weight is set to α = 0.4, β = 0.3, γ = 0.2, and δ = 0.1. As other embodiments of the present application, the implementer can set the values of each energy weight according to the actual situation. Among them, α > β > γ > δ, and the sum of α, β, γ, and δ is 1.
[0073] Furthermore, the optimized energy function of the current iteration is used as the energy function in the Snake model at the current iteration, and the gradient of the total energy of the current iteration is calculated. Among them, calculating the gradient of the total energy in the Snake model is a well-known technology, and the specific process will not be elaborated here.
[0074] Furthermore, an evolution equation in the contour iteration process is constructed through the gradient of the total energy, and the expression is:
[0075]
[0076] In the formula, represents the k-th point on the contour at the (t + 1)-th iteration of the Snake model; represents the k-th point on the contour at the t-th iteration of the Snake model; η represents the learning rate; is the gradient of the total energy of the current iteration.
[0077] Among them, for the learning rate η, the learning rate is well-known content, which controls the speed and amplitude of the contour evolution. The value range of η is 10 -6 ~1. Preferably, in the embodiments of the present application, the value of η is set to 0.05; if it is found during the contour evolution that the update direction is correct, but the update amplitude is too large resulting in missing the optimal contour, the learning rate can be reduced; if the contour converges too slowly, the learning rate can be increased.
[0078] The condition for terminating the iteration is set to stop the iteration when the average displacement of all contour points between the current iteration and the previous iteration is less than a preset first threshold, or when the maximum number of iterations is reached. Preferably, in the embodiments of the present application, the first threshold is set to 0.1 pixel, and the maximum number of iterations is set to 200 times. Thus, each wire contour in the current frame image is finally obtained.
[0079] With each wire contour as the center, a detection area is respectively expanded outward by 100 pixels. It should be noted that the size of the detection area can be set by the implementer according to the actual situation, and the present application does not make specific limitations.
[0080] Step S4, obtaining the vegetation pixels in each frame of image through a deep learning model; performing power line tree obstacle detection based on the appearance of vegetation pixels in the detection area of each frame of image.
[0081] A large amount of image data containing vegetation and non-vegetation is collected for annotation. The annotated data is input into the U-Net neural network model for training. The trained model can then identify the vegetation in the image and segment the vegetation area in the image. Denote the trained model as the tree obstacle recognition model. Among them, model training belongs to well-known technology, and the specific steps will not be elaborated. Among them, the U-Net neural network model is well-known technology, and the specific process will not be elaborated.
[0082] It should be noted that for tree obstacle recognition, the implementer can also use other deep learning models for training and tree obstacle recognition, and this application does not make specific restrictions.
[0083] The tree obstacle recognition model is used to perform tree obstacle recognition on each frame of image, and the vegetation pixels identified in each frame of image are marked in each frame of image. If there are pixel points marked as vegetation pixels in the detection area of each frame of image, it indicates that there is a tree obstacle in the power line corridor, and an alarm is sent in time for removal.
[0084] To reduce the error of the deep learning model in detecting vegetation, for example, false alarms caused by misidentifying non-vegetation pixels in the detection area as vegetation pixels, for each detection area in each frame of image, the pixel at the average value of the coordinates of the U vegetation pixels closest to the edge of the detection area is used as the detection point. If the detection point is within the detection area, it is determined that there is a tree obstacle in the power line corridor and an alarm is issued; if the detection point is not within the detection area, it is determined that there is no tree obstacle in the power line corridor and no alarm is issued. Among them, preferably, in the embodiments of this application, the value of U is set to 100. As other embodiments of this application, the implementer can set the value of U according to the actual situation.
[0085] The schematic diagram of the acquisition process of the suspected conductor line is as Figure 2 shown.
[0086] Based on the same inventive concept as the above method, the embodiments of this application also provide a power line tree obstacle detection system based on AI image recognition, including a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, it implements the steps of any one of the above methods of a power line tree obstacle detection method based on AI image recognition.
[0087] In summary, the embodiment of the present application provides a method for detecting tree obstacles in power lines based on AI image recognition. By setting a camera at the top of the pole tower for video monitoring, real-time detection can be achieved by collecting videos through the camera, which does not depend on the inspection time and increases the real-time performance of detection. By screening the detected straight lines in the image through wire features, the influence of irrelevant straight lines in the background information is reduced. By optimizing the energy function at each iteration through the trend of all suspected wire lines in the current frame image and the degree of proximity to the contour at each iteration of the Snake model, the Snake model is improved. By using the improved Snake model for wire contour detection and detecting tree obstacles in power lines based on the occurrence of vegetation pixels near the detected wires, the possibility that the Snake model deviates from the true wire position when obtaining the wire contour is reduced, the extraction accuracy and speed of the wire are improved, and thus the accuracy of tree obstacle detection is improved.
[0088] It should be noted that the above sequence of embodiments of the present application is only for description and does not represent the superiority or inferiority of the embodiments. And the above specific embodiments of the present application have been described. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0089] 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.
[0090] The above are only the preferred embodiments of the present application and are not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the principle of the present application shall be included in the protection scope of the present application.
Claims
1. A method for detecting tree obstacles in power lines based on AI image recognition, characterized in that, The method includes the following steps: Collect video images of the conductors between the poles and towers to obtain each frame of image, where the images include the images of the poles and towers connected to both sides of the conductors; Based on the edge line features in each frame of image, obtain the suspected conductor lines in each frame of image; in the current frame of image, determine the initial contour of the Snake model according to the position of the conductor in the image; based on the trend of all suspected conductor lines in the current frame of image, determine the linear prior energy of the Snake model; calculate the scene constraint energy of the current iteration of the Snake model based on the proximity of the contour of the current iteration of the Snake model to the suspected conductor lines; Based on the linear prior energy and the scene constraint energy, obtain the optimized energy function of the current iteration, and calculate the gradient of the total energy of the current iteration; based on the gradient of the total energy, determine the evolution equation of each iteration, and perform iterations in combination with the Snake model to obtain the contour of each conductor in the current frame of image, and use the neighborhood of the conductor contour as the detection area; Obtain the vegetation pixels in each frame of image through a deep learning model; perform power line tree obstacle detection based on the occurrence of vegetation pixels in the detection area of each frame of image.
2. The method for detecting power line tree obstacles based on AI image recognition according to claim 1, wherein The process of obtaining the suspected conductor lines in each frame of image is as follows: Perform edge detection on the grayscale images of each frame of image to obtain each edge image, and perform line detection on each edge image to obtain each line in each edge image; Set the standard lines in each frame of image; Take the lines whose length is greater than the preset length threshold and the angle with the standard line is less than the preset angle threshold as the suspected conductor lines.
3. The method for detecting power line tree obstacles based on AI image recognition according to claim 2, wherein, The process of setting the standard lines is as follows: In the area of any pole and tower in the first frame of image, randomly select a pixel point, denoted as A1(u1, v1); in the area of another pole and tower in the first frame of image, obtain the pixel point corresponding to A1(u1, v1), denoted as A2(u2, v2), and connect the point A1(u1, v1) and the point A2(u2, v2) to form a line, denoted as the standard line; take the position of the standard line in the first frame of image as the position of the standard line in each frame of image.
4. The method for detecting tree obstacles in power lines based on AI image recognition according to claim 1, characterized in that, The process of obtaining the linear prior energy is as follows: Take the angle between the suspected line of the i-th wire and the standard straight line as the direction angle of the suspected line of the i-th wire, denoted as Denote the prior energy of the straight line as E line , E line The expression of is: In the formula, M is the number of suspected wire lines in the current frame image, cos 2 () is to calculate the square of the cosine function.
5. The method for detecting tree obstacles in a power line based on AI image recognition according to claim 1, characterized in that, The expression of the scene constraint energy of the current iteration is: where E prior is the scene constraint energy of the current iteration; M is the number of suspected wire lines in the current frame image; N is the number of pixel points on the contour of the current iteration; D[] is the function for calculating the Euclidean distance; (x k , y k ) is the coordinate of the k-th pixel point on the contour of the current iteration; (x Hi , y Hi ) is the coordinate of the midpoint of the i-th suspected wire line in the current frame image.
6. The method for detecting power line tree obstacles based on AI image recognition according to claim 1, wherein The expression of the optimized energy function of the current iteration is: E total = α × E grad + β × E curve + γ × E line + δ × E prior where, E total is the optimized energy function of the current iteration, α, β, γ, and δ are all preset energy weights, and E grad , E curve are the gradient energy and the curvature energy in the energy function of the original Snake model respectively, E line is the straight line prior energy, and E prior is the scene constraint energy of the current iteration; where α > β > γ > δ, and the sum of α, β, γ, and δ is 1.
7. The method for detecting tree obstacles in a power line based on AI image recognition according to claim 1, characterized in that, The process of obtaining the gradient of the total energy of the current iteration is: Take the optimized energy function of the current iteration as the energy function in the current iteration of the Snake model, and calculate the gradient of the total energy of the current iteration.
8. The method for detecting tree obstacles in a power line based on AI image recognition according to claim 1, characterized in that, The evolution equation of each iteration is: In the formula, represents the k-th point on the contour at the (t + 1)-th iteration; represents the k-th point on the contour at the t-th iteration; η represents the learning rate; is the gradient of the total energy of the current iteration.
9. The method for detecting tree obstacles in a power line based on AI image recognition according to claim 1, wherein, The power line tree obstacle detection based on the occurrence of vegetation pixels in the detection area of each frame of image is specifically as follows: For each detection area in each frame of image, take the pixel at the average value of the coordinates of the preset number of vegetation pixels closest to the edge of the detection area as the detection point. If the detection point is within the detection area, it means that there is a tree obstacle in the power line corridor, and an alarm is issued; Otherwise, there is no tree obstacle in the power line corridor.
10. An electric power line tree obstacle detection system based on AI image recognition, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method described in any one of claims 1-9.
Citation Information
Patent Citations
Method for extracting target closed contour based on shape prior
CN101673345A
Method for acquiring initial contour in ultrasonic image segmentation based on active contour model
CN103914845A
Contour extraction method based on Snake model
CN107292896A
Arc fitting method based on combination of Snake model and iterative polarity conversion regression
CN108830868A
Contour extraction method based on snake model
CN110276771A