Method for counting materials of power distribution tower
Data is collected by drone surrounds and using computer vision algorithms, combined with multi-view image comprehensive counting, the problem of cumbersome and inaccurate material counting of distribution pole towers is solved, and efficient and accurate material management data support is achieved.
Patent Information
- Application Number
- CN202510350544.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-24
- Publication Date
- 2025-04-22
- Estimated Expiration
- 2045-03-24
AI Technical Summary
In the prior art, manual statistics on the number of materials for distribution pole towers is cumbersome and time-consuming, and the materials may be blocked during drone inspections, resulting in inaccurate counting.
The drone is used to collect distribution tower data around, and material counting is performed through computer vision algorithms. Multi-view image comprehensive counting is used to train material detection models and cross-view frame matching models to achieve accurate material counting.
It improves the efficiency and accuracy of material counting, avoids misjudgment of manual counting and material omission, and provides accurate material management data support.
Smart Images

Figure CN119863616A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of material counting, and in particular to a method for counting materials on a distribution tower. Background Art
[0002] The distribution tower contains many materials, such as insulators, wire clamps, etc., and each material plays an important role. At the same time, each tower has a standard, that is, the number of each material on the tower should be. Therefore, at the end of the tower construction or daily inspection, the number of materials on the tower needs to be counted to avoid disasters caused by missing materials.
[0003] Manually counting the number of materials on each tower is complicated and time-consuming. Using drones for inspection combined with computer vision algorithms can facilitate rapid statistics. Since there are many targets in the tower, some materials will be blocked when taking a single picture, making it impossible to count. Based on this, we designed to shoot the same tower from multiple perspectives and combine these pictures to count the materials.
[0004] Based on this, a method for counting materials on distribution towers is proposed here to solve the above problems. Summary of the invention
[0005] In order to overcome the above technical problems, the purpose of the present invention is to provide a method for counting materials on distribution towers, which uses computer vision counting to realize the material counting function based on drone patrol, avoiding the problems of slow efficiency and misjudgment of manual counting. The purpose of the present invention can be achieved through the following technical solutions: A method for counting materials on a distribution tower, comprising the following steps: Step 1: Collecting distribution tower data using a drone ,in The i in the number represents the i-th tower, and 0 represents the first picture taken at the i-th tower. The 1 in represents the second picture taken in the i-th tower, and so on. Here, it is required that the pictures collected by each tower are taken around the tower, and the angle between adjacent pictures is not greater than θ degrees; Step 2: Label the detection box of the material in each image in D to obtain the detection data set Ddet; Step 3: Mark the material detection frame in each tower in D in the corresponding picture The relationship is obtained by obtaining the matching relationship dataset Dmatch; Step 4: Use Ddet data to train the material detection model Det; Step 5: Use Dmatch data to train the cross-view box matching model Match; Step 6: Enter the image to be tested To the trained Ddet, get the detection results , input the detection result into the trained matching model Match to obtain the label result of each box , according to the cls result and instance result, get the final number of each material.
[0006] Preferably, the step 2 comprises the following steps: Step 2.1: The format of the annotation is the standard detection format, recorded as , where k represents the kth tower, represents the first picture taken in the kth tower, represents the first material frame marked in the first picture taken in the k-th tower, Indicates the category to which the first material box marked in the first picture taken in the k-th tower belongs, and the same applies to the others.
[0007] Preferably, step 3 comprises the following steps: Step 3.1: For , , marked and The relationship between ,in Indicates whether the material in the first picture taken at the kth tower appears in the second picture taken at the kth tower. If so, its index in the second picture is recorded as ,by For example, if and belong to the same material, then =1, if does not appear in the second picture, then =-1.
[0008] Preferably, step 4 comprises the following steps: Step 4.1: The material detection model is trained using the yolov8 model commonly used in the field to obtain Det.
[0009] Preferably, the method comprises the following steps: Step 5.1: During training, input a batch of b samples into the network for training. Here we take b=1 as an example to illustrate the input: Select the i-th image and the j-th image in the k-th tower, then , ,according to Can get , is a The value of the (ii, jj)th position of the matrix represents The iith box in Whether the jj-th box belongs to the same material, if it is a material, the corresponding value is 1, if not, the corresponding value is 2.
[0010] Preferably, the step 5 further comprises step 5.2: inputting the i-th picture into a backbone network to obtain Fi, inputting the j-th picture into a backbone network to obtain Fj, and using ROIAlign according to Get the characteristics of each material frame (Fi_ ,....)、(Fj_ , ....), input the feature and box information, cls information into the subsequent information interaction network, and obtain the predicted relationship between boxes , and then optimize it based on the BCE loss function commonly used in the field; finally, the converged model Match is obtained.
[0011] Preferably, step 6 comprises the following steps: Step 6.1: Input L+1 images taken by a tower Here, we require that L+1 images are taken around the tower, and the angle between adjacent images is no greater than θ degrees. They are input into the trained Ddet and obtained. , .
[0012] Preferably, step 6.2: traverse and input the i-th image and its material detection result and the j-th image and its material detection result into the Match model to obtain the predicted relationship , assign a label instance to each box, where instance is the label of a certain material, and each material label is independent; the order of traversing the image is (0,1), (0,2)..., (0,L), (1,2), (1,3)... (1,L),..., (L-1, L); where (0,1) means and , and so on; Step 6.3: Count the number of assigned labels and finally get the quantity of each material.
[0013] Beneficial effects of the present invention: 1. Computer vision counting is used to realize the material counting function based on drone patrol, avoiding the problems of slow efficiency and misjudgment of manual counting. Drones are used to collect data around distribution towers. The angle between adjacent pictures is no more than θ degrees, ensuring full coverage of materials around the towers. Image information of all angles of the towers can be obtained, avoiding material omissions due to limited viewing angles. The collection efficiency is high and the data is comprehensive, laying a solid foundation for subsequent accurate counting.
[0014] 2. The material detection frame in the picture is labeled in a standard detection format, which clarifies the correspondence between the tower, picture, material frame and the category to which it belongs, making the labeled data highly standardized and consistent, facilitating subsequent data processing and model training, and improving data quality and availability.
[0015] 3. When counting materials, the image is first input into the material detection model to obtain the detection result, and then the detection result is input into the cross-view frame matching model to obtain the label of each frame. Finally, the number of materials is counted according to the label. The whole process is rigorous and logically clear, which can effectively reduce counting errors, improve the accuracy and reliability of counting, and provide accurate data support for distribution tower material management. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The present invention will be further described below in conjunction with the accompanying drawings.
[0017] Figure 1 This is a flow chart of data collection and model training of the present invention; Figure 2 It is a material counting flow chart of the present invention. DETAILED DESCRIPTION
[0018] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention. Example
[0019] See also Figure 1 - Figure 2 As shown, a method for counting materials on distribution towers includes: Step 1: Collecting distribution tower data using a drone ,in The i in the number represents the i-th tower, and 0 represents the first picture taken at the i-th tower. The 1 in represents the second picture taken in the i-th tower, and so on. Here, it is required that the pictures collected by each tower are taken around the tower, and the angle between adjacent pictures is not greater than θ degrees. In this embodiment, we collect 3 pictures for each tower. In actual use, other numbers of pictures can be collected, and the number of pictures collected by each tower can be different. The value of θ is 45; Step 2: Label the detection box of the material in each image in D to obtain the detection data set Ddet; Step 3: Mark the material detection frame in each tower in D in the corresponding picture The relationship is obtained by obtaining the matching relationship dataset Dmatch; Step 4: Use Ddet data to train the material detection model Det; the detection model selected in this embodiment is YOLOv8; Step 5: Use Dmatch data to train the cross-view box matching model Match; Step 6: Enter the image to be tested To the trained Ddet, get the detection results , input the detection result into the trained matching model Match to obtain the label result of each box , according to the cls result and instance result, get the final number of each material.
[0020] For step 2, the following steps are included: Step 2.1: The format of the annotation is the standard detection format, recorded as , where k represents the kth tower, represents the first picture taken in the kth tower, represents the first material frame marked in the first picture taken in the k-th tower, Indicates the category to which the first material box marked in the first picture taken in the kth tower belongs, and the same applies to the others; in this embodiment, the marked materials are insulators, crossarms, and wire clamps, that is, the value range of cls is insulators, crossarms, and wire clamps. More material types can be marked in actual use; For step 3, the following steps are included: Step 3.1: , , marked and The relationship between ,in Indicates whether the material in the first picture taken at the kth tower appears in the second picture taken at the kth tower. If so, its index in the second picture is recorded as ,by For example, if and belong to the same material, then =1, if does not appear in the second picture, then =-1.
[0021] For step 4, the following steps are included: Step 4.1: The material detection model is trained using the yolov8 model commonly used in the field to obtain Det; For step 5, the following steps are included: Step 5.1: During training, input a batch of b samples into the network for training. Here we take b=1 as an example to illustrate the input: Select the i-th image and the j-th image in the k-th tower, then , ,according to Can get , is a The value of the (ii, jj)th position of the matrix represents The iith box in Whether the jj-th box belongs to the same material, if it is a material, the corresponding value is 1, if not, the corresponding value is 2.
[0022] Step 5 also includes step 5.2: input the i-th image into a backbone network to obtain Fi, input the j-th image into a backbone network to obtain Fj, and use ROIAlign according to Get the characteristics of each material frame (Fi_ ,....)、(Fj_ , ....), input the feature and box information, cls information into the subsequent information interaction network, and obtain the predicted relationship between boxes , and then optimize based on the BCE loss function commonly used in the field; finally obtain the converged model Match; in this embodiment, the subsequent information interaction network is composed of a transformer layer, and other networks such as CNN and GNN can also be used; For step 6, the following steps are included: Step 6.1: Input L+1 images taken by a tower Here, we require that L+1 images are taken around the tower, and the angle between adjacent images is no greater than θ degrees. They are input into the trained Ddet and obtained. , ; In this embodiment, L is 3, and θ is 45;
[0023] Step 6.2: Traverse and input the i-th image and its material detection results and the j-th image and its material detection results into the Match model to obtain the predicted relationship , assign a label instance to each box, where the instance value refers to the label of a certain material (for example: insulator 1, insulator 2, wire clamp 1, wire clamp 2...), and the label of each material is independent; the order of traversing the image is (0,1), (0,2)..., (0,L), (1,2), (1,3)... (1,L),...., (L-1, L); where (0,1) means and , and so on; Step 6.3: Count the number of assigned labels and finally get the quantity of each material.
[0024] The preferred embodiments of the present invention disclosed above are only used to help explain the present invention. The preferred embodiments do not describe all the details in detail, nor do they limit the invention to only specific implementation methods. Obviously, many modifications and changes can be made according to the content of this specification. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the present invention, so that those skilled in the art can understand and use the present invention well. The present invention is limited only by the claims and their full scope and equivalents.
Claims
1. A method for counting materials on distribution towers, characterized in that: The following steps are involved: Step 1: Collect distribution tower data using drones ,in The i in the number represents the i-th tower, and 0 represents the first picture taken at the i-th tower. The 1 in represents the second picture taken in the i-th tower, and so on. Here, it is required that the pictures collected by each tower are taken around the tower, and the angle between adjacent pictures is not greater than θ degrees; Step 2: Label the detection box of the material in each image in D to obtain the detection data set Ddet; Step 3: Mark the material detection frame in each tower in D in the corresponding picture The relationship is obtained by obtaining the matching relationship dataset Dmatch; Step 4: Use Ddet data to train the material detection model Det; Step 5: Use Dmatch data to train the cross-view box matching model Match; Step 6: Enter the image to be tested To the trained Ddet, get the detection results , input the detection result into the trained matching model Match to obtain the label result of each box , according to the cls result and instance result, get the final number of each material.
2. The method for counting materials on distribution towers according to claim 1, wherein step 2 comprises the following steps: Step 2.1: The format of the annotation is the standard detection format, recorded as , where k represents the kth tower, represents the first picture taken in the kth tower, represents the first material frame marked in the first picture taken in the k-th tower, Indicates the category to which the first material box marked in the first picture taken at the k-th tower belongs.
3. The method for counting materials on distribution towers according to claim 1, wherein step 3 comprises the following steps: Step 3.1: For , , marked and The relationship between ,in Indicates whether the material in the first picture taken at the kth tower appears in the second picture taken at the kth tower. If so, its index in the second picture is recorded as ,by For example, if and belong to the same material, then =1, if does not appear in the second picture, then =-1.
4. The method for counting materials on distribution towers according to claim 1, wherein step 4 comprises the following steps: Step 4.1: The material detection model is trained using the yolov8 model commonly used in the field to obtain Det.
5. The method for counting materials on distribution towers according to claim 1, wherein step 5 comprises the following steps: Step 5.1: During training, input a batch of b samples into the network for training. Here we take b=1 as an example to illustrate the input: Select the i-th image and the j-th image in the k-th tower, then , ,according to Can get , is a The value of the (ii, jj)th position of the matrix represents The iith box in Whether the jj-th box belongs to the same material, if it is a material, the corresponding value is 1, if not, the corresponding value is 2.
6. A method for counting materials of distribution towers according to claim 5, wherein step 5 further comprises step 5.2: inputting the i-th image into a backbone network to obtain Fi, inputting the j-th image into a backbone network to obtain Fj, using ROIAlign according to Get the characteristics of each material frame (Fi_ , ....)、(Fj_ , ....), input the feature and box information, cls information into the subsequent information interaction network, and obtain the predicted relationship between boxes , and then optimize it based on the BCE loss function commonly used in the field; finally, the converged model Match is obtained.
7. The method for counting materials on distribution towers according to claim 1, wherein step 6 comprises the following steps: Step 6.1: Input L+1 images taken by a tower Here, we require that L+1 images are taken around the tower, and the angle between adjacent images is no greater than θ degrees. They are input into the trained Ddet and obtained. , .
8. A method for counting materials of distribution towers according to claim 7, step 6.2: traversing and inputting the i-th image and its material detection result and the j-th image and its material detection result into the Match model to obtain the predicted relationship , assign a label instance to each box, where instance is the label of a certain material, and each material label is independent; the order of traversing the image is (0,1), (0,2)..., (0,L), (1,2), (1,3)... (1,L),..., (L-1, L); where (0,1) means and , and so on; Step 6.3: Count the number of assigned labels and finally get the quantity of each material.
Citation Information
Patent Citations
Unmanned aerial vehicle aerial image-based power distribution tower reverse breaking information rapid identification method
CN110929646A
Tower insulator detection method based on deep learning
CN114581795A
Intelligent edge detection method for power grid inspection and monitoring
CN116385958A
Unmanned aerial vehicle distribution network completion acceptance method based on multi-view fusion
CN117152647A
Method for detecting densely occluded fish based on YOLOv5 network
US11790640B1