A power grid multi-form power equipment OBB detection method fusing rotation perception attention
By integrating rotation-sensing attention-based directional bounding box detection methods, the problem of high-precision detection of multi-form power equipment in complex field environments was solved. This enabled accurate positioning and angle measurement of equipment of multiple scales and arbitrary orientations, improving the robustness and efficiency of the detection.
Patent Information
- Application Number
- CN202611085269.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-21
- Publication Date
- 2026-11-06
- Estimated Expiration
- 2046-07-21
AI Technical Summary
Existing technologies cannot achieve high-precision detection of power grid equipment of various shapes, scales, and orientations in complex field environments. Furthermore, angle regression suffers from periodic boundary abrupt changes and severe background noise interference, resulting in insufficient detection accuracy and low efficiency.
A directional bounding box detection method integrating rotational sensing attention is adopted. The rotational sensing attention module extracts angular position encoding information, performs multi-scale feature fusion and angle regression, and combines it with a decoupled directional bounding box detection head to achieve accurate positioning and angle measurement of various types of power equipment.
It significantly improves the robustness and accuracy of detection for various types of power equipment, solves the problems of instability in angle regression and background noise interference, and improves the stability and efficiency of detection.
Smart Images

Figure CN122617874B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of computer vision pattern recognition and unmanned automated inspection technology of smart grids, specifically involving an OBB detection method for multi-form power equipment in power grids that integrates rotation perception and attention. Background Technology
[0002] With the intelligent upgrading of smart grids, automated inspection equipment such as drones and inspection robots have been widely used in field power grid operation and maintenance. Power grid inspection scenarios encompass a wide range of electrical equipment, including insulator strings, vibration dampers, tension clamps, tower crossarms, and conductor spacers. This equipment varies greatly in size and orientation, and is often exposed to complex outdoor environments with vegetation, mountains, snow, buildings, and varying light and shadow, placing extremely high demands on the accuracy, robustness, and generalization ability of visual inspection algorithms. Oriented bounding box (OBB) detection can closely fit the equipment outline, remove background interference, and output the equipment's rotation attitude, and has gradually become the mainstream technology for intelligent inspection of power grid equipment.
[0003] Traditional power grid equipment inspection often employs the Horizontal Bounding Box (HBB) algorithm, which is only suitable for inspecting normally aligned equipment. For tilted, suspended, elongated, and densely arranged power equipment, the HBB algorithm introduces a large number of irrelevant background pixels, significantly reducing the purity of region features. This leads to problems such as decreased classification confidence and insufficient localization accuracy, and can also cause non-maximum suppression algorithms to mistakenly delete dense targets. Furthermore, the HBB algorithm cannot characterize the rotational attitude of the equipment, failing to meet advanced inspection requirements such as tilt angle measurement and stress state analysis.
[0004] Existing conventional directional bounding box detection models have the following shortcomings: First, the network lacks a rotation-adaptive perception mechanism. The inherent translation invariance of convolution cannot adapt to arbitrary rotation transformations of the device, resulting in severe attenuation of feature responses for devices at large angles and insufficient feature representation capabilities for narrow and densely packed devices. Second, traditional multi-scale feature fusion only mechanically splices deep and shallow features without incorporating prior adaptive weighting of target angle and scale, making it difficult to meet the detection needs of both small power grid connectors and large tower equipment. Third, conventional angle regression directly fits Euler angles, which suffers from periodic abrupt changes in angles, easily leading to gradient oscillations, making model training convergence difficult, and prone to getting trapped in local optima.
[0005] Furthermore, multi-sensor fusion solutions combining lidar and cameras have high hardware costs and heavy equipment loads. Sparse point clouds cannot accurately cover the outlines of small electrical devices, and calibration inaccuracies are prone to occur under strong electromagnetic and vibration environments, resulting in poor generalization. Currently, the industry mostly trains detection models for individual devices separately, lacking a unified end-to-end detection paradigm, which leads to high storage pressure and low inference efficiency for edge devices. Summary of the Invention
[0006] The purpose of this invention is to provide an OBB detection method for multi-form power grid equipment that integrates rotational sensing attention. This method solves the technical problems of existing technologies, such as the inability to achieve unified high-precision detection of multi-form, multi-scale, and arbitrarily oriented power grid equipment in complex field environments, the existence of periodic boundary abrupt changes in angle regression, and severe background noise interference.
[0007] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is as follows:
[0008] In a first aspect, the present invention provides a method for detecting OBB (On-Board Component) of multi-morphic power equipment in a power grid by integrating rotational sensing attention, comprising the following steps:
[0009] Original inspection images of various types of power equipment are collected, and size normalization and channel-by-channel pixel value standardization are performed on the original inspection images to generate preprocessed image feature maps.
[0010] The preprocessed image feature map is input into the backbone network of the directional bounding box detection network to perform multi-scale feature extraction and output a multi-scale feature map. The multi-scale feature map is then enhanced by a rotation-aware attention module embedded between the backbone network and the neck network, and the enhanced rotation-aware attention feature map is output. The rotation-aware attention feature enhancement process includes extracting angle position encoding information based on feature space coordinates and performing global aggregation of angle dimensions and adaptive calibration of channel space based on the angle position encoding information.
[0011] The neck network receives rotation-aware enhanced feature maps and performs multi-scale rotation adaptive feature fusion, outputting a multi-scale fused feature map with cross-scale alignment. The multi-scale rotation adaptive feature fusion process includes performing cross-scale spatial alignment operations on the high-level semantic feature layer and the low-level detail feature layer, and calculating the adaptive fusion weight coefficients of the cross-scale aligned features based on the target angle prior and the scale prior.
[0012] The multi-scale fused feature map is input into the decoupled oriented bounding box detection head, and the device classification mapping, bounding box coordinate localization, and angle regression operation based on periodic encoding are performed in parallel to generate the predicted oriented bounding box, the category confidence probability of the corresponding predicted oriented bounding box, and the target physical existence prediction confidence.
[0013] The product of the category confidence probability and the target physical existence prediction confidence is obtained as the absolute confidence benchmark. Based on the absolute confidence benchmark, the predicted orientation bounding box is subjected to rotation nonmaximum suppression post-processing to remove spatially redundant bounding boxes pointing to the same multi-morphological power equipment. The final positioning detection coordinates and category attributes of the multi-morphological power equipment are output.
[0014] As a preferred embodiment of the present invention, the extraction of angular position encoding information includes:
[0015] Construct an angular position encoding matrix with a spatial size equivalent to the dimension of the multi-scale feature map. The encoding vector of each spatial coordinate point in the angular position encoding matrix represents the relative yaw angle offset value of a specific spatial coordinate point relative to the origin of the multi-scale feature map center.
[0016] An element-wise tensor addition operation is performed between the angle position encoding matrix and the multi-scale feature map to generate an angle-enhanced feature map.
[0017] The step of performing global aggregation of angle dimensions and adaptive calibration of channel space based on angle position encoding information includes:
[0018] Based on the preset central corner sector division rules, the angle enhancement feature map is grouped and angle pooled along the spatial dimension to extract the angle interval feature vectors corresponding to a preset number of angle intervals;
[0019] Tensor concatenation is performed on all angular interval feature vectors to obtain angular aggregated features. One-dimensional convolution dimensionality reduction mapping and non-linear activation processing are then performed on the angular aggregated features to generate angular-sensitive weight vectors.
[0020] Apply the angle-sensitive weight vector to the angle-enhanced feature map and perform channel-dimensional broadcast multiplication weighting to output the angle-aware feature tensor.
[0021] Spatial global average pooling and two-level fully connected dimensionality reduction and upscaling are performed on the angle-aware feature tensor to generate a channel calibration weight matrix; a learnable spatial attention convolution kernel is used to perform feature mapping on the angle-aware feature tensor to generate a spatial attention mask matrix; the channel calibration weight matrix and the spatial attention mask matrix are concatenated and applied to the angle-aware feature tensor to generate a rotation-aware enhanced feature map.
[0022] Furthermore, the multi-scale rotation adaptive feature fusion includes:
[0023] Bilinear interpolation is applied to the high-level semantic feature layer to generate upsampled feature tensors, and stride convolution is applied to the low-level detail feature layer to generate downsampled feature tensors. A bottleneck convolutional layer of uniform dimension is applied to adjust the upsampled and downsampled feature tensors to the same channel depth to generate aligned high-level and aligned low-level features.
[0024] Spatial pooling operations are performed on the aligned high-level features and aligned low-level features respectively to obtain global semantic description vectors. The global semantic description vectors are concatenated and input into the multilayer perceptron to perform nonlinear mapping and exponential function normalization processing, and output the high-level feature fusion weight values and low-level feature fusion weight values.
[0025] Based on the fusion weight values of high-level features, scalar multiplication is performed on the aligned high-level features. Based on the fusion weight values of low-level features, scalar multiplication is performed on the aligned low-level features. The two feature tensors obtained by scalar multiplication are then combined by element-wise addition to generate a multi-scale fused feature map.
[0026] As a preferred embodiment of the present invention, the decoupled directional bounding box detection head includes mutually independent classification branches, positioning branches, and angle branches;
[0027] The classification branch receives multi-scale fused feature maps, extracts features through a classification convolution kernel, and then applies a normalization function to output the category confidence probability and the target physical existence prediction confidence.
[0028] The localization branch receives multi-scale fused feature maps, maps them through a localization convolution kernel, and outputs the center horizontal relative coordinate offset, center vertical relative coordinate offset, width logarithmic offset, and height logarithmic offset. It then combines the downsampling step size parameter of the multi-scale fused feature map with the prior geometric dimensions of the preset anchor box to decode and generate the center coordinates, width value, and height value of the predicted oriented bounding box.
[0029] As a preferred embodiment of the present invention, the step of performing angle regression calculation based on periodic encoding includes:
[0030] The sine and cosine coding operators are used to project the actual physical rotation angle of the labeled target onto a two-dimensional unit circle space to generate sine-coded target values and cosine-coded target values.
[0031] The angle branch extracts rotation features from the multi-scale fused feature map through the angle convolution kernel, and uses a linear mapping layer to regress the rotation features into predicted sine and predicted cosine values;
[0032] The predicted sine and predicted cosine values are input into the four-quadrant arctangent decoding operator to generate the regression rotation angle.
[0033] As a preferred technical solution of the present invention, the oriented bounding box detection network applies a rotation-invariant loss function that incorporates multiple penalties for end-to-end gradient backpropagation during the parameter optimization stage. The rotation-invariant loss function includes a focus classification loss for penalizing misclassification and suppressing interference from background sample volume, an skew cross-union ratio localization loss for constraining the spatial overlap between the predicted oriented bounding box and the real boundary polygon, and an angle smoothing loss for eliminating abrupt changes in the regression of the rotated boundary.
[0034] As a preferred embodiment of the present invention, applying angle smoothing loss for end-to-end gradient backpropagation includes:
[0035] Calculate the absolute value of the deviation between the regressed rotation angle and the target's true physical rotation angle;
[0036] Determine whether the absolute value of the deviation exceeds the preset smoothing control threshold; if it does not exceed the preset smoothing control threshold, calculate the local smoothing loss using a quadratic penalty function with respect to the absolute value of the deviation; if it exceeds or equals the preset smoothing control threshold, calculate the global smoothing loss using a linear penalty function with respect to the absolute value of the deviation.
[0037] As a preferred embodiment of the present invention, the post-processing for rotational nonmaximum suppression of the predicted oriented bounding box includes:
[0038] Background redundant bounding boxes with absolute confidence levels below a preset retention threshold are removed, and the remaining predicted oriented bounding boxes are constructed into a descending sorted sequence.
[0039] The highest confidence bounding box at the top of the descending sorted sequence is extracted as the reference orientation box. The separating axis theorem is applied to calculate the ratio of the area of the rotation intersection and union of the reference orientation box and the remaining predicted orientation bounding boxes in the descending sorted sequence.
[0040] Determine whether the ratio of the area of the rotation intersection to the area of the union is greater than a preset spatial repulsion tolerance threshold; if it is greater than the preset spatial repulsion tolerance threshold, delete the corresponding predicted orientation bounding box from the descending sort sequence; repeatedly perform the extraction and comparison of the reference orientation box until the descending sort sequence is empty, and determine all entities that were previously used as reference orientation boxes as the final positioning detection coordinates.
[0041] As a preferred technical solution of the present invention, in the positive and negative sample calibration stage before backpropagation training of the directional bounding box detection network, the separating axis theorem is applied to calculate the rotation intersection-union matrix of all real polygonal targets and the preset anchor frame mesh matrix; preset anchor frame meshes with values higher than the positive sample boundary threshold in the rotation intersection-union matrix are assigned as positive sample anchor frames, and preset anchor frame meshes with values lower than the negative sample boundary threshold in the rotation intersection-union matrix are assigned as negative sample anchor frames. The loss term for regression gradient is not calculated for preset anchor frame meshes with rotation intersection-union ratios between the positive and negative sample boundary thresholds.
[0042] As a preferred technical solution of the present invention, the multi-form power equipment includes insulator strings, vibration dampers, tension clamps, tower components, and spacers; the original inspection images are captured and generated by an aviation-grade visible light imaging system carried by a UAV.
[0043] Secondly, the present invention provides an OBB detection system for multi-form power equipment in a power grid that integrates rotational sensing and attention, comprising a memory, a processor, and computer program instructions fixed in the memory and executable by the processor. When the computer program instructions are executed by the processor, they implement the following functional module logic:
[0044] The image preprocessing module is used to acquire raw inspection images of various types of power equipment, perform size normalization and channel-by-channel pixel value standardization on the raw inspection images, and generate preprocessed image feature maps.
[0045] The rotation-aware attention module is used to input the preprocessed image feature map into the backbone network of the directional bounding box detection network to perform multi-scale feature extraction and output a multi-scale feature map. The rotation-aware attention module, which is embedded between the backbone network and the neck network, performs rotation-aware attention feature enhancement on the multi-scale feature map and outputs a rotation-aware enhanced feature map. The feature enhancement process performed by the rotation-aware attention module includes extracting angle position encoding information based on feature space coordinates and performing global aggregation of angle dimensions and adaptive calibration of channel space based on the angle position encoding information.
[0046] The multi-scale rotation adaptive feature fusion module is used to control the neck network to receive rotation-aware enhanced feature maps and perform multi-scale rotation adaptive feature fusion, outputting a multi-scale fused feature map with cross-scale alignment. The fusion logic of the multi-scale rotation adaptive feature fusion module includes performing cross-scale spatial alignment operations on the high-level semantic feature layer and the low-level detail feature layer, and calculating adaptive fusion weight coefficients based on the target angle prior and scale prior.
[0047] The decoupled oriented bounding box detection head is used to receive multi-scale fused feature maps, perform device classification mapping, bounding box coordinate localization, and angle regression operation based on periodic encoding in parallel, and generate predicted oriented bounding boxes, the category confidence probability of the corresponding predicted oriented bounding boxes, and the target physical existence prediction confidence.
[0048] The redundancy suppression and result output module is used to obtain the product of the category confidence probability and the target physical existence prediction confidence as the absolute confidence benchmark. Based on the absolute confidence benchmark, the predicted oriented bounding box is subjected to rotation non-maximum suppression post-processing to remove spatial redundant bounding boxes pointing to the same multi-morphological power equipment, and outputs the final positioning detection coordinates and category attributes of the multi-morphological power equipment.
[0049] Thirdly, the present invention provides a non-volatile computer-readable storage medium on which computer software instruction code is physically recorded. When the computer software instruction code is loaded and executed by the processing core of the computing terminal, the computing terminal is forced to complete the steps of the above-described method for detecting OBB of multi-form power equipment in a power grid that integrates rotational sensing attention.
[0050] Compared with the prior art, the present invention has the following beneficial effects:
[0051] This invention constructs a directional bounding box detection method that integrates rotational perception and attention, and systematically improves existing technologies in terms of feature extraction, multi-scale fusion, angle regression and post-processing. It solves the technical problems of insufficient detection accuracy, unstable angle regression and severe background noise interference of various power grid equipment in complex field environments.
[0052] This invention's rotation-aware attention module is embedded between the backbone network and the neck network. By extracting angular position encoding information and performing cross-angular dimension global aggregation and channel space adaptive calibration, the network possesses explicit perception capabilities of the target's rotational attitude in the early stages of feature extraction. This explicit spatial geometric constraint mechanism, compared to conventional networks that rely on convolutional translation invariance, can adaptively capture and enhance key feature responses of devices with arbitrary orientations, significantly improving the robustness of detection for multi-angle installed devices such as insulator strings and vibration dampers. Simultaneously, the decoupled directional bounding box detection head separates classification, localization, and angle regression tasks into independent processing pipelines, avoiding gradient conflicts between different optimization objectives under shared parameters, and improving training convergence stability and single-inference localization accuracy.
[0053] This invention utilizes sine and cosine periodic encoding for angle regression, mapping real-valued angles to a two-dimensional unit circle space before regression and decoding. Combined with a piecewise angle smoothing loss function, it mathematically eliminates the gradient abruptness at periodic boundaries inherent in traditional Euler angle regression, making the angle prediction process smooth and differentiable, significantly improving the fitting accuracy of rotated bounding boxes. The multi-scale rotation adaptive feature fusion process introduces target angle and scale priors to calculate adaptive fusion weights, solving the problem of weight solidification in cross-scale fusion of deep and shallow features. This allows the network to handle power equipment with significant size differences, such as large towers and tiny bolts, improving the comprehensive detection capability of multi-morphological equipment under a unified model. The rotation non-maximum suppression post-processing further uses the separating axis theorem to accurately calculate the intersection-union ratio (IU / UG) between rotated boxes, effectively eliminating spatially redundant bounding boxes generated by high-density sampling and outputting accurate final localization results. Attached Figure Description
[0054] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained from these drawings without creative effort.
[0055] Figure 1 is a flowchart of the method described in this invention.
[0056] Figure 2 is a flowchart of the rotation-sensory attention feature enhancement subprocess of the present invention.
[0057] Figure 3 This is a flowchart of the angle regression operation sub-process based on periodic coding. Detailed Implementation
[0058] In the following description, only certain exemplary embodiments are briefly described. As those skilled in the art will recognize, the described embodiments can be modified in various ways without departing from the spirit or scope of the embodiments of the invention. Therefore, the drawings and description are considered to be exemplary in nature and not restrictive.
[0059] The following is in conjunction with the appendix Figures 1-3 The embodiments of the present invention will be described in detail below.
[0060] Example 1: This example discloses an OBB detection system for multi-form power equipment in a power grid that integrates rotational sensing and attention. The system includes a memory, a processor, and computer program instructions stored in the memory and executable by the processor. When executed by the processor, the computer program instructions implement the following functional module logic:
[0061] The image preprocessing module is used to acquire raw inspection images of various types of power equipment, perform size normalization and channel-by-channel pixel value standardization on the raw inspection images, and generate preprocessed image feature maps.
[0062] The rotation-aware attention module is used to input the preprocessed image feature map into the backbone network of the directional bounding box detection network to perform multi-scale feature extraction and output a multi-scale feature map. The rotation-aware attention module, which is embedded between the backbone network and the neck network, performs rotation-aware attention feature enhancement on the multi-scale feature map and outputs a rotation-aware enhanced feature map. The feature enhancement process performed by the rotation-aware attention module includes extracting angle position encoding information based on feature space coordinates and performing global aggregation of angle dimensions and adaptive calibration of channel space based on the angle position encoding information.
[0063] The multi-scale rotation adaptive feature fusion module is used to control the neck network to receive rotation-aware enhanced feature maps and perform multi-scale rotation adaptive feature fusion, outputting a multi-scale fused feature map with cross-scale alignment. The fusion logic of the multi-scale rotation adaptive feature fusion module includes performing cross-scale spatial alignment operations on the high-level semantic feature layer and the low-level detail feature layer, and calculating adaptive fusion weight coefficients based on the target angle prior and scale prior.
[0064] The decoupled oriented bounding box detection head is used to receive multi-scale fused feature maps, perform device classification mapping, bounding box coordinate localization, and angle regression operation based on periodic encoding in parallel, and generate predicted oriented bounding boxes, the category confidence probability of the corresponding predicted oriented bounding boxes, and the target physical existence prediction confidence.
[0065] The redundancy suppression and result output module is used to obtain the product of the category confidence probability and the target physical existence prediction confidence as the absolute confidence benchmark. Based on the absolute confidence benchmark, the predicted oriented bounding box is subjected to rotation non-maximum suppression post-processing to remove spatial redundant bounding boxes pointing to the same multi-morphological power equipment, and outputs the final positioning detection coordinates and category attributes of the multi-morphological power equipment.
[0066] In practice, based on the physical order of data flow within the edge computing terminal of the detection system, the precise absolute positioning of multi-form power equipment on the two-dimensional image plane is achieved through image preprocessing, feature dimensionality reduction and prior attention extraction, cross-scale semantic reconstruction, decoupled coordinate mapping, and physical redundancy space suppression.
[0067] The specific steps are as follows:
[0068] S1. Perform the power grid inspection image acquisition and preprocessing steps;
[0069] Images of field power grid facilities, including insulator strings, vibration dampers, tension clamps, tower components, and spacers, are acquired using an optoelectronic pod mounted on a drone platform, forming raw environmental optical signals. The optocoupler inside the pod maps continuous spectral energy into a discrete two-dimensional digital signal matrix, generating the raw inspection image. Due to the dynamic changes in the drone's field of view during transmission line inspections, the pixel dimensions of the raw inspection image exhibit non-standardized features. The static computational graph architecture at the bottom layer of the directional bounding box detection network pre-determines a fixed tensor receptive field input dimension. It then uses a bilinear interpolation two-dimensional resampling operator to perform absolute size forced normalization on the raw inspection image matrix, generating a normalized image tensor. The bilinear interpolation two-dimensional resampling operator maps the raw coordinates to the target resampling grid and performs inverse proportional weighting calculations based on the physical Euclidean distance between four adjacent discrete pixels to achieve image size alignment.
[0070] The varying lighting conditions and weather conditions at the power grid site during different time periods introduce significant absolute scale bias in pixel values. To reduce the convergence difficulty of the bottom convolutional layers in the backbone network during gradient backpropagation and improve the stability of the convolutional kernel weight matrix in capturing high-frequency gradient signals, channel-wise pixel value standardization is performed on all pixels within the normalized image tensor. Channel-wise pixel value standardization relies on the statistical prior distribution parameters of three color channels, pre-calculated globally on the power grid multi-morphological power equipment oriented bounding box annotation dataset. This maps the value of each discrete pixel within the 3D feature grid to a standard normal distribution physical interval strictly within zero mean and unit variance, outputting a preprocessed image feature map. The underlying algebraic mapping relationship of channel-wise pixel value standardization is defined by the following mathematical formula:
[0071]
[0072] in To preprocess the image feature map on the horizontal axis Vertical coordinate and color channel index The standard pixel response value mapped at that location; The normalized image tensor output after performing bilinear interpolation two-dimensional resampling operation on the horizontal axis Vertical coordinate and color channel index The original pixel record value at that location; The first offline measurement obtained in advance during the training phase The constant parameter of the average global pixel brightness of each channel; The first offline measurement obtained in advance during the training phase The standard deviation parameter constant of global pixel brightness for each channel.
[0073] S2, Perform the rotation-aware attention feature enhancement step:
[0074] Preprocessed image feature maps are injected as standard input tensors into the backbone network module of the directional bounding box detection network. The backbone network extracts hierarchical visual semantic representation matrices at different physical levels based on a multi-layered, cross-stage local network convolutional structure. The backbone network module utilizes a continuous stride-length convolutional downsampling mechanism connected with residual identity mapping to truncate and separate three types of multi-scale feature maps with different resolution dimensions at different network depths. These maps are responsible for representing the shallow high-frequency edge micro-texture matrix for micro vibration damping hammers at the hundred-pixel level, the mid-level geometric structure semantic matrix for insulator skirts at the thousand-pixel level, and the deep global abstract macro-structure matrix for large tower load-bearing crossarm components at the ten-thousand-pixel level.
[0075] Multi-form electrical equipment exhibits highly uncontrolled rotational randomness on a two-dimensional camera plane. Conventional convolutional kernel operations based on Cartesian coordinates, due to their inherent absolute translation invariance, cannot spontaneously establish stable angular rotation response correlations in the underlying feature tensor flow space. Therefore, an independently computed rotation-aware attention module is embedded between the multi-scale feature map signal output of the backbone network module and the signal input interface of the subsequent neck network. This rotation-aware attention module extracts relative polar coordinate physical prior information, performs dynamic weighted recombination along the feature channel depth direction and the two-dimensional spatial plane direction, and executes a feature activation enhancement mechanism for arbitrary tilt angles.
[0076] The multi-scale feature map set consists of stacked feature tensors of three independent dimensions. For any single-scale input feature tensor within the multi-scale feature map set, the rotation position encoding unit at the beginning of the rotation-aware attention module constructs an angle position encoding matrix containing yaw angle information relative to the polar coordinates of the origin, based on the grid size. The content of the angle position encoding matrix is independent of image color and brightness texture variations and is specifically used to characterize the two-dimensional geometric orientation physical properties of the spatial grid. The angle position encoding matrix and the input feature tensor are subjected to an element-wise tensor summation operator along the channel dimension to generate an angle-enhanced feature map carrying prior information about the rotation angle. The algebraic generating function for each discrete spatial position element within the angle position encoding matrix is defined as follows:
[0077]
[0078] in To construct the obtained angle position encoding matrix in the vertical space index Horizontal spatial index and channel dimension index The angle code value obtained by calculation at this location; The constant representing the total number of channels for the input feature tensor at the current level; The physical width span of the entire graph space corresponding to the input feature tensor of the current level; Input the physical height span of the entire graph space corresponding to the feature tensor of the current level; To map discrete angular values to a nonlinear periodic cosine geometric function operator; A function operator for calculating the arctangent angle values in the four quadrants relative to the offset of the absolute coordinates from the line connecting the geometric center points of the characteristic matrix.
[0079] Angle-enhanced feature map tensor data streams are transmitted and injected into angle-aware pooling units. Different types of power equipment of the same category will activate different specific sub-channel matrix combinations within the feature channel set at different yaw angles. The angle-aware pooling unit performs discretized local region averaging convergence along the absolute angle physical sector boundaries in the two-dimensional spatial dimension, generating independent angle-aggregated feature vectors that can capture the semantic response density in different directions. A nonlinear algebraic mapping is applied to the concatenated independent angle-aggregated feature vectors through parameterized independent one-dimensional convolutional layers to extract the angle correlation between channels and output angle-sensitive weight vectors. The mathematical model for the continuous numerical flow of data within the angle-aware pooling unit is as follows:
[0080]
[0081] in Extract angle-sensitive weight vectors containing full-channel scale scaling factors for network layers; To compress and map unbounded real number outputs to a Sigmoid nonlinear activation function in the interval between zero and one; A one-dimensional convolutional feature dimension mapping operator with a cross-channel local perceptual receptive field of three; To divide the grid space into central angle sectors according to a preset 36 degrees and perform a group angle average pooling operator with absolute regional average; This is the original input feature tensor of a single scale within a multi-scale feature map set; To complete the construction of the angle position encoding matrix, after the angle-sensitive weight vector is extracted, the directional bounding box detection network aligns it with the angle-enhanced feature map and performs a channel-dimensional broadcast multiplication scaling operator, outputting an angle-aware feature tensor with orientation selection bias.
[0082] Angle-aware feature tensors are cascaded and input into the channel and spatial weighting unit module. In the parallel stream computation branch, this module calls a global average spatial pooling operation to compress the two-dimensional spatial physical dimension grid information, outputting a one-dimensional channel description vector with a length equal to the number of feature channels. This channel description vector is fed into a bottleneck multilayer perceptron composed of two fully connected neural networks. The first fully connected neural network performs dimensionality reduction compression to remove redundant correlations, while the second fully connected neural network performs dimensionality increase to restore the original channel length and calculates the importance coefficient of each channel, generating a channel calibration weight matrix. In another parallel stream computation branch, the network uses a large-size two-dimensional convolutional kernel with non-fixed learnable weights for spatial attention to extract high-frequency gradient features of specific electrical equipment physical component regions on the angle-aware feature tensor surface, outputting a single-channel spatial attention mask matrix. The channel calibration weight matrix and the spatial attention mask matrix work together, executing a multi-dimensional tensor cascaded multiplication and cross-fusion strategy to forcibly weaken the pixel response activation values of high-frequency blade and cable interlacing background noise in complex electromagnetic field environments to near zero, outputting the final rotation-aware enhanced feature map. The mathematical formula for weighted cross-fusion interactive logic operation is as follows:
[0083]
[0084] in The rotation-aware enhanced feature map output to the next stage after the channel and spatial weighted unit module has completed all filtering operations; This is the angle-aware feature tensor input from the previous operator level to the spatial weighted unit module; The channel calibration weight matrix is calculated and output by the bottleneck multilayer perceptron network to constrain the relative importance ratio of channels; A spatial attention mask matrix generated by scanning the feature matrix with a large-size two-dimensional convolution kernel for learnable spatial attention, used to label spatially absolute saliency locations; This represents a broadcast element-wise physical multiplication operator that performs automatic alignment expansion of the tensor dimension and element-wise multiplication.
[0085] S3. Perform the multi-scale rotation adaptive feature fusion step;
[0086] The three independent scale-level rotation-aware enhanced feature maps, processed and output after the aforementioned rotation-aware attention feature enhancement steps, are fed into the neck network, which has fully connected properties, in the form of a feature group list to perform cross-scale structured tensor information interweaving and semantic reconstruction. The neck network internally employs a bidirectional parameter information transfer network pathway architecture that includes bottom-up path gradient propagation enhancement logic and top-down feature pyramid receptive field diffusion logic.
[0087] In memory, adjacent network layer feature maps exhibit pixel resolution differences due to continuous downsampling and channel depth differences due to the configuration of convolutional kernel numbers. Before performing feature fusion or element-wise addition, the neck network architecture internally invokes a cross-scale alignment operator to force a 3D resampling unification of physical space and feature dimensions for high-level semantic feature layers containing highly abstract concepts and low-level detail feature layers containing extremely rich edge textures. For high-level semantic feature layers, the network invokes a bilinear spatial interpolation operator to calculate and insert new pixels within continuous spatial points to enlarge the grid's physical scale to align with the outer boundary of the low-level resolution. For low-level detail feature layers, the network uses a cross-stretch convolution operator with a stride parameter greater than one to perform weighted resampling underflow to compress the grid's physical scale to fit the inner boundary of the high-level resolution. The mathematical relationship of the tensor dimension reshaping process of the cross-scale alignment operator is as follows:
[0088]
[0089]
[0090] in The upsampled feature tensor is obtained by interpolating the high-level semantic feature layer to amplify the resolution. This is a spatial bilinear interpolation operation function that applies inverse weights by taking into account the Euclidean distance between adjacent pixels; This is a high-level semantic feature layer representing the original input state. This is a constant representing the spatial magnification factor obtained by dynamically solving based on the aspect ratio of the input high-low layer matrix; This is the downsampled feature tensor obtained by reprojecting the network convolution parameters to compress the resolution of the low-level detail feature layers; Extract convolution operator functions for network features with a physical receptive field size of 3x3 grid units in the receiving region; This is the low-level detailed feature layer of the original input state; The downsampling convolution stride parameter variable is used to drive the current matrix resolution to generate a compression ratio of half. The upsampling feature tensor and the downsampling feature tensor are further subjected to channel depth forced compression or channel depth forced expansion operations through a parameterized bottleneck mapping convolutional layer with a receptive field of only 1×1 size, without changing the spatial resolution, to generate aligned high-level feature and aligned low-level feature matrix objects with uniform physical channel dimensions.
[0091] Because the power grid contains both large transmission towers and extremely small spacer bolts attached to cables, a continuous adaptive weight allocation strategy is introduced for different layers to enable the underlying directional bounding box detection network to automatically evaluate the relative proportion of effective receptive fields contained in a single narrow vibration damper device across various feature space layers. The underlying logic of this strategy aggregates and aligns the internal parameters of high-level and low-level features using a global two-dimensional semantic description vector. This global semantic description vector inherently encodes the target angle and scale priors, and dynamically generates continuous real-domain fusion scaling coefficients for tensors of different layers using a normalized exponential function constrained by the sum-of-ones rule. The logic for solving and generating the dynamic scaling weight parameters and the derivation formula for the aggregation of pixel values in the multi-scale fusion feature map matrix are rigorously defined as follows:
[0092]
[0093]
[0094] in This is a one-dimensional vector parameter set containing two floating-point elements to store the generated normalized weight values. The one-dimensional vector parameter set contains the specific high-level feature fusion weight values. and low-level feature fusion weight values ; The normalized exponential operation function operator is used to ensure that all elements in a vector sequence are within the zero-to-one bound and that their mathematical sum is one. A fully connected parameterized linear numerical mapping operator that receives a one-dimensional vector and outputs one-dimensional vectors of different dimensions; A global average pooling collapse operator for traversing all elements of a two-dimensional physical slice of a feature tensor and solving for the arithmetic mean; Align high-level features to the standard; Align low-level features to the standard; This is a physical operator for concatenating feature description vector tensors to perform matrix data tiling and joining along the channel dimension depth direction; After the network layers have fully executed the multi-layer scale weight allocation strategy and the corresponding element-wise summation operation at the bottom pixel level, the multi-scale fusion feature map multidimensional tensor, which completely eliminates the islanding effect, is passed to the next detection head cascade. The construction of the multi-scale fusion feature map multidimensional tensor eliminates the discontinuous barriers between various receptive fields in deep and shallow layers, and constructs a semantic pixel base with extremely high continuity and ultra-high information density for the network to accurately constrain the two-dimensional polar coordinate related geometric constraints of the device's prediction of tilted bounding boxes in the later stages.
[0095] S4. Perform the decoupled directional bounding box detection head positioning and azimuth angle calculation regression steps.
[0096] The multi-scale fused feature map output from the multiple fusion steps is directly imported into the decoupled directional bounding box detection head's internal system, which includes a category judgment branch, a coordinate mapping localization branch, and a dedicated orientation determination angle branch. Traditional coupled detection architectures without isolation typically use a single path within the last-level convolutional network parameter stacking layer, simultaneously forcing the prediction output of discrete multi-class probability vectors for object classification and continuous coordinate regression floating-point values representing polygon shape and position. In this non-decoupled architecture, the gradient directions for target classification and polygon regression calculation often exhibit orthogonal or even inversely resistant relationships, easily leading to gradient inefficiencies within the feature mapping space due to different optimization objectives. This can cause an exponential decrease or even collapse in the efficiency of the network weight convergence process. The decoupled directional bounding box detection head, through physical-level channel isolation, cuts off the problem of the semantic classification task and the measurement of relative physical coordinate geometric localization tasks sharing the feature flow network channel.
[0097] The classification branch independently receives a multi-scale fused feature map matrix from the front-end data buffer of the detection head. It then calls a dedicated conventional classification convolutional layer with stacked, multi-layered independent receptive field boundaries of 3x3 grid units to perform deeper, finer-grained electrical appliance classification abstract feature extraction. The extracted classification feature matrix is then imported in parallel into a feature reduction bottleneck convolutional layer with single-point mapping capabilities. The output includes a multi-class prediction probability matrix tensor covering various types of power grid equipment and an independent confidence matrix used to determine the probability of the presence of objective entities within a preset extraction grid area. The specific calculation logic for the multi-dimensional parameter mapping of class probabilities and the mathematical nonlinear activation mapping relationship is as follows:
[0098]
[0099] in The output of the classification network branch is a high-dimensional matrix data that covers the confidence probability values of the preset categories; To implement a Sigmoid nonlinear normalized numerical compression mapping function that limits the output to between zero and one limits; A 3x3 spatial domain feature extraction convolution mapping operator, which is set up exclusively within the classification branch architecture and is not subject to physical interference from location coordinate information; This is a multi-scale fused feature map entity input from the neck feature fusion architecture port to the classification branch network for computation. The independent confidence matrix represents the target's physical existence prediction confidence, and together with the class confidence probability matrix, it serves as the output of the classification branch.
[0100] The localization mapping branch pipeline synchronously and independently receives multi-scale fused feature maps from the parallel data port. After sliding convolution extraction processing using a specially designed deep localization mapping convolution kernel matrix within the localization branch, the multi-channel output represents a set of spatial multi-dimensional offset metrics representing the mapping of a preset anchor box within a predefined spatial region to the current network's relative hierarchical receptive field physical metric. This set of spatial multi-dimensional offset metrics precisely covers the horizontal relative coordinate offset of the target polygon detection box relative to the basic geometric center position of the preset anchor box, the vertical relative coordinate offset of the center relative to the basic geometric center position of the preset anchor box, the width logarithmic offset calculated from the logarithmic difference of the initially estimated width value of the preset anchor box, and the height logarithmic offset calculated from the logarithmic difference of the initially estimated height value of the preset anchor box. The localization and mapping branch pipeline calls the underlying tensor library computation components, closely combining the physical parameters of the downsampling step size relative to the original high-resolution input image space of the backbone network, which are carried by the multi-scale fusion feature map of the current layer, and the pre-set anchor boxes that are fixed to the initial geometric size variables of the grid regions. It then performs a reverse nonlinear mapping decoding and parsing operation on the four-dimensional offset values of the network's original prediction output, thereby converting and constructing the predicted polygon center horizontal coordinates, predicted polygon center vertical coordinates, predicted polygon width metric, and predicted polygon height metric of the predicted oriented bounding box structure in the physical coordinate system scale of the original high-resolution two-dimensional image. The detailed mathematical calculation physical process and parameter definitions for polygon localization, reverse nonlinear decoding, reconstruction, and restoration of the physical box are listed below:
[0101]
[0102]
[0103]
[0104]
[0105] Among them, for and formula: It is the Sigmoid non-linear activation function; The horizontal real coordinates of the horizontal center of the predicted polygonal oriented bounding box structure after the decoding and restoration operation is completed; The vertical real coordinates of the vertical center of the predicted polygonal oriented bounding box structure after the decoding and restoration operation is completed; The horizontal relative coordinate displacement of the center generated by the output of the network's bottom convolutional kernel operation; The vertical relative coordinate displacement of the center generated by the output of the convolutional kernel operation at the bottom layer of the network; To decouple the structure, the current received feature map matrix size is reduced by the cumulative downsampling step size ratio factor of the original grid resolution space of the original inspection image, which is a constant. The horizontal reference x-coordinate of the prior center position of the preset polygon anchor frame corresponding to the grid point of the current matching positive sample feature is defined in advance according to the clustering algorithm; The vertical reference ordinate of the prior center position of the preset polygon anchor frame corresponding to the relative grid point is pre-preset within the feature generation mesh. For and formula: The width of the bounding box of the predicted polygon after the decoding and restoration operation is completed is calculated using the ruler. The height of the predicted polygon orientation bounding box is calculated using the ruler after the decoding and restoration operation is completed. The logarithmic mapping bias offset of the physical ratio of the predicted width to the prior width generated by the output of the network's bottom convolutional kernel operation; The logarithmic mapping bias offset of the physical ratio of the predicted height to the prior height generated by the output of the network's bottom convolutional kernel operations; The objective physical reference prior width measurement of the currently mounted preset polygonal anchor frame; The objective physical reference prior height measurement of the currently mounted preset polygonal anchor frame; For the natural constant This is an operator that performs exponential-level nonlinear numerical recovery amplification of the natural exponential physical base.
[0106] Due to objective engineering physics factors such as the actual suspension environment of field transmission lines and the angle of gravity force on the connection, the two-dimensional imaging cross-section attitude orientation of various power grid equipment exhibits infinite arbitrary dispersion characteristics within the 360° real physical domain.
[0107] The traditional method of directly calculating the numerical value of the objective physical rotation yaw angle using the absolute Euler real-point floating-point domain measurement has a significant drawback when the mathematical calculation space model crosses the horizontal limit zero-degree coincidence line boundary or the vertical ninety-degree measurement line edge threshold. This is because the physical reality is similar, leading to similar target feature patterns, but the corresponding manually labeled boundary real-number labels experience a steep jump from minimum to maximum value. This inevitably triggers a physical discontinuity phenomenon where numerical errors are amplified abruptly. The angle branching component requires, at the source, a mathematical geometric sine mapping encoding operator structure to continuously project and distort the manually labeled target entity's true boundary rotation angle scalar parameter, which has physical limit closed-loop discontinuity, into a smooth sine and cosine curve function numerical component in a two-dimensional geometrically continuous feature plane space. Utilizing the inherent infinite-period waveform smoothness and continuity mechanism of mathematical trigonometric functions, it eliminates and purifies the naturally latent truncated boundary data discontinuity logical mathematical singularity inherent in the traditional real-number angle measurement regression equation from the root dimension of the physical architecture model.
[0108] An independent angle computation branch with dedicated tensor computing power is constructed and continuously operates. The receiving channel extracts and compresses multi-scale features from the same source output through specially configured angle depth perception extraction and analysis convolutional network operation layer units. The tensor mapping matrix contains a high-dimensional angle feature matrix tensor that reflects the geometric topological deformation mapping relationship of the rotation space. Subsequently, a series of fully connected data linear space dimension transformation layers with global full mapping connectivity are used to perform high-precision inversion operations on the multiple associated rotation-related geometric features captured and extracted on the two-dimensional feature extraction grid. This results in numerical mapping regression that generates two independent but mutually constrained scalar numerical parameters: a distribution mapping that satisfies the unit circle law logic of the preset angle network architecture, and a corresponding measurement and prediction of the sinusoidal associated component response value and a corresponding measurement and prediction of the cosine associated component response value.
[0109] After acquiring two-dimensional continuous parameters with triangular cyclic characteristics, the detection framework applies a four-quadrant arctangent inverse triangular transformation spatial decoding physical operation restoration function to the generated network data set of measurement and prediction of sine correlation component response values and the network data set of measurement and prediction of cosine correlation component response values, which are all located in the multidimensional tensor network nodes. This function incorporates a polarity distribution pointing correction rule. The above mapping mechanism directly converts the internal mathematical feature radian measurement algorithm into an objective, smooth rotation angle output from 0 to 360 degrees that conforms to human intuitive engineering interpretation standards. This output presents a physical meaning and exhibits a continuous restoration regression representation of the rotational offset physical angle without periodic numerical jumps or abrupt boundary breaks in spatial distribution. The core algorithmic relationship for the continuous mathematical algebraic construction of the sine and cosine parameters for dimensionality reduction representation and decoding back-calculation mapping of physical angle values is detailed below:
[0110]
[0111]
[0112]
[0113] in The target expectation value is the correct standard unbiased sine function encoding of the tilt and rotation scalar angle of the real physical space of the object in the image, which is defined by the underlying manual annotation and calibration rules and is calculated using triangular projection. To generate the correct standard unbiased cosine function projection encoding target expectation value of the same object's true physical tilt angle obtained by synchronous operation mapping using the same rules; This represents the objective, real physical rotation angle constant of the entity object in the current image target box region, which is pre-defined and assigned by external human experts based on their business logic prior judgment in the model training stage. The process involves decoupling the network angle measurement and mapping branch structure, multi-layer complex floating-point iterative operations to calculate and complete the internal four-quadrant arctangent reverse space reconstruction decoding, and finally outputting the output to the external judgment module node for continuous inversion mapping restoration to finally revert the relative scale physical rotation deviation angle value. The representative angle measurement and analysis branch directly uses the internal matrix convolution feature nonlinear compression and recombination as the end feature output node to calculate the floating-point prediction approximation mapping to generate the sinusoidal extracted response value by the actual network carrying the training bias property. This represents the actual computational derivation of the approximation mapping generated by the parallel computation dimension of the same source feature matrix, which is extracted and independently released through the fully connected mapping node. The approximation mapping is generated by the cosine extraction of the relevant response value.
[0114] In the backpropagation optimization training phase of the directional bounding box detection network, a rotation-invariant loss function incorporating multiple compound penalties is applied for end-to-end weight gradient descent updates. Traditional object detection loss functions cannot directly measure the two-dimensional angular deviation of the rotated boxes and struggle to handle the extreme imbalance of positive and negative samples presented by various types of electrical equipment in the image feature grid. The rotation-invariant loss function aggregates the cross-entropy variant reflecting the degree of classification error, the cross-union ratio variant reflecting the topological overlap deviation of the bounding box space, and the smoothing penalty operator reflecting the angular regression period deviation into a unified scalar gradient target output tensor. The overall rotation-invariant loss function is rigorously defined as follows:
[0115]
[0116] in The overall loss value output by the directional bounding box detection network to the underlying backpropagation engine after a complete forward computation graph pass-through; This is a focal classification loss value specifically designed to penalize class mismapping and suppress interference from a large number of simple background pixel samples. This is a value for the tilted intersection-union ratio (CIRR) localization loss, specifically used for fine-constraint prediction of the spatial physical overlap deviation between the generated polygonal oriented bounding boxes and the manually calibrated target's true boundary polygons. This is a numerical value for angle smoothing loss specifically designed to eliminate abnormal jittering of gradient boundaries during rotation angle regression. The system is pre-set with hyperparameter weight balancing scaling factors to regulate and limit the magnitude of classification gradient updates; The system is pre-set with hyperparameter weighting scaling factors to control the fitting and approximation amplitude of polygon positioning boundaries; The system is pre-set with hyperparameter weighting scaling factors to regulate and limit the smooth decay of the approximation rate amplitude of the rotation angle.
[0117] To mitigate the overwhelming negative impact of tree, vegetation, and sky background pixels—which constitute a large proportion of the background in field power grid inspection images—on the model's classification weight convergence gradient, the focus classification loss imposes an exponential weight gradient penalty decay operation on background samples that the model can easily classify. The underlying calculation logic and algebraic formula structure of the focus classification loss are as follows:
[0118]
[0119] in The classification branch module of the directional bounding box detection network calculates the predicted confidence probability for the current extracted receptive field region as the final solution of the network. A category balance correction scaling factor is introduced to address the inherent imbalance in the number of positive and negative samples among various types of power equipment, such as spacers and large towers. The dynamic focusing penalty hyperparameter is used to exponentially suppress the intensity of interference from high-confidence simple background negative samples. The natural logarithm operator. As the network prediction confidence probability gradually approaches the correct interval with training iterations, the base inside the multinomial penalty term tends to a minimum, thereby forcing the arithmetic contribution of the current small gradient to the global weight update to decay rapidly and approach zero infinitely.
[0120] The tilted intersection-union localization loss method abandons the geometric misalignment constraint defects caused by the traditional horizontal detection box using four independent coordinate calculations of L1 or L2 norm distance. Instead, it calls the separating axis theorem computer operator based on the point set polygon intersection geometry theory to calculate the overlapping physical closed area of irregular convex polygons, and converts the calculated area ratio into a penalty term index for nonlinear optimization of network parameters.
[0121]
[0122] in A mathematical area measurement operator for performing discrete pixel area integral summation over any closed geometric polygon region; The network localization branch decodes, calculates, and reconstructs a set of two-dimensional vertex coordinates for the polygonal predicted orienting bounding box based on relative coordinate displacement parameters. This is the set of two-dimensional vertex coordinates of the true oriented bounding boxes of polygonal targets defined by externally imposed annotations from the detection dataset. Operator for physically finding the geometric intersection of a set of points in a spatial polygon; This is an operator for finding the physical union of geometric joints of point sets in spatial polygons. By driving the gradient through the intersection-union area ratio, the network can be forced to adapt to the real physical edges of insulator devices with extreme aspect ratios.
[0123] For the angle smoothing loss module, the oriented bounding box detection network calculates the absolute value of the angle difference between the continuously regressed rotation angles output from the periodic decoding stage and the actual physical rotation angles of the target recorded in the labeled source file, and enforces a piecewise nonlinear penalty operation mechanism based on threshold truncation:
[0124]
[0125] in The absolute value of the relative difference between the angle deviation obtained after performing trigonometric function periodic alignment mathematical operations is used to calculate the angle deviation between the continuous regression rotation angle and the actual physical rotation angle of the calibration target in the network regression solution. This refers to the threshold parameter for smoothing control inflection points, which is pre-defined in the network hyperparameter configuration table. A piecewise smoothing continuous function topology is adopted. During the late convergence interval with small angle deviations, the network system implements a quadratic polynomial curve decay action to smooth and protect local extrema from being destroyed by oscillating gradients. Conversely, during the early convergence interval with large angle deviations, a strict first-order linear penalty action is implemented to suppress the risk of global gradient numerical explosion and overflow.
[0126] S5. Perform rotational nonmaximum suppression post-processing and absolute positioning output steps.
[0127] In actual field inspection forward inference, the directional bounding box detection network, influenced by the mathematical mechanism of densely overlapping sampling of the receptive field of the feature pyramid, generates a massive array of redundant candidate boxes that overlap and occlude within the space surrounding the physical boundary of a single, multi-shaped power equipment entity. The system instructs the computer backend processing engine to extract the independent class confidence probability vector and the independent target physical existence prediction confidence vector output by the decoupled directional bounding box detection head. It then performs element-wise multiplication of the class confidence probability vector and the target physical existence prediction confidence vector to obtain the absolute confidence benchmark for a single, specific candidate polygon bounding box. The network backend then calls a filtering operator to filter out redundant background candidate bounding boxes whose absolute confidence benchmark is lower than a preset retention threshold. For all predicted directional bounding box coordinate sequences retained after the first round of initial screening, the sorting engine strictly performs a descending order reordering operation based on the absolute confidence benchmark scalar value, generating a descending sorted queue sequence.
[0128] The instruction iteration engine extracts the high-confidence polygon bounding box that occupies the first position in the current descending sorted queue sequence and forcibly sets it as the baseline candidate orientation ruler box. The Separating Axis Theorem Intersection-Union-Comparison Space Detection Operator is then called sequentially. This operator finds independent projection normal axes in two-dimensional space that prevent one-dimensional line segment overlap between the projections of all vertices of two rectangular polygonal regions with rotational angular deviations onto a specific axis. It then precisely calculates the polygon rotation intersection-union-overlap ratio between the baseline candidate orientation ruler box and the remaining subordinate predicted orientation bounding box elements in the current descending sorted queue sequence.
[0129] If the calculated rotation overlap ratio is physically greater than a preset spatial repulsion tolerance threshold, the algorithm kernel logically determines that the currently compared subordinate predicted polygon bounding box and the baseline candidate orientation ruler box point to the same physical surface entity of the power grid equipment. It then issues a memory release command to remove the currently identified overlapping redundant bounding boxes from the maintenance sequence. The system iterates through the logical branches of baseline candidate orientation ruler box extraction, comparison calculation, and redundancy removal until all polygon tensor elements within the initial predicted orientation bounding box sequence are cleared and released. The network architecture physically outputs to external monitoring terminals discrete classification labels for the attributes of multi-morphological power equipment in a completely non-redundant and minimalist state, along with floating-point confidence values and a series of orientation bounding box coordinates with rotation and orientation parameters.
[0130] Before the system executes the complete end-to-end inference mechanism described above, the directional bounding box detection network must complete supervised learning calibration iterations for the physical space of the benchmark samples within the server computing cluster. The constructed power grid directional bounding box calibration dataset encompasses numerous physical entities, including tower components such as glass insulator strings, composite insulator strings, vibration dampers, bolt-type tension clamps, and crossarm supports, as well as various types of rigid spacers for multi-morphological split conductors. The training engine employs a rotation-matching label multi-dimensional allocation strategy to determine the positive / negative and ignored attributes of the anchor frames in the bottom-level preset mesh of the detection head. The computation engine constructs a computation matrix in memory and applies the separating axis theorem to simultaneously calculate the rotation intersection-over-union matrix of the coordinates of all real target labeled polygons within the entire image and all preset anchor frame matrix mesh coordinates of the system. When the system detects that the floating-point value of the overlap calculation corresponding to a specific preset anchor frame coordinate grid crosses the positive sample threshold limit upwards, the system assigns feature grid points to initiate the coordinate regression penalty mechanism and marks the preset anchor frame as a positive sample feature anchor frame. When the floating-point value of the overlap calculation falls below the negative sample safety threshold limit downwards, the system blocks the application of any shape fitting regression penalty parameters to the grid position of this feature matrix and marks the preset anchor frame as a negative sample feature anchor frame. For grid anchor frames whose overlap calculation floating-point values float between the positive sample threshold and the negative sample safety threshold, the system command forcibly marks them as ignored and does not participate in the loss backpropagation process of this iteration.
[0131] Example 2: This example is a further optimization based on Example 1. In some examples executed in high-resolution, large-target-area image input environments, the multi-scale rotation adaptive feature fusion process is configured with a channel texture edge compensation operator with second-order derivative extraction capability embedded in the feature tensor fusion pre-calculation node to address the local feature texture physical distortion and collapse caused by strong specular light reflection from the metal surface of the power transmission line.
[0132] Aligned high-level features, due to the disruption caused by multiple rounds of max pooling and stride convolution, often lack high-frequency edge sharpness information describing the physical contour boundaries of objects. The channel texture edge compensation operator calculates the channel Laplacian physical second-order spatial derivative response matrix of the aligned low-level feature matrix in 3D image space. This channel Laplacian physical second-order spatial derivative response matrix is then multiplied by a specific compensation ratio and superimposed onto the original aligned low-level features to generate an edge-compensated low-level feature tensor, thereby enhancing high-frequency edges. The definition flow of the joint algebraic operation for high-frequency feature compensation after Laplacian compensation is as follows:
[0133]
[0134]
[0135] in This is the low-level feature tensor for edge compensation generated after high-frequency texture boundary physical response forced enhancement processing. The standard alignment of low-level features after the channel and spatial physical dimensions have been uniformly adjusted; The floating-point texture compensation intensity scalar coefficient is set in advance in the hyperparameter file to balance the edge noise intensity. The Laplacian second-order differential gradient operator is used to extract the physical information of the second-order rate of change in both the horizontal and vertical directions of the image space. To generate a new one-dimensional channel scaling vector parameter set containing two floating-point elements after adding compensation features, the system re-dynamically regresses. Function operators for performing normalized exponential operation control and being subject to one constraint; Extraction operator for fully connected parameterized linear feature maps; For global average region pooling collapse extraction operator; The standard alignment of high-rise features is completed after the channel and spatial scale adjustments are made. To perform concatenation and combination operations along the channel dimension.
[0136] In the subsequent weighted fusion stage, the generated edge compensation low-level feature tensor is used. Replace the original standard alignment low-level features As input for low-level detailed features, element-wise additive feature merging is performed on the high-level features aligned with the standard. High-frequency detailed physical edge information is forcibly compensated to the low-level features and participates in the fusion, which improves the physical fitting geometric accuracy of the predicted polygonal oriented bounding box in the case of minor flashover causing insulator skirt edge structure defects.
[0137] Example 3: This example is based on the same principles as Example 1, except that in some examples where the network is deployed on a low-power computing platform on the edge of a micro UAV, considering the extremely stringent hardware physical upper limit of the video memory capacity and system memory data read bandwidth of the UAV edge payload computing platform, in order to achieve real-time millisecond-level inference of the directional bounding box detection network with a large number of parameters at the edge computing nodes, the system introduces a low-precision hybrid data quantization truncation mechanism based on relative entropy divergence calibration of the underlying loss during the deployment and compilation phase.
[0138] During the backpropagation training phase within the GPU cluster server, network parameters strictly adhere to a 32-bit single-precision floating-point binary memory format to ensure the normal, lossless accumulation of minute weight gradients. In the inference and compilation phase, which converts the model to edge device format, the quantization mechanism calibrator performs forward inference on a mini-batch validation inspection dataset. It statistically analyzes the data probability physical distribution of the tensor responses of activation values within multi-scale feature layers and each convolutional layer, seeking the optimal truncation physical threshold that minimizes information loss. Based on this optimal truncation physical threshold, the system forcibly maps most static weight parameters and dynamic feature activation values to an 8-bit integer data physical format that occupies only a quarter of the memory. The search for the optimal truncation physical threshold relies on calculating the Kohlbek-Leibler relative entropy divergence loss between the original full-precision floating-point probability distribution and the quantized integer probability distribution. The mathematical physics optimization model is as follows:
[0139]
[0140] in The physical measure of the cross-relative entropy divergence between the full-precision model before quantization and the low-precision model after quantization; For statistical analysis up to the th interval after histogram interval division The original full-precision feature activation value probability density distribution of each interval is calculated. The activation probability density distribution is the calculated value after numerical truncation and linear scaling to an eight-bit integer format, followed by re-execution of the dequantization physical reconstruction solution. This refers to the total number of statistical interval containers defined when dividing the global numerical space using a histogram statistical algorithm. The natural logarithm function is used to perform the logarithmic scaling transformation. By performing multiple iterations to minimize the aforementioned physical measure of relative entropy divergence, the directional bounding box detection network achieves a more than fourfold reduction in model physical storage volume and a precipitous decrease in runtime GPU memory bandwidth usage on embedded hardware, at the physical cost of only a tiny percentage point loss in predicted bounding box localization coordinate accuracy.
[0141] The system further integrates compiler-level directed acyclic graph fusion optimization technology to force the physical merging of numerous fragmented memory physical operations generated during the multi-scale rotation adaptive feature fusion stage of the oriented bounding box detection network. The underlying embedded inference engine pre-locks and allocates a block of video memory with a contiguous physical address space, forcibly setting it as a shared interactive cache. This shared interactive cache data area is reused alternately in time slices between different detection head operation branches and feature neck convolution calculation layers, thereby eliminating runtime blocking overhead caused by frequent dynamic physical memory allocation and deallocation at the system level. Through the implementation of these extreme optimization mechanisms at the underlying hardware assembly level, the compressed and pruned fused rotation-aware attention feature-oriented bounding box detection network achieves a real-time video stream detection standard exceeding 30 frames per second on low-end embedded heterogeneous computing devices limited by physical computing power. This provides closed-loop visual feedback perception physical support for micro-UAVs to autonomously avoid obstacles close to poles in strong winds and for precise locking and close-range tracking of various equipment.
[0142] Example 4: This example is based on the same principles as Example 1, but differs in that, in some embodiments designed to improve the network's generalization ability to unseen weather conditions, to address the severe degradation of visual physical features and even geometric collapse of various types of power equipment in images under extreme weather conditions, the directional bounding box detection network forcibly embeds a data augmentation random operator based on multidimensional physical manifold geometry into the forward propagation input path of the training batch data. This multidimensional physical manifold geometry data augmentation random operator introduces a matrix algebraic space geometric continuous transformation and a color optical physical space nonlinear strong random perturbation mechanism to compress and guide the bottom-level extraction convolutional layers of the directional bounding box detection network to learn the essential physical topological features of the power equipment that are not limited by ambient light intensity and relative position in two-dimensional physical space.
[0143] To address the irregular and arbitrary distribution of the spatial rotational attitudes of devices such as suspension insulator strings and spacers, the data loading streamline construction introduces a parameterized affine rotation operator module around the geometric center of the two-dimensional plane of the image. In memory, this module performs a synchronous mathematical matrix multiplication coordinate mapping between the input array of raw inspection images fed into the network computation and the physical coordinates of the vertices of the manually pre-annotated polygonal oriented bounding boxes. The underlying geometric matrix dot product mathematical relationship of the parameterized affine rotation mapping process is defined as follows:
[0144]
[0145] in The pixel generated after performing the rotation matrix mapping mathematical algebra operation on the original point is located at the horizontal coordinate inside the new grid. The pixels generated after performing the rotation matrix mapping mathematical algebra operation on the original point are located in the vertical coordinates inside the new grid. The yaw angle parameter of a single rotational disturbance is randomly sampled in real time from the 360-degree uniform distribution probability model preset by the pseudo-random number generator. The original horizontal coordinates carried by the original unmoved pixels before the transformation operation; The original vertical coordinates carried by the original unmoved pixels before the transformation operation; For the whole Figure 2 The fixed horizontal coordinate value of the geometric center of the physical grid of the 3D image; For the whole Figure 2 The fixed vertical coordinate value of the geometric center of the physical grid of the 3D image; For the geometric projection operator of cosine trigonometric functions; This is a sine trigonometric function geometric projection operator. The algorithm synchronously performs the dot-matrix multiplication operation on all four geometric vertices of the manually labeled polygonal bounding boxes written to disk within the memory scheduling pipeline. This physically maintains the alignment of the physical pixel content offset of the electrical equipment within the input image with the repositioning of the target mathematical label in two-dimensional space.
[0146] In addition to random forced transformations in geometric topology, a nonlinear perturbation mechanism for the optical color physical space is used to force an algebraic mapping transformation of the read three-channel red, green, and blue primary color pixel combinations to a three-dimensional HSV cylindrical coordinate color space that physically represents hue, saturation, and brightness. The underlying tensor operator is then instructed to independently apply continuous white noise physical offsets based on a Gaussian distribution model to each of the three independent optical representation channels according to specific probabilities. This disrupts the physical trap of local overfitting of network weights inevitably caused by the single illumination of the acquired sample set or the fixed parameters of the imaging device. Taking the nonlinear physical transformation generation process for the brightness channel as an example, the mathematical operator operations are as follows:
[0147]
[0148] in The horizontal coordinate of the two-dimensional plane and vertical ordinate The brightness value of a local single pixel is generated after being reorganized following enhanced mathematical perturbation. The horizontal axis is at the beginning of the process before any random disturbances occur. and vertical ordinate The original local single-pixel brightness physical record value at the location; The relative scaling perturbation coefficient of brightness is a real-time discrete random sample from the system's preset standard normal probability density distribution based on a random seed; A clamping protection function, which enforces upper and lower boundary value truncation, is specifically designed to prevent pixel values that have undergone multiplicative amplification from overflowing the 255 extreme physical boundary that the 8-bit integer storage hardware can withstand, thus preventing image distortion. The aforementioned multidimensional matrix data augmentation continuous operation with forced random physical properties significantly expands the abundance distribution of training data for low-frequency, long-tailed physical sample characteristics within the computation cycle. This ensures that the directional bounding box feature detection system and network model maintain high robustness and stability in localization regression detection and feature extraction detection prediction performance when future physical drones face extreme light spot variations caused by different physical time periods and various extreme spatial angles during on-site inspection and physical detection tasks.
[0149] Although preferred embodiments of the invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including both the preferred embodiments and all changes and modifications falling within the scope of the invention.
[0150] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. It should be noted that any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for detecting OBB (On-Board Component) of multi-form power equipment in a power grid by integrating rotational sensing and attention, characterized in that, Includes the following steps: Original inspection images of various types of power equipment are collected, and size normalization and channel-by-channel pixel value standardization are performed on the original inspection images to generate preprocessed image feature maps. The preprocessed image feature map is input into the backbone network of the directional bounding box detection network to perform multi-scale feature extraction, outputting a multi-scale feature map. A rotation-aware attention module embedded between the backbone network and the neck network is used to enhance the multi-scale feature map through rotation, outputting a rotation-enhanced feature map. The rotation-aware attention feature enhancement process includes extracting angle position encoding information based on feature space coordinates, and performing global aggregation of angle dimensions and adaptive calibration of channel space based on the angle position encoding information. An angle position encoding matrix with spatial dimensions equal to the dimensions of the multi-scale feature map is constructed. The encoding vector of each spatial coordinate point in the angle position encoding matrix represents the relative yaw angle offset value of the specific spatial coordinate point relative to the origin of the multi-scale feature map. Element-wise tensor addition is performed between the angle position encoding matrix and the multi-scale feature map to generate the angle-enhanced feature map. The process of performing global aggregation of angle dimensions and adaptive calibration of channel space based on angle position encoding information includes: Based on the preset central corner sector division rules, the angle enhancement feature map is grouped and angle pooled along the spatial dimension to extract the angle interval feature vectors corresponding to a preset number of angle intervals; Tensor concatenation is performed on all angular interval feature vectors to obtain angular aggregated features. One-dimensional convolution dimensionality reduction mapping and non-linear activation processing are then performed on the angular aggregated features to generate angular-sensitive weight vectors. Apply the angle-sensitive weight vector to the angle-enhanced feature map and perform channel-dimensional broadcast multiplication weighting to output the angle-aware feature tensor. Spatial global average pooling and two-level fully connected dimensionality reduction and upscaling are performed on the angle-aware feature tensor to generate a channel calibration weight matrix; a learnable spatial attention convolution kernel is used to perform feature mapping on the angle-aware feature tensor to generate a spatial attention mask matrix; the channel calibration weight matrix and the spatial attention mask matrix are concatenated and applied to the angle-aware feature tensor to generate a rotation-aware enhanced feature map. The neck network receives rotation-aware enhanced feature maps and performs multi-scale rotation adaptive feature fusion, outputting a multi-scale fused feature map with cross-scale alignment. The multi-scale rotation adaptive feature fusion process includes performing cross-scale spatial alignment operations on the high-level semantic feature layer and the low-level detail feature layer, and calculating the adaptive fusion weight coefficients of the cross-scale aligned features based on the target angle prior and the scale prior. The multi-scale fused feature map is input into the decoupled oriented bounding box detection head, and the device classification mapping, bounding box coordinate localization, and angle regression operation based on periodic encoding are performed in parallel to generate the predicted oriented bounding box, the category confidence probability of the corresponding predicted oriented bounding box, and the target physical existence prediction confidence. The product of the category confidence probability and the target physical existence prediction confidence is obtained as the absolute confidence benchmark. Based on the absolute confidence benchmark, the predicted orientation bounding box is subjected to rotation nonmaximum suppression post-processing to remove spatially redundant bounding boxes pointing to the same multi-morphological power equipment. The final positioning detection coordinates and category attributes of the multi-morphological power equipment are output.
2. The method for detecting OBB (On-Board Component) of multi-morphic power equipment in a power grid by integrating rotational sensing and attention as described in claim 1, characterized in that, The multi-scale rotation adaptive feature fusion includes: Bilinear interpolation is applied to the high-level semantic feature layer to generate upsampled feature tensors, and stride convolution is applied to the low-level detail feature layer to generate downsampled feature tensors. A bottleneck convolutional layer of uniform dimension is applied to adjust the upsampled and downsampled feature tensors to the same channel depth to generate aligned high-level and aligned low-level features. Spatial pooling operations are performed on the aligned high-level features and aligned low-level features respectively to obtain global semantic description vectors. The global semantic description vectors are concatenated and input into the multilayer perceptron to perform nonlinear mapping and exponential function normalization processing, and output the high-level feature fusion weight values and low-level feature fusion weight values. Based on the fusion weight values of high-level features, scalar multiplication is performed on the aligned high-level features. Based on the fusion weight values of low-level features, scalar multiplication is performed on the aligned low-level features. The two feature tensors obtained by scalar multiplication are then combined by element-wise addition to generate a multi-scale fused feature map.
3. The method for detecting OBB (On-Board Component) of multi-form power equipment in a power grid by integrating rotational sensing and attention as described in claim 1, characterized in that, The decoupled directional bounding box detection head includes mutually independent classification branches, positioning branches, and angle branches; The classification branch receives multi-scale fused feature maps, extracts features through a classification convolution kernel, and then applies a normalization function to output the category confidence probability and the target physical existence prediction confidence. The localization branch receives multi-scale fused feature maps, maps them through a localization convolution kernel, and outputs the center horizontal relative coordinate offset, center vertical relative coordinate offset, width logarithmic offset, and height logarithmic offset. It then combines the downsampling step size parameter of the multi-scale fused feature map with the prior geometric dimensions of the preset anchor box to decode and generate the center coordinates, width value, and height value of the predicted oriented bounding box.
4. The method for detecting OBB (On-Board Component) of multi-form power equipment in a power grid by integrating rotational sensing and attention as described in claim 3, characterized in that, The execution of the angle regression operation based on periodic encoding includes: The sine and cosine coding operators are used to project the actual physical rotation angle of the labeled target onto a two-dimensional unit circle space to generate sine-coded target values and cosine-coded target values. The angle branch extracts rotation features from the multi-scale fused feature map through the angle convolution kernel, and uses a linear mapping layer to regress the rotation features into predicted sine and predicted cosine values; The predicted sine and predicted cosine values are input into the four-quadrant arctangent decoding operator to generate the regression rotation angle.
5. The method for detecting OBB (On-Board Component) of multi-form power equipment in a power grid by integrating rotational sensing and attention as described in claim 1, characterized in that, In the parameter optimization stage, the oriented bounding box detection network uses a rotation-invariant loss function that incorporates multiple penalties for end-to-end gradient backpropagation. The rotation-invariant loss function includes a focus classification loss to penalize misclassification and suppress interference from background sample size, a tilt intersection-union ratio localization loss to constrain the spatial overlap between the predicted oriented bounding box and the real boundary polygon, and an angle smoothing loss to eliminate abrupt changes in the regression of the rotated boundary.
6. The method for detecting OBB (On-Board Component) of multi-morphic power equipment in a power grid by integrating rotational sensing attention as described in claim 5, characterized in that, Applying angle smoothing loss to perform end-to-end gradient backpropagation includes: Calculate the absolute value of the deviation between the regressed rotation angle and the target's true physical rotation angle; Determine whether the absolute value of the deviation exceeds the preset smoothing control threshold; if it does not exceed the preset smoothing control threshold, calculate the local smoothing loss using a quadratic penalty function with respect to the absolute value of the deviation; if it exceeds or equals the preset smoothing control threshold, calculate the global smoothing loss using a linear penalty function with respect to the absolute value of the deviation.
7. A method for detecting OBB (On-Board Component) of multi-morphic power equipment in a power grid by integrating rotational sensing attention according to any one of claims 1 to 6, characterized in that, Various types of power equipment include insulator strings, vibration dampers, tension clamps, tower components, and spacers.
8. The method for detecting OBB (On-Board Component) of multi-morphic power equipment in a power grid by integrating rotational sensing and attention as described in claim 1, characterized in that, The original inspection images were captured and generated by an airborne visible light imaging system mounted on a drone.
Citation Information
Patent Citations
Mixed anchor point remote sensing image target detection method based on multi-scale large kernel convolution
CN120279310A
Lightweight anchor-frame-free rotating target detection method and device for remote sensing image
CN122223534A
