Method, device, computer equipment, computer-readable storage medium and computer program product for detecting tilt of equalizing ring
By calculating the rotation center and rotation angle in the polygonal region of the equalization ring and the insulator string, the problem of low accuracy of the equalization ring tilt detection in the prior art is solved, and higher detection accuracy is achieved.
Patent Information
- Application Number
- CN202411085952.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-08
- Publication Date
- 2025-04-18
- Estimated Expiration
- 2044-08-08
AI Technical Summary
In the prior art, the accuracy of the tilt detection of the pressure equalization ring is low, mainly due to the variable viewing angles of the image obtained by aerial photography of the drone, and it is difficult to determine the direction information of the pressure equalization ring in the example segmentation model.
By acquiring the image of the transmission line, the polygonal region of the equalizing ring and the insulator string is determined based on the example segmentation model, the rotation center and rotation angle of the minimum rotation rectangle of each polygonal region are calculated, and the inclination detection of the equalizing ring is performed based on this information.
The accuracy of the inclination detection of the pressure equalization ring is improved, and the problem of difficulty in determining the direction information of the horizontal rectangular frame is avoided, and more accurate shape depiction of the pressure equalization ring and insulator string is achieved.
Smart Images

Figure CN118887197B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of power grid technology, and in particular to a method, device, computer equipment, computer-readable storage medium and computer program product for detecting a grading ring tilt. Background Art
[0002] The grading ring can make the electric field in the transmission line of the power grid, such as the power supply network or the distribution network, evenly distributed, thereby reducing corona discharge and electromagnetic interference, and improving the transmission efficiency and stability of the transmission line. Once the grading ring is tilted, it will cause uneven distribution of the electric field in the transmission line, increase the local electric field strength, thereby increasing the risk of corona discharge, energy loss and electromagnetic interference, and may also cause uneven force on the insulator, accelerate its aging and damage, affect the safety and stability of the transmission line, and further affect the safe and stable operation of the power supply network or the distribution network. Therefore, it is necessary to detect whether the grading ring is tilted.
[0003] In the related art, transmission lines are usually photographed by drones, and then the instance segmentation model is used to detect whether the grading ring in the image is tilted. However, the viewing angle of the images obtained by drone aerial photography is variable, and the horizontal rectangular frame used by the instance segmentation model makes it difficult to determine the direction information of the grading ring, resulting in a low accuracy rate in detecting the tilt of the grading ring. Summary of the invention
[0004] Based on this, it is necessary to provide a pressure equalizing ring inclination detection method, device, computer equipment, computer readable storage medium and computer program product that can improve the accuracy of pressure equalizing ring inclination detection in order to address the technical problem of low accuracy of pressure equalizing ring inclination detection.
[0005] In a first aspect, the present application provides a method for detecting a tilt of a pressure equalizing ring, comprising:
[0006] Acquire images of power transmission lines;
[0007] Based on the instance segmentation model, determining in the image at least one polygonal region corresponding to a grading ring and at least one polygonal region corresponding to an insulator string; each grading ring corresponds to a polygonal region, and each insulator string corresponds to a polygonal region;
[0008] respectively determining the rotation center and rotation angle of the minimum rotation rectangle of each polygonal area in the image;
[0009] For each grading ring, based on the rotation center and the corresponding rotation angle corresponding to the grading ring, and the rotation center and the corresponding rotation angle corresponding to each insulator string, the grading ring is tilted to obtain the tilt detection result of the grading ring; specifically including:
[0010] Based on the rotation angle corresponding to the grading ring and the rotation angle corresponding to each insulator string, determining the existence of an insulator string matching the grading ring in each insulator string;
[0011] In the case where the matching insulator string exists, based on the rotation angle corresponding to the grading ring and the rotation angle corresponding to the matching insulator string, the grading ring is tilted and detected to obtain a tilt detection result of the grading ring;
[0012] When the matching insulator string does not exist, the grading ring is tilted and detected based on the rotation angle corresponding to the grading ring and the rotation angles corresponding to the other grading rings except the grading ring to obtain a tilt detection result of the grading ring.
[0013] In one embodiment, the step of performing tilt detection on the grading ring based on the rotation angle corresponding to the grading ring and the rotation angle corresponding to the matching insulator string to obtain the tilt detection result of the grading ring includes:
[0014] When the angle difference between the rotation angle corresponding to the grading ring and the rotation angle corresponding to the matching insulator string satisfies the corresponding first preset condition, it is determined that the grading ring is tilted.
[0015] In one of the embodiments, the pressure equalizing ring is tilted based on the rotation angle corresponding to the pressure equalizing ring and the rotation angles corresponding to the remaining pressure equalizing rings except the pressure equalizing ring, to obtain the tilt detection result of the pressure equalizing ring, including:
[0016] Traversing the remaining pressure equalizing rings;
[0017] When the angle difference between the rotation angle corresponding to the pressure equalizing ring and the rotation angles corresponding to the other traversed pressure equalizing rings meets the corresponding second preset condition, it is determined that the pressure equalizing ring is tilted.
[0018] In one of the embodiments, determining the existence of an insulator string matching the grading ring in each insulator string based on the rotation angle corresponding to the grading ring and the rotation angle corresponding to each insulator string includes:
[0019] Determine the distance between the rotation center corresponding to the grading ring and the rotation center corresponding to each insulator string;
[0020] Selecting, from the insulator strings, insulator strings whose corresponding distances are less than a preset distance threshold;
[0021] Among the screened insulator strings, the insulator string whose corresponding distance is smaller than that of the other insulator strings is determined as the matching insulator string.
[0022] In one embodiment, the step of respectively determining the rotation center and the rotation angle of the minimum rotation rectangle of each polygonal area in the image includes:
[0023] For each polygonal area, dividing the polygonal area into a plurality of triangles, and determining the centroid and area of each triangle;
[0024] Determine the centroid of the polygonal area according to the centroid and area of each triangle, and determine the rotation center search range according to the centroid of the polygonal area;
[0025] Based on the rotation center search range, the preset rotation angle search range and the particle swarm optimization algorithm, an objective function with the minimum area of the circumscribed rectangle of the polygonal area as the optimization goal and the rotation center and rotation angle of the circumscribed rectangle as optimization parameters is solved to obtain the rotation center and rotation angle of the minimum rotation rectangle of the polygonal area.
[0026] In one of the embodiments, the example segmentation model is used to determine, in the image, at least one polygonal region corresponding to a grading ring and at least one polygonal region corresponding to an insulator string, including:
[0027] Inputting the image into the instance segmentation model;
[0028] Determine, by using the instance segmentation model, in the image at least one candidate region corresponding to a grading ring and at least one candidate region corresponding to an insulator string, and generate a feature map corresponding to each candidate region and a mask corresponding to each candidate region;
[0029] For each candidate region, mask processing is performed on the feature map corresponding to the candidate region through the instance segmentation model and the mask corresponding to the candidate region to obtain a polygonal region corresponding to the grading ring or insulator string to which the candidate region belongs.
[0030] In a second aspect, the present application also provides a pressure equalizing ring tilt detection device, comprising:
[0031] An image acquisition module, used for acquiring images of the power transmission line;
[0032] An instance segmentation module, used to determine, based on an instance segmentation model, a polygonal region corresponding to at least one grading ring and a polygonal region corresponding to at least one insulator string in the image; each grading ring corresponds to a polygonal region, and each insulator string corresponds to a polygonal region;
[0033] An information determination module, used to respectively determine the rotation center and rotation angle of the minimum rotation rectangle of each polygonal area in the image;
[0034] A tilt detection module is used to perform tilt detection on each grading ring based on the rotation center and the corresponding rotation angle of the grading ring, and the rotation center and the corresponding rotation angle of each insulator string, to obtain a tilt detection result of the grading ring;
[0035] The tilt detection module is also used to determine the existence of an insulator string matching the grading ring in each insulator string based on the rotation angle corresponding to the grading ring and the rotation angle corresponding to each insulator string; if the matching insulator string exists, the grading ring is tilted based on the rotation angle corresponding to the grading ring and the rotation angle corresponding to the matching insulator string to obtain a tilt detection result of the grading ring; if the matching insulator string does not exist, the grading ring is tilted based on the rotation angle corresponding to the grading ring and the rotation angles corresponding to the remaining grading rings in the grading rings except the grading ring to obtain a tilt detection result of the grading ring.
[0036] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0037] Acquire images of power transmission lines;
[0038] Based on the instance segmentation model, determining in the image at least one polygonal region corresponding to a grading ring and at least one polygonal region corresponding to an insulator string; each grading ring corresponds to a polygonal region, and each insulator string corresponds to a polygonal region;
[0039] respectively determining the rotation center and rotation angle of the minimum rotation rectangle of each polygonal area in the image;
[0040] For each grading ring, based on the rotation center and the corresponding rotation angle corresponding to the grading ring, and the rotation center and the corresponding rotation angle corresponding to each insulator string, the grading ring is tilted to obtain the tilt detection result of the grading ring; specifically including:
[0041] Based on the rotation angle corresponding to the grading ring and the rotation angle corresponding to each insulator string, determining the existence of an insulator string matching the grading ring in each insulator string;
[0042] In the case where the matching insulator string exists, based on the rotation angle corresponding to the grading ring and the rotation angle corresponding to the matching insulator string, the grading ring is tilted and detected to obtain a tilt detection result of the grading ring;
[0043] When the matching insulator string does not exist, the grading ring is tilted and detected based on the rotation angle corresponding to the grading ring and the rotation angles corresponding to the remaining grading rings except the grading ring to obtain a tilt detection result of the grading ring.
[0044] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:
[0045] Acquire images of power transmission lines;
[0046] Based on the instance segmentation model, determining in the image at least one polygonal region corresponding to a grading ring and at least one polygonal region corresponding to an insulator string; each grading ring corresponds to a polygonal region, and each insulator string corresponds to a polygonal region;
[0047] respectively determining the rotation center and rotation angle of the minimum rotation rectangle of each polygonal area in the image;
[0048] For each grading ring, based on the rotation center and the corresponding rotation angle corresponding to the grading ring, and the rotation center and the corresponding rotation angle corresponding to each insulator string, the grading ring is tilted to obtain the tilt detection result of the grading ring; specifically including:
[0049] Based on the rotation angle corresponding to the grading ring and the rotation angle corresponding to each insulator string, determining the existence of an insulator string matching the grading ring in each insulator string;
[0050] In the case where the matching insulator string exists, based on the rotation angle corresponding to the grading ring and the rotation angle corresponding to the matching insulator string, the grading ring is tilted and detected to obtain a tilt detection result of the grading ring;
[0051] When the matching insulator string does not exist, the grading ring is tilted and detected based on the rotation angle corresponding to the grading ring and the rotation angles corresponding to the remaining grading rings except the grading ring to obtain a tilt detection result of the grading ring.
[0052] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:
[0053] Acquire images of power transmission lines;
[0054] Based on the instance segmentation model, determining in the image at least one polygonal region corresponding to a grading ring and at least one polygonal region corresponding to an insulator string; each grading ring corresponds to a polygonal region, and each insulator string corresponds to a polygonal region;
[0055] respectively determining the rotation center and rotation angle of the minimum rotation rectangle of each polygonal area in the image;
[0056] For each grading ring, based on the rotation center and the corresponding rotation angle corresponding to the grading ring, and the rotation center and the corresponding rotation angle corresponding to each insulator string, the grading ring is tilted to obtain the tilt detection result of the grading ring; specifically including:
[0057] Based on the rotation angle corresponding to the grading ring and the rotation angle corresponding to each insulator string, determining the existence of an insulator string matching the grading ring in each insulator string;
[0058] In the case where the matching insulator string exists, based on the rotation angle corresponding to the grading ring and the rotation angle corresponding to the matching insulator string, the grading ring is tilted and detected to obtain a tilt detection result of the grading ring;
[0059] When the matching insulator string does not exist, the grading ring is tilted and detected based on the rotation angle corresponding to the grading ring and the rotation angles corresponding to the other grading rings except the grading ring to obtain a tilt detection result of the grading ring.
[0060] The above-mentioned grading ring tilt detection method, device, computer equipment, computer-readable storage medium and computer program product first obtain an image of the transmission line; then, based on the instance segmentation model, determine in the image at least one polygonal area corresponding to the grading ring and at least one polygonal area corresponding to the insulator string; each grading ring corresponds to a polygonal area, and each insulator string corresponds to a polygonal area; then, respectively determine the rotation center and rotation angle of the minimum rotation rectangle of each polygonal area in the image; finally, for each grading ring, based on the rotation center and the corresponding rotation angle corresponding to the grading ring, and the rotation center and the corresponding rotation angle corresponding to each insulator string, The voltage-equalizing ring is subjected to tilt detection to obtain a tilt detection result of the voltage-equalizing ring; specifically comprising: determining the existence of an insulator string matching the voltage-equalizing ring in each insulator string based on a rotation angle corresponding to the voltage-equalizing ring and a rotation angle corresponding to each insulator string; in a case where a matching insulator string exists, the voltage-equalizing ring is subjected to tilt detection based on a rotation angle corresponding to the voltage-equalizing ring and a rotation angle corresponding to the matching insulator string to obtain a tilt detection result of the voltage-equalizing ring; in a case where a matching insulator string does not exist, the voltage-equalizing ring is subjected to tilt detection based on a rotation angle corresponding to the voltage-equalizing ring and a rotation angle corresponding to the remaining voltage-equalizing rings in each voltage-equalizing ring except the voltage-equalizing ring to obtain a tilt detection result of the voltage-equalizing ring. In this way, on the one hand, polygon-based instance segmentation can have more accurate boundaries than target detection based on horizontal rectangles, thereby more accurately depicting the actual shapes of the grading ring and the insulator string. On the other hand, the tilt detection of the grading ring is achieved based on the rotation center and rotation angle of the minimum rotation rectangle of the polygonal area corresponding to the grading ring and the insulator string, which can avoid the problem that it is difficult to determine the direction information of the horizontal rectangular frame. Therefore, the grading ring tilt detection method based on the above process can improve the accuracy of the grading ring tilt detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0062] Figure 1 A schematic diagram of a flow chart of a method for detecting a tilt of a pressure equalizing ring in an embodiment;
[0063] Figure 2 A flowchart of the steps of performing tilt detection on each grading ring based on the rotation center and the corresponding rotation angle of the grading ring, and the rotation center and the corresponding rotation angle of each insulator string to obtain the tilt detection result of the grading ring in an embodiment;
[0064] Figure 3 A flowchart of a step of determining the existence of an insulator string matching the grading ring in each insulator string based on the rotation angle corresponding to the grading ring and the rotation angle corresponding to each insulator string in one embodiment;
[0065] Figure 4 A flowchart of steps for performing tilt detection on the grading ring based on the rotation center and the corresponding rotation angle corresponding to the grading ring, and the rotation center and the corresponding rotation angle corresponding to each insulator string, and obtaining the tilt detection result of the grading ring in one embodiment;
[0066] Figure 5 It is a flowchart of the steps of respectively determining the rotation center and the rotation angle of the minimum rotation rectangle of each polygonal area in an image in one embodiment;
[0067] Figure 6 A schematic diagram of a flow chart of steps for optimizing an objective function based on a particle swarm optimization algorithm in one embodiment;
[0068] Figure 7 A schematic flow chart of a step of determining, in an image, a polygonal region corresponding to at least one grading ring and a polygonal region corresponding to at least one insulator string based on an instance segmentation model in an embodiment;
[0069] Figure 8 It is a flowchart of an automatic detection method for the tilt of a pressure equalizing ring based on instance segmentation and particle swarm optimization in one embodiment;
[0070] Fig. 9 is a structural block diagram of a pressure equalizing ring tilt detection device in one embodiment;
[0071] Fig.10 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0072] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0073] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0074] In one embodiment, Figure 1 As shown, a method for detecting the tilt of a grading ring is provided. This embodiment uses the method applied to a server as an example for illustration. It is understandable that the method can also be applied to a terminal, and can also be applied to a system including a server and a terminal, and is implemented through the interaction between the server and the terminal; wherein the server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services; the terminal can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, etc. In this embodiment, the method includes the following steps:
[0075] Step S102, acquiring an image of a power transmission line.
[0076] Specifically, the server obtains images of the power transmission lines collected by the drone.
[0077] In specific applications, the server can preliminarily determine the target areas where there are grading rings and insulator strings in the transmission line based on the design drawings of the transmission line, and then generate image acquisition tasks for each target area, and send each image acquisition task to the drone; after receiving each image acquisition task, the drone will execute each image acquisition task, collect images for each target area, and upload the collected images to the server.
[0078] In practical applications, for each target area, the drone can collect images of the target area from different angles of the target area.
[0079] Step S104: Based on the instance segmentation model, determine in the image at least one polygonal region corresponding to a grading ring and at least one polygonal region corresponding to an insulator string.
[0080] Among them, the target objects of the example segmentation model in the voltage-grading ring detection method provided in the present application are the voltage-grading ring and the insulator string.
[0081] Each grading ring corresponds to a polygonal area, and each insulator string corresponds to a polygonal area.
[0082] Specifically, the server inputs each image into the instance segmentation model, and performs instance segmentation processing on the image through the instance segmentation model, thereby determining at least one polygonal area corresponding to a grading ring and at least one polygonal area corresponding to an insulator string in each image.
[0083] Step 106, respectively determining the rotation center and rotation angle of the minimum rotation rectangle of each polygonal area in the image.
[0084] The minimum rotated rectangle of the polygonal area refers to a rectangle with the smallest area that can surround the polygonal area after being rotated around the polygonal area.
[0085] Specifically, for each image, the server determines the minimum rotation rectangle of each polygonal area in the image, as well as the rotation center and rotation angle of the minimum rotation rectangle.
[0086] Step S108, for each grading ring, based on the rotation center and the corresponding rotation angle of the grading ring, and the rotation center and the corresponding rotation angle of each insulator string, perform a tilt detection on the grading ring to obtain a tilt detection result of the grading ring.
[0087] Among them, the rotation center corresponding to the pressure equalizing ring is the rotation center of the minimum rotation rectangle of the polygonal area corresponding to the pressure equalizing ring; the rotation angle corresponding to the pressure equalizing ring is the rotation angle of the minimum rotation rectangle of the polygonal area corresponding to the pressure equalizing ring.
[0088] The rotation center corresponding to the insulator string is the rotation center of the minimum rotation rectangle of the polygonal area corresponding to the insulator string; and the rotation angle corresponding to the insulator string is the rotation angle of the minimum rotation rectangle of the polygonal area corresponding to the insulator string.
[0089] Specifically, the server performs tilt detection on each grading ring in each image according to a preset detection logic, based on the rotation center and rotation angle of the minimum rotation rectangle of the polygonal area corresponding to the grading ring, and the rotation center and rotation angle of the polygonal area corresponding to each insulator string in the image, thereby determining the tilt detection result of the grading ring.
[0090] like Figure 2 As shown, the above step S108, for each grading ring, based on the rotation center and the corresponding rotation angle corresponding to the grading ring, and the rotation center and the corresponding rotation angle corresponding to each insulator string, performs a tilt detection on the grading ring to obtain a tilt detection result of the grading ring, specifically including the following steps:
[0091] Step S202: Based on the rotation angle corresponding to the grading ring and the rotation angle corresponding to each insulator string, the existence of an insulator string matching the grading ring is determined in each insulator string.
[0092] The insulator string matched with the grading ring is used as a reference to detect whether the grading ring is tilted.
[0093] Specifically, for each grading ring, the server first determines the distance between the rotation center corresponding to the grading ring and the rotation center corresponding to each insulator string. , then based on the distance between the grading ring and each insulator string , determine the existence of an insulator string that matches the grading ring in each insulator string.
[0094] Step S204: When a matching insulator string exists, based on the rotation angle corresponding to the grading ring and the rotation angle corresponding to the matching insulator string, perform a tilt detection on the grading ring to obtain a tilt detection result of the grading ring.
[0095] Specifically, if an insulator string matching the grading ring exists, the server performs a tilt detection on the grading ring according to the angle difference between the rotation angle corresponding to the grading ring and the rotation angle corresponding to the matching insulator string to obtain the tilt result of the grading ring.
[0096] Step S206, when a matching insulator string does not exist, based on the rotation angle corresponding to the grading ring and the rotation angles corresponding to the remaining grading rings except the grading ring, the grading ring is tilted and detected to obtain a tilt detection result of the grading ring.
[0097] Specifically, if the insulator string matching the grading ring does not exist, the server performs tilt detection on the grading ring based on the angle difference between the rotation angle corresponding to the grading ring and the rotation angles corresponding to the remaining grading rings other than the grading ring, to obtain the tilt detection result of the grading ring.
[0098] In the above-mentioned grading ring tilt detection method, first, the server obtains an image of the transmission line; then, based on the instance segmentation model, the server determines in the image at least one polygonal area corresponding to a grading ring and at least one polygonal area corresponding to an insulator string; each grading ring corresponds to a polygonal area, and each insulator string corresponds to a polygonal area; then, the server determines the rotation center and rotation angle of the minimum rotation rectangle of each polygonal area in the image respectively; finally, the server performs tilt detection on each grading ring based on the rotation center and the corresponding rotation angle corresponding to the grading ring, and the rotation center and the corresponding rotation angle corresponding to each insulator string, and obtains The method comprises the following steps: the server determines the existence of an insulator string matching the grading ring in each insulator string based on the rotation angle corresponding to the grading ring and the rotation angle corresponding to each insulator string; when a matching insulator string exists, the server performs a tilt detection on the grading ring based on the rotation angle corresponding to the grading ring and the rotation angle corresponding to the matching insulator string, and obtains a tilt detection result of the grading ring; when a matching insulator string does not exist, the server performs a tilt detection on the grading ring based on the rotation angle corresponding to the grading ring and the rotation angles corresponding to the remaining grading rings in each grading ring except the grading ring, and obtains a tilt detection result of the grading ring. In this way, on the one hand, polygon-based instance segmentation can have more accurate boundaries than target detection based on horizontal rectangles, so that the server can more accurately depict the actual shapes of the grading ring and the insulator string. On the other hand, the tilt detection of the grading ring is realized based on the rotation center and rotation angle of the minimum rotation rectangle of the polygonal area corresponding to the grading ring and the insulator string respectively. The server can avoid the problem that it is difficult to determine the direction information of the horizontal rectangular frame; therefore, the grading ring tilt detection method based on the above process can improve the accuracy of the grading ring tilt detection.
[0099] In an exemplary embodiment, the above step S204 performs a tilt detection on the voltage equalizing ring based on the rotation angle corresponding to the voltage equalizing ring and the rotation angle corresponding to the matching insulator string to obtain a tilt detection result of the voltage equalizing ring, which specifically includes the following contents: when the angle difference between the rotation angle corresponding to the voltage equalizing ring and the rotation angle corresponding to the matching insulator string satisfies the corresponding first preset condition, it is determined that the voltage equalizing ring is tilted.
[0100] The first preset condition refers to that the angle difference falls within the corresponding angle difference interval. It is easy to understand that the angle difference is an absolute value.
[0101] Specifically, for each equalizing ring, the server calculates the angle difference between the rotation angle corresponding to the equalizing ring and the rotation angle corresponding to the insulator string matching the equalizing ring, and determines whether the angle difference falls within the angle difference interval corresponding to the first preset condition. If so, it is determined that the angle difference satisfies the first preset condition, and then the equalizing ring is determined to be tilted.
[0102] In a specific application, the angle difference interval corresponding to the first preset condition includes a first angle difference interval and a second angle difference interval; the first angle difference interval and the second angle difference interval are "or" logic, that is, the angle difference falls into any one of the first angle difference interval or the second angle difference interval, which can be regarded as the angle difference falling into the angle difference interval corresponding to the first preset condition, that is, the angle difference satisfies the first preset condition.
[0103] In practical applications, the first preset condition is shown in Formula 1:
[0104] (Formula 1)
[0105] in, Indicates A pressure equalizing ring, Indicates The rotation angle corresponding to each pressure equalizing ring; Indicates Insulator strings, Indicates The rotation angle corresponding to the insulator string.
[0106] In this embodiment, the server matches the equalizing ring and the insulator string to determine the insulator string in each insulator string that is used as a reference to detect whether the equalizing ring is tilted, and based on the angle difference between the rotation angles of the equalizing ring and the reference insulator string, the server can detect the tilt of the equalizing ring.
[0107] In an exemplary embodiment, the above step S206 performs tilt detection on the pressure equalizing ring based on the rotation angle corresponding to the pressure equalizing ring and the rotation angles corresponding to the other pressure equalizing rings except the pressure equalizing ring, to obtain the tilt detection result of the pressure equalizing ring, which specifically includes the following contents: traversing the other pressure equalizing rings; when the angle difference between the rotation angle corresponding to the pressure equalizing ring and the rotation angles corresponding to the other traversed pressure equalizing rings meets the corresponding second preset condition, determining that the pressure equalizing ring is tilted.
[0108] The second preset condition refers to that the angle difference falls within the corresponding angle difference interval. It is also easy to understand that the angle difference is an absolute value.
[0109] Specifically, if the server is based on the distance between the grading ring and each insulator string The voltage-equalizing ring is matched with each insulator string, but there is no insulator string matching the voltage-equalizing ring in each insulator string. Then the server traverses the remaining voltage-equalizing rings except the voltage-equalizing ring, and when traversing each remaining voltage-equalizing ring, calculates the angle difference between the rotation angle corresponding to the voltage-equalizing ring and the rotation angle corresponding to the remaining traversed voltage-equalizing rings, and determines whether the angle difference falls within the angle difference range corresponding to the second preset condition. If so, it is determined that the angle difference satisfies the second preset condition, and then the voltage-equalizing ring is determined to be tilted.
[0110] In a specific application, the angle difference interval corresponding to the second preset condition includes a third angle difference interval and a fourth angle difference interval; the third angle difference interval and the fourth angle difference interval are "or" logic, that is, the angle difference falls into any one of the third angle difference interval and the fourth angle difference interval, which can be regarded as the angle difference falling into the angle difference interval corresponding to the second preset condition, that is, the angle difference satisfies the second preset condition.
[0111] In practical applications, the second preset condition is shown in Formula 2:
[0112] (Formula 2)
[0113] in, Indicates A pressure equalizing ring, Indicates The rotation angle corresponding to the pressure equalizing ring is Indicates that in the same image, except for the The pressure equalizing ring other than the pressure equalizing ring The corresponding rotation angle.
[0114] In this embodiment, the server can detect the tilt of the grading ring based on the angle difference between the rotation angle of the grading ring and other grading rings when there is no insulator string that can serve as a reference.
[0115] In an exemplary embodiment, Figure 3 As shown, step S202, based on the rotation angle corresponding to the grading ring and the rotation angle corresponding to each insulator string, determines the existence of an insulator string matching the grading ring in each insulator string, specifically including the following steps:
[0116] Step S302, determining the distance between the rotation center corresponding to the grading ring and the rotation center corresponding to each insulator string.
[0117] Step S304: Filter out, from each insulator string, insulator strings whose corresponding distances are less than a preset distance threshold.
[0118] Step S306: Determine, among the screened insulator strings, the insulator strings whose corresponding distances are smaller than those of the remaining insulator strings as matching insulator strings.
[0119] Specifically, the server matches the grading ring with each insulator string based on the following process: First, the server calculates the distance between the rotation center of the grading ring and the rotation center of each insulator string respectively. ; Then, the server selects the distance between each insulator string and the grading ring Less than the preset distance threshold The insulator string is used as the candidate insulator string; then, the server calculates the distance between each candidate insulator string and the grading ring. The smallest insulator string is determined to be the insulator string that matches the grading ring.
[0120] In this embodiment, the server can determine the insulator string that matches the grading ring from multiple insulator strings through two distance-based matches, so that the server can detect whether the grading ring is tilted by using the matching insulator string as a reference.
[0121] In an exemplary embodiment, the rotation center of the minimum rotation rectangle of each polygonal area is represented by coordinates in a plane rectangular coordinate system, for example, The rotation center corresponding to the pressure equalizing ring is , No. The rotation center corresponding to the insulator string is The server calculates the distance between the corresponding rotation centers of the grading ring and the insulator string based on the coordinates of the corresponding rotation centers of the two.
[0122] In an exemplary embodiment, if Figure 4 As shown, the above step S108, based on the rotation center and the corresponding rotation angle corresponding to the grading ring, and the rotation center and the corresponding rotation angle corresponding to each insulator string, performs tilt detection on the grading ring to obtain the tilt detection result of the grading ring, specifically also includes the following steps:
[0123] Step S402, determining the distance between the rotation center corresponding to the grading ring and the rotation center corresponding to each insulator string.
[0124] Step S404: Based on the distance, determine whether there is an insulator string matching the grading ring in each insulator string.
[0125] Step S406: If there is an insulator string matching the grading ring in each insulator string, it is determined that the grading ring is tilted when the angle difference between the rotation angle corresponding to the grading ring and the rotation angle corresponding to the matching insulator string meets the corresponding first preset condition.
[0126] Step S408: If there is no insulator string matching the grading ring in each insulator string, traverse the remaining grading rings in each grading ring except the grading ring.
[0127] Step S410: When the angle difference between the rotation angle corresponding to the pressure equalizing ring and the rotation angles corresponding to the other traversed pressure equalizing rings meets the corresponding second preset condition, it is determined that the pressure equalizing ring is tilted.
[0128] In an exemplary embodiment, Figure 5 As shown, the above step S106, respectively determining the rotation center and rotation angle of the minimum rotation rectangle of each polygonal area in the image, specifically includes the following steps:
[0129] Step S502: for each polygonal area, divide the polygonal area into a plurality of triangles, and determine the centroid and area of each triangle.
[0130] Step S504, determining the centroid of the polygonal area according to the centroid and area of each triangle, and determining the rotation center search range according to the centroid of the polygonal area.
[0131] Step S506, based on the rotation center search range, the preset rotation angle search range and the particle swarm optimization algorithm, solve the objective function with the minimum area of the circumscribed rectangle of the polygonal area as the optimization goal and the rotation center and rotation angle of the circumscribed rectangle as the optimization parameters, and obtain the rotation center and rotation angle of the minimum rotated rectangle of the polygonal area.
[0132] Specifically, first, the server establishes an objective function based on geometric knowledge, taking the minimum area of the circumscribed rectangle of the polygonal area as the optimization goal, and taking the rotation center and rotation angle of the circumscribed rectangle as optimization parameters.
[0133] The server records the rotation center of the circumscribed rectangle of the polygonal area as , the rotation angle is , the area is Among them, when When , the vertices of the circumscribed rectangle are , are the width and height of the circumscribed rectangle respectively; and the server records the coordinates of each vertex of the polygonal area in the plane rectangular coordinate system as ; Therefore, the coordinates of each vertex of the polygonal area after rotation It can be expressed as formula 3:
[0134] (Formula 3)
[0135] The server uses the calculation to obtain the minimum circumscribed rectangle for the rotated polygonal area whose vertex coordinates are represented by the above formula 3. The specific process is as shown in formula 4, traversing all the vertices of the rotated polygonal area to find the boundary points therein:
[0136] (Formula 4)
[0137] Based on the expressions of Formula 3 and Formula 4 above, the server establishes the objective function shown in Formula 5:
[0138] (Formula 5)
[0139] Then, for each polygonal area, the server divides the polygonal area into multiple triangles based on the vertices of the polygonal area, and calculates the centroid and area of each triangle. The server calculates the centroid of the triangle according to the following formula 6 :
[0140] (Formula 6)
[0141] in, They are The horizontal coordinates of the three vertices of a triangle in the plane rectangular coordinate system, They are The vertical coordinates of the three vertices of a triangle in the rectangular coordinate system.
[0142] The server then sends The area of a triangle is , and calculate the centroid of the polygonal area based on the following formula 7 :
[0143] (Formula 7)
[0144] And according to the above centroid , determine the search range of the rotation center corresponding to the polygon area .
[0145] Next, the server searches the range based on the rotation center , preset rotation angle search range And the particle swarm optimization algorithm is used to solve the objective function shown in Formula 5 to obtain the rotation center and rotation angle of the minimum rotation rectangle of the polygonal area.
[0146] Furthermore, if Figure 6 As shown, the specific process of optimizing the objective function shown in Formula 5 based on the particle swarm optimization algorithm is as follows:
[0147] The server first sets the number of iterations and particles; then initializes the particle swarm and randomly generates the initial positions of the particles; then calculates the objective function value of each particle and updates the optimal position of each particle and the global optimal position; the server updates the particle speed based on the particle's own experience and the group's experience based on Formula 8:
[0148] (Formula 8)
[0149] in, is the inertia weight, is the acceleration constant, is a random number between 0 and 1; is the number of iterations, For the Particles; It is The current optimal position of a particle, is the global optimal position among all particles; It is The particle in The position at the iteration, It is The particle in The speed at which the iterations are performed.
[0150] At the same time, the server updates the particle position based on formula 9:
[0151] (Formula 9)
[0152] Next, the server continues to iteratively update the particle's speed and position, and checks after each update whether the convergence conditions are met: the maximum number of iterations is reached or the change in the global optimal position is less than the set threshold; if the convergence conditions are met, the iteration is stopped and the result is output, that is, the rotation center and rotation angle of the minimum circumscribed rectangle.
[0153] In this embodiment, the server can solve the objective function with the minimum area of the circumscribed rectangle of the polygonal area as the optimization goal and the rotation center and rotation angle of the circumscribed rectangle as the optimization parameters through the particle swarm optimization algorithm, thereby obtaining the rotation center and rotation angle of the minimum rotated rectangle of the polygonal area.
[0154] In an exemplary embodiment, Figure 7 As shown, the above step S104, based on the instance segmentation model, determines in the image at least one polygonal area corresponding to the grading ring and at least one polygonal area corresponding to the insulator string, specifically including the following steps:
[0155] Step S702: input the image into the instance segmentation model.
[0156] Step S704: determine at least one candidate region corresponding to a grading ring and at least one candidate region corresponding to an insulator string in the image through an instance segmentation model, and generate a feature map corresponding to each candidate region and a mask corresponding to each candidate region.
[0157] Step S706: for each candidate area, mask processing is performed on the feature map corresponding to the candidate area through the instance segmentation model and the mask corresponding to the candidate area to obtain a polygonal area corresponding to the grading ring or insulator string to which the candidate area belongs.
[0158] Among them, the instance segmentation model is based on the modification and training of YOLOv8 (a version of the YOLO target detection and image segmentation model); the instance segmentation model includes an instance segmentation head, and further, the instance segmentation branch can be divided into a target detection branch and an instance segmentation branch; further, the instance segmentation model also includes a classification head and a branch classification head.
[0159] Among them, the target detection branch is used to determine the candidate area; the classification head is used to determine the category and category confidence of the candidate area (in this application, the categories include grading rings and insulator strings); the branch classification head is used to generate the mask confidence corresponding to the candidate area; the instance segmentation branch is used to generate the prototype mask corresponding to the candidate area, and based on the mask confidence and the prototype mask, obtain the mask corresponding to the candidate area.
[0160] Specifically, the server inputs the image into the instance segmentation model; the instance segmentation model first determines at least one candidate region corresponding to the grading ring and at least one candidate region corresponding to the insulator string in the image based on the target detection branch, and determines the category and category confidence corresponding to each candidate region based on the classification head, and the server generates a mask confidence for each candidate region based on the branch classification head, and generates a prototype mask corresponding to each candidate region based on the instance segmentation branch, and obtains the mask corresponding to each candidate region based on the mask confidence and the prototype mask corresponding to each candidate region according to the following formula 10:
[0161] (Formula 10)
[0162] in, is the prototype mask corresponding to the candidate area; is the mask confidence corresponding to the candidate region, is the transpose symbol; is the mask corresponding to the candidate region.
[0163] Then, the instance segmentation model generates a feature map of each candidate area, and based on the mask corresponding to the candidate area, performs mask processing on the feature map corresponding to the candidate area to obtain the polygonal area corresponding to the grading ring or insulator string to which the candidate area belongs, and outputs the coordinates of each vertex of the polygonal area. .
[0164] In this embodiment, the server can accurately output the polygonal areas corresponding to the grading ring and the insulator string through the improved instance segmentation model.
[0165] In an exemplary embodiment, the improvement and training process of the instance segmentation model is as follows:
[0166] The server obtains multiple sample images, each of which contains at least one grading ring and one insulator string. Then, for each sample image, the server performs polygonal annotations on the grading ring and the insulator string. Next, the server uses data enhancement schemes such as Mosaic, flipping, random image cropping, and random contrast to augment the sample data, and divides the data into training, validation, and test sets in a ratio of 8:1:1.
[0167] Then, the server replaces the original object detection head of YOLOv8 with the above instance segmentation head to realize the instance segmentation function.
[0168] In specific applications, the target detection branch adopts an anchor-free decoupled head structure, separates the classification head and the detection head, and only regresses the target center point and width and height of feature maps of different scales, avoiding missed detection or repeated detection problems caused by unreasonable anchor frame settings.
[0169] Among them, the target detection branch is trained under the joint complete intersection loss function as shown in Formula 11:
[0170] (Formula 11)
[0171] in, The location of the candidate region output by the target detection branch; is the neighboring value of the candidate region (the position around the candidate region); The probability of being a neighbor value.
[0172] The classification head is trained under the binary cross entropy loss function as shown in Formula 12:
[0173] (Formula 12)
[0174] in, The category of the candidate region output by the classification head; is the true category of the candidate region.
[0175] The instance segmentation branch is trained under the binary cross entropy loss function with combined logarithmic loss as shown in Formula 13:
[0176] (Formula 13)
[0177] in, is the feature map corresponding to the candidate region pixels; For the The probability that a pixel belongs to the true category of the corresponding candidate area; is the Sigmoid function as shown in formula 14:
[0178] (Formula 14)
[0179] In the actual training process, the server trains the instance segmentation model through early stopping training and mixed precision training; specifically, the accuracy of the validation set is selected as the monitoring indicator of early stopping. When the accuracy of the validation set fluctuates slightly for ten consecutive rounds, the model training is stopped and the optimal model is saved to prevent model overfitting, improve the generalization ability of the model, and save computing resources. At the same time, single-precision floating point numbers (FP32) and half-precision floating point numbers (FP16) are used for calculations during training to speed up training and reduce the usage of video memory.
[0180] In order to more clearly illustrate the pressure equalizing ring tilt detection method provided in the embodiment of the present application, the pressure equalizing ring tilt detection method is specifically described below with a specific embodiment, but it should be understood that the embodiment of the present application is not limited thereto. Figure 8 As shown, in one of the exemplary embodiments, the present application also provides an automatic detection method for the tilt of a pressure equalizing ring based on instance segmentation and particle swarm optimization, which specifically includes the following steps:
[0181] Step S802: Acquire an image of the power transmission line and input the image into an instance segmentation model.
[0182] Specifically, the instance segmentation model is based on YOLOv8 as the prototype, and polygon-annotated images as samples, and is obtained by early stopping training and mixed precision training. The instance segmentation model includes a target detection branch trained based on the above formula 11, a classification head trained based on the above formula 12, an instance segmentation branch trained based on the above formula 13, and the above branch classification head.
[0183] Step S804: determine at least one candidate region corresponding to a grading ring and at least one candidate region corresponding to an insulator string in the image through an instance segmentation model, and generate a feature map corresponding to each candidate region and a mask corresponding to each candidate region.
[0184] Step S806: for each candidate region, mask processing is performed on the feature map corresponding to the candidate region through the instance segmentation model and the mask corresponding to the candidate region to obtain a polygonal region corresponding to the grading ring or insulator string to which the candidate region belongs.
[0185] Step S808, for each polygonal area, based on the particle swarm optimization algorithm, solve the objective function with the minimum area of the circumscribed rectangle of the polygonal area as the optimization goal and the rotation center and rotation angle of the circumscribed rectangle as the optimization parameters, and obtain the rotation center and rotation angle of the minimum rotated rectangle of the polygonal area.
[0186] Specifically, after obtaining the polygonal area output by the instance segmentation model, the server inputs the vertex set of the polygonal area into the rotating box fitting algorithm for solving the objective function shown in the above formula 5 to obtain the rotation center and rotation angle corresponding to each polygonal area.
[0187] Step S810: for each grading ring, respectively determine the distance between the rotation center corresponding to the grading ring and the rotation center corresponding to each insulator string, and based on the distance, determine whether there is an insulator string matching the grading ring in each insulator string.
[0188] Specifically, the insulator string matched with the grading ring refers to an insulator string with the smallest distance among the insulator strings whose corresponding distances are smaller than a preset distance threshold.
[0189] Step S812: If there is an insulator string matching the grading ring in each insulator string, the grading ring is determined to be tilted when the angle difference between the rotation angle corresponding to the grading ring and the rotation angle corresponding to the matching insulator string meets the corresponding first preset condition.
[0190] Specifically, the first preset condition is as shown in the above formula 1.
[0191] Step S814: if there is no insulator string matching the voltage equalizing ring in each insulator string, then traverse the remaining voltage equalizing rings except the voltage equalizing ring in each voltage equalizing ring, and when the angle difference between the rotation angle corresponding to the voltage equalizing ring and the rotation angle corresponding to the remaining traversed voltage equalizing rings meets the corresponding second preset condition, determine that the voltage equalizing ring is tilted.
[0192] Specifically, the second preset condition is as shown in the above formula 2.
[0193] In this embodiment, polygonal annotation is a mature annotation method. Therefore, the mask generated based on the instance segmentation model trained by it is highly accurate and can provide rich information to the subsequent rotating frame fitting algorithm used to solve the objective function. The method provided in this embodiment is an automated pressure equalizing ring tilt detection method, which can adjust the detection threshold and logic according to actual usage. There is no human interference throughout the process, no need for naked eye determination, the results can be reproduced, and the pressure equalizing ring tilt detection is more accurate and rigorous.
[0194] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0195] Based on the same inventive concept, the embodiment of the present application also provides a pressure equalizing ring tilt detection device for implementing the pressure equalizing ring tilt detection method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more embodiments of the pressure equalizing ring tilt detection device provided below can refer to the limitations of the pressure equalizing ring tilt detection method above, and will not be repeated here.
[0196] In an exemplary embodiment, Fig. 9 As shown, a pressure equalizing ring tilt detection device is provided, including: an image acquisition module 902, an instance segmentation module 904, an information determination module 906 and a tilt detection module 908, wherein:
[0197] The image acquisition module 902 is used to acquire images of the power transmission line.
[0198] The instance segmentation module 904 is used to determine, based on the instance segmentation model, a polygonal area corresponding to at least one grading ring and a polygonal area corresponding to at least one insulator string in the image; each grading ring corresponds to a polygonal area, and each insulator string corresponds to a polygonal area.
[0199] The information determination module 906 is used to respectively determine the rotation center and rotation angle of the minimum rotation rectangle of each polygonal area in the image.
[0200] The tilt detection module 908 is used to perform tilt detection on each grading ring based on the rotation center and the corresponding rotation angle of the grading ring, and the rotation center and the corresponding rotation angle of each insulator string, to obtain the tilt detection result of the grading ring.
[0201] The tilt detection module 908 is also used to determine the existence of an insulator string matching the voltage equalizing ring in each insulator string based on the rotation angle corresponding to the voltage equalizing ring and the rotation angle corresponding to each insulator string; when a matching insulator string exists, the voltage equalizing ring is tilted based on the rotation angle corresponding to the voltage equalizing ring and the rotation angle corresponding to the matching insulator string to obtain a tilt detection result of the voltage equalizing ring; when a matching insulator string does not exist, the voltage equalizing ring is tilted based on the rotation angle corresponding to the voltage equalizing ring and the rotation angles corresponding to the remaining voltage equalizing rings in each voltage equalizing ring except the voltage equalizing ring to obtain a tilt detection result of the voltage equalizing ring.
[0202] In an exemplary embodiment, the tilt detection module 908 is further configured to determine that the grading ring is tilted when the angle difference between the rotation angle corresponding to the grading ring and the rotation angle corresponding to the matching insulator string satisfies the corresponding first preset condition.
[0203] In an exemplary embodiment, the tilt detection module 908 is further used to determine the tilt of the pressure equalizing ring when the angle difference between the rotation angle corresponding to the pressure equalizing ring and the rotation angles corresponding to the other traversed pressure equalizing rings meets the corresponding second preset condition.
[0204] In an exemplary embodiment, the tilt detection module 908 is also used to determine the distance between the rotation center corresponding to the voltage equalizing ring and the rotation center corresponding to each insulator string; select the insulator strings whose corresponding distances are less than a preset distance threshold from each insulator string; and determine the insulator strings whose corresponding distances are less than those of the remaining insulator strings among the selected insulator strings as matching insulator strings.
[0205] In an exemplary embodiment, the information determination module 906 is also used to divide each polygonal area into multiple triangles and determine the centroid and area of each triangle; determine the centroid of the polygonal area based on the centroid and area of each triangle, and determine the rotation center search range based on the centroid of the polygonal area; based on the rotation center search range, a preset rotation angle search range and a particle swarm optimization algorithm, solve the objective function with the minimum area of the circumscribed rectangle of the polygonal area as the optimization goal and the rotation center and rotation angle of the circumscribed rectangle as optimization parameters, and obtain the rotation center and rotation angle of the minimum rotated rectangle of the polygonal area.
[0206] In an exemplary embodiment, the instance segmentation module 904 is also used to input the image into an instance segmentation model; through the instance segmentation model, candidate areas corresponding to at least one grading ring and at least one insulator string are determined in the image, and a feature map corresponding to each candidate area and a mask corresponding to each candidate area are generated; for each candidate area, the feature map corresponding to the candidate area is masked through the instance segmentation model and the mask corresponding to the candidate area, so as to obtain a polygonal area corresponding to the grading ring or the insulator string to which the candidate area belongs.
[0207] Each module in the above-mentioned pressure equalizing ring tilt detection device can be implemented in whole or in part by software, hardware and their combination. Each of the above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the corresponding operations of each of the above modules.
[0208] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Fig.10 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store image data of the transmission line and the equalizing ring inclination detection data of the transmission line. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for detecting the inclination of an equalizing ring is implemented.
[0209] Those skilled in the art will understand that Fig.10 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0210] In an exemplary embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.
[0211] In an exemplary embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0212] In an exemplary embodiment, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps in the above method embodiments are implemented.
[0213] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.
[0214] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0215] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A method for detecting the tilt of a pressure equalizing ring, characterized in that: The method comprises: Acquire images of power transmission lines; Based on the instance segmentation model, determining in the image at least one polygonal region corresponding to a grading ring and at least one polygonal region corresponding to an insulator string; each grading ring corresponds to a polygonal region, and each insulator string corresponds to a polygonal region; By optimizing, respectively determining the rotation center and rotation angle of the minimum rotation rectangle of each polygonal area in the image; For each grading ring, based on the rotation center and the corresponding rotation angle corresponding to the grading ring, and the rotation center and the corresponding rotation angle corresponding to each insulator string, the grading ring is tilted and detected to obtain the tilt detection result of the grading ring; specifically including: Based on the rotation center corresponding to the grading ring and the rotation center corresponding to each insulator string, determining the existence of an insulator string matching the grading ring in each insulator string; In the case where the matching insulator string exists, based on the rotation angle corresponding to the grading ring and the rotation angle corresponding to the matching insulator string, the grading ring is tilted and detected to obtain a tilt detection result of the grading ring; When the matching insulator string does not exist, the grading ring is tilted and detected based on the rotation angle corresponding to the grading ring and the rotation angles corresponding to the remaining grading rings except the grading ring to obtain a tilt detection result of the grading ring.
2. The method according to claim 1, characterized in that The step of performing tilt detection on the grading ring based on the rotation angle corresponding to the grading ring and the rotation angle corresponding to the matching insulator string to obtain the tilt detection result of the grading ring includes: When the angle difference between the rotation angle corresponding to the grading ring and the rotation angle corresponding to the matching insulator string satisfies the corresponding first preset condition, it is determined that the grading ring is tilted.
3. The method according to claim 1, characterized in that The step of performing tilt detection on the pressure equalizing ring based on the rotation angle corresponding to the pressure equalizing ring and the rotation angles corresponding to the remaining pressure equalizing rings except the pressure equalizing ring among the pressure equalizing rings to obtain the tilt detection result of the pressure equalizing ring includes: Traversing the remaining pressure equalizing rings; When the angle difference between the rotation angle corresponding to the pressure equalizing ring and the rotation angles corresponding to the other traversed pressure equalizing rings meets the corresponding second preset condition, it is determined that the pressure equalizing ring is tilted.
4. The method according to any one of claims 1 to 3, characterized in that: The determining, based on the rotation center corresponding to the grading ring and the rotation centers corresponding to each insulator string, the existence of an insulator string matching the grading ring in each insulator string comprises: Determine the distance between the rotation center corresponding to the grading ring and the rotation center corresponding to each insulator string; Selecting, from the insulator strings, insulator strings whose corresponding distances are less than a preset distance threshold; Among the screened insulator strings, the insulator string whose corresponding distance is smaller than that of the other insulator strings is determined as the matching insulator string.
5. The method according to any one of claims 1 to 3, characterized in that: The step of respectively determining the rotation center and the rotation angle of the minimum rotation rectangle of each polygonal area in the image through optimization processing includes: For each polygonal area, dividing the polygonal area into a plurality of triangles, and determining the centroid and area of each triangle; Determine the centroid of the polygonal area according to the centroid and area of each triangle, and determine the rotation center search range according to the centroid of the polygonal area; Based on the rotation center search range, the preset rotation angle search range and the particle swarm optimization algorithm, an objective function with the minimum area of the circumscribed rectangle of the polygonal area as the optimization goal and the rotation center and rotation angle of the circumscribed rectangle as optimization parameters is solved to obtain the rotation center and rotation angle of the minimum rotation rectangle of the polygonal area.
6. The method according to any one of claims 1 to 3, characterized in that: The example-based segmentation model determines in the image at least one polygonal region corresponding to a grading ring and at least one polygonal region corresponding to an insulator string, including: Inputting the image into the instance segmentation model; Determine, by using the instance segmentation model, in the image at least one candidate region corresponding to a grading ring and at least one candidate region corresponding to an insulator string, and generate a feature map corresponding to each candidate region and a mask corresponding to each candidate region; For each candidate region, mask processing is performed on the feature map corresponding to the candidate region through the instance segmentation model and the mask corresponding to the candidate region to obtain a polygonal region corresponding to the grading ring or insulator string to which the candidate region belongs.
7. A pressure equalizing ring tilt detection device, characterized in that: The device comprises: An image acquisition module, used for acquiring images of the power transmission line; An instance segmentation module, used to determine, based on an instance segmentation model, a polygonal region corresponding to at least one grading ring and a polygonal region corresponding to at least one insulator string in the image; each grading ring corresponds to a polygonal region, and each insulator string corresponds to a polygonal region; An information determination module, used to determine the rotation center and rotation angle of the minimum rotation rectangle of each polygonal area in the image through optimization processing; A tilt detection module is used to perform tilt detection on each grading ring based on the rotation center and the corresponding rotation angle of the grading ring, and the rotation center and the corresponding rotation angle of each insulator string, to obtain a tilt detection result of the grading ring; The tilt detection module is also used to determine the existence of an insulator string matching the grading ring in each insulator string based on the rotation center corresponding to the grading ring and the rotation centers corresponding to each insulator string; if the matching insulator string exists, the grading ring is tilted based on the rotation angle corresponding to the grading ring and the rotation angle corresponding to the matching insulator string to obtain a tilt detection result of the grading ring; if the matching insulator string does not exist, the grading ring is tilted based on the rotation angle corresponding to the grading ring and the rotation angles corresponding to the remaining grading rings in the grading rings except the grading ring to obtain a tilt detection result of the grading ring.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
High-resolution image grading ring defect identification method based on cascade rotation detection
CN116309500A