A power distribution station instrument intelligent identification method based on a multi-scale attention mechanism
The intelligent identification method for substation instruments using a multi-scale attention mechanism solves the problems of sensitivity to changes in lighting and poor robustness in substations. It achieves efficient and easy-to-deploy automated detection, improves the robustness and accuracy of substation instrument identification, and ensures the safety of power production.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- NANTONG UNIV
- Filing Date
- 2026-03-13
- Publication Date
- 2026-06-05
AI Technical Summary
Existing intelligent inspection methods in power distribution substations suffer from problems such as sensitivity to changes in lighting, poor robustness, low accuracy, slow detection speed, and complex model deployment, making it difficult to meet the safety production needs of the power industry.
A smart identification method for substation instruments based on a multi-scale attention mechanism is adopted, including adaptive illumination enhancement, multi-scale feature extraction, multi-task parallel detection, and result fusion. The adaptive enhancement module handles illumination changes, the EMA attention mechanism extracts features, and parallel detection is performed on indicator lights, digital and pointer instruments. An uncertainty weighting strategy is used to optimize task weights.
It improves the robustness and accuracy of instrument identification in power distribution stations, reduces system complexity, and enables efficient and easy-to-deploy automated detection, ensuring the safety and real-time performance of power production.
Smart Images

Figure CN122156563A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of computer vision and artificial intelligence, and in particular to a method for intelligent identification of substation instruments based on a multi-scale attention mechanism. Background Technology
[0002] Substations are critical nodes in the power system, requiring regular equipment inspections to ensure production safety. In high-voltage distribution environments, traditional manual inspection methods pose safety hazards such as electric shock and arc flash, and involve significant investment of specialized manpower, making 24-hour uninterrupted monitoring difficult. With the widespread application of substations and increasing demands for safety, existing manual inspection methods are gradually failing to meet the actual needs of the power industry.
[0003] Currently, some power sectors have introduced automatic detection technology. However, most existing intelligent inspection methods are based on traditional image processing algorithms, such as using Hough transform to detect pointer positions and template matching to identify numbers. These methods typically suffer from problems such as sensitivity to changes in lighting, the need for manual setting of numerous parameters, poor robustness, and low accuracy when identifying indicator lights with varying brightness and different types of digital meters on distribution cabinets. Furthermore, in multi-target recognition scenarios, traditional algorithms use different models sequentially to detect different types of targets, leading to slow detection and inference speeds and complex overall model deployment. Summary of the Invention
[0004] The purpose of this invention is to provide an intelligent identification method for substation instruments based on a multi-scale attention mechanism. Addressing the aforementioned problems, this method proposes a substation instrument identification method characterized by multi-target unification, high detection efficiency, and strong robustness. This is of great significance to the power industry, as it solves problems in existing technologies such as poor light adaptability, insufficient small target detection capability, and the need for complex post-processing for pointer identification. Simultaneously, it significantly improves the automation of power industry production and inspection, and ensures the safety of technical personnel.
[0005] To achieve the above-mentioned objectives, the present invention employs the following technical solution: a method for intelligent identification of substation instruments based on a multi-scale attention mechanism, comprising the following steps:
[0006] Step 1: Image preprocessing stage. The input image is preprocessed using the illumination adaptive enhancement module, which automatically estimates the illumination conditions and dynamically adjusts the enhancement parameters to output an illumination-normalized image.
[0007] Step 2, Multi-scale Feature Extraction Stage: Multi-scale features are extracted through a backbone network integrating the EMA attention mechanism, while focusing on important features in both channel and spatial dimensions to enhance the expressive power of small targets and detailed features.
[0008] Step 3, Multi-task parallel detection stage: indicator light detection and color / status recognition, digital instrument detection and OCR recognition, pointer instrument detection and angle regression;
[0009] Step 4, Result Fusion and Output Stage: The multi-task detection results are fused and output in a unified format, including information such as location, category, reading, and confidence level.
[0010] Furthermore, step 1 specifically includes the following steps:
[0011] Step 1.1: Estimate the illumination level of the instrument image:
[0012]
[0013] Where H and W represent the height and width of the instrument image. , , For pixels The RGB components. According to The instrument images are divided into three categories: For dark images, Normal lighting To brighten the image;
[0014] Step 1.2: Perform Gamma correction on the image with the assessed illumination level:
[0015]
[0016] in, This indicates the image after gamma correction at the [number]th [time]. Line number Pixel values at the column; Indicates the original input image at the th Line number Pixel value at the column. Gamma correction factor. Based on the overall lighting level of the image Adaptive determination, dark image ( )Pick Brighten the image ( )Pick Darken the image and take normal lighting. No adjustments will be made. Among them, This indicates the overall illumination level of the input image.
[0017] Furthermore, the optimal Gamma value can be predicted during the training phase using a deep convolutional neural network: ,in For feature extraction networks, This is the Sigmoid function.
[0018] Step 1.3: For dark images with an illumination level below 0.4, apply the CLAHE (Contrast Limiting Adaptive Histogram Equalization) algorithm to the L channel of the LAB color space, with parameters set to clipLimit=2.0 and tileGridSize=(8,8). This method only enhances the L channel, maintaining color fidelity and improving local contrast while avoiding noise amplification.
[0019] Furthermore, step 2 specifically includes the following steps:
[0020] Step 2.1: Dimensionality reduction. The number of channels is reduced to 1 / 8 of the original number using 1×1 convolutions, thus reducing the amount of subsequent computation.
[0021] Step 2.2: Multi-scale feature extraction. 3×3 and 5×5 depthwise separable convolutions are used in parallel to extract features from different receptive fields. Then, the two feature paths are added and fused. The computational cost is only 1 / 8 of that of standard convolution.
[0022]
[0023] in, Represents a multi-scale fused feature map; This represents the input feature map after channel compression; Indicates the kernel size as Depth-separable convolution operations are used to extract local detail features; Indicates the kernel size as Depthwise separable convolution operations are used to extract contextual features under a larger receptive field.
[0024] Step 2.3, Channel Attention: Channel statistics are extracted using global average pooling and max pooling, and channel weights are calculated via a fully connected layer to achieve attention to important features.
[0025]
[0026] in, This represents the channel attention weight mapping; and These represent the first fully connected layer and the second fully connected layer, respectively. Represents the linear rectification activation function; This represents the channel statistical features obtained by global average pooling of the input feature map; This represents the channel statistical features obtained by global max pooling of the input feature map; This indicates that the global average pooling feature and the global max pooling feature are concatenated.
[0027] Step 2.4, Spatial Attention: Calculate the mean and maximum values in the channel dimension, and then use a 7×7 convolution to calculate the spatial weight map, thus achieving attention to features at important locations.
[0028]
[0029] in, Represents the spatial attention weight map; Indicates the kernel size as Convolution operations; This represents the spatial feature map obtained after average pooling of the input feature map along the channel dimension. This represents the spatial feature map obtained after max pooling the input feature map along the channel dimension. This indicates that the average pooling feature map and the max pooling feature map are concatenated.
[0030] Step 2.5: Dimensional Upgrading and Residual Connections. The original number of channels is restored through 1×1 convolution and added to the input features to preserve the original information and accelerate training convergence. The final output is a residual connection.
[0031]
[0032] in, This represents the output feature map after residual connection; This represents the input feature map of the module; This represents the feature map after spatial attention processing. Indicates the kernel size as The convolution operation is used to recover the number of feature channels; This indicates a batch normalization operation;
[0033] Furthermore, step 3 specifically includes the following steps:
[0034] Step 3.1: This invention designs a unified multi-task detection head, which takes the shared YOLOv8 backbone network feature pyramid {P3, P4, P5} as input and outputs three types of detection results in parallel:
[0035] Indicator light detector head: Outputs four categories of classification results (red light on, red light off, green light on, green light off) and bounding box coordinates, suitable for identifying the working status of various indicator lights in substations;
[0036] Digital meter detection head: Outputs bounding box coordinates and OCR recognition results (supports 11 characters including digits 0-9 and decimal point), enabling automatic reading of digital meters;
[0037] Pointer meter detection head: outputs bounding box coordinates, pointer angle (0-360°), scale range and confidence level, and combines with PARN network to realize end-to-end reading of pointer instrument.
[0038] Step 3.2: Traditional multi-task learning using fixed weights struggles to balance different tasks. This invention employs an uncertain weighting strategy:
[0039]
[0040] The total loss function for multi-task joint training; For task indexing, The sub-tables represent indicator light detection tasks and digital instrument detection tasks. Tasks, pointer-type instrument testing tasks. For the first Loss function for each subtask; For the first The learnable uncertainty parameters corresponding to each subtask; For the first Adaptive weighting coefficients for the loss of each subtask; This is a regularization term used to suppress excessively large uncertain parameters and ensure training stability.
[0041] This method enables the network to automatically learn the optimal weights for each task without requiring manual parameter tuning.
[0042] Furthermore, step 3.2 specifically includes the following:
[0043] Step 3.2.1: For the indicator light detection task, the loss consists of three parts: bounding box regression loss, classification loss, and confidence loss.
[0044]
[0045] In the formula, This represents the total loss function for the indicator light detection task; This represents the bounding box regression loss, used to constrain the consistency between the predicted bounding box and the ground truth bounding box in terms of location and scale; This represents the category classification loss, used to supervise the identification results of indicator light categories; This represents the target confidence loss, used to determine whether a target exists at the current predicted location.
[0046] The bounding box regression loss uses CIoU loss, which, based on the intersection-union ratio, simultaneously constrains the center point distance and aspect ratio consistency between the predicted bounding box and the ground truth bounding box; the classification loss uses cross-entropy loss, which supervises the four categories of red light on, red light off, green light on, and green light off; and the confidence loss uses binary cross-entropy loss, which is used to determine whether the target exists at the current predicted location.
[0047] Step 3.2.2: For the digit detection task, in addition to the bounding box regression loss and confidence loss, an OCR character recognition loss is added:
[0048]
[0049] in, This represents the total loss function for digital instrument detection tasks. This represents the character recognition loss, used to monitor the recognition results of each character in digital instrument readings. The OCR character recognition loss is calculated independently for each character in the reading and then averaged. The character set includes 10 digits from 0 to 9, plus a decimal point, totaling 11 classes.
[0050] Step 3.2.3: For the pointer table detection task, in addition to the bounding box regression loss and confidence loss, angle regression loss and scale range regression loss are added:
[0051]
[0052] in, This represents the total loss function for a pointer-type instrument detection task. This represents the angle regression loss, used to constrain the deviation between the predicted pointer angle and the actual pointer angle; This represents the range regression loss, used to constrain the prediction accuracy of the instrument's minimum and maximum range values. Angle regression loss. The angle prediction head from PARN generates the difference between the predicted and true angles, and the loss is calculated using the SmoothL1 function to avoid generating erroneous large gradients at the 0° and 360° boundaries. (Scale range regression loss) The range prediction head generated by PARN uses mean square error to constrain the prediction accuracy of the minimum and maximum range values, enabling the network to adapt to the range range of different types of instruments.
[0053] Meanwhile, this invention proposes an intelligent identification system for substation instruments based on a multi-scale attention mechanism. The system, applying the method described in this invention, includes the following steps:
[0054] The adaptive enhancement module is configured to perform the following process: preprocess the input image using the illumination adaptive enhancement module, estimate the illumination level of the image, adaptively predict the Gamma value based on the illumination level, perform Gamma correction on the image, use adaptive CLAHE to limit the contrast adaptive histogram equalization enhancement for dark images, and output the illumination-normalized image.
[0055] The EMA attention module is configured to perform the following process: integrate the EMA attention mechanism into the backbone network, extract features from the input image through a deep convolutional neural network, enhance feature representation using multi-scale convolution, channel attention, and spatial attention, and output a multi-scale feature pyramid.
[0056] The detection module is configured to perform the following process: It performs three parallel detections on the extracted multi-scale features. The first type is indicator light detection, which determines the position of the indicator light, identifies its color as red or green, and its status as constantly on or off. The second type is digital meter detection, which detects the position of the digital meter, recognizes and displays the digits using OCR, and outputs the reading. The third type is pointer meter detection, which detects the position of the pointer meter, predicts the pointer angle using an angle regression network, predicts the scale range, and calculates the reading.
[0057] The output module is configured to perform the following process: perform non-maximum suppression (NMS) post-processing on the multi-task detection results, filter low-confidence predictions, and output detection results in a uniform format, including target category, location, reading, and confidence information.
[0058] Meanwhile, the present invention proposes an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the computer program is executed, it implements the steps of the method described in the present invention.
[0059] Furthermore, the present invention proposes a computer-readable storage medium having a computer program stored thereon, the computer program being configured to implement the steps of the method described in the present invention when invoked by a processor.
[0060] Finally, the present invention provides a computer program product comprising a computer program / instructions that, when executed by a processor, implement the steps of the method described in the present invention.
[0061] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0062] 1. This invention employs an illumination-adaptive enhancement method, which combines illumination level estimation, gamma correction, and contrast-limited adaptive histogram equalization to adaptively preprocess images under different illumination conditions. This improves the consistency of image quality under complex illumination environments and enhances the robustness of subsequent recognition.
[0063] 2. This invention introduces a multi-scale EMA attention mechanism into the backbone network. Through the synergistic effect of multi-scale convolution and channel attention and spatial attention, it enhances the feature representation ability of key targets such as indicator lights, digital display areas and dial pointers, and improves the detection accuracy of small targets and the recognition ability of multi-scale targets in complex backgrounds.
[0064] 3. This invention constructs a unified multi-task parallel framework for indicator light detection, digital instrument recognition, and pointer instrument recognition, realizing single-model joint processing of multiple types of targets, reducing system structural complexity, and improving recognition efficiency and engineering deployment convenience.
[0065] 4. This invention adopts an angle regression-based pointer instrument recognition method, which can directly predict the pointer angle and calculate the reading by combining the scale range. This reduces the reliance on traditional image processing post-processing steps, simplifies the recognition process, and improves the accuracy and stability of pointer instrument readings.
[0066] 5. This invention employs multi-task uncertainty adaptive weighted loss, which can adaptively allocate optimization weights for different tasks, improving the stability of multi-task joint training and overall recognition performance, while reducing the difficulty of manual parameter tuning.
[0067] 6. This invention forms a complete intelligent identification solution for power distribution station inspection scenarios, which can perform unified detection, status identification and reading output for multiple types of instrument targets. It has the advantages of high identification accuracy, strong robustness, good real-time performance and easy deployment, and can effectively improve the automation and intelligence level of power distribution station inspection. Attached Figure Description
[0068] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used together with the embodiments of the invention to explain the invention and do not constitute a limitation thereof.
[0069] Figure 1 This is a flowchart of the overall system of the present invention.
[0070] Figure 2 This is a complete network architecture diagram of the present invention.
[0071] Figure 3 This is a detailed flowchart of the illumination adaptive enhancement module in this invention.
[0072] Figure 4 This is a detailed structural diagram of the EMA attention module in this invention.
[0073] Figure 5 This is a structural diagram of the C2f_EMA module in this invention.
[0074] Figure 6 This is a diagram of the pointer angle regression network structure in this invention.
[0075] Figure 7 This is a schematic diagram of the multi-task detection head frame in this invention, showing the parallel structure of three task-specific detection heads and their respective outputs.
[0076] Figure 8This is a graph showing the loss curve and performance index changes during the training process in this invention.
[0077] Figure 9 This is a statistical analysis chart of dataset categories and bounding boxes in this invention.
[0078] Figure 10 This is a schematic diagram illustrating the target detection effect of multiple types of instruments in a power distribution station in this invention. Detailed Implementation
[0079] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. Of course, the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0080] Example 1: See Figure 1 and Figure 8 This embodiment uses a smart inspection scenario in the distribution room of a 220kV substation as an example. The distribution room is equipped with 40 red and green indicator lights, 30 pointer-type ammeters, and 20 digital voltmeters. The equipment is densely distributed, and the lighting conditions are complex and variable due to factors such as direct fluorescent light, reflections from metal cabinet surfaces, and shadows cast by the equipment. Traditional manual inspections require two electricians, each conducting two inspections daily, posing a risk of high-voltage electric shock, and increasing the error rate of instrument readings during nighttime inspections.
[0081] This embodiment proposes a method for intelligent identification of substation instruments based on a multi-scale attention mechanism, such as... Figure 1 The overall process shown is deployed on a power distribution room inspection robot, and sequentially goes through four stages: image acquisition, illumination enhancement, feature extraction, and multi-task detection, to achieve fully automatic identification of the above three types of targets. The method includes the following steps:
[0082] S1. Image Acquisition and Preprocessing
[0083] Inside the power distribution room, the inspection robot travels along a pre-set track to each power distribution cabinet, capturing images of the cabinets within its current field of view. Due to inconsistent lighting conditions inside the power distribution room, the image quality varies. Figure 3 The Light Adaptive Enhancement (LAE) module shown is used for preprocessing.
[0084] like Figure 3As shown, this module first converts the image to grayscale and calculates the average brightness of the entire image to obtain the illumination level. It darkens scenes with strong reflections from metal cabinet surfaces, common in power distribution rooms; it brightens scenes caused by underexposure during nighttime inspections or in shadowed areas inside cabinets. Furthermore, it applies CLAHE local contrast enhancement to the L channel of the LAB color space, setting clipLimit to 2.0 and the block size to 8×8, improving the visibility of instruments in dark areas while maintaining color accuracy. After LAE processing, the brightness of the power distribution cabinet image under different lighting conditions tends to be consistent, providing stable input for subsequent inspections.
[0085] S2, Multi-scale Feature Extraction
[0086] The normalized image is fed into a YOLOv8 backbone network with an integrated EMA attention mechanism for feature extraction. The extraction process follows... Figure 4 and Figure 5 The module structure is shown. When processing images of a power distribution room, indicator lights typically occupy only about 20×20 pixels in a 640×640 input image, which is a typical small target. The original C2f module has a weak feature response to such targets and is prone to missing detection. Figure 5 As shown, the key feature extraction layer of the backbone network adopts the C2f_EMA module. Compared with the original C2f module, the EMA attention module is added after feature fusion to reduce the false negative rate.
[0087] like Figure 4 As shown, the EMA module extracts features from different receptive fields in parallel using 3×3 and 5×5 depthwise separable convolutions and then fuses them, enabling the network to simultaneously focus on the detailed textures of small targets such as indicator lights and the overall structure of large targets such as dial lights. Subsequently, the channel attention submodule uses global average pooling and max pooling to jointly calculate the importance weights of each channel, suppressing background noise channels and enhancing the response of instrument-related channels. Finally, the spatial attention submodule generates an attention heatmap in the spatial dimension, enabling the network to focus on the instrument dial, pointers, and digital display areas, rather than irrelevant areas such as the power distribution cabinet door and cables.
[0088] Finally, the backbone network outputs feature maps at three scales: P3 (80×80), P4 (40×40), and P5 (20×20), which correspond to the detection resolutions of small, medium, and large targets, respectively.
[0089] S3, Multi-task Parallel Detection
[0090] The feature maps at three scales are fused using a feature pyramid and then fed into... Figure 7 The multi-task detection head shown can simultaneously detect three types of substation targets.
[0091] The indicator light detection head uses high-resolution features from layer P3 as its main input and outputs the bounding box coordinates and four classification results (red light on, red light off, green light on, green light off) for each candidate location. In actual power distribution room scenarios, indicator lights are densely arranged, and the distance between two adjacent lights is sometimes less than 5 pixels. The detection head uses a confidence branch to apply a post-processing method (NMS) to remove overlapping boxes for each candidate box, ensuring that only one detection result is output for each indicator light.
[0092] The digital meter detection head uses P4 layer features as its main input. While locating the meter dial, it uses an OCR sub-head to recognize each character on the display screen digit by digit, supporting 11 character classes from 0 to 9 and a decimal point. The final result is a complete reading string output. For situations in the power distribution room where slight distortion of the digital display is caused by viewing angle deviation, the OCR sub-head improves robustness to such cases by introducing perspective transformation samples during the data augmentation stage.
[0093] The pointer dial detection head uses P4 and P5 layer features as its main input. After coarse localization of the dial, it sends the feature regions corresponding to the detection boxes into... Figure 6 The pointer angle regression network (PARN) shown is used for refined prediction. For example... Figure 6 As shown, PARN first uniformly clips the features of the detection box region to a 7×7 size through RoI alignment. Then, it extracts a 128-dimensional feature vector through two layers of 3×3 convolution and global average pooling. Finally, three parallel fully connected heads predict the pointer angle, measurement range, and prediction confidence. For the ammeter (range 0–500A) in this 220kV substation, the network directly outputs the corresponding angle and calculates the actual current reading according to the formula, without requiring manual preset of the range parameters. Compared with the traditional Hough transform method, PARN can still output stably even when the pointer is partially obstructed or the dial has scratches. The average angle error is reduced from 8.5° to 1.7°, and the corresponding reading error rate is reduced from 12.3% to 2.3%.
[0094] Example 2: Model Training and Validation Based on Real Substation Datasets
[0095] This embodiment uses real substation inspection images as the basis for constructing a training dataset. For example... Figure 9 As shown, the dataset contains approximately 35 categories of substation targets, covering various models of indicator lights, digital voltmeters, digital ammeters, pointer meters, and switchboard panel components. From... Figure 9 The category distribution bar chart in the upper left corner shows that category 0 (indicator lights) has the most samples, reaching about 300 instances, far exceeding other categories. This is consistent with the actual situation of a dense number of indicator lights in the power distribution room. Categories 2 and 20 are next, while the other categories have fewer samples, showing an overall long-tail distribution characteristic.
[0096] from Figure 9The superimposed annotation box image in the upper right corner shows that the size of the annotation boxes in the dataset varies significantly, ranging from small indicator lights that occupy less than 1% of the image area to the entire panel of the power distribution cabinet that occupies most of the central area of the image. The multi-layered nested border structure reflects the typical characteristic of the large scale of the target in the power distribution station scene. Figure 9 The scatter plot of width and height distribution in the lower right corner further shows that most of the bounding boxes have an aspect ratio close to 1:1 and are mainly concentrated in the range of normalized width from 0.05 to 0.15, indicating that the dataset mainly consists of small to medium-sized targets. Figure 9 The location heatmap in the lower left corner shows that the center point of the labeled box is relatively scattered in the image space, covering most of the central and surrounding areas of the image. This indicates that the inspection images are taken from various angles, and the model needs to have robust recognition capabilities for targets in different locations.
[0097] To address the class imbalance problem, during training, Mosaic data augmentation and random flipping are used to expand the sample size for rare classes with fewer than 20 samples. The sampling weight of the dominant indicator light class is appropriately reduced to alleviate the model's tendency to overfit to the majority class.
[0098] The dataset was divided into training, validation, and test sets in an 8:1:1 ratio. Training was performed on a workstation equipped with an NVIDIA RTX 3090 graphics card. The training parameters were set to epochs=100, batch_size=16, initial learning rate of 0.01, decayed to 0.0001 using cosine annealing, and the optimizer was AdamW with a weight decay coefficient of 0.0005.
[0099] Figure 1 The complete training curves of the model over 100 training epochs are shown. Looking at the training set metrics in the top row, the box_loss (boundary regression loss) steadily decreased from an initial value of approximately 1.4 to around 0.55, the cls_loss (classification loss) rapidly decreased from approximately 5.0 to below 0.8, and the dfl_loss (distribution focus loss) decreased from approximately 1.15 to around 0.55. All three curves show a smooth, monotonically decreasing trend, and the loss curves on the training set and validation set are highly consistent, indicating that the model did not exhibit overfitting and the training process converged stably.
[0100] Looking at the performance metrics on the right, both precision and recall experienced brief fluctuations around the 10th epoch before rapidly increasing, eventually stabilizing at around 0.90 and 0.88, respectively. It's worth noting that both curves exhibit a clear oscillation range within the first 10 epochs. This is a normal phenomenon in the multi-task learning framework where uncertain weight parameters dynamically adjust the weights of each task during the initial training phase. During this stage, the network automatically balances the learning progress of the three tasks: indicator light detection, digital meter recognition, and analog meter reading. mAP@0.5 rises rapidly from the 5th epoch, reaching above 0.85 by the 30th epoch, then continues to increase slightly before stabilizing after the 80th epoch, ultimately reaching 0.92. mAP@0.5 and 0.95 simultaneously climb from 0 to around 0.80, indicating that the model maintains high detection accuracy even under stricter IoU thresholds and possesses good localization capabilities for substation instruments under different degrees of occlusion and viewing angles.
[0101] Figure 10 The image shows the detection results of the trained model on 16 real substation inspection images. The following points can be observed from the image:
[0102] Firstly, the model has a strong ability to distinguish densely arranged indicator lights. Figure 3 Taking the first image in the first row (20201202172859) as an example, this image contains two sets of dense indicator light arrays, each set containing 4 to 6 horizontally arranged indicator lights. The model accurately marks the position of each indicator light with a blue border and outputs the category number 0. There are no missed or duplicate detections between adjacent lights, which verifies the effectiveness of the EMA attention mechanism in small target dense scenes.
[0103] Secondly, the model's ability to perform parallel detection of multiple types of instruments within the same frame is fully demonstrated. Figure 3 Taking the second image in the second row (20201202105430) as an example, multiple targets such as indicator lights (blue box, category 0), digital display tables (red box, category 17), and analog scales (pink box, category 15) appear simultaneously in the same frame. The model accurately distinguishes each type of target with different colored borders, and there is no confusion between the detection results of different categories, which reflects the stability of the parallel output of the multi-task detection head.
[0104] Third, the robustness of the model in complex backgrounds and occluded scenes was verified. Figure 3In the second image of the third row (20201203099574), there is obvious text signage obscuring the foreground of the distribution cabinet, and only part of the instrument panel is visible. The model still accurately locates the visible areas of the two instruments using category 17 (red box) and category 24 (blue box), indicating that the network extracts sufficient discriminative information from high-level semantic features, rather than relying on the complete appearance of the target.
[0105] Fourth, regarding Figure 3 The almost blank power distribution cabinet door scene shown in the third image of the fourth row (20201203105807) has very few detection boxes output by the model, and there are no large number of false detections, indicating that the confidence filtering threshold is set reasonably and the background suppression effect is good.
[0106] Based on the training curves and detection results, the method proposed in this invention achieves stable convergence and accurate detection in a real power distribution station scenario. Ultimately, it achieves 92.8% mAP@0.5 on the test set and an inference speed of 38 FPS, meeting the dual requirements of real-time performance and accuracy for intelligent inspection robots in power distribution stations.
[0107] Example 3: This example proposes a substation instrument intelligent identification system based on a multi-scale attention mechanism. The system includes:
[0108] The adaptive enhancement module is configured to perform the following process: preprocess the input image using the illumination adaptive enhancement module, estimate the illumination level of the image, adaptively predict the Gamma value based on the illumination level, perform Gamma correction on the image, use adaptive CLAHE to limit the contrast adaptive histogram equalization enhancement for dark images, and output the illumination-normalized image.
[0109] The EMA attention module is configured to perform the following process: integrate the EMA attention mechanism into the backbone network, extract features from the input image through a deep convolutional neural network, enhance feature representation using multi-scale convolution, channel attention, and spatial attention, and output a multi-scale feature pyramid.
[0110] The detection module is configured to perform the following process: It performs three parallel detections on the extracted multi-scale features. The first type is indicator light detection, which determines the position of the indicator light, identifies its color as red or green, and its status as constantly on or off. The second type is digital meter detection, which detects the position of the digital meter, recognizes and displays the digits using OCR, and outputs the reading. The third type is pointer meter detection, which detects the position of the pointer meter, predicts the pointer angle using an angle regression network, predicts the scale range, and calculates the reading.
[0111] The output module is configured to perform the following process: perform non-maximum suppression (NMS) post-processing on the multi-task detection results, filter low-confidence predictions, and output detection results in a uniform format, including target category, location, reading, and confidence information.
[0112] Example 4: This example proposes an electronic system, including: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the method steps of the present invention.
[0113] Example 5: This example proposes a computer-readable storage medium storing a computer program thereon. When the computer program is executed by a processor, it implements the steps of the method described in this invention, which will not be repeated here.
[0114] Example 6: This example proposes a computer program product, including a computer program / instructions. When the computer program / instructions are executed by a processor, they implement the steps of the method described in this invention, which will not be repeated here.
[0115] It should be noted that the processing flow of embodiments 3-6 corresponds to the specific steps of the method provided in embodiment 1 of the present invention, and has the corresponding functional modules and beneficial effects of the method. Technical details not described in detail in this embodiment can be found in the method provided in embodiment 1 of the present invention.
[0116] The program code used to implement the methods of this application may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing device, such that when executed by the processor or controller, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0117] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., 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 intelligent identification of substation instruments based on a multi-scale attention mechanism, characterized in that, Includes the following steps: Step 1: Use the illumination adaptive enhancement module to preprocess the input image, estimate the illumination level of the image, adaptively predict the Gamma value based on the illumination level, perform Gamma correction on the image, use adaptive CLAHE to limit the contrast adaptive histogram equalization enhancement for dark images, and output the illumination normalized image. Step 2: Integrate the EMA attention mechanism into the backbone network, extract features from the input image through a deep convolutional neural network, and enhance feature representation using multi-scale convolution, channel attention, and spatial attention to output a multi-scale feature pyramid. Step 3: Perform three types of parallel detection on the extracted multi-scale features, and use a multi-task joint loss function to jointly optimize each detection branch during the training phase. The first type is indicator light detection: determine the position of the indicator light, identify the color as red or green and the status as always on or off; the second type is digital meter detection: detect the position of the digital meter, recognize and display the numbers through OCR, and output the reading; the third type is pointer meter detection: first detect the position of the pointer meter, then input the dial area into the pointer angle regression network for processing, predict the pointer angle through the angle regression network, establish the conversion relationship between the angle and the actual reading by combining the meter scale range, and calculate the reading. Step 4: Perform non-maximum suppression (NMS) post-processing on the multi-task detection results to filter low-confidence predictions and output detection results in a unified format, including target category, location, reading, and confidence information.
2. The intelligent identification method for substation instruments based on a multi-scale attention mechanism according to claim 1, characterized in that, In step 1, the light level is estimated using the following formula: ; Where H and W are the height and width of the image, respectively. , , For pixels RGB components; Overall Illumination Level , 255 is the pixel coordinate index, and 255 is the maximum pixel value of the RGB channel.
3. The intelligent identification method for substation instruments based on a multi-scale attention mechanism according to claim 1, characterized in that, The prediction of the Gamma value follows these rules: ; in, These are gamma correction coefficients, used to control the degree of image brightness enhancement or suppression. For the input image, A convolutional neural network extracts features from an input image and outputs a predicted illumination value. It is the Sigmoid activation function, with 0.5 and 1.5 being linear scaling factors used to map the Sigmoid output range from (0, 1) to (0.5, 2.0) to obtain the final gamma correction coefficient.
4. The intelligent identification method for substation instruments based on a multi-scale attention mechanism according to claim 1, characterized in that, In step 2, the EMA attention module includes: a dimensionality reduction convolutional layer that reduces the number of channels to 1 / 8 of the original; a multi-scale convolutional branch that uses 3×3 and 5×5 depthwise separable convolutions to extract features in parallel; a channel attention submodule that calculates channel weights through global average pooling and max pooling; a spatial attention submodule that calculates the attention map in the spatial dimension; an up-dimensional convolutional layer; and residual connections.
5. The intelligent identification method for substation instruments based on a multi-scale attention mechanism according to claim 1, characterized in that, In step 3, the pointer angle regression uses a periodic perceptual loss function: ; For loss function, This is the pointer angle regression loss function, used to measure the error between the predicted angle and the true angle. The pointer angle value is predicted by the neural network. The pointer angle value is the actual value as labeled. To represent the absolute error between the predicted angle and the actual angle, 360 is the angle period constant, indicating that a complete 360° angle range is 360°.
6. The intelligent identification method for substation instruments based on a multi-scale attention mechanism according to claim 1, characterized in that, In step 3, the multi-task loss adopts an uncertainty adaptive weighting: ; in, The total loss function for multi-task joint training; For task indexing, The tables are divided into indicator light testing tasks, digital instrument testing tasks, and pointer instrument testing tasks. For the first Loss function for each subtask; For the first The learnable uncertainty parameters corresponding to each subtask; For the first Adaptive weighting coefficients for the loss of each subtask; This is a regularization term used to suppress excessively large uncertain parameters and ensure training stability.
7. A substation instrument intelligent identification system based on a multi-scale attention mechanism, characterized in that, The system comprising the steps of applying the method according to any one of claims 1 to 6, wherein the system includes: The adaptive enhancement module is configured to perform the following process: preprocess the input image using the illumination adaptive enhancement module, estimate the illumination level of the image, adaptively predict the Gamma value based on the illumination level, perform Gamma correction on the image, use adaptive CLAHE to limit the contrast adaptive histogram equalization enhancement for dark images, and output the illumination-normalized image. The EMA attention module is configured to perform the following process: integrate the EMA attention mechanism into the backbone network, extract features from the input image through a deep convolutional neural network, enhance feature representation using multi-scale convolution, channel attention, and spatial attention, and output a multi-scale feature pyramid. The detection module is configured to perform the following process: It performs three parallel detections on the extracted multi-scale features. The first type is indicator light detection, which determines the position of the indicator light, identifies its color as red or green, and its status as constantly on or off. The second type is digital meter detection, which detects the position of the digital meter, recognizes and displays the digits using OCR, and outputs the reading. The third type is pointer meter detection, which detects the position of the pointer meter, predicts the pointer angle using an angle regression network, predicts the scale range, and calculates the reading. The output module is configured to perform the following process: perform non-maximum suppression (NMS) post-processing on the multi-task detection results, filter low-confidence predictions, and output detection results in a uniform format, including target category, location, reading, and confidence information.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the computer program is executed, it implements the steps of the method as described in any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, The computer program is configured to implement the steps of the method according to any one of claims 1 to 6 when invoked by a processor.
10. A computer program product comprising a computer program / instructions, characterized in that, When the computer program / instructions are executed by the processor, they implement the steps of the method according to any one of claims 1 to 6.