Power distribution box circuit device automatic identification method and system based on sparse network
By constructing a Sparse Refined R-CNN object detection model, the challenges of lightweight network models and small object detection are solved, enabling efficient automatic identification and status monitoring of circuit equipment. This model is suitable for UAV monitoring and automatic conversion of circuit equipment into CAD circuit diagrams.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- WUHAN UNIV
- Filing Date
- 2023-06-01
- Publication Date
- 2026-07-21
AI Technical Summary
Existing target detection models suffer from insufficient demand for lightweight network models and difficulties in detecting targets at different scales in industrial applications. In particular, the feature of small objects tends to disappear in deep networks, affecting the accuracy of automatic identification and status monitoring of circuit equipment.
A Sparse Refined R-CNN object detection model based on the Transformer decoder concept is constructed. It adopts a sparse network structure, introduces proposal candidate boxes and feature fusion techniques, and combines local cross-attention mechanism and multi-scale feature fusion to improve the model's ability to automatically identify and monitor the status of circuit devices.
It enables efficient and automatic identification and status monitoring of circuit equipment, improves detection accuracy and efficiency, reduces human resource consumption, and is suitable for UAV monitoring and automatic conversion of circuit equipment into CAD circuit diagrams.
Smart Images

Figure CN116883314B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the technical field of computer vision. In the automatic identification of circuit equipment in distribution boxes, by processing the collected images of the internal structure of the distribution box according to the sparse network model structure proposed by this invention, the types of circuit equipment in the distribution box and their switching status can be identified. Background Technology
[0002] Distribution boxes are indispensable in various settings such as factories, hospitals, large buildings, and airports. Their application is particularly widespread and numerous in large factories and buildings. Therefore, collecting information on the various circuit components within these distribution boxes and monitoring their status is a crucial task in modern society. Most factories and buildings are equipped with older distribution boxes. With economic development, the aging of circuitry in many distribution boxes has created safety hazards, necessitating regular upgrades to ensure safe production and daily life. In some power-related factories, the distribution boxes are outdated, and many have lost their original circuit diagrams. Given the large scale of these distribution boxes, maintaining them is difficult and requires significant manpower, sometimes exceeding the cost of purchasing new equipment. However, directly replacing them with new, intelligent distribution boxes is also time-consuming and labor-intensive due to the large scale of the replacement. The maintenance and testing of the new distribution boxes may cause production and daily life disruptions, impacting normal factory operations and resulting in economic losses. When replacing electrical equipment, it is necessary to count the number of electrical devices in the original distribution box and draw the corresponding circuit diagram. Over time, the manual collection of information on the distribution box will consume a lot of human resources.
[0003] With the rapid development of computer vision in recent years, artificial intelligence has gradually replaced human labor in solving many practical problems in production and daily life, reducing manpower consumption and improving production efficiency. Research has found that object detection models based on deep neural networks can effectively solve problems in the construction of intelligent circuit information. However, existing object detection models are more theoretical, and there is still considerable room for improvement in lightweight network models that meet the requirements of industrial application. Furthermore, the detection of objects at different scales remains a challenge in object detection. Information about large objects occupies a large portion of the feature map, while the detailed features of small objects may gradually disappear as the network deepens. Therefore, improving the detection accuracy of object detection models remains a key research area.
[0004] The Transformer model is built entirely on the attention mechanism. In recent years, researchers have successfully used Transformers to build object detection models in the field of computer vision, achieving a leap forward in image detection model structure. The model mainly consists of two parts: an encoder and a decoder. The encoder encodes the image input into a fixed-length vector, and the decoder decodes the required result based on the encoder's output.
[0005] This invention addresses the problems existing in the construction of intelligent circuit information by transferring the dense target detection model to the field of circuit equipment recognition. It constructs a Sparse Refined R-CNN target detection model based on the Transformer decoder concept, which solves the problems of automatic identification of circuit equipment and monitoring of circuit equipment status, and provides technical support for the automatic conversion of circuit equipment into CAD circuit diagrams and UAV monitoring of equipment status. Summary of the Invention
[0006] This invention addresses the problems existing in the construction of intelligent circuit information by transferring the dense target detection model to the field of circuit equipment recognition. It constructs a Sparse Refined R-CNN target detection model based on the Transformer decoder concept, which solves the problems of automatic identification of circuit equipment and monitoring of circuit equipment status, and provides technical support for the automatic conversion of circuit equipment into CAD circuit diagrams and UAV monitoring of equipment status.
[0007] This invention provides an automatic identification method for electrical distribution box circuit equipment based on sparse networks. It transfers the dense target detection model to circuit equipment identification, constructs a target detection model based on the Transformer decoder concept, and solves the problems of automatic identification and status monitoring of circuit equipment. The implementation process includes the following steps.
[0008] Image feature extraction yields multi-scale feature maps as output.
[0009] Prepare proposed candidate boxes and proposed features, including randomly generating a set of proposed candidate boxes by setting hyperparameters. The proposed candidate boxes provide coarse localization of the object, and a set of proposed features of the same size are introduced to assist in learning.
[0010] Feature fusion includes taking the proposed candidate boxes and proposed features as inputs to the dynamic instance interaction head for subsequent operations to generate the final learned features; the dynamic instance interaction head is implemented in the form of several cascaded heads, wherein each interaction head contains a local cross attention mechanism module GM-MCA and a multi-scale feature fusion module PPA;
[0011] The classification and regression results are obtained, including classification and regression after obtaining the final learned features generated by the interactive head, generating target classification and final prediction boxes. Before the regression branch, a one-to-one matching of ground truth boxes and prediction boxes is performed. Then, a feature fusion model is used to perform second-order feature fusion on multiple points on each prediction box and calculate the loss to backpropagate and complete parameter updates, further correcting the position of the prediction boxes to obtain the automatic identification results of the distribution box circuit equipment.
[0012] Furthermore, multi-scale feature maps are output through a backbone network based on the ResNet50 structure and feature pyramids.
[0013] Furthermore, the processing in the interaction header is implemented as follows:
[0014] Multi-scale feature fusion includes, before information interaction, performing region feature aggregation on the proposed candidate boxes, extracting the candidate regions from the feature maps and projecting them onto object features of uniform size, and then inputting the vectors obtained from each feature map into the multi-scale feature fusion module PPA for pre-processing, aggregation and post-processing to obtain the final feature fusion vector, which serves as one of the inputs to the dynamic network.
[0015] Dynamic network feature aggregation includes proposing features. Before inputting them into the dynamic instance interaction head, a self-attention mechanism is used to learn the features to infer the relationship between objects. The resulting vector is used as the second input. Then, two parameter matrices are generated using the proposed features. The instance features are multiplied by the two parameter matrices in turn, and two consecutive activation functions are used to realize the interaction process, generating new instance features. Then, a linear projection transformation is used to obtain the output of the dynamic network.
[0016] The local cross-attention mechanism (GM-MCA) is used to enhance the final features by using the geometric relationship between two corresponding boxes, thereby enabling the final features to acquire global information.
[0017] Furthermore, the feature fusion module is implemented as follows:
[0018] For each preselected box, the feature map of the corresponding region is generated by region feature aggregation. The final features are divided into 9 groups using convolutional layers, with each group of features corresponding to a grid point. Finally, deconvolution is used to generate a heatmap. At the same time, the same steps are performed on the unfused feature maps to obtain the heatmap of the unfused features and the ground truth heatmap. The loss function is calculated using these three heatmaps together.
[0019] Moreover, the final loss function of the object detection model consists of four parts: classification loss, L1 regression loss, GIoU regression loss, and regression loss of the GPF module. The total loss is the sum of the four losses multiplied by their respective weights.
[0020] On the other hand, the present invention provides an automatic identification system for distribution box circuit equipment based on sparse networks, which is used to implement the automatic identification method for distribution box circuit equipment based on sparse networks as described above.
[0021] Moreover, it includes the following modules,
[0022] The first module is used for image feature extraction, and outputs a multi-scale feature map.
[0023] The second module is used to prepare the proposed candidate boxes and proposed features. This includes randomly generating a set of proposed candidate boxes by setting hyperparameters. The proposed candidate boxes provide coarse localization of the object, and a set of proposed features of the same size are introduced to assist in learning.
[0024] The third module is used for feature fusion, which includes taking the obtained proposed candidate boxes and proposed features as inputs to the dynamic instance interaction head for subsequent operations to generate the final learned features. The dynamic instance interaction head is implemented in the form of several cascaded heads, wherein each interaction head contains a local cross attention mechanism module GM-MCA and a multi-scale feature fusion module PPA.
[0025] The fourth module is used to obtain classification and regression results. This includes classification and regression after obtaining the final learned features generated by the interactive head, generating target classification and final prediction boxes. Before the regression branch, a one-to-one matching of ground truth boxes and prediction boxes is performed. Then, a feature fusion model is used to perform second-order feature fusion on multiple points on each prediction box and calculate the loss to backpropagate and complete parameter updates. This further corrects the position of the prediction boxes to obtain the automatic identification results of the distribution box circuit equipment.
[0026] Alternatively, it may include a processor and a memory, the memory being used to store program instructions, and the processor being used to call the stored instructions in the memory to execute an automatic identification method for distribution box circuit equipment based on sparse networks as described above.
[0027] Alternatively, it may include a readable storage medium storing a computer program that, when executed, implements the automatic identification method for distribution box circuit equipment based on sparse networks as described above.
[0028] The advantages of this invention are as follows: First, attention mechanism technology is used to enhance the output of the model's dynamic instance interaction head by using the geometric position features of the proposed candidate boxes; then, grid point feature fusion technology is introduced to enhance the model's localization accuracy of the predicted boxes; finally, multi-scale feature aggregation technology is introduced to enhance the model's ability to capture features. Attached Figure Description
[0029] Figure 1 This is a model diagram of the method in an embodiment of the present invention.
[0030] Figure 2 This is a schematic diagram of the ROI Align method in an embodiment of the present invention, wherein the left part is a region division diagram and the right part is a schematic diagram of bilinear interpolation.
[0031] Figure 3 This is a visualization of the actual application of the method in the embodiments of the present invention. Detailed Implementation
[0032] The technical solution of the present invention will be described in detail below with reference to the accompanying drawings and embodiments.
[0033] This invention constructs a target detection model based on the Transformer decoder concept, named SparseRefined R-CNN, to achieve automatic identification and status monitoring of circuit devices. Specifically, the main architecture of the model follows the sparse anchor boxes and sparse features proposed in the Sparse R-CNN model. The Sparse Refined R-CNN model proposes a novel local cross-attention module GM-MCA, which enhances the cross-attention mechanism using the anchor box neighborhood algorithm GIoU and combines local mask information to improve the model's accuracy and convergence speed. In addition, the model proposes a GPF feature fusion module, which further fuses grid point features to improve the model's accuracy. Finally, the model proposes a PPA module, which uses multi-scale feature aggregation to further improve the model's accuracy.
[0034] See Figure 1 This invention provides an automatic identification method for distribution box circuit equipment based on sparse networks, comprising the following steps:
[0035] Step 1, Image Feature Extraction. Upon input of an image, a multi-scale feature map is first obtained through a backbone network based on the ResNet50 structure and a feature pyramid. In this invention, a four-layer pyramid structure is used, with each layer having 256 channels. The feature pyramid integrates deep features into shallow features to enhance their expressive power. Specifically, the outputs C2, C3, C4, and C5 of the ResNet50 convolutional network—image features at different resolutions—are converted to 256 channels through a 1x1 convolution to facilitate subsequent feature fusion steps. Deep features are then aggregated with lower-layer features through upsampling, and finally, a 3x3 convolution is performed to obtain the final feature pyramid outputs, i.e., feature maps P2, P3, P4, and P5, ensuring that the output feature maps contain feature information at different scales.
[0036] Step 2: Prepare proposal candidate boxes and proposal features. Proposal candidate boxes and proposal features are two sets of pre-defined learnable parameters, which are adjusted using a loss function during model training. Learnable proposal candidate boxes are randomly initialized to guide the model in finding target locations within specific regions, enabling direct end-to-end target detection without the need for traditional anchor boxes or bounding boxes. Proposal features are randomly initialized and progressively learned during model network training, representing instance features of specific objects and the relationships between these features. These features can then interact with the proposal candidate boxes to generate a fixed number of target prediction boxes.
[0037] After obtaining the feature map, traditional two-stage models extract candidate boxes using the RPN network. However, the model studied in this invention abandons this RPN network pre-selection step. The RPN network generates a large amount of redundant and nearly repetitive results, making Non-Maximum Suppression (NMS) post-processing a necessary component, which increases computation significantly. Furthermore, the size, aspect ratio, and number of generated prediction boxes all have a substantial impact on the final performance of the algorithm. Transformer-based detection models offer a new approach to object detection, replacing the original prediction boxes with a set of pre-defined proposal boxes. Therefore, this paper references the Transformer model and randomly generates a set of N-dimensional proposal candidate boxes by setting hyperparameters. While the proposal candidate boxes provide coarse object localization, they lose much detail, such as the object's pose and shape. Therefore, a set of proposal features of the same size is needed to aid learning. In practice, the hyperparameters can be tuned experimentally for each dataset to find the best value for N.
[0038] Step 3, Feature Fusion. The two sets of parameters obtained in Step 2 are used as inputs to the dynamic instance interaction head for subsequent operations to generate the final learned features. In the model proposed in this invention, the dynamic instance interaction head preferably adopts a cascaded head approach of 6 heads, where each cascaded interaction head includes the GM-MCA local cross-attention mechanism module and the PPA multi-scale feature fusion module proposed in this paper.
[0039] Each interaction header in the embodiment has the same structure, and the specific implementation is as follows:
[0040] Step 3.1, Multi-scale Feature Fusion. Before information interaction, Region of Interest (ROI) Align is performed on the N groups of proposed candidate boxes. The candidate regions are extracted from the feature maps and projected onto the uniformly sized object features RoiFeatures, resulting in a 7x7 256-dimensional vector. Then, the vector obtained from each feature map is input into the PPA module for pre-processing, aggregation, and post-processing to obtain the final feature fusion vector, which serves as one of the inputs to the dynamic network.
[0041] Step 3.1.1, the steps of ROI Align are as follows:
[0042] (1) First, divide the original preselection box into four regions A, B, C and D. The following steps take region A as an example, and the same operation is performed on the other regions.
[0043] (2) Divide region A into four equal regions again and take out the four center points Q. 11 Q 12 Q 13 Q 14 like Figure 2 As shown in the left-middle figure, the four center points Q are calculated using bilinear interpolation. 11 Q 12 Q 13 Q 14 pixel value K 11 K 12 K 13 K 14 Bilinear interpolation calculates the pixel value of a point proportionally using the four nearest pixels. Figure 2 As shown in the middle right figure, in order to calculate P1 ’ The pixel value, first P 11 and P 12 The pixel value of point R1 is calculated using the first formula below, followed by P. 13 and P 14 The pixel value of point R2 is calculated using the second formula, and finally, P1 is calculated using the third formula based on R1 and R2. ’ The pixel value of a point.
[0044]
[0045]
[0046]
[0047] In the above formula, (·) represents the pixel value of the current point, x represents the x-coordinate of the point, and y represents the y-coordinate of the point.
[0048] (3) By adjusting the pixel value K 11 K 12 K 13 K 14 The corresponding pixel value A in this region is obtained by performing downsampling operations such as averaging or max pooling. ’ This allows us to obtain the final K x K preselected bounding box and its pixel values. K is the size of the feature map.
[0049] Step 3.1.2, PPA module. Based on the 4-layer feature pyramid, the PPA module appropriately aggregates the pooled multi-scale features and adds pre- and post-aggregation processing to further learn multi-scale features. The specific process mainly consists of three parts.
[0050] (1) The first part of the preprocessing uses a single convolution with a kernel of 5x5 to perform preprocessing operations. Without increasing the network complexity or changing the vector dimension, it obtains better extracted bounding box features, improves the effect of feature expression, and finally forms an N×256×7×7 output vector.
[0051] (2) The second part is the aggregation operation. The aggregation operation can merge features of different scales together. The feature vector dimension after aggregation by summation is still N×256×7×7.
[0052] (3) The third part of the post-processing uses an attention mechanism module to eliminate the interference of useless information on training, so that the model can effectively distinguish between useful and useless information in the features, thereby enhancing the representation ability of the aggregated result.
[0053] Step 3.2, Dynamic Network Feature Aggregation. For N sets of proposed features, before inputting them into the dynamic instance interaction head, a self-attention mechanism is used to learn the relationships between objects, resulting in an Nx256 vector, which serves as the second input. Then, two parameter matrices (params matrices) are generated using the 256-dimensional proposed features. The ROI feature is then multiplied sequentially by these two parameter matrices, and two consecutive activation functions are used to implement the interaction process, generating entirely new ROI features. Finally, linear projection is used to transform these features into 256 dimensions, yielding the output of the dynamic network.
[0054] In this embodiment, for N sets of proposed features, the candidate regions are first extracted from the feature map by the ROI Align module and projected onto instance features of uniform size, RoiFeatures, as one of the inputs to the dynamic network. Before being input into the dynamic instance interaction head, randomly generated proposed features, configured with parameters, undergo self-attention to learn from each other, enabling better association between features of different targets. The output after the attention mechanism serves as the input ProFeatures to the dynamic instance interaction head. Here, it is assumed that the dimension of the proposed features is N, then the dimension of the resulting instance features RoiFeatures is N×K×K×d, and the dimension of ProFeatures is N×d, where d is the number of channels. Each ROI feature has its own unique interaction network. The Nth dimension K×K×d instance feature interacts and learns with the Nth dimension d proposed feature, ultimately outputting the target feature of dimension d, which is the output of the dynamic network.
[0055] Step 3.3, Local Cross-Attention Mechanism. The interactive features output by the dynamic network are enhanced by the proposed GM-MCA local cross-attention mechanism module, which uses the geometric relationship between two corresponding boxes to provide global information to the final features. The attention mechanism has four inputs: Key and Query are proposed features, and Value is the proposed pre-selected box. In addition to the three inputs of the traditional attention mechanism, geometric position information obtained from the GIoU calculation of the pre-selected boxes is added. The geometric position weight matrix of GIoU is calculated pairwise from N proposed pre-selected boxes, with a dimension of NxN. The result approaches 1 when two pre-selected boxes are approximately close, and approaches -1 when they are less close. The weight matrix is then bitwise operated with the weight matrix obtained from Key and Query to obtain the final weight matrix. A mask filter parameter is set after the weight matrix generated from the proposed features. This is done to add modules without increasing the computational complexity of the model, and to enable the model to focus on learning the information relationship of pre-selected boxes with large overlapping areas. Finally, the weight matrix is multiplied with the output of the dynamic network to obtain the output of this module. The specific formula is:
[0056]
[0057] Where Q and K are the input Query and Key matrices, which are obtained by projecting the proposal features through different parameter matrices, and their dimensions are N×d; V is the input Value matrix, which is obtained by projecting the output instance features of the dynamic interaction head, and its dimensions are also N×d; GIoU is calculated as the ratio of the overlapping area between N proposal boxes to the total area.
[0058] Step 4: Obtain classification and regression results. After obtaining the final learned features generated by the interactive head, classification and regression are performed to generate the target classification and the final predicted bounding box. However, before the regression branch, the model first uses the Hungarian matching algorithm to perform a one-to-one matching between the ground truth bounding box and the predicted bounding box. Then, the feature fusion model proposed in this paper is used to perform second-order feature fusion on the 9 points on each predicted bounding box and calculate the loss to backpropagate and complete the parameter update, further correcting the position of the predicted bounding box and making the accuracy higher.
[0059] The specific implementation of step 4 in the embodiment is as follows:
[0060] Step 4.1, Feature Fusion Module (GPF). In the initial stage of the GPF module, the Hungarian matching algorithm is used to match a predicted box for each ground truth box, thereby reducing the computational load of the GPF module. Then, the feature map and the predicted box are aggregated using Region Align (ROI) to generate a 14×14 feature map. The GPF module studied in this invention fuses image features through 9 points. Therefore, a 3×3 convolution with a stride of 1 is first used to reduce the feature dimension to 7x7. Then, 7 convolutions with 3×3 kernels and a stride of 2 are used to generate 9 sets of feature maps corresponding to key points. Assuming the number of target boxes is K and the number of channels is 64, the dimension of the 9 sets of feature maps is K×(64×9)×7×7.
[0061] Next, the grid points are determined and fusion is performed. The GPF module uses the four corner points, the midpoint of the side length, and the center point of the predicted bounding box as the fusion grid points. The neighboring points corresponding to the nine grid points are actually the same for each bounding box. Grid point fusion is the key to the GPF module. Here, a two-order fusion method is used. The first stage of fusion fuses the spatial location features of the neighboring points into each grid point. The second stage fuses the information with the neighboring point features from the first stage into each grid point again. After this fusion operation, each grid point not only has the features of the neighboring points with a stride of 1, but also the information of the neighboring points with a stride of 2. After the feature fusion algorithm, nine sets of 7×7 feature maps are obtained. The feature maps are deconvolved with two 4×4 kernels with a stride of 2 to obtain the heatmap of the fused features, with dimensions of K×(64×9)×28×28. At the same time, the same steps are performed on the unfused feature maps to obtain the heatmap of the unfused features.
[0062] In order to continuously correct the model's learning through the loss function, in addition to the feature maps generated before and after fusion, a heatmap corresponding to the ground truth box needs to be generated as a baseline. The size of the heatmap corresponding to the ground truth box should be consistent with the dimension of the predicted heatmap, that is, the dimension is K×(64×9)×28×28. The basic idea is to generate hotspots within a 1-pixel range for the 9 points of the ground truth box and then generate a heatmap.
[0063] Finally, cross-entropy is used to calculate the loss of the heatmaps before and after fusion, and the loss of the true heatmap, respectively. and The final loss of the GPF module is obtained by summing the results. The calculation method is shown below, which is used to correct the model's learning and achieve better learning results.
[0064]
[0065] in, This represents the loss between the heatmap before merging and the true heatmap. This indicates the loss between the merged heatmap and the true heatmap.
[0066] Step 4.2, Loss Function Calculation. Finally, the final loss function of the Sparse Refined R-CNN model consists of four parts: classification loss, L1 regression loss, GIoU regression loss, and the regression loss from the GPF module. The total loss is calculated by multiplying each of the four losses by its respective weight and then summing them, as shown in the formula below. After obtaining the loss, backpropagation can be used to adjust the parameters, resulting in the final model parameters used for object recognition.
[0067]
[0068] in, Let λ represent the classification loss. cls For its weight, λ represents the L1 regression loss. L1 For its weight, λ represents the GIoU regression loss. giou For its weight, λ represents the regression loss of the GPF module. GPF Assign weights to them.
[0069] Cross-entropy is actually the sum of relative entropy and information entropy. Relative entropy is a metric used to measure the difference between the true probability distribution and the predicted probability distribution. When the two probability distributions are the same, the relative entropy is 0; the greater the difference in distributions, the closer it is to 1. Information entropy represents the uncertainty of things; the greater the uncertainty, the greater the information entropy. The calculation method for cross-entropy is shown below.
[0070]
[0071] Where n represents n samples, k represents k labels, and y ij It is a truth value. The smaller the predicted value and the smaller the loss function, the closer it is to the true label.
[0072] The L1 loss is essentially the mean of the sum of the absolute values of the differences between the true value and the predicted value, so it is also called the mean absolute value error loss. The L1 loss is shown below.
[0073]
[0074] Where y i It is a truth value. This is a predicted value.
[0075] IoU is used when calculating GIoU loss. The formula below represents GIoU loss.
[0076]
[0077] Where A and B represent the area of the truth box and the area of the predicted box, respectively, and C represents the area of the maximum adjacency matrix of the two boxes A and B. IoU represents the intersection-union ratio of the areas of the truth box and the predicted box, as shown in the formula below.
[0078]
[0079] Where Aera(·) represents the area of the box.
[0080] Applying the above model to the self-collected distribution box dataset can achieve automatic identification of the distribution box circuit equipment. See the attached image for a specific effect. Figure 3 As shown.
[0081] In specific implementation, the method proposed in the technical solution of this invention can be automatically executed by those skilled in the art using computer software technology. System devices for implementing the method, such as computer-readable storage media storing the corresponding computer program of the technical solution of this invention and computer equipment including the computer program running the corresponding computer program, should also be within the protection scope of this invention.
[0082] In some possible embodiments, an automatic identification system for distribution box circuit equipment based on sparse networks is provided, including the following modules:
[0083] The first module is used for image feature extraction, and outputs a multi-scale feature map.
[0084] The second module is used to prepare the proposed candidate boxes and proposed features. This includes randomly generating a set of proposed candidate boxes by setting hyperparameters. The proposed candidate boxes provide coarse localization of the object, and a set of proposed features of the same size are introduced to assist in learning.
[0085] The third module is used for feature fusion, which includes taking the obtained proposed candidate boxes and proposed features as inputs to the dynamic instance interaction head for subsequent operations to generate the final learned features. The dynamic instance interaction head is implemented in the form of several cascaded heads, wherein each interaction head contains a local cross attention mechanism module GM-MCA and a multi-scale feature fusion module PPA.
[0086] The fourth module is used to obtain classification and regression results. This includes classification and regression after obtaining the final learned features generated by the interactive head, generating target classification and final prediction boxes. Before the regression branch, a one-to-one matching of ground truth boxes and prediction boxes is performed. Then, a feature fusion model is used to perform second-order feature fusion on multiple points on each prediction box and calculate the loss to backpropagate and complete parameter updates. This further corrects the position of the prediction boxes to obtain the automatic identification results of the distribution box circuit equipment.
[0087] In some possible embodiments, an automatic identification system for distribution box circuit equipment based on sparse networks is provided, including a processor and a memory. The memory is used to store program instructions, and the processor is used to call the stored instructions in the memory to execute the automatic identification method for distribution box circuit equipment based on sparse networks as described above.
[0088] In some possible embodiments, an automatic identification system for distribution box circuit equipment based on sparse networks is provided, including a readable storage medium on which a computer program is stored. When the computer program is executed, it implements the automatic identification method for distribution box circuit equipment based on sparse networks as described above.
[0089] In practice, the technical solution provided by this invention can be automated by those skilled in the art using computer software technology.
[0090] The specific embodiments described herein are merely illustrative of the spirit of the invention. Those skilled in the art may modify or supplement the described embodiments or use similar methods to substitute them, without departing from the spirit of the invention or exceeding the scope defined by the appended claims.
Claims
1. An automatic identification method for distribution box circuit equipment based on sparse networks, characterized in that: The dense target detection model was transferred to circuit device recognition, and a target detection model based on the Transformer decoder concept was constructed to solve the problems of automatic identification and status monitoring of circuit devices. The implementation process includes the following steps. Image feature extraction yields multi-scale feature maps as output. Prepare proposed candidate boxes and proposed features, including randomly generating a set of proposed candidate boxes by setting hyperparameters. The proposed candidate boxes provide coarse localization of the object, and a set of proposed features of the same size are introduced to assist in learning. Feature fusion includes using the proposed candidate bounding boxes and proposed features as inputs to the dynamic instance interaction head for subsequent operations to generate the final learned features. The dynamic instance interaction head is implemented using a cascaded head approach, where each interaction head contains a Local Cross Attention Mechanism (GM-MCA) module and a Multi-Scale Feature Fusion (PPA) module. The processing in the interaction header is implemented as follows: Multi-scale feature fusion includes, before information interaction, performing region feature aggregation on the proposed candidate boxes, extracting the candidate regions from the feature maps and projecting them onto object features of uniform size, and then inputting the vectors obtained from each feature map into the multi-scale feature fusion module PPA for pre-processing, aggregation and post-processing to obtain the final feature fusion vector, which serves as one of the inputs to the dynamic network. Dynamic network feature aggregation includes proposing features. Before inputting them into the dynamic instance interaction head, a self-attention mechanism is used to learn the features to infer the relationship between objects. The resulting vector is used as the second input. Then, two parameter matrices are generated using the proposed features. The instance features are multiplied by the two parameter matrices in turn, and two consecutive activation functions are used to realize the interaction process, generating new instance features. Then, a linear projection transformation is used to obtain the output of the dynamic network. The local cross-attention mechanism (GM-MCA) is used to enhance the final features by using the geometric relationship between two corresponding boxes to obtain global information. Obtain classification and regression results, including performing classification and regression after obtaining the final learned features generated by the interactive head, and generating the target classification and final prediction box; Before the regression branch, a one-to-one matching of ground truth boxes and predicted boxes is performed. Then, a feature fusion model is used to perform second-order feature fusion on multiple points on each predicted box and calculate the loss to backpropagate and complete the parameter update, further correcting the position of the predicted box to obtain the automatic identification result of the distribution box circuit equipment. The final loss function of the target detection model consists of four parts: classification loss, L1 regression loss, GIoU regression loss and regression loss of the GPF module. The total loss is the sum of the four losses multiplied by their respective weights.
2. The automatic identification method for distribution box circuit equipment based on sparse networks according to claim 1, characterized in that: Multi-scale feature maps are output through a backbone network composed of ResNet50 structure and feature pyramid.
3. The automatic identification method for distribution box circuit equipment based on sparse networks according to claim 1, characterized in that: The feature fusion module is implemented as follows: For each preselected box, the feature map of the corresponding region is generated by region feature aggregation. The final features are divided into 9 groups using convolutional layers, with each group of features corresponding to a grid point. Finally, deconvolution is used to generate a heatmap. At the same time, the same steps are performed on the unfused feature maps to obtain the heatmap of the unfused features and the ground truth heatmap. The loss function is calculated using these three heatmaps together.
4. An automatic identification system for distribution box circuit equipment based on sparse networks, characterized in that: This method is used to implement an automatic identification method for distribution box circuit equipment based on sparse networks as described in any one of claims 1-3.
5. The automatic identification system for distribution box circuit equipment based on sparse networks according to claim 4, characterized in that: Includes the following modules, The first module is used for image feature extraction, and outputs a multi-scale feature map. The second module is used to prepare the proposed candidate boxes and proposed features. This includes randomly generating a set of proposed candidate boxes by setting hyperparameters. The proposed candidate boxes provide coarse localization of the object, and a set of proposed features of the same size are introduced to assist in learning. The third module is used for feature fusion, which includes taking the obtained proposed candidate boxes and proposed features as inputs to the dynamic instance interaction head for subsequent operations to generate the final learned features. The dynamic instance interaction head is implemented using a cascaded head approach, where each interaction head contains a Local Cross Attention Mechanism (GM-MCA) module and a Multi-Scale Feature Fusion (PPA) module. The fourth module is used to obtain classification and regression results, including classification and regression after obtaining the final learned features generated by the interactive head, to generate the target classification and the final prediction box; Before the regression branch, a one-to-one matching of the ground truth box and the predicted box is performed. Then, a feature fusion model is used to perform second-order feature fusion on multiple points on each predicted box and calculate the loss to backpropagate and complete the parameter update. The position of the predicted box is further corrected to obtain the automatic identification result of the distribution box circuit equipment.
6. The automatic identification system for distribution box circuit equipment based on sparse networks according to claim 5, characterized in that: It includes a processor and a memory, the memory being used to store program instructions, and the processor being used to call the stored instructions in the memory to execute the automatic identification method for distribution box circuit equipment based on sparse networks as described in any one of claims 1-3.
7. The automatic identification system for distribution box circuit equipment based on sparse networks according to claim 5, characterized in that: The method includes a readable storage medium on which a computer program is stored, and when the computer program is executed, it implements the automatic identification method for distribution box circuit equipment based on sparse networks as described in any one of claims 1-3.