Disconnecting link type identification method based on interference area elimination and image matching
By eliminating interference areas and image matching in the knife switch type recognition method, and using the object detection model to filter and eliminate interference elements, the robustness and adaptability problems of image matching in complex environments are solved, efficient knife switch type recognition is achieved, and computing resource requirements are reduced.
Patent Information
- Application Number
- CN202510122889.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-26
- Publication Date
- 2025-06-27
AI Technical Summary
In the prior art, when image matching in complex environments, feature descriptors are difficult to adapt to scenes and lighting changes, and mismatch points are easily generated, and static feature descriptors lack the ability to adapt to dynamically changing scenes.
The knife switch type recognition method based on excluding interference areas and image matching is adopted. By obtaining inspection photos and pre-processing, the trained target detection model is used to filter the interference elements and remove their detection frame areas to obtain the picture to be matched, and the knife switch type is then identified through the image encoding module and the image matching module.
By limiting the size of the knife gate detection frame and removing interference elements, the possibility of a decrease in recognition accuracy is reduced, the computing power requirements in subsequent matching processes are reduced, the matching accuracy is improved, and the method is suitable for deployment in edge computing devices.
Smart Images

Figure CN120219788A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of power maintenance, and particularly to a method for identifying the type of disconnecting switch based on excluding interference regions and image matching. Background Art
[0002] The disconnecting switch, as an important electrical equipment, is widely used in the power system. It is crucial to ensure the safe operation of the power system by knowing whether the disconnecting switch is in the correct working state.
[0003] The state detection of the disconnecting switch based on machine vision has the advantages of not requiring modification of the existing disconnecting switch and being flexibly adapted to the intelligent inspection system. Specifically, for the state detection of the disconnecting switch based on machine vision, usually, the inspection photos taken by the intelligent inspection system are obtained, and then target detection is first performed based on the inspection photos, then feature points are extracted, and some feature descriptors are calculated based on the feature points, and then they are matched with the standard feature descriptor values of different types of disconnecting switches to obtain the final recognition result.
[0004] However, when facing image matching in a complex environment, the above existing technologies still have some challenges.
[0005] Firstly, traditional feature descriptors are often defined based on fixed rules and are difficult to adapt to various different scenarios and changes in lighting conditions, which may lead to insufficient robustness in the description of feature points. Secondly, in the presence of a large amount of noise or interference regions, traditional methods are prone to generating a large number of false matching points, thereby affecting the accuracy of subsequent processing. Finally, since most of these feature descriptors are static, they lack sufficient adaptability to dynamically changing scenarios.
[0006] In recent years, the development of deep learning technology has brought new solutions to image feature matching. Convolutional neural networks are widely used due to their powerful feature learning ability and good adaptability to large-scale datasets. Deep learning methods can learn richer and more robust feature representations in an end-to-end manner, thus largely overcoming the limitations of traditional methods.
[0007] Nevertheless, the current feature matching methods based on deep learning still face some problems. The existing feature matching methods are often affected by noise, occlusion, or other non-target regions, resulting in inaccurate matching results. How to efficiently identify and exclude these interference regions has become the key to improving the matching accuracy.
[0008] Although some existing technologies attempt to solve this problem, for example, Chinese patent CN113159043A discloses a feature point matching method and system based on semantic information. First, the semantic segmentation results are used to constrain the feature point matching, proving that semantic information can improve the stability of feature points; in order to better integrate the high-level semantic information of the image into the feature points, the feature point matching in this matching method is performed within each individual semantic category, narrowing the matching range and thus reducing interference items, but this method will increase the difficulty of algorithm design, the amount of calculation is too large, and it is difficult to deploy on edge computing devices. Summary of the invention
[0009] The purpose of the present invention is to provide a knife switch type identification method based on eliminating interference areas and image matching.
[0010] The purpose of the present invention can be achieved by the following technical solutions:
[0011] A knife switch type identification method based on eliminating interference areas and image matching, comprising:
[0012] Obtain inspection photos of the inspection system;
[0013] The inspection photos are pre-processed and then input into the trained first target detection model to obtain a plurality of identification elements output by the first target detection model and a detection frame area of each identification element;
[0014] If a knife switch exists in all the recognition elements, determine whether the ratio of the size of the detection frame of the knife switch to the size of the inspection photo is within a preconfigured first ratio interval;
[0015] If the ratio of the size of the detection frame of the knife switch to the size of the inspection photo is within a pre-configured first ratio interval, the interference elements among all the recognition elements are screened out, and the detection frame areas corresponding to all the interference elements are removed to obtain the first to-be-matched picture;
[0016] The first image to be matched is input into the trained second target detection model to obtain the knife switch type output by the second target detection model.
[0017] The inspection system includes a drone, a handheld terminal or an inspection robot.
[0018] The first ratio range is from 0.2 to 0.7.
[0019] The interference elements at least include the sky, trees, flying objects and pedestrians.
[0020] The process of removing the detection frame areas corresponding to all interference elements to obtain the first image to be matched includes: overwriting the pixel values of the detection frame areas corresponding to all interference elements in the preprocessed inspection photo to 255 to obtain the first image to be matched.
[0021] The process of removing the detection frame areas corresponding to all interference elements to obtain the first image to be matched includes:
[0022] Cut out the detection frame areas corresponding to all interference elements in the preprocessed inspection photo according to a square parallel to the wide side of the inspection photo, and the remaining part obtained is used as the first potential image to be matched;
[0023] Judge whether the size of the detection frame area of the disconnecting switch in the first potential image to be matched is the same as the size of the detection frame area of the disconnecting switch in the inspection photo. If so, judge whether the ratio of the size of the detection frame area of the disconnecting switch in the first potential image to be matched to the size of the first potential image to be matched is within a pre-configured second ratio range. If so, use the first potential image to be matched as the first image to be matched.
[0024] The right boundary of the second ratio range is greater than the right boundary of the first ratio range.
[0025] The second target detection model includes an image encoding module and an image matching module.
[0026] The process of inputting the first image to be matched into the trained second target detection model to obtain the type of disconnecting switch output by the second target detection model includes:
[0027] Input the first image to be matched into the image encoding module of the trained second target detection model to obtain the feature vector of the first image to be matched;
[0028] Calculate the distance between the feature vector of the first image to be matched and the average feature vectors of all disconnecting switch types, and select the disconnecting switch type related to the smallest distance as the recognized disconnecting switch type.
[0029] A method for identifying the type of disconnecting switch based on excluding interference regions and image matching includes a memory, a processor, and a program stored in the memory. When the processor executes the program, the above method is implemented.
[0030] A storage medium stores a program, and when the program is executed, the above method is implemented.
[0031] Compared with the prior art, the present invention has the following beneficial effects:
[0032] 1. By limiting the size ratio of the detection frame of the disconnecting switch, it is possible to ensure that within a certain scale, the decline in recognition accuracy caused by inconsistent scales of parts outside the disconnecting switch is reduced. On this basis, by removing the identified interference element parts, the computing power requirement in the subsequent matching process can be reduced while reducing this part of interference.
[0033] 2. Directly cover the area of the interference elements with a gray value of 255. With such a design, the first image to be matched can have better integrity.
[0034] 3. Adopt the method of directly cutting off the area of the interference elements, and the cutting direction is parallel to the width of the original photo in the reverse direction. Thus, while ensuring the integrity of the pixel points in one dimension, it can avoid the interference of the covered pixel values on the image encoder. Therefore, the image encoder can be directly used for image encoding and distance calculation to achieve type recognition, with relatively low computing power requirements and can be deployed in edge computing devices. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 It is a schematic diagram of the main step flow of the method of the present invention;
[0036] Figure 2 It is a schematic diagram of cutting off the part containing interference elements. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0037] The present invention will be described in detail below with reference to the drawings and specific embodiments. This embodiment is implemented on the premise of the technical solution of the present invention, and gives the detailed implementation manner and specific operation process, but the protection scope of the present invention is not limited to the following embodiments.
[0038] Embodiment 1
[0039] A method for identifying the type of disconnecting switch based on excluding interference regions and image matching. By limiting the size ratio of the detection frame of the disconnecting switch, it can ensure that within a certain scale, the decline in recognition accuracy caused by inconsistent scales of the parts outside the disconnecting switch can be reduced. On this basis, by removing the identified interference element parts, the computing power requirements in the subsequent matching process can be reduced while reducing the interference of this part.
[0040] As Figure 1 shown, the method of this application includes:
[0041] Step S1: Obtain the inspection photos taken by the intelligent inspection system;
[0042] Generally, the intelligent inspection system is a drone, a camera or an inspection robot. For the same target disconnecting switch, it is required to take as many inspection photos as possible, involving different angles and distances, so as to ensure that at least one inspection photo meets the requirements. Among them, even for the same angle and distance, multiple photos can be taken.
[0043] Step S2: After preprocessing the inspection photos, input them into the trained first target detection model to obtain multiple recognition elements output by the first target detection model and the detection frame regions of each recognition element;
[0044] Among them, the preprocessing process includes grayscale conversion, distortion removal, and noise reduction, so as to remove some primary interference factors, so that the first object detection model can correctly detect various elements.
[0045] Step S3: If there is a disconnecting switch among all the recognized elements, determine whether the ratio of the size of the detection frame of the disconnecting switch to the size of the inspection photo is within a pre-configured first ratio range;
[0046] The first object detection model can adopt existing models such as YOLOv10, which can output various target objects, called elements, covering disconnecting switches, sky, trees, pedestrians, and poles, etc. Among them, the sky, trees, pedestrians, etc. belong to the parts that change significantly in a short time and have no association with the type of disconnecting switch, while elements such as poles are related to the type of disconnecting switch. Therefore, on the one hand, since some interference elements need to be removed later, on the other hand, the image of the disconnecting switch part should be large enough. On the other hand, some elements that are related to the type of disconnecting switch, such as poles, can also be used as a basis for assisting in judging the type of disconnecting switch when the angle of the disconnecting switch is not good. Therefore, requiring the size ratio of the disconnecting switch part can improve the accuracy of subsequent recognition.
[0047] Step S4: If the ratio of the size of the detection frame of the disconnecting switch to the size of the inspection photo is within the pre-configured first ratio range, screen out the interference elements among all the recognized elements, and remove the detection frame areas corresponding to all the interference elements to obtain the first image to be matched;
[0048] In particular, the interference elements at least include the sky, woods, flying objects, and pedestrians.
[0049] In addition, in this embodiment, the process of removing the detection frame areas corresponding to all the interference elements to obtain the first image to be matched includes:
[0050] As shown in Figure 2, after cutting off the detection frame areas corresponding to all the interference elements in the preprocessed inspection photo according to a square parallel to the wide side of the inspection photo, the remaining part is used as the first potentially image to be matched. Figure 2 In the figure, the shaded part is the cut-off part;
[0051] Judge whether the size of the detection frame area of the disconnecting switch in the first potentially image to be matched is the same as the size of the detection frame area of the disconnecting switch in the inspection photo. If so, judge whether the ratio of the size of the detection frame area of the disconnecting switch in the first potentially image to be matched to the size of the first potentially image to be matched is within a pre-configured second ratio range. If so, use the first potentially image to be matched as the first image to be matched.
[0052] Designed in this way, by directly cutting off the interference element area and with the cutting direction being parallel and opposite to the width of the original photo, it is possible to ensure the integrity of the pixel points in one dimension while avoiding the interference of the covered pixel values on the image encoder. Thus, the image encoder can be directly used for image encoding and distance calculation to achieve type recognition, with relatively low computing power requirements and can be deployed in edge computing devices.
[0053] At this time, the right boundary of the second ratio interval is greater than the right boundary of the first ratio interval, and the second ratio interval is a relatively narrow interval. For example, in a certain embodiment, the second ratio interval can be 0.5 - 0.6, and the first ratio interval is 0.2 - 0.5.
[0054] Step S5: Input the first image to be matched into the trained second object detection model to obtain the switchblade type output by the second object detection model.
[0055] In this embodiment, the second object detection model includes an image encoding module and an image matching module.
[0056] The process of inputting the first image to be matched into the trained second object detection model to obtain the switchblade type output by the second object detection model includes:
[0057] Input the first image to be matched into the image encoding module of the trained second object detection model to obtain the feature vector of the first image to be matched.
[0058] Specifically, the core of the image encoding module is an image encoder. For example, in this embodiment, a vae image encoder is used. In this embodiment, after the first image to be matched is input into the image encoding module of the second object detection model, the first image to be matched is first cropped to obtain a sub-image of the switchblade detection frame part, then the sub-image of the switchblade detection frame part is scaled to a standard size, and then the scaled sub-image of the switchblade detection frame part is encoded by the image encoder to obtain a first sub-vector. Then, after scaling the first image to be matched to the standard size, the scaled first image to be matched is encoded by the image encoder to obtain a second sub-vector, and the first sub-vector and the second sub-vector are concatenated to obtain the feature vector of the first image to be matched.
[0059] Calculate the distance between the feature vector of the first image to be matched and the average feature vectors of all switchblade types, and select the switchblade type related to the smallest distance as the recognized switchblade type.
[0060] In this embodiment, specifically calculate the Euclidean distances between the feature vector of the first image to be matched and the average feature vectors of all switchblade types respectively. When calculating, calculate the Euclidean distances for the first sub-vector and the second sub-vector respectively, that is:
[0061] D i = α·d i,1 + β·d i,2
[0062] Where: D i is the Euclidean distance between the feature vector of the first image to be matched and the average feature vector of the i-th type of disconnecting switch, α and β are weight coefficients, and d i,1 is the Euclidean distance between the first sub-vector of the first image to be matched and the average first sub-vector of the i-th type of disconnecting switch, and d i,2 is the Euclidean distance between the second sub-vector of the first image to be matched and the average second sub-vector of the i-th type of disconnecting switch.
[0063] In this way, through the above design, while solving the problem of insufficient precision caused by solely considering the characteristics of the disconnecting switch itself, it can also be achieved with relatively low computing resources, greatly reducing the cost.
[0064] Embodiment 2
[0065] The same parts of this embodiment and Embodiment 1 will not be elaborated here, and only the differences will be described. Specifically, in this embodiment, the process of obtaining the first image to be matched by removing the detection frame areas corresponding to all interference elements includes: covering the pixel values of the detection frame areas corresponding to all interference elements in the preprocessed inspection photo with 255 to obtain the first image to be matched.
[0066] This embodiment obtains the first image to be matched by covering instead of cropping, so that more abundant image content can be retained. In this embodiment, the first ratio interval is from 0.2 to 0.7. However, compared with Embodiment 1, this embodiment requires designing a more complex second object detection model and more training sample support.
[0067] In this embodiment, the second object detection model is implemented using a neural network model and a classifier.
[0068] Embodiment 3
[0069] If the above functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention. The foregoing storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard disks, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), magnetic disks, or optical discs.
Claims
1. A knife switch type identification method based on eliminating interference areas and image matching, characterized in that: include: Obtain inspection photos taken by the inspection system; The inspection photos are pre-processed and then input into the trained first target detection model to obtain a plurality of identification elements output by the first target detection model and a detection frame area of each identification element; If a knife switch exists in all the recognition elements, determine whether the ratio of the size of the detection frame of the knife switch to the size of the inspection photo is within a preconfigured first ratio interval; If the ratio of the size of the detection frame of the knife switch to the size of the inspection photo is within a pre-configured first ratio interval, the interference elements among all the recognition elements are screened out, and the detection frame areas corresponding to all the interference elements are removed to obtain the first to-be-matched picture; The first image to be matched is input into the trained second target detection model to obtain the knife switch type output by the second target detection model.
2. The method for identifying knife switch types based on eliminating interference areas and image matching according to claim 1 is characterized in that: The inspection system is a drone, a handheld terminal or an inspection robot.
3. The method for identifying knife switch types based on eliminating interference areas and image matching according to claim 1 is characterized in that: The first ratio range is from 0.2 to 0.
7.
4. The method for identifying knife switch types based on eliminating interference areas and image matching according to claim 1 is characterized in that: The interference elements at least include the sky, trees, flying objects and pedestrians.
5. The method for identifying knife switch types based on eliminating interference areas and image matching according to claim 1 is characterized in that: The process of removing the detection frame areas corresponding to all interference elements to obtain the first image to be matched includes: overwriting the pixel values of the detection frame areas corresponding to all interference elements in the preprocessed inspection photo to 255 to obtain the first image to be matched.
6. The method for identifying knife switch types based on eliminating interference areas and image matching according to claim 1 is characterized in that: The process of removing the detection frame areas corresponding to all interference elements to obtain the first image to be matched includes: According to a square parallel to the wide side of the inspection photo, after cutting out the detection frame area corresponding to all interference elements in the pre-processed inspection photo, the remaining part is used as the first potential image to be matched; Determine whether the size of the detection frame area of the knife switch in the first potential picture to be matched is consistent with the size of the detection frame area of the knife switch in the inspection photo. If so, determine whether the ratio of the size of the detection frame area of the knife switch in the first potential picture to be matched to the size of the first potential picture to be matched is within a preconfigured second ratio range. If so, use the first potential picture to be matched as the first picture to be matched.
7. The method for identifying knife switch types based on eliminating interference areas and image matching according to claim 6 is characterized in that: The right boundary of the second ratio interval is greater than the right boundary of the first ratio interval.
8. The method for identifying knife switch types based on eliminating interference areas and image matching according to claim 6 is characterized in that: The second target detection model includes an image encoding module and an image matching module. The process of inputting the first to-be-matched image into the trained second target detection model to obtain the knife switch type output by the second target detection model includes: Inputting the first image to be matched into the image encoding module of the trained second object detection model to obtain a feature vector of the first image to be matched; The distance between the feature vector of the first image to be matched and the average feature vector of all knife switch types is calculated, and the knife switch class correlation with the smallest distance is selected as the identified knife switch type.
9. A method for identifying knife switch types based on eliminating interference areas and image matching, comprising a memory, a processor, and a program stored in the memory, characterized in that: When the processor executes the program, the method according to any one of claims 1 to 8 is implemented.
10. A storage medium having a program stored thereon, characterized in that: When the program is executed, the method according to any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
Feature point matching method and system based on semantic information
CN113159043A