A key pressure augmentation and metadata directed SF6 pressure gauge end-to-end reading method

CN122676512APending Publication Date: 2026-09-01ANQING VOCATIONAL & TECHN COLLEGE
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610548070.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-04-23
Publication Date
2026-09-01

AI Technical Summary

Technical Problem

现有技术中,很多方法仅依赖图像本身进行统一建模,未能有效利用量程上下限等物理先验信息,导致不同量程条件下的读数映射关系难以统一刻画,影响模型的泛化能力与稳定性

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122676512A_ABST
    Figure CN122676512A_ABST
Patent Text Reader

Abstract

This invention discloses an end-to-end reading method for SF6 pressure gauges based on key pressure enhancement and metadata guidance, belonging to the fields of intelligent instrument recognition and computer vision technology. The method acquires images of the SF6 pressure gauge and metadata about its upper and lower range limits. After image preprocessing, targeted enhancement is performed on samples in key pressure ranges. The images are input into a visual feature extraction network, and modulation parameters are generated using the range metadata to guide the modulation of the visual features. Subsequently, a normalized reading is output, and the physical reading is recovered. During training, a loss function with higher weights for key pressure ranges is constructed. This method can improve the reading accuracy of SF6 pressure gauges in key pressure areas, their cross-range generalization ability, and their robustness in complex scenarios.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of intelligent instrument recognition, computer vision, and deep learning technologies, specifically to a method for end-to-end reading of SF6 pressure gauges guided by key pressure enhancement and metadata. Background Technology

[0002] SF6 gas, due to its excellent insulation and arc-extinguishing properties, is widely used in gas-insulated switchgear, combined electrical appliances, and related power system equipment. The pressure state of SF6 gas directly affects the insulation level, arc-extinguishing capability, and operational safety of the equipment; therefore, accurate monitoring of SF6 gas pressure is of significant engineering importance. In practical applications, SF6 gas pressure gauges are commonly used to reflect pressure changes inside the gas chamber. When the pressure value falls below a preset threshold, the equipment may trigger alarms, lockouts, or protection logic; therefore, ensuring the accuracy of readings in critical low-pressure areas is particularly crucial.

[0003] In existing technologies, automatic reading methods for pointer-type instruments mainly include traditional image processing methods and deep learning-based methods. Traditional image processing methods typically estimate the pointer position and calculate the reading through edge detection, circle detection, scale segmentation, and geometric fitting. However, these methods are sensitive to changes in shooting angle, lighting conditions, occlusion, reflection, and dial structure, and have limited robustness in complex industrial environments. In recent years, instrument reading methods based on convolutional neural networks have improved adaptability to complex environments by automatically learning features from images and directly regressing the reading.

[0004] However, existing deep learning-based instrument reading methods still have the following shortcomings when applied to SF6 gas pressure gauges: First, SF6 gas pressure gauges have distinct structural features. Some SF6 gas pressure gauges have a non-planar recessed layout for the pointer relative to the dial, and the central area of ​​the dial has a hollow structure or partial obstruction. This can easily cause reflections, shadows, reduced contrast, and local blurring, resulting in insufficient saliency of the pointer edges and making it difficult to extract visual features.

[0005] Secondly, existing models are typically trained with the goal of minimizing the average error across the entire measurement range, making it difficult to simultaneously address the high accuracy requirements of critical low-pressure regions. For SF6 gas pressure gauges, low-pressure regions often correspond to the vicinity of equipment warning, alarm, or lockout thresholds, where the error tolerance is significantly lower than in other measurement ranges. If the model only pursues overall average accuracy, it may still produce unacceptable local errors in critical low-pressure regions, even with a relatively good overall evaluation index.

[0006] Third, SF6 gas pressure gauges in actual engineering applications have different upper and lower limits for their measuring ranges. In instruments with different ranges, the same pointer geometric position may correspond to different physical readings. In existing technologies, many methods rely solely on the image itself for unified modeling, failing to effectively utilize prior physical information such as the upper and lower limits of the measuring range. This makes it difficult to uniformly characterize the reading mapping relationship under different measuring range conditions, affecting the model's generalization ability and stability.

[0007] Fourth, although existing technologies include data augmentation, conditional modulation, and weighted loss, these are usually used as general-purpose technology modules and lack a collaborative optimization mechanism to address the specific technical problem of high-precision readings in the low-pressure key area of ​​SF6 gas pressure gauges. This makes it difficult to form a closed-loop improvement from the three levels of training sample distribution, feature representation, and optimization objectives.

[0008] Therefore, it is necessary to propose an identification scheme that addresses the special structure of SF6 gas pressure gauges, the differences in mapping between different ranges, and the need for high-precision readings in key low-pressure areas, in order to improve the identification accuracy, robustness, and engineering applicability in complex industrial scenarios. Summary of the Invention

[0009] (a) Technical problems to be solved To address the shortcomings of existing technologies, this invention provides an end-to-end reading method for SF6 pressure gauges guided by key pressure enhancement and metadata. Addressing specific technical issues such as the non-planar concave pointer, hollow dial, mapping differences across different ranges, and the sensitivity of low-pressure key areas to errors in SF6 gas pressure gauges, this invention employs a collaborative design approach from three levels: training sample distribution optimization, feature representation enhancement, and loss target constraint. This improves overall reading accuracy, low-pressure key area identification accuracy, and cross-range generalization capability.

[0010] (II) Technical Solution To achieve the above objectives, the present invention provides the following technical solution: a multi-source collaborative identification method for high-precision readings of low-pressure critical areas of SF6 gas pressure gauges, comprising the following steps: Step 1: Data Acquisition and Preprocessing Acquire an image of the SF6 gas pressure gauge to be identified and corresponding range metadata, wherein the range metadata includes at least a lower range limit and a higher range limit.

[0011] The pressure gauge image is preprocessed, and the preprocessing includes at least one or more of the following: dial area positioning, image cropping, size normalization, and pixel normalization.

[0012] In some implementations, dial area localization can be achieved through manual bounding boxes, traditional circle detection algorithms, object detection networks, or segmentation networks. The input size after image normalization can be set to 224x224, 256x256, or other sizes suitable for neural network processing.

[0013] Step 2: Construction of Normalized Readings The physical readings corresponding to the sample are normalized. Let the actual physical reading of the sample be y, the lower limit of the range be mmin, and the upper limit of the range be mmax. Then the normalized reading yn can be expressed as: yn = y minus mmin, then divide by mmax minus mmin.

[0014] Here, yn satisfies the value within the interval of 0 to 1. Through this processing, instrument samples of different ranges are mapped to a unified reading space, which is beneficial for cross-range training and modeling.

[0015] Step 3: Construction of Low-Pressure Critical Enhancement Samples During the model training phase, a critical pressure enhancement strategy is implemented for samples whose normalized readings are lower than the preset low-pressure threshold tau, generating low-pressure critical enhancement samples.

[0016] Preferably, the low-pressure threshold tau can be any value between 0.15 and 0.35, and more preferably 0.20, 0.25 or 0.30.

[0017] The critical pressure enhancement strategy is used to simulate the visual degradation phenomenon commonly seen in SF6 gas pressure gauges under critical low-pressure conditions, and includes at least one or more of the following: Contrast degradation; Local blurring; Directional shadowing perturbation; Small-angle rotational disturbance; Pointer neighborhood noise injection; Localized brightness unevenness disturbance.

[0018] In some embodiments, the contrast attenuation coefficient may be set to 0.6 to 0.95; The rotation angle range can be set from -5 degrees to +5 degrees; The size of the fuzzy kernel can be set to 3 to 7; The noise intensity can be set to 0.005 to 0.03; The shadow coverage ratio can be set to 5% to 25% of the effective image area.

[0019] Unlike performing uniform random augmentation on all samples, this invention performs controlled augmentation only on samples in key low-pressure areas, matching the target operating conditions. This improves the distribution of key samples and enables the model to achieve a more stable visual adaptation to low-pressure critical states.

[0020] Step 4: Multi-layer visual feature extraction The preprocessed image is input into a visual feature extraction network to obtain visual features at multiple levels.

[0021] In some implementations, the visual feature extraction network may be EfficientNet-B4; in other implementations, it may be ResNet, MobileNet, ConvNeXt or other neural network structures with multi-scale feature extraction capabilities.

[0022] Suppose that the visual feature extraction network outputs L layers of feature maps, and denote the l-th layer feature map as Fl, where l is an integer from 1 to L.

[0023] Step 5: Range metadata encoding The lower limit value mmin and the upper limit value mmax of the measurement range are used to form a metadata vector M, which is then input into the metadata encoding module for encoding to obtain modulation parameters corresponding to at least one level of visual features.

[0024] The metadata vector can be represented as: M=[mmin,mmax] The metadata encoding module can adopt a multilayer perceptron structure. Let the encoding function be E, then: Pl=E_l(M) Where Pl represents the set of parameters used to modulate the visual features of the l-th layer.

[0025] In some implementations, the parameter set P1 includes at least the scale modulation parameter gamma_l and the bias modulation parameter beta_l, wherein the dimensions of gamma_l and beta_l may be consistent with the number of channels of the corresponding feature map, or may be matched with the corresponding feature map via a broadcast mechanism.

[0026] Step Six: Multi-layer Residual Metadata-Guided Modulation The modulation parameters obtained in step five are applied to at least one level of visual feature map to perform metadata-guided modulation of the visual features.

[0027] For the feature map Fl of the l-th layer, its modulated feature map F'l can be represented as: F'l = Fl multiplied by 1 plus gamma_l, then plus beta_l.

[0028] Where gamma_l represents the scale modulation parameter generated based on the range metadata, and beta_l represents the bias modulation parameter generated based on the range metadata.

[0029] This invention employs a residual modulation method that includes "1 plus gamma_l" instead of a pure overlay modulation that directly multiplies gamma_l by Fl. The reason for this is that the pointer of the SF6 gas pressure gauge has features such as low contrast, non-planar concavity, and weak edges in some scenarios. If overlay modulation is directly used, it may weaken the already weak effective information in the original visual features. By preserving the core of the original features, the range prior can be gradually embedded into the visual expression, enhancing the reading mapping constraint without destroying the original weak pointer cues.

[0030] Preferably, metadata-guided modulation can be applied to feature maps at multiple levels, so that range priors can simultaneously participate in shallow local texture representation, mid-level structural representation, and deep semantic representation, thereby improving the modeling stability of the "pointer position-range range-physical reading" mapping under cross-range conditions.

[0031] Step 7: Reading Prediction The modulated features are input into the regression prediction module, which outputs the predicted normalized reading yhat_n.

[0032] Then, the corresponding physical reading yhat is recovered based on the range metadata, and its calculation method is as follows: yhat = yhat_n multiplied by mmax minus mmin, then added to mmin.

[0033] In some implementations, the regression prediction module may include a global average pooling layer and a fully connected regression layer; in other implementations, a convolutional regression head, an attention regression head, or an equivalent prediction structure may be used.

[0034] Step 8: Adaptive Penalized Loss Construction and Model Training During the training phase, an adaptive penalty loss function oriented towards low-pressure critical regions is used to optimize the model.

[0035] Let the basic regression loss be Lbase, preferably the mean absolute error loss, which can be expressed as: Lbase = absolute value yhat_n minus yn.

[0036] To enhance training intensity in the low-pressure critical region, a sample weight function w(yn) is constructed. In one implementation, if yn is less than or equal to tau, a higher weight is assigned; if yn is greater than tau, the base weight is used. The weight function can be expressed as: When yn is less than or equal to tau, w(yn) = 1 plus lambda multiplied by tau minus yn and then divided by tau; When yn is greater than tau, w(yn) = 1.

[0037] Wherein, lambda is the penalty coefficient, preferably ranging from 0.5 to 10.

[0038] Therefore, the adaptive penalty loss Lapl can be expressed as: Lapl = w(yn) multiplied by Lbase.

[0039] Under batch training conditions, the total loss L can be expressed as the mean of all samples Lapl, or by adding regularization loss on top of Lapl.

[0040] The aforementioned weighting function allows samples closer to the low-pressure critical region to receive larger optimized weights. Compared with a simple fixed weighting method, this can improve the accuracy of the critical region while reducing the risk of training oscillations.

[0041] An SF6 pressure gauge end-to-end reading system includes: The image acquisition module is used to acquire images of SF6 pressure gauges; Metadata acquisition module, used to acquire range metadata corresponding to the SF6 pressure gauge image; The preprocessing module is used to preprocess the SF6 pressure gauge image; The critical stress enhancement module is used to perform enhancement processing on samples in critical stress intervals during the training phase; The feature extraction module is used to extract visual feature representations; Metadata encoding module, used to generate modulation parameters based on the range metadata; The feature modulation module is used to perform metadata-guided modulation on the visual feature representation based on the modulation parameters; The reading prediction module is used to output the predicted normalized reading and recover the predicted physical reading; The training module is used to train the model based on a loss function weighted for key stress intervals; The system is configured to perform the method according to any one of claims 1 to 8.

[0042] An electronic device or computer-readable storage medium includes a memory and a processor, wherein the memory stores a computer program that, when executed by the processor, uses the method described above.

[0043] (III) Beneficial Effects Compared with existing technologies, this invention provides a method for end-to-end reading of SF6 pressure gauges guided by key pressure enhancement and metadata, which has the following beneficial effects: 1. Dedicated optimization for specific industrial applications This invention is designed for the specific industrial application of SF6 gas pressure gauges, rather than for general instrument identification. It is specifically designed to address the characteristics of SF6 gas pressure gauges, such as non-planar concave pointers, hollow dials, and high sensitivity of readings in critical low-pressure areas. The technical problems are clearly defined and the invention has strong engineering adaptability.

[0044] 2. Improve the distribution of key low-pressure samples By performing critical pressure enhancement matching the target operating condition only on samples in the low-pressure critical region, this invention can more effectively simulate the real visual degradation distribution under low-pressure critical conditions, improving the model's adaptability and robustness to critical operating conditions.

[0045] 3. Enhance the ability to model cross-range reading mapping. By introducing the upper and lower limits of the measurement range as physical prior information into the visual feature modeling process, this invention enables the mapping relationship of readings of instruments with different ranges to no longer depend solely on image geometric features, but to explicitly integrate range constraints at the feature level, thereby improving the generalization ability and consistency of the model under different range conditions.

[0046] 4. Retain weak pointer characteristics and enhance discrimination ability By employing multi-layer residual metadata-guided modulation, this invention enhances the reading mapping constraint using range metadata while preserving the original visual feature backbone, avoiding the damage to weak pointer features caused by direct overlay modulation, thus making it more suitable for reading recognition of low-contrast, weak-edge pointers in SF6 gas pressure gauges.

[0047] 5. Improve the accuracy of identifying key low-voltage areas. By constructing an adaptive penalty loss for low-pressure critical regions, this invention enables the model training process to allocate more optimization capabilities to the more engineering-sensitive low-pressure critical regions, significantly reducing local errors in low-pressure critical regions while ensuring overall accuracy.

[0048] 6. Construct a collaborative closed loop between the data layer, feature layer, and target layer. The low-pressure critical enhancement strategy, range metadata-guided modulation, and adaptive penalty loss in this invention are not simply a superposition of conventional modules, but rather act on three levels: training sample distribution, visual feature representation, and training target constraints, respectively, forming a synergistic closed loop around the same technical problem, and achieving a comprehensive technical effect that is superior to using any one module in isolation. Attached Figure Description

[0049] Figure 1 This is a schematic diagram of the overall method flow provided in one embodiment of the present invention; Figure 2 This is a schematic diagram of a low-pressure critical enhancement strategy provided in one embodiment of the present invention; Figure 3This is a schematic diagram of the range metadata encoding and multi-layer residual modulation structure provided in one embodiment of the present invention; Figure 4 This is a schematic diagram of a reading prediction process provided in one embodiment of the present invention; Figure 5 This is a schematic diagram of the adaptive penalty loss construction provided in one embodiment of the present invention; Figure 6 This is a schematic diagram illustrating the collaborative relationship between the data layer, feature layer, and target layer according to an embodiment of the present invention; Figure 7 This is a schematic diagram of the system structure provided in one embodiment of the present invention; Figure 8 This is the MGCM-Net network structure of the present invention; Figure 9 This describes the application effects of the various enhancement components of the CPA in this invention; Figure 10 This is the MGM multi-level modulation process of the present invention; Figure 11 This is the working mechanism of the APL loss function in this invention; Figure 12 This is an example of the SF6 gas pressure gauge dataset of the present invention; Figure 13 This is a comparison of the training loss curves of the present invention; Figure 14 This is a comparison diagram of the module structure of the present invention; Figure 15 This is an experimental sample for the reading accuracy of the present invention. Detailed Implementation

[0050] To better understand the purpose, structure, and function of this invention, the following detailed description, in conjunction with the accompanying drawings, provides a method for end-to-end reading of SF6 pressure gauges guided by key pressure enhancement and metadata.

[0051] Please see Figure 1-15 This invention: Example 1: Method Example This embodiment provides a multi-source collaborative identification method for high-precision readings of key low-pressure areas of SF6 gas pressure gauges, the process of which is as follows: Figure 1 As shown, it includes the following steps: S101: Acquiring Image and Metadata Images of SF6 gas pressure gauges are acquired, and the corresponding physical readings, lower limit (mmin), and upper limit (mmax) are obtained for each image. Images can be sourced from substation field inspection terminals, fixed camera devices, experimental platforms, or historical databases.

[0052] Preferably, the image acquisition conditions include different shooting angles, different lighting conditions, different dial contamination levels, and different range models, in order to improve the diversity of training samples.

[0053] S102: Image Preprocessing The dial area is located and cropped from the image to obtain a dial image containing the main reading area. The cropped image is then resized and normalized in pixels.

[0054] In some implementations, dial positioning can be achieved using a target detection network; in other implementations, Hough circle detection and geometric constraints can be used for initial positioning.

[0055] S103: Reading Normalization Calculate the normalized reading yn based on the actual physical reading and the upper and lower limits of the range.

[0056] When mmax is greater than mmin, the following formula is used: yn = y minus mmin, then divide by mmax minus mmin.

[0057] If a sampling error causes the reading to slightly exceed the range boundary, the yn can be limited to between 0 and 1 through a truncation mechanism.

[0058] S104: Low-voltage key sample identification and enhancement Set a low-pressure threshold tau. If the normalized reading yn of a sample is less than or equal to tau, the sample is identified as a critical low-pressure sample and a critical pressure enhancement strategy is executed; if yn is greater than tau, basic enhancement may be performed or no enhancement may be performed.

[0059] In a preferred embodiment, tau is 0.25.

[0060] For low-pressure critical samples, select one or more combinations of the following enhancement operations to perform: Contrast scaling; Gaussian blur; Small angle rotation; Local shadow overlay; Pointer neighborhood noise injection; Brightness disturbance in the central region.

[0061] Let the input image be X, and the enhanced image be Xaug. The enhancement described above can be written as: Xaug=A(X,p) Where A represents the critical pressure enhancement operator, and p represents the set of enhancement parameters.

[0062] The parameter set is preferably limited to a small perturbation range to ensure that the enhanced image retains the semantics of the original readings.

[0063] S105: Visual Feature Extraction The preprocessed image is input into the feature extraction network to obtain feature maps at multiple levels.

[0064] Taking the four-layer feature output as an example, it can be denoted as F1, F2, F3 and F4.

[0065] Among them, shallow features are more inclined to represent edges, textures and local contours, while mid-to-high-level features are more inclined to represent structural relationships and global semantics.

[0066] Considering that the pointer of the SF6 gas pressure gauge may have weak edges and local obstruction, this embodiment preferably selects at least the middle layer and high layer features for subsequent modulation.

[0067] S106: Range metadata encoding The metadata vector M, consisting of the upper and lower limits of the measurement range, is input into the metadata encoding network.

[0068] Let M = [mmin, mmax].

[0069] The metadata encoding network outputs modulation parameters for different levels of features: gamma_l, beta_l = G_l(M) Where G_l represents the coding mapping function corresponding to the l-th layer, and gamma_l and beta_l represent the scale modulation parameter and the bias modulation parameter, respectively.

[0070] In one implementation, the metadata encoding network includes two or three fully connected layers, each followed by a non-linear activation function.

[0071] S107: Multilayer residual metadata-guided modulation Perform metadata-guided modulation on the selected hierarchical features.

[0072] For the feature map Fl of the l-th layer, the modulated feature map F'l is: F'l = Fl multiplied by 1 plus gamma_l, then plus beta_l.

[0073] If gamma_l and beta_l are channel vectors, they can be extended to the same spatial dimension as Fl through the channel broadcasting mechanism.

[0074] Compared to the approach of concatenating metadata into the prediction head before performing regression, this embodiment introduces range priors into the feature expression stage, enabling the model to establish range constraints during the visual encoding stage, which helps to suppress mapping confusion caused by different ranges.

[0075] S108: Reading Prediction The modulated high-level features are input into the regression prediction module to obtain the predicted normalized reading yhat_n.

[0076] Then, the physical reading yhat is recovered based on the upper and lower limits of the measurement range: yhat = yhat_n multiplied by mmax minus mmin, then added to mmin.

[0077] S109: Construct the adaptive penalized loss and train. Define the basic loss as: Lbase = absolute value yhat_n minus yn.

[0078] The weighting function for the low-pressure critical area is defined as follows: If yn is less than or equal to tau, then w(yn) = 1 plus lambda multiplied by tau minus yn then divided by tau; If yn is greater than tau, then w(yn)=1.

[0079] Therefore, the total sample loss is: Lapl = w(yn) multiplied by the absolute value yhat_n minus yn.

[0080] In mini-batch training, the total loss is the average of Lapl values ​​for each sample. If necessary, L2 regularization or other stable training terms can be added.

[0081] In this embodiment, lambda can be 2.0, 4.0, 6.0, or 8.0. A larger lambda helps to strengthen the optimization of low-pressure critical regions, but too large a lambda may lead to overall training instability. Therefore, it is preferable to select parameters using a validation set.

[0082] S110: Model Deployment After training, the model is deployed on edge computing devices, inspection terminals, servers, or integrated online monitoring systems to automatically read the SF6 gas pressure gauge images acquired in real time.

[0083] Example 2: Multi-module collaborative mechanism example This embodiment is used to illustrate the synergistic relationship between the various technical features of the present invention.

[0084] In existing technologies, data augmentation, metadata input, and loss weighting are often used as independent optimization techniques, making it difficult to ensure that they collectively serve the same technical problem. This invention, however, focuses on a collaborative design centered on the specific objective of "high-precision readings of the low-pressure critical area of ​​SF6 gas pressure gauges." First, the low-pressure critical enhancement strategy starts from the training sample distribution level, so that the samples in the low-pressure key area are more fully exposed to complex visual disturbances during the training process, thus alleviating the problem of insufficient or monotonous distribution of low-pressure operating condition samples.

[0085] Second, range metadata-guided modulation starts from the feature expression level, allowing the reading mapping constraints of different range instruments to directly participate in the construction of visual features, rather than only performing post-complementary fusion at the final prediction end, thereby improving the consistency of cross-range reading mapping.

[0086] Third, the adaptive penalty loss starts from the training objective level, which makes the model impose stronger constraints on the low-pressure key area samples during the gradient optimization process, thereby improving the regression accuracy of key operating conditions.

[0087] The technical features at these three levels respectively affect the input distribution, feature representation, and objective function, and collectively address the same technical problem, forming a synergistic closed loop of the data layer, feature layer, and objective layer. Therefore, this invention is not a simple stacking of general technical modules, but rather a holistic technical solution with a clear problem orientation and synergistic effect.

[0088] Example 3: System Example like Figure 7 As shown, the present invention also provides an identification system for high-precision readings of critical low-pressure areas of SF6 gas pressure gauges, comprising: The image acquisition module is used to acquire images of SF6 gas pressure gauges; The metadata acquisition module is used to acquire the lower limit value and upper limit value of the measurement range corresponding to the image. The preprocessing module is used to perform dial positioning, cropping, size normalization, and pixel normalization on the image; The low-pressure critical enhancement module is used to perform critical pressure enhancement on low-pressure key samples during the training phase. The feature extraction module is used to extract multi-layer visual features; Metadata encoding module, used to generate modulation parameters based on range metadata; The feature modulation module is used to perform residual metadata-guided modulation on at least one level of visual features; The reading prediction module is used to output normalized readings and / or physical readings; The training optimization module is used to train the recognition model based on adaptive penalty loss.

[0089] Each module of the above system can be implemented by hardware circuits, by a processor executing program instructions stored in memory, or by a combination of hardware and software.

[0090] Example 4: Electronic Device Example The present invention also provides an electronic device, including a processor, a memory, a communication interface and a bus, wherein the memory stores a computer program, and when the computer program is executed by the processor, the electronic device performs the steps of the method described in any of the foregoing embodiments.

[0091] The electronic device may be a server, industrial gateway, edge computing terminal, inspection robot, handheld inspection device, industrial control computer or other computing device with image processing capabilities.

[0092] Example 5: Storage Medium Example The present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method described in any of the foregoing embodiments.

[0093] The computer-readable storage medium may be a read-only memory, random access memory, disk, optical disk, flash memory, solid-state drive, or other tangible medium capable of storing program code.

[0094] Detailed description of optional implementation methods and variations It should be noted that, in order to enable the present invention to have better adaptability to different application scenarios, different hardware conditions, and different data distribution conditions, each component module and processing step of the present invention can be appropriately replaced, extended, or modified without departing from the core concept of the present invention. As long as the relevant modifications still revolve around the overall concept of "guiding and constraining the SF6 gas pressure gauge reading process based on physical prior information, and improving reading accuracy through directional optimization of low-pressure key areas", they should all be considered to fall within the protection scope of the present invention.

[0095] The following provides a more detailed explanation of several typical deformation methods.

[0096] I. Alternative Implementation Methods for Visual Feature Extraction Networks In the foregoing embodiments, the visual feature extraction network can preferably be implemented using EfficientNet-B4, because this network achieves a good balance between parameter size, inference efficiency, and multi-scale feature representation capability, making it suitable for applications in industrial scenarios where edge deployment and accuracy requirements coexist. However, the present invention is not limited to using EfficientNet-B4.

[0097] As long as the network structure used can extract hierarchical visual features from the input SF6 gas pressure gauge image, especially if it can simultaneously retain shallow texture edge information, mid-level structural contour information and deep semantic representation information, and support subsequent metadata modulation or reading regression processing, it can be used as an alternative implementation of the visual feature extraction network in this invention.

[0098] In some alternative implementations, the visual feature extraction network may employ one of the following convolutional neural networks: ResNet series networks; DenseNet series networks; MobileNet series networks; ShuffleNet series networks; ConvNeXt series networks; RegNet series networks; CSPNet series networks; Other convolutional neural networks with hierarchical feature extraction capabilities.

[0099] For example, when the actual deployment environment has high requirements for model inference speed and storage overhead, lightweight networks such as MobileNet or ShuffleNet can be selected to reduce computational complexity and equipment deployment costs; when the application scenario emphasizes recognition accuracy and the ability to express complex features, network structures with strong representation capabilities such as ResNet, DenseNet or ConvNeXt can be selected.

[0100] In other embodiments, the visual feature extraction network may also employ a hybrid network structure combining convolution and attention mechanisms. For example, channel attention, spatial attention, coordinate attention, or local self-attention modules can be introduced into some layers of the convolutional backbone network to enhance the model's responsiveness to pointer regions, scale regions, and central structural regions. As long as the network as a whole still possesses multi-level feature output capabilities and can be used in conjunction with the metadata-guided modulation module in this invention, it constitutes an equivalent alternative implementation of this invention.

[0101] In a further embodiment, the visual feature extraction network may also employ VisionTransformer, SwingTransformer, PVT, or other Transformer-like structures capable of generating hierarchical visual representations. Because Transformer structures are advantageous in long-range dependency modeling and global relation representation, they can be used to capture global relationships between pointers and scales, and between scales and measurement ranges. In this embodiment, the hierarchical features, patch features, or fused features output by the Transformer can be used as input for subsequent metadata modulation and reading prediction.

[0102] It should be noted that the key to this invention does not lie in limiting itself to a specific backbone network, but rather in: on the one hand, extracting a multi-level visual representation suitable for characterizing the pointer position, scale structure, and local differences of the dial of an SF6 gas pressure gauge through a visual feature extraction network; on the other hand, enabling this visual representation to accept guided modulation from range metadata or other physical priors, and serving the specific technical goal of high-precision readings in key low-pressure areas. Therefore, as long as the replaced network can achieve the above functions and is compatible with the subsequent modulation, regression, and loss optimization processes of this invention, it should be considered an equivalent variation of this invention in terms of visual feature extraction networks.

[0103] II. Extended Implementation Methods for Range Metadata Content In the foregoing embodiments, the metadata mainly includes the lower and upper limits of the measurement range. This is because the upper and lower limits directly determine the mapping boundary from the geometric position of the pointer to the physical reading, and are the most basic and stable prior physical information. However, in actual industrial scenarios, in addition to the upper and lower limits, there are other prior information that can affect the reading mapping relationship or the interpretation of auxiliary features. Therefore, the metadata in this invention is not limited to the upper and lower limits of the measurement range, and can be extended to a richer set of prior physical information according to specific application conditions.

[0104] Different models of SF6 gas pressure gauges may differ in dial layout, scale density, pointer length, central structure, casing material, and font printing. Even with the same measurement range, the visual appearance and reading mapping details of different models may vary. Therefore, in some implementations, the instrument model can be encoded as a discrete category identifier or embedded vector, and used together with the upper and lower limits of the measurement range as metadata input to the encoding module. By introducing model parameters, the model can further learn the differences in geometric layout and visual representation among different instrument models, thereby improving the stability of cross-model recognition.

[0105] Some pressure gauges do not employ a completely uniform visual layout across their measurement ranges; the scale density, warning color bands, and functional area divisions may differ between different range segments. For example, low-pressure areas may use color markings, high-density scales, or special partitions to emphasize their engineering importance. In such cases, scale partition parameters can be included in the metadata. These parameters may include, but are not limited to: the start and end positions of the low-pressure critical area, the boundaries of the color-coded warning intervals, the distribution ratio of different scale segments, the number of scale partitions, and the scale spacing mapping rules. By introducing scale partition parameters, the model can more accurately understand the reading sensitivity and geometric relationships corresponding to different locations during the feature representation stage, thereby helping to improve the regression accuracy of critical intervals.

[0106] In practical applications, pressure gauges may use different units, such as MPa, kPa, and bar. Although different units can be standardized through conversion relationships, differences in range marking methods, character layouts, and display habits may exist under different units during actual deployment. Therefore, in some implementations, the unit type can be included as part of the metadata, input into the metadata encoding module in the form of discrete encoding, one-hot encoding, or embedded vectors. This allows the model to obtain additional semantic priors during the visual feature modulation stage, helping to reduce reading interpretation bias caused by unit differences.

[0107] Pressure gauges from different manufacturers or production batches may exhibit systematic differences in material reflectivity, font printing style, pointer color, scale thickness, and central axis structure. While these differences may not directly alter the reading mapping formula, they do affect the distribution of visual features. Therefore, in some implementations, information such as manufacturer codes, production batch codes, and serial numbers can be further incorporated as metadata input. This type of information can be mapped into vectors through an embedding layer and then encoded together with the range parameters to help the model better distinguish visual patterns under different manufacturing styles.

[0108] In addition to the parameters mentioned above, any information that can reflect or assist in reflecting the mapping, structural, or constraint relationships between visual images and physical readings can, in principle, be used as extended metadata in this invention. Examples include: dial diameter parameters, pointer effective length parameters, installation tilt angle parameters, instrument usage scenario category, ambient temperature correction parameters, and pressure gauge status category parameters.

[0109] In practical implementation, the extended metadata can be encoded using one or more of the following methods: numerical parameters are directly normalized and input; categorical parameters are encoded using one-hot encoding; categorical parameters are mapped to dense vectors through an embedding layer; different types of parameters are concatenated and input into a unified encoding network; different types of parameters are encoded separately and then fused. As long as its ultimate function is still to provide physical prior constraints for visual feature representation or reading regression, it should be considered an equivalent implementation of the metadata extension of this invention.

[0110] III. Alternative Implementation Methods for the Basic Form of Adaptive Penalized Loss In the foregoing, the mean absolute error (MAE) loss is preferably used as the base loss for the adaptive penalty loss because it is robust to outliers and is easy to interpret and optimize in regression scenarios. However, the core of this invention is not that MAE must be used as the sole base loss, but rather that higher optimization weights are assigned to samples in low-pressure critical regions, so that the training process achieves a more engineering-compliant balance between overall accuracy and critical region accuracy.

[0111] Therefore, the basic regression loss in this invention can take many forms. As long as it can be combined with the low-pressure critical region weighting mechanism, it belongs to the alternative implementation of this invention.

[0112] In some implementations, the base loss can be Huber loss. Huber loss exhibits squared error when the error is small and absolute error when the error is large, combining the smoothness of squared loss with the robustness of absolute error loss. For samples with minor annotation errors, image anomalies, or extreme visual perturbations, using Huber loss can maintain stable training while preventing abnormal samples from having an excessive impact on the overall optimization process. Combining Huber loss with adaptive weights for low-pressure critical regions can further improve the robustness of the training process.

[0113] In other implementations, the base loss can be a smoothed L1 loss. The smoothed L1 loss is similar in nature to the Huber loss, maintaining continuous differentiability when the error is small and reducing the risk of gradient explosion when the error is large, making it suitable for industrial regression tasks requiring stable optimization. When applying the smoothed L1 loss to this invention, the samples can also be weighted according to the normalized reading positions to highlight the importance of key low-pressure regions.

[0114] In some implementation scenarios that are more sensitive to large errors, mean squared error (MSE) loss can also be used as the base loss. MSE penalizes large-biased samples more strongly, and when data labeling is relatively accurate and outliers are few, it helps to quickly converge to a higher-precision region. However, in practical applications, if the number of samples in the low-pressure critical region is limited or individual samples have high noise, MSE may cause the training process to be significantly affected by outliers. Therefore, when using MSE, it can be used in conjunction with weight truncation, gradient clipping, or robust training strategies.

[0115] In a further implementation, the basic loss can also be a composite form consisting of multiple losses. Examples include: a weighted combination of mean absolute error and mean squared error; a combination of Huber loss and structural constraint loss; a combination of basic reading loss and ranking loss; and a combination of basic regression loss and physical consistency loss. The physical consistency loss can be used to constrain the prediction results to be consistent with range boundaries, scale partitioning rules, or other prior logic.

[0116] It should be noted that regardless of the underlying regression loss used, the essence of this invention remains the same: by introducing an adaptive weighting mechanism related to the low-pressure critical region, different samples obtain optimization strength commensurate with their engineering importance in the training objective. Therefore, any loss function form that can achieve this purpose should be considered an equivalent alternative to this invention in terms of loss function.

[0117] IV. Adjustable Implementation Methods for Low-Pressure Critical Enhancement Strategies In the foregoing embodiments, the low-voltage critical enhancement strategy includes enhancement operations such as contrast attenuation, local blurring, shadow perturbation, small-angle rotation, noise injection, and local brightness unevenness, used to simulate common visual degradation phenomena in low-voltage critical areas in actual industrial environments. It should be noted that the present invention is not limited to fixed enhancement types and fixed parameter ranges.

[0118] In actual deployments, due to differences in the type of data acquisition equipment, lens parameters, on-site lighting conditions, dial material, housing reflectivity, installation location, and inspection methods, the visual degradation patterns in low-pressure critical areas will also vary. Therefore, the critical pressure enhancement strategy in this invention can be adaptively adjusted according to actual application conditions.

[0119] Different acquisition devices vary in resolution, dynamic range, exposure strategies, noise levels, and lens distortion. For example, low-light industrial cameras may be more prone to noise enhancement and localized underexposure; mobile terminal cameras may be more prone to motion blur and compression artifacts; and fixed surveillance cameras may suffer from insufficient resolution and skewed viewing angles. In such cases, enhancement strategies can be adjusted accordingly, such as by adding compression noise simulation, exposure perturbation, motion blur, or perspective distortion perturbation, to make the training samples more closely resemble actual imaging conditions.

[0120] Lighting conditions vary significantly across different substations, switchgear locations, and indoor / outdoor inspection scenarios, potentially manifesting as strong light reflection, localized shadow occlusion, low-illuminance backgrounds, color temperature variations, and lighting flicker. Therefore, some implementations enhance lighting-related simulation types, such as stronger brightness jitter, color temperature shifts, non-uniform lighting overlay, directional highlight area simulation, and localized shadow area expansion. These adjustments improve the model's robustness to actual lighting variations.

[0121] Pressure gauges from different manufacturers and models use different materials for their dial panels, protective glass, and pointer coatings. For example, some dial surfaces are more reflective, some protective covers have scratches, and some pointers have low color contrast with the background. In such cases, enhancement strategies can be adjusted according to the material and structural characteristics, such as increasing specular reflection disturbance, increasing fine scratch masking simulation, increasing pointer edge weakening enhancement, increasing brightness gradient changes in the central area, and increasing local semi-transparent masking.

[0122] In some implementations, the enhancement parameter range can be adaptively set based on prior statistical results or the actual distribution of collected samples. For example, the brightness distribution, blur level, rotation deviation, and noise amplitude of samples in the target scene can be statistically analyzed first, and then the mean and fluctuation range of the enhancement parameters can be determined based on the statistical results. In further implementations, different enhancement strategies can be dynamically selected according to different range models, different installation locations, or different collection periods, making the enhancement process more closely resemble the real scene.

[0123] Although the enhancement type and parameter range can vary, their core purpose should not deviate from the concept of this invention, namely: to prioritize samples in low-pressure critical areas, simulate typical visual degradation factors affecting the recognition of critical readings in actual industrial applications, and improve the distribution of training samples and the robustness of the model under critical operating conditions. Therefore, any enhancement adjustment method that meets this purpose can be regarded as an equivalent variation of this invention.

[0124] V. Variations in the Position and Mode of Feature Modulation In the foregoing embodiments, the range metadata-guided modulation is preferably applied to multiple levels of visual feature maps to achieve progressive constraints on shallow textures, mid-level structures, and high-level semantics. It should be noted that the present invention is not limited to a fixed number of modulation layers and a fixed modulation position.

[0125] As long as the relevant modulation method can achieve the core objective of "guiding and constraining visual representation based on range metadata or other physical prior information", it can be regarded as an equivalent implementation of the present invention in terms of feature modulation.

[0126] In scenarios with limited implementation conditions, small model size, or high real-time requirements, metadata modulation can be performed only on a single layer of key features. For example, only high-level semantic features can be modulated, allowing range priors to directly participate in the final reading prediction. This approach has a relatively simple structure, fewer parameters, and is suitable for deployment scenarios with limited edge computing resources.

[0127] In other implementations, metadata modulation can be performed simultaneously on two or more layers among the shallow, middle, and high layers. Examples include simultaneous modulation of the middle and high layers, modulation of the output features of all backbone stages, and modulation of multiple nodes before and after feature fusion. This approach allows physical priors to participate in feature construction layer by layer, which is generally more beneficial for stable recognition and cross-range generalization in complex scenarios.

[0128] In some implementations, feature modulation does not directly apply to the original backbone output features, but rather to the intermediate representation after feature fusion. For example, after feature pyramid fusion, skip connection fusion, or multi-scale concatenation, modulation parameters are generated based on metadata to guide the fused representation. This approach is suitable for networks with feature fusion structures and can inject range prior information into the higher-level semantic space after fusion.

[0129] In the foregoing embodiments, residual affine modulation is preferred, i.e., features are adjusted through scale and bias terms. Besides this, without departing from the essence of the invention, the following modulation methods can also be used: scale-only modulation, bias-only modulation, channel-level modulation, spatial location-level modulation, combined channel and spatial modulation, gated modulation, attention-weighted modulation, and feature reweighting after generating an attention map based on prior vectors. As long as the modulation method essentially still guides and constrains the visual representation using range metadata or other physical prior information, it should be considered an equivalent variation of the invention.

[0130] In a further implementation, the modulation target may not be limited to the backbone network feature map, but may also include multi-scale fused features, vector representations after global pooling, intermediate hidden representations of the regression head, query vectors, key vectors, and value vectors in the attention module, as well as local feature representations related to the scale region and pointer region. By expanding the modulation target object, the depth and flexibility of the model's utilization of physical priors can be further enhanced.

[0131] It is important to emphasize that the key to the feature modulation in this invention does not lie in a fixed mathematical form, but rather in introducing range-dependent or physically-dependent prior information, so that visual features are no longer pure image representations completely detached from the physical properties of the instrument, but rather become task-dependent representations guided and constrained by the reading mapping law. Therefore, as long as a certain modulation method can achieve this objective, even if its specific level of action, implementation path, or parameterization form differs, it should be considered an equivalent implementation of this invention.

[0132] The following are the specific plans and experiments. The overall network structure diagram of MGCM-Net is as follows: Figure 8 As shown.

[0133] 2.1 Backbone Network The proposed solution selects EfficientNet-B4 as the backbone network to benefit from its powerful feature extraction capabilities. This network achieves a balance between model depth, width, and input resolution through a compound scaling method, resulting in significant advantages in both computational efficiency and accuracy. The network expands in a balanced manner across the three dimensions of depth, width, and resolution using a compound scaling method, achieving a good balance between computational efficiency and feature extraction capabilities. EfficientNet-B4 contains 17 learnable layers, with 7 MBConv modules employing an attention mechanism to adaptively adjust feature responses. The network input size is 224×224 pixels, and the output feature map has a spatial dimension of 7×7 and a channel dimension of 1792. This high-dimensional feature representation provides rich semantic information for subsequent metadata-guided modulation.

[0134] In the specific implementation, the global pooling layer and classification head of the original EfficientNet-B4 were removed, while retaining the entire structure from the initial convolutional layer to the final feature extraction layer. This processing enables the network to output a high-dimensional feature map F with a spatial dimension of 7×7 and a channel dimension of 1792. Its calculation process can be briefly described as follows: This feature map carries rich spatial and semantic information, such as the overall structure of the dial, the precise position of the pointer, and the details of the scale, providing an informational foundation for subsequent metadata-guided modulation. We initialize the model using weights pre-trained on the ImageNet dataset and fine-tune all backbone network parameters during training to adapt it to the specific domain of SF6 pressure gauge images. Compared with other candidate network architectures, EfficientNet-B4 demonstrates superior feature representation capabilities and robustness in the SF6 pressure gauge reading task, providing a reliable guarantee for high-precision readings of the entire system.

[0135] 2.2 Critical Pressure Enhancement Strategy (CPA) Accurate identification of the critical pressure region is of particular importance in SF6 gas pressure gauge reading tasks. This paper proposes a dedicated Critical Pressure Enhancement (CPA) strategy to address this issue. The CPA strategy effectively improves the model's robustness under critical operating conditions by applying targeted physical simulation enhancements to the low-pressure reading region (normalized value less than 0.2). The enhancement process simulates the visual characteristic changes that SF6 gas may exhibit under critical pressure conditions. When a target reading is detected to be in a low-pressure region, the system applies a dual physical effect simulation, the core operation of which can be described as a serialization transformation of the input image: Among them G σ Figure 9 A Gaussian blur kernel with a standard deviation of σ is used to simulate the fogging effect. Indicates the image A random rotation transformation (angle θ) is applied to simulate pointer jitter. The coefficient α controls the fogging intensity. First, a fogging effect is introduced, and multi-scale Gaussian blurring is used to simulate the visual attenuation caused by changes in gas density. Then, pointer jitter blurring is applied to simulate the fluctuating characteristics of the pointer reading under critical conditions. This dual enhancement mechanism ensures that the model can fully learn the feature representations of the low-pressure region.

[0136] Unlike general data augmentation, the CPA strategy has explicit physical guidance. The intensity of the fogging effect is controlled by a randomly generated circular blur kernel, whose radius and transparency parameters are set based on the statistical characteristics of the actual physical phenomenon. Pointer blur is achieved through affine transformation, with the simulated angle controlled within ±3 degrees, consistent with the observation characteristics of actual instruments under critical pressure. Furthermore, CPA complements general image transformation. In addition to applying critical pressure augmentation, the system still applies conventional degradation techniques such as rotation, tilt, blurring, or noise with a probability of 0.7, ensuring the model's generalization ability under different imaging conditions. This hierarchical augmentation design ensures both specialized optimization of key regions and balanced overall performance.

[0137] Figure 9 The effects of the various enhancement components of CPA on SF6 pressure gauge images are demonstrated. By comparing with the original image, the optimization effects of each component on the instrument's visual features can be intuitively observed, including critical pressure effects, pointer jitter, low contrast, shadow effects, blur noise, random cropping, and double distortion. These enhancement strategies collectively improve the model's reading accuracy and robustness in key pressure regions.

[0138] The CPA strategy can significantly improve the model's recognition accuracy in low-pressure regions. Through targeted physical characteristic simulation, the model can better capture subtle feature changes under critical pressure conditions, providing reliable technical support for the industrial application of SF6 gas pressure gauges.

[0139] 2.3 Metadata-Guided Modulation Module (MGM) The core innovation of MGM lies in its residual modulation design. Traditional FiLM completely overwrites the original features, while MGM preserves the original feature information through a (1+γ) term. This design is particularly suitable for reading SF6 gas pressure gauges because the low-value region features of the concave pointer are extremely weak and easily disturbed, and once lost, are difficult to recover. The MGM proposed in this paper addresses the unique structural characteristics and operating environment challenges of SF6 gas pressure gauges. This module guides visual feature extraction by using the instrument's range parameters as conditional signals, achieving adaptive perception of different pressure values ​​within the range. In traditional instrument reading models, although the range of SF6 pressure gauges is basically fixed, the unique hollow dial, concave pointer structure, and complex field environment limit the model's generalization ability. The metadata-guided modulation module introduces the instrument's minimum range value m... min and the maximum range value m max As metadata input, a unified reading perception framework was constructed, which effectively improved the model's adaptability to the special structure of SF6 pressure gauges.

[0140] Figure 10 The multi-stage modulation process of MGM is demonstrated. The entire process proceeds from left to right, including the input image and instrument metadata, which are then encoded by a metadata encoder. Simultaneously, the input image undergoes a backbone network to extract visual features. Subsequently, the encoded metadata and visual features are processed through a three-stage modulation module, with each stage including an MGM module and a residual connection. Finally, the modulated features are passed through a regression head to obtain the predicted reading.

[0141] Given an input image and the corresponding instrument range metadata The metadata encoder MGE maps metadata to a high-dimensional feature space. This encoding process is achieved through a two-layer fully connected network, where the first layer upscales the 2D metadata to a 128-dimensional space, and the second layer further maps it to a 256-dimensional feature space. In the formula and Weights and biases of the first-level linear transformation. and The weights and biases for the second-level linear transformation. This is the encoded metadata feature vector. Through two nonlinear transformations, MGE can capture the complex relationship between the range and feature modulation in the metadata.

[0142] After obtaining the encoded metadata features, the module generates scale modulation parameters through two independent linear transformations. and bias modulation parameters : in and The weight matrix is ​​a learnable matrix. This represents the number of channels in the visual feature map. For the EfficientNet-B4 backbone network, This represents the channel dimension of the final feature map. (Scale parameter) The bias parameter controls the degree of enhancement or suppression of each feature channel. Adjust the baseline activation level for each feature channel.

[0143] These modulation parameters were then applied to the visual feature maps extracted by the backbone network. ,in and Spatial dimensions of the feature map: Here This indicates a channel-wise multiplication operation, where the feature map of each channel is multiplied by the corresponding scale parameter; This indicates a channel-by-channel addition operation, where the feature map of each channel is added to its corresponding bias parameter. This modulation method allows the model to dynamically adjust the response mode of the visual features according to the specific instrument range characteristics, achieving adaptive perception of different pressure instruments. When processing instruments in low-value ranges, the module can enhance the response to subtle local changes in features; while for instruments in normal ranges, it can suppress excessive sensitivity and maintain feature stability.

[0144] In the specific implementation, a three-level modulation strategy is adopted, repeatedly applying metadata to guide modulation at multiple layers of the network, forming a deep conditional feature evolution process. Let the original visual features be... ,go through The characteristics after modulation are: Each modulation stage is based on the same metadata encoding. However, it has independent modulation parameters. Multi-level modulation enables the model to fuse metadata information at different levels of abstraction. Shallow modulation mainly affects the sensitivity of basic feature extraction, such as edges and textures, while deep modulation affects the generation of high-level semantic features, such as the accurate perception of pointer shape and position.

[0145] To maintain the integrity of the original visual information and prevent the modulation process from excessively distorting the original features, the module also introduces a residual connection mechanism: in It is a 1×1 convolutional layer used to adjust channel dimension matching. This design leverages the conditional guidance of metadata while preserving the original expressive power of visual features, ensuring that the model can maintain basic visual recognition capabilities even in the event of deviations in metadata encoding.

[0146] The MGM module modulates visual features using range metadata, enhancing the model's ability to capture subtle pointer features and mitigating the problem of indistinct visual features in recessed pointers. Simultaneously, through conditional modulation, the model can better adapt to reading deviations caused by low-contrast scenes with hollow dials. Furthermore, the introduction of this module enables the model to learn the intrinsic laws related to the range, providing a more reliable reading basis for critical functions such as alarms and interlocks, ensuring the safe and stable operation of power equipment.

[0147] 2.4 Adaptive Penalized Loss (APL) Function This paper proposes an Adaptive Penalty (APL) loss function to address the insufficient accuracy in the low-pressure region of SF6 pressure gauge readings. In SF6 pressure gauge reading tasks, even small errors in the low-pressure region can have serious consequences in practical applications; therefore, a specialized loss function is needed to enhance the optimization of these critical regions.

[0148] The APL loss function is based on the mean absolute error (MAE) and introduces a dynamic weighting mechanism related to the reading values ​​to achieve differentiated processing for different pressure regions. Given the normalized readings predicted by the model... and the true normalized reading Where i represents the sample index, and the basic loss function is defined as: Where N is the number of samples in the batch. The basic loss function treats all samples equally and fails to reflect the importance of low-value regions. To enhance attention to low-value regions, the adaptive penalty loss function introduces a critical threshold mechanism. Based on the physical characteristics of SF6 pressure gauges, regions with normalized readings below 0.2 are defined as critical low-value regions, and samples in these regions are assigned higher penalty weights. Specifically, a low-value region mask is first constructed: in This is the critical threshold. This mask is used to identify samples that require stronger penalties.

[0149] Based on the low-value region mask, construct adaptive penalty weights: in The penalty coefficient is set to 10.0 in our experiments. This means that for samples in low-value regions, the loss weight will increase to 11 times that of ordinary samples, while for samples in non-low-value regions, the weight remains unchanged.

[0150] The final adaptive penalty loss function is defined as a weighted sum of the basic loss and the penalty weights: From an optimization perspective, this loss function generates a larger gradient signal for low-value samples during gradient backpropagation, forcing the model to invest more learning power in these critical areas. Consider the gradient of the loss function with respect to the predicted value: It can be seen that the gradient magnitude of samples in the low-value region is greater than that of ordinary samples. This mechanism can quickly correct systematic biases in the low-value region of the model during the early stages of training.

[0151] Figure 11 The core working mechanism of the adaptive penalty loss function is demonstrated. Figure 11 The evolution of the dynamic penalty weight in (a) reflects the changing trend of APL’s attention to samples in low-value areas, with the penalty multiplier mainly concentrated in the range of 1.0-1.4. Figure 11 (b) shows the improvement trend in low-value region error, demonstrating the optimization effect of the model on key stress regions guided by the APL mechanism. During the training of the complete model, the low-value region error exhibits a significant decreasing trend. This optimization effect reflects the synergistic effect of the APL mechanism and the CPA strategy, where APL guides the model to strengthen its focus on key stress regions through dynamic penalty weights.

[0152] The APL loss function design also considers training stability. Compared to directly using weighted mean squared error, the MAE-based approach avoids the gradient explosion problem, especially maintaining stable training even when the number of samples is small in the low-value region. Furthermore, this loss function does not introduce additional hyperparameters, relying solely on a critical threshold. and penalty coefficient Both parameters, which control the intensity of punishment, have clear physical meanings and adjustment directions.

[0153] The training process shows that after adopting the adaptive penalty loss function, the model's reference error decreased from 38.87% in the low-value region to 1.39%, proving the effectiveness of this loss function in solving the unbalanced reading problem. Furthermore, because the loss function design maintains convexity and smoothness, the optimization process converged stably without training oscillations or divergence, demonstrating its practical application value.

[0154] 3. Experimental Design and Results Analysis To verify the effectiveness and synergistic effect of the proposed Critical Pressure Enhancement Strategy (CPA), Metadata-Guided Modulation Module (MGM), and Adaptive Penalized Loss (APL), a series of experiments were conducted. The SF6 gas pressure gauge dataset used included images collected from real-world power industry sites and from online and open-source projects. The instrument images comprised various types of SF6 gauges, all with non-planar pointers, and also reflected image quality issues common in real-world industrial settings, such as glare and tilt. Before the experiments, the YOLOv13 object detection algorithm was used to crop the gauge dials. The cropped images were used as the dataset for this experiment. A total of 6164 SF6 gas pressure gauge dial images were selected and divided into training, validation, and test sets in an 8:1:1 ratio. Some dataset images are shown below. Figure 12 As shown in Table 1, the parameter settings and experimental environment configuration during training are illustrated.

[0155] Table 1 Experimental environment and training parameter configuration To comprehensively evaluate the performance of MGCM-Net in the SF6 gas pressure gauge reading task, the following metrics were used for analysis: For overall accuracy assessment, the mean absolute error (MAE) is used. Figure 12 Root Mean Square Error (RMSE) Figure 12 As a basic evaluation standard, MAE reflects the mean absolute deviation between the predicted and actual values ​​and is insensitive to outliers. RMSE amplifies the impact of larger errors through squaring, better reflecting the fluctuation characteristics of prediction errors. The coefficient of determination (R²) is also introduced. 2 ) Figure 12 The ability of a model to explain data variability is evaluated using the following formula: Where n is the total number of samples in the test set. For the i-th sample, Let be the model's predicted reading for the i-th sample. This is the arithmetic mean of all the true readings.

[0156] Industrial pressure gauges typically use reference error as a measurement standard. For instruments with a fixed range, reference error can uniformly measure accuracy across the entire range, using the instrument's own range as a benchmark to eliminate dimensional differences between instruments with different ranges. For the safety monitoring requirements of SF6 gas pressure gauges, a low-value reference error is specifically established. The performance in the critical pressure region is evaluated, and the calculation formula is as follows: in, This represents the number of low-pressure samples in the test set. This represents the maximum range value of the pressure gauge corresponding to the i-th sample. This represents the minimum range value of the pressure gauge corresponding to the i-th sample.

[0157] 5.3.1 Ablation Experiment To verify the effectiveness and synergistic effect of the proposed Critical Pressure Enhancement (CPA) strategy, Metadata Guided Modulation (MGM) module, and Adaptive Penalized Loss (APL) module, we designed a systematic ablation experiment scheme. This scheme includes eight different model configurations, starting with a baseline model of the EfficientNetB4 backbone network without any innovative modules, and progressively introducing each module while observing their performance changes when used individually and in combination. The experiments begin with reference errors... Low-pressure area reference error Mean absolute error (MAE), root mean square error (RMSE), and coefficient of determination (R²) 2 A comprehensive evaluation of the five key indicators was conducted, and the specific results are summarized in Table 2.

[0158] Table 2 Module Ablation Experiment Results The experimental results show that each module significantly impacts model performance. Model A, which introduces the Critical Pressure Enhancement (CPA) strategy alone, shows the greatest improvement in low-pressure region error, decreasing from 10.31% to 1.56% of the baseline, indicating that the CPA strategy effectively improves reading accuracy under critical conditions. When the metadata-guided modulation module is used alone, the overall reference error of Model B decreases from 1.617% to 1.338%, but the improvement in the low-pressure region is limited, suggesting that it is better at improving global feature representation. When the Adaptive Penalized Loss (APL) is used alone, although it reduces the low-pressure error to 2.98%, it causes the overall reference error to rise to 1.836%, indicating that it may cause optimization conflicts when not used in conjunction with other modules. When CPA is combined with MGM, the model achieves excellent overall accuracy, with the reference error decreasing to 1.179%, but the low-pressure error of 2.18% indicates that there is still room for improvement. The complete model that integrates CPA, MGM, and APL achieves the best performance balance. It not only achieves the lowest overall reference error of 1.160% among all configurations, but also further reduces the critical low-pressure reference error to 1.39%. At the same time, other indicators also reach the optimal or near-optimal levels, which confirms the complementarity between the components and the effectiveness of the overall solution.

[0159] Figure 13 The loss curves of each ablation experiment model on the training and validation sets are presented separately. Overall, the loss of all models decreases significantly with increasing training cycles and tends to converge, indicating that the training process is effective. In terms of validation loss, although the performance of the complete model is not the absolute lowest, it is within the optimal range, and its training loss curve is close to the validation loss curve, demonstrating good generalization ability and no obvious overfitting, thus proving the effectiveness of the proposed model architecture.

[0160] 5.3.2 Comparative Experiment To comprehensively evaluate the performance of the proposed method, this study selected several representative models as comparison models. These include the visual Transformer model ViT-Small based on self-attention mechanism, HRNet-W48 which maintains high-resolution feature representation, ConvNeXt

[78] which adopts modern convolutional design, the classic residual network ResNet50, the lightweight models MobileNetV3

[79] and ShuffleNetV2

[80] which focus on mobile applications, and SDSMDenseNet which has dense connection characteristics. These models have significant differences in parameter quantity, computational complexity and performance, which verifies the effectiveness of the proposed method from multiple dimensions.

[0161] Table 3 Comparison of experimental results Table 3 shows the experimental results, demonstrating that the MGCM-Net model exhibits the best performance across most evaluation metrics. In terms of accuracy, the proposed model achieves a pass rate of 1.160% and a low-value region error of 1.39%, both significantly better than other comparative models. Furthermore, the model's mean absolute error and root mean square error are 0.0112 and 0.0431, respectively, with a coefficient of determination of 0.8457, all superior to all comparative models. Regarding efficiency, the proposed model maintains a good inference speed of 81.55 FPS, lower than some lightweight models but significantly higher than models with similar parameter counts. Among the comparative models, MobileNetV3 performs best in inference speed at 219.17 FPS, but its accuracy metric lags behind the proposed model. ConvNeXt and Resnet50 perform well in accuracy, but are inferior to MGCM-Net in low-value region error control. Overall, the proposed model achieves the best balance between accuracy and efficiency, particularly excelling in the low-value region, validating its effectiveness in the SF6 gas pressure gauge reading task.

[0162] In order to fully evaluate the effectiveness of the MGM module proposed in this paper, this study selected four feature modulation methods for comparison. The scheme includes four main comparison groups, which replace the original MGM module with different feature modulation mechanisms to verify the adaptability of different modulation strategies in the SF6 pressure gauge reading task. The first group uses the FiLM (Feature-wise Linear Modulation)

[69] module, which uses a simple affine transformation mechanism to linearly modulate visual features by generating scale parameters and bias parameters through metadata. It has the characteristics of simple structure and high computational efficiency. The second group uses the AdaIN (Adaptive Instance Normalization)

[81] module, which is based on instance normalization statistics. It first standardizes the input features and then uses the parameters generated by metadata to recalibrate the standardized features. It shows good adaptability in the style transfer task. The third group introduces the SFMA (Spatial Feature Modulation Assembly)

[82] module, which designs a dual-branch processing architecture. One branch captures the spatial feature distribution through downsampling and variance statistics, and the other branch enhances the features through deep MLP. Finally, the outputs of the two branches are fused. The fourth group uses the SAFM (Spatially-Adaptive Feature Modulation)

[83] module, which adopts a multi-scale spatial processing strategy to divide the input features into two parts. One part is spatially adaptively modulated by pooling, convolution and upsampling operations, and the other part is directly passed and concatenated with the modulated features. All comparative experiments were conducted under the same experimental settings, including the same dataset partitioning, training strategy, evaluation metrics and hardware environment. Each comparative model only replaced the feature modulation module, while keeping other components unchanged, including the EfficientNet-B4 backbone network, metadata encoder structure, residual connection mechanism and adaptive penalty loss function.

[0163] Table 4 Comparison Experiment Results of MGM Module As can be seen from the experimental results in Table 4, different feature modulation modules exhibit significant differences in accuracy and efficiency. The FiLM module demonstrates the best computational efficiency, achieving an inference speed of 84.73 FPS, while maintaining good accuracy performance with a reference error of 1.387% and a low-value region error of 1.62%. This simple affine transformation mechanism achieves a good balance between computational complexity and accuracy. The AdaIN module is comparable to FiLM in terms of accuracy. It is 1.394%. The accuracy is 1.61%, but the inference speed is slightly lower at 71.89 FPS, which is consistent with the additional overhead of needing to calculate instance statistics.

[0164] Experimental results show that the MGM module achieves the optimal trade-off between computational efficiency and accuracy improvement. Although FiLM and AdaIN have a slight advantage in inference speed, the MGM module achieves the best performance in terms of accuracy. The lowest was 1.160%. The lowest accuracy was 1.39%, and the lowest mean absolute error was 0.0112. In terms of computational efficiency, the MGM module achieved an inference speed of 81.55 FPS and a computational load of 3.16 G, on par with FiLM and AdaIN, and significantly outperformed the SFMA and SAFM modules. This result demonstrates that the metadata-guided modulation mechanism designed in the MGM module effectively improves the accuracy of instrument readings, especially in the critical low-value region. The SFMA module also showed lower RMSE and R... 2 The module performed best in terms of metrics, reaching 0.0425 and 0.8501 respectively, indicating a good fit between its predicted and actual values. However, the module's parameter count and computational cost increased significantly, reaching 122.46M and 12.00G respectively. The percentage rose to 2.01%. The SAFM module performed poorly across all metrics, with a parameter count as high as 266.62M, a computational load of 27.08G, and an inference speed as slow as 54.89 FPS. The highest was 1.856%. The figure is 2.02%. This indicates that overly complex multi-scale spatial processing mechanisms did not bring performance improvements in this task, and may even have led to a decrease in generalization ability due to over-parameterization.

[0165] Combination Figure 14 The comparison of the module structures shown provides a deeper understanding of the performance differences between the modules. The FiLM module's concise structure gives it a significant advantage in computational efficiency; its simple affine transformation mechanism is sufficient for most reading scenarios, but it may lack sufficient expressive power when dealing with complex dial structures. The AdaIN module introduces spatial adaptability through instance normalization, improving the normalization of the feature distribution while maintaining reasonable computational overhead, which is consistent with its relatively good performance in low-value regions.

[0166] While the dual-branch architecture and statistical feature utilization of the SFMA module improve the overall fit of the predicted values, the complex structure leads to a significant increase in the number of parameters, which may result in overfitting on limited datasets. This explains the decrease in pass rate and performance degradation in low-value regions. The multi-scale processing and channel segmentation mechanism of the SAFM module should theoretically provide stronger spatial adaptability, but practical results show that this complex design has not been effectively translated into a performance advantage in this task. Instead, its high computational complexity has hampered its practical value.

[0167] Comprehensive analysis shows that in the specific task of reading SF6 pressure gauges, overly complex feature modulation mechanisms do not always lead to performance improvements. Module design needs to strike a balance between expressive power and computational efficiency. Relatively simple modulation methods such as FiLM and AdaIN offer more balanced overall performance, while complex modules such as SFMA and SAFM, although improving some indicators, perform poorly in key indicators for practical applications, such as throughput and accuracy in low-value regions.

[0168] 5.3.3 SF6 Gas Pressure Gauge Reading Accuracy Experiment To verify the accuracy and robustness of the proposed method in reading pointer instruments under different environmental conditions, four SF6 gas pressure gauge dial images with different image qualities (tilted, poor lighting, blurry, reflective, etc.) were selected for reading accuracy experiments. Figure 15 As shown.

[0169] Three representative pointer instrument reading recognition methods were selected and compared with this model to comprehensively evaluate the performance differences. A robust pointer reading recognition method under image corruption, MSCR-CNN

[84] , was selected. This method uses an instance segmentation network combined with anti-image erosion data augmentation technology to calculate the reading by area ratio. A semantic segmentation and coordinate attention mechanism, CAR-Unet

[85] network, was selected. This method focuses on fine segmentation of instrument components and introduces a mask-based correction strategy to handle tilt problems. A key point-based detection framework, KSE-CenterNet

[86] , was selected. This method recognizes four key points of the instrument and combines perspective transformation algorithm to correct tilted images, thereby realizing reading calculation. The experimental results of SF6 gas pressure gauge readings are shown in Table 5.

[0170] Under common interference conditions such as tilt and reflection represented by samples a and d, the errors of all methods were kept at a low level. KSE-CenterNet performed comparable to the proposed method, with an error of approximately 2%. However, under the extreme conditions of poor lighting and severe blurring simulated by samples b and c, the performance of each method diverged significantly. CAR-Unet had an error as high as 20.47% on the blurry sample c, with poor pointer extraction. MSCR-CNN also had errors of 1.87% and 4.58% on samples b and c, respectively. In contrast, although KSE-CenterNet showed strong robustness, its best performance across all samples was not stable. The proposed method achieved significant advantages on poor lighting sample b and blurry sample c, with errors of only 0.13% and 0.03%, respectively, while maintaining accuracy comparable to the best method on the remaining samples. Compared to the proposed model, these methods each have their own focus. The keypoint scheme simplifies the process but is limited by point detection accuracy, while semantic segmentation provides detail awareness but is prone to incomplete feature segmentation results in poor image quality, making it overly dependent on image quality. Comparative experiments demonstrate that the proposed method exhibits superior stability and generalization ability when facing complex environmental factors, effectively addressing common image degradation problems in real-world industrial scenarios.

[0171] It is understood that the present invention has been described through some embodiments, and those skilled in the art will recognize that various changes or equivalent substitutions can be made to these features and embodiments without departing from the spirit and scope of the invention. Furthermore, under the teachings of the present invention, these features and embodiments can be modified to adapt to specific situations and materials without departing from the spirit and scope of the invention. Therefore, the present invention is not limited to the specific embodiments disclosed herein, and all embodiments falling within the scope of the claims of this application are within the protection scope of the present invention.

Claims

1. A critical pressure augmented and metadata directed SF6 pressure gauge end-to-end reading method, characterized by, Includes the following steps: S1. Obtain the SF6 pressure gauge image and the range metadata corresponding to the SF6 pressure gauge image. The range metadata includes at least the lower limit value and the upper limit value of the range. S2. Preprocess the SF6 pressure gauge image to obtain the input image; S3. Construct normalized readings based on the actual physical readings of the sample and the lower and upper limits of the range; S4. During the model training phase, perform key pressure enhancement on samples whose normalized readings fall within a preset key pressure range to generate enhanced samples. S5. Input the image to be input into a visual feature extraction network to obtain at least one layer of visual feature representation; S6. Input the range metadata into the metadata encoding module to generate modulation parameters for guiding the representation of visual features; S7. Based on the modulation parameters, perform metadata-guided modulation on the at least one layer of visual feature representation to obtain the modulated feature representation; S8. Input the modulated feature representation into the reading prediction module, output the predicted normalized reading, and recover the predicted physical reading based on the lower limit and upper limit of the range. S9. During the training phase, a loss function is constructed that assigns higher weights to samples in key pressure ranges, and the model is trained based on the loss function to achieve end-to-end prediction from SF6 pressure gauge images to physical readings.

2. The method of claim 1, wherein, The normalized readings described in step S3 are constructed as follows: Let the actual physical reading be y, the lower limit of the range be mmin, and the upper limit of the range be mmax. Then the normalized reading yn satisfies: yn = y minus mmin, then divided by mmax minus mmin.

3. The method of claim 1, wherein, The critical pressure enhancement in step S4 is performed on samples whose normalized readings are below a preset threshold tau, and the critical pressure enhancement includes at least one of the following: Contrast degradation, local blurring, shadow perturbation, brightness unevenness perturbation, small-angle rotation perturbation, and noise injection; The critical pressure enhancement is used to simulate the visual degradation characteristics of SF6 pressure gauges under critical pressure conditions.

4. The method of claim 1, wherein, The visual feature extraction network mentioned in step S5 is a neural network with multi-scale feature extraction capability. The neural network includes any one of EfficientNet, ResNet, DenseNet, MobileNet, ConvNeXt, or Transformer-type visual networks.

5. The method of claim 1, wherein, In addition to the lower and upper limits of the measurement range, the range metadata mentioned in step S6 also includes at least one of the following: Instrument model, scale zone parameters, unit type, manufacturer parameters, installation tilt angle parameters, and other physical prior information characterizing the reading mapping relationship; The metadata encoding module is used to encode the range metadata into modulation parameters that match the visual feature representation.

6. The method according to claim 1, characterized in that, The metadata-guided modulation in step S7 includes scaling and / or bias modulation of the visual feature representation; For visual features Fl at layer l, the modulated features F'l satisfy: F'l = Fl multiplied by 1 plus gamma_l, plus beta_l; Wherein, gamma_l and beta_l are the l-th layer scale modulation parameter and bias modulation parameter generated by the metadata encoding module, respectively.

7. The method according to claim 1, characterized in that, The metadata guidance and adjustment described in step S7 is applied to any one of single-layer visual features, multi-layer visual features, or intermediate representations after feature fusion.

8. The method according to claim 1, characterized in that, The loss function described in step S9 is constructed based on the basic regression loss and the sample weight function. The basic regression loss includes any one of the following: mean absolute error loss, Huber loss, smoothing L1 loss, or mean squared error loss. When the normalized reading of a sample is within the critical pressure range, its loss weight is higher than that of samples in non-critical pressure ranges.