Lightweight network meter pointer reading method and system

By adopting lightweight EfficientViT network and multi-stage upsampling technology in the meter recognition system, combining feature fusion module and reading method based on text recognition and Hough transform, the problem of improving the meter recognition accuracy while maintaining calculation efficiency is solved, and efficient and accurate meter recognition is achieved.

CN119625701APending Publication Date: 2025-03-14STATE GRID ANHUI ELECTRIC POWER CO LTD ELECTRIC POWER SCI RES INST +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411694512.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-25
Publication Date
2025-03-14

AI Technical Summary

Technical Problem

While maintaining calculation efficiency, the problem of improving the accuracy of meter recognition.

Method used

A lightweight EfficientViT network is used for feature extraction and fusion, combining multi-stage upsampling and residual connection, a feature fusion module is designed to fully fuse multi-scale features, and reading calculation is performed using a meter reading method based on text recognition and Hough transform.

Benefits of technology

It improves the accuracy and computing efficiency of meter recognition, can effectively handle recognition tasks in complex scenarios, reduces the amount of model parameters and avoids feature loss.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119625701A_ABST
    Figure CN119625701A_ABST
Patent Text Reader

Abstract

The invention discloses a lightweight network meter pointer reading method and system, and the method comprises the steps: carrying out the feature extraction and fusion of a collected meter diagram through a trained lightweight recognition network, and recognizing meters in the meter diagram; and cutting the identified meter, and reading the cut meter image by adopting a meter reading method based on text identification and Hough transform. According to the method, the richness and effectiveness of feature expression are improved on the premise that the calculation efficiency of a meter recognition part is kept.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of pointer meter identification, and in particular to a lightweight network meter pointer identification method and system. Background Art

[0002] In real life, pointer meters are widely used due to their simple structure, low cost, strong anti-interference and high reliability. However, these meters generally do not have data transmission interfaces, and workers are required to read meters and conduct inspections regularly. Traditional pointer meter reading has problems such as low efficiency, inability to monitor in real time, high consumption of manpower and material resources, and high risks in extreme environments such as high temperature, high pressure, and radiation. In recent years, intelligent meter reading systems have gradually been introduced. By using cameras to take real-time photos of pointer meters and combining image recognition algorithms, the system can automatically read the position of the pointer and convert it into the corresponding value. This intelligent meter reading system can not only greatly improve the efficiency of meter reading, but also realize remote monitoring, reducing the dependence on manual inspections.

[0003] At present, the pointer meter reading model mainly relies on traditional image processing technology and deep learning technology. Based on traditional image processing technology, the pointer outline in the image and the scale lines on the dial are found through edge detection to calculate the meter reading. However, these traditional image processing technologies are complicated to handle problems such as uneven lighting, complex background, pointer tilt, and image blur, and have low accuracy and large errors.

[0004] Thanks to the development of artificial intelligence technology, the reading model of pointer instruments has made significant progress in processing complex scenes and improving recognition accuracy by using deep learning technology. Compared with traditional image processing methods, the reading model based on deep learning can automatically learn the features in the image, without complex manual design steps, it can recognize pointer instruments in complex scenes, and then combine with other image processing algorithms to get the pointer reading.

[0005] However, in practice, due to the hardware equipment and real-time requirements, the efficient computing power and easy deployment characteristics of lightweight networks make them an ideal choice in the field of meter reading, especially in application scenarios such as large-scale IoT devices and remote monitoring of smart meters, which can significantly improve the overall performance and economic benefits of the system. However, since lightweight networks have been simplified in model design, they may cause the loss of some detailed features in feature extraction, thereby affecting the recognition accuracy in complex scenarios. Therefore, it is very important to reduce the number of model parameters and improve the recognition accuracy while ensuring that the features are not lost in large quantities. Summary of the invention

[0006] The technical problem to be solved by the present invention is how to improve the meter recognition accuracy while maintaining the calculation efficiency.

[0007] In order to solve the above technical problems, the present invention provides the following technical solutions:

[0008] A lightweight network meter pointer reading method, comprising:

[0009] S10, using the trained lightweight recognition network to extract and fuse features of the collected meter map, and identify the meters in the meter map;

[0010] S20, cropping the identified meter, and reading the cropped meter image using a meter reading method based on text recognition and Hough transform;

[0011] The constructed lightweight recognition network includes: a feature extraction module and a feature fusion module;

[0012] The feature extraction module includes a lightweight EfficientViT network submodule and an upsampling submodule; the meter image is first divided into multiple small block images by the lightweight EfficientViT network submodule, and then multi-scale meter feature images are gradually extracted; then multi-stage upsampling is adopted in the upsampling submodule, and at the same time, the meter feature images of each scale outputted from the EfficientViT network submodule and the meter feature images outputted from the upsampling submodule in each stage are connected in the form of residuals;

[0013] The meter feature map output by the upsampling submodule is used as the input of the feature fusion module; the feature fusion module includes a parallel first fusion path and a second fusion path. The first fusion path uses a layer of convolution operation to generate low-dimensional meter features; the second fusion path uses two layers of convolution operations to generate deep meter features; finally, the meter features output by the first fusion path and the second fusion path are added to finally obtain the meter features.

[0014] In one embodiment of the present invention, the lightweight EfficientViT network submodule includes an overlapping patch embedding module, two consecutive EfficientViT Block and EfficientViT Subsample modules, and an EfficientViTBlock module;

[0015] The collected meter map is divided into multiple Small image blocks; multiple After the small block image passes through the first consecutive EfficientViT Block and EfficientViT Subsample modules, the output The meter characteristic graph is then passed through the second consecutive EfficientViT Block and EfficientViTSubsample module to output The meter feature map is finally extracted by the EfficientViT Block module and input into the upsampling submodule.

[0016] In one embodiment of the present invention, the upsampling submodule includes a first upsampling module, a second upsampling module and a third upsampling module; wherein a first residual connection module is provided between the first upsampling module and the second upsampling module; and a second residual connection module is provided between the second upsampling module and the third upsampling module;

[0017] The first upsampling module output The meter characteristic diagram is combined with the output of the first consecutive EfficientViT Block and EfficientViT Subsample modules. The meter feature map is residually connected through the first residual connection module and then input into the second upsampling module;

[0018] The second upsampling module output The meter feature map is embedded with the output of the overlapping patch module The small block image is residually connected through the second residual connection module and then input into the third upsampling module;

[0019] The third upsampling module samples and extracts features and then inputs them into the feature fusion module.

[0020] In one embodiment of the present invention, the network architecture of the feature fusion module includes: a first fusion module, a second fusion module;

[0021] The output of the first fusion path is used as an input of the first fusion module;

[0022] An output of the first fusion module is used as an input of the second fusion path;

[0023] The output of the second fusion path is used as an input of the second fusion module;

[0024] in,

[0025] The first fusion path includes a first convolution module, a downsampling fusion module, and a second convolution module connected in sequence; the second fusion path includes a third convolution module, an upsampling fusion module, and a fourth convolution module connected in sequence; and the output port of the downsampling fusion module is connected to the output port of the upsampling fusion module;

[0026] The multi-stage upsampling in the upsampling submodule includes a first upsampling module, a second upsampling module and a third upsampling module;

[0027] in,

[0028] The output of the first upsampling module is used as another input of the first fusion module;

[0029] The output of the second upsampling module is used as another input of the downsampling fusion module;

[0030] The third upsampling module serves as another input of the second fusion module.

[0031] In one embodiment of the present invention, in the first fusion path and the second fusion path, the network architecture of each convolution module is the same, but the convolution kernel filling settings are different; wherein the convolution module introduces a channel attention mechanism, including: a 2×2 convolution module, a channel screening module and a 1×1 convolution module;

[0032] After sampling in the 2×2 convolution module, it enters the channel screening module to learn the channel weight distribution from the channel perspective, and finally reduces the overall number of channels through the 1×1 convolution module.

[0033] In one embodiment of the present invention, the output feature of each convolution module in the first fusion path and the second fusion path is expressed by the following formula:

[0034] F o =Conv 1×1 (SE(Conv 2×2 (F i )));

[0035] In the formula, F o It is represented as the output feature of the convolution module in the first fusion path or the second fusion path, F i is represented as the input feature of the convolution module in the first fusion path or the second fusion path, SE(·) is represented as the channel attention mechanism, Conv 2×2 Represented as 2×2 convolution, here as a 2×2 convolution module, Conv 1×1 Represented as a 1×1 convolution, here as a 1×1 convolution module.

[0036] In one embodiment of the present invention, the first fusion module, the second fusion module, the downsampling fusion module and the upsampling fusion module have the same structure, and the output feature of each fusion module is expressed by the following formula:

[0037] F c =C(F1,F2);

[0038] In the formula, F c It represents the output feature of the fusion module after connection, F1 represents the direct input feature of the fusion module, F2 represents the input feature after upsampling or downsampling, and C represents the connection operation.

[0039] In one embodiment of the present invention, the meter features output by the first fusion path and the second fusion path are added together to finally obtain the identified meter features, which are expressed by the following formula:

[0040] F=Conv 1×1 (F C )+Conv 3×3 (Conv 1×1 (F C ));

[0041] In the formula, F represents the meter that is finally identified, Conv 3×3 Represented as 3×3 convolution; the first fusion path uses Conv 1×1 Convolution operation, the second fusion path uses Conv 1×1 and Conv 3×3 operate.

[0042] In one embodiment of the present invention, table count reading includes:

[0043] Use the canny operator to detect the edge information of the cropped dial;

[0044] Using the dial edge information as a mask, Hough circle detection is applied to obtain the dial area;

[0045] Use the text recognition tool to identify the zero scale line in the dial area, and then use the Hough line detection method to detect the straight lines in the dial area to find the rotation center of the dial;

[0046] The intersection of each extended scale line is taken as the rotation center of the dial, and then the scale line is removed to obtain the pointer, and the deflection angle of the pointer relative to the zero scale line is calculated to obtain the meter reading;

[0047] The meter reading is obtained by the following formula:

[0048]

[0049] Where T is the meter reading, T0 is the maximum range, θ is the deflection angle of the pointer relative to the zero scale line, and δ is the effective range angle of the dial.

[0050] The present invention also provides a lightweight network meter pointer reading system, which applies the above-mentioned lightweight network meter pointer reading method, including:

[0051] The meter recognition module is used to apply the trained lightweight recognition network to extract and fuse the features of the collected meter diagram and recognize the meters in the meter diagram;

[0052] The meter reading module is used to crop the identified meter and read the cropped meter image using a meter reading method based on text recognition and Hough transform.

[0053] Compared with the prior art, the present invention has the following beneficial effects:

[0054] The present invention introduces a lightweight EfficientViT network, which first divides the image into multiple small blocks to reduce the amount of calculation, and then gradually extracts multi-scale feature information, effectively improving the network's computational efficiency and feature expression capabilities. Then, in order to capture multi-scale features and improve the model's ability to recognize targets of different sizes, different perspectives, and complex scenes, a three-stage upsampling is used. In addition, in order to prevent downsampling and feature loss of lightweight modules, a residual connection is designed to improve the model's expression capabilities.

[0055] The present invention designs a feature fusion module that can fully fuse feature information from multiple scales, thereby significantly improving recognition accuracy. The feature fusion module uses multiple fusion modules, each of which connects and fuses features of two different scales to ensure that key information is effectively retained during the multi-scale feature fusion process. In addition, a channel attention mechanism is added during the up and down sampling process to filter out irrelevant information. Finally, the fusion results of each fusion module are further integrated to generate richer output features to improve recognition accuracy.

[0056] The present invention proposes a meter reading method based on text recognition and Hough transform, which combines the advantages of OCR technology and Hough transform. First, OCR technology is used to quickly identify the zero scale line on the dial. Then, Hough transform is used to detect the pointer position of the dial and its angle relative to the rotation center, so as to quickly determine the direction of the pointer. Finally, the dial reading is determined by combining geometric relationships with formula calculations. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] Figure 1 The present invention is a flowchart of a lightweight network meter pointer reading method according to an embodiment of the present invention.

[0058] Figure 2 Schematic diagram of the architecture of a lightweight recognition network according to an embodiment of the present invention.

[0059] Figure 3 Schematic diagram of the structure of a sampling convolution module according to an embodiment of the present invention.

[0060] Figure 4 The present invention is a block diagram of a lightweight network meter pointer reading system according to an embodiment of the present invention. DETAILED DESCRIPTION

[0061] In order to facilitate those skilled in the art to understand the technical solution of the present invention, the technical solution of the present invention is further described in conjunction with the accompanying drawings of the specification.

[0062] The terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of this application, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.

[0063] See also Figure 1 As shown, the present invention provides a lightweight network meter pointer reading method, comprising:

[0064] S10, using the trained lightweight recognition network, extracts and fuses features from the collected meter map, and identifies the meters in the meter map.

[0065] See also Figure 1 and Figure 2 As shown, in one embodiment of the present invention, a lightweight recognition network is constructed, including: the lightweight recognition network includes a feature extraction module 10 and a feature fusion module 20.

[0066] In this embodiment, the feature extraction module 10 includes a lightweight EfficientViT network submodule 11 and an upsampling submodule 12. The meter image is first divided into multiple small block images by the lightweight EfficientViT network submodule 11, which effectively reduces the calculation amount of the model, and then gradually extracts multi-scale meter feature images to gradually extract effective information. Then, multi-stage upsampling is adopted in the upsampling submodule 12, and the meter feature images of each scale output from the EfficientViT network submodule 11 and the meter feature images output from the upsampling submodule 12 in each stage are connected in the form of residuals.

[0067] The meter feature map output by the upsampling submodule 12 is used as the input of the feature fusion module 20. The feature fusion module 20 includes a first fusion path and a second fusion path in parallel. The first fusion path uses a layer of convolution operation to generate low-dimensional meter features. The second fusion path uses two layers of convolution operations to generate deep-level meter features. Finally, the meter features output by the first fusion path and the second fusion path are added together to finally obtain the recognized meter features.

[0068] See also Figure 1 and Figure 2As shown, in one embodiment of the present invention, the lightweight EfficientViT network submodule 11 includes an Overlap Patch Embed module (Overlap PatchEmbed), two consecutive EfficientViT Block and EfficientViT Subsample modules and an EfficientViT Block module.

[0069] In this embodiment, the collected meter map is divided into multiple Small image blocks; multiple After the small block image passes through the first consecutive EfficientViT Block and EfficientViTSubsample modules, the output The meter characteristic graph is then passed through the second consecutive EfficientViT Block and EfficientViT Subsample modules to output The meter feature map is finally extracted by the EfficientViT Block module and input into the upsampling submodule.

[0070] In this embodiment, in order to capture multi-scale features and improve the model's ability to recognize targets of different sizes, different perspectives and in complex scenes, the upsampling submodule 12 adopts three-stage upsampling and uses 2×2 deconvolution and ReLU activation function.

[0071] In this embodiment, specifically, the upsampling submodule 12 includes a first upsampling module, a second upsampling module and a third upsampling module. In addition, in order to prevent feature loss due to downsampling, the form used will ensure that key features are retained at different scales, further improving feature expression capabilities. Specifically, a first residual connection module is provided between the first upsampling module and the second upsampling module, and a second residual connection module is provided between the second upsampling module and the third upsampling module.

[0072] The first upsampling module output The meter characteristic diagram is combined with the output of the first consecutive EfficientViT Block and EfficientViT Subsample modules. The meter feature map is connected through the first residual connection module and then input into the second upsampling module. The second upsampling module outputs The meter feature map is embedded with the output of the overlapping patch module The small block image is residually connected through the second residual connection module and then input into the third upsampling module. The third upsampling module samples and extracts features and then inputs into the feature fusion module.

[0073] See also Figure 1 and Figure 2 As shown, in one embodiment of the present invention, in order to further utilize multi-scale information, the present invention designs a feature fusion module 20, which is used to effectively fuse adjacent different-scale features and fully utilize multi-scale information. Specifically, the network architecture of the feature fusion module 20 includes: a first fusion module and a second fusion module.

[0074] In this embodiment, the output of the first fusion path is used as an input of the first fusion module, an output of the first fusion module is used as an input of the second fusion path, and the output of the second fusion path is used as an input of the second fusion module. The first fusion path includes a first convolution module, a downsampling fusion module, and a second convolution module connected in sequence, and the second fusion path includes a third convolution module, an upsampling fusion module, and a fourth convolution module connected in sequence. And the output port of the downsampling fusion module is connected to the output port of the upsampling fusion module.

[0075] In this embodiment, the output of the first upsampling module is used as another input of the first fusion module, the output of the second upsampling module is used as another input of the downsampling fusion module, and the third upsampling module is used as another input of the second fusion module.

[0076] See also Figures 1 to 3 As shown, in one embodiment of the present invention, in the first fusion path and the second fusion path, the network frame of each convolution module is the same, but the convolution kernel filling settings are different. Figure 3 As shown in the figure, each convolution module introduces a channel attention mechanism, including: 2×2 convolution module, channel filtering module and 1×1 convolution module.

[0077] In this embodiment, after the 2×2 convolution module uses 2×2 convolution for upsampling or downsampling, it enters the channel screening module after convolution for a large amount of useless background information that may exist in the image. The channel screening module uses the attention mechanism to learn the channel weight allocation from the channel perspective to reduce the interference of irrelevant information. Finally, the overall number of channels is reduced by using a 1×1 convolution module to reduce the amount of calculation.

[0078] In this embodiment, the output features of each convolution module in the first fusion path and the second fusion path are expressed by the following formula:

[0079] F o =Conv 1×1 (SE(Conv 2×2 (F i )));

[0080] In the formula, F o It is represented as the output feature of the convolution module in the first fusion path or the second fusion path, Fi is represented as the input feature of the convolution module in the first fusion path or the second fusion path, SE(·) is represented as the channel attention mechanism, Conv 2×2 Represented as 2×2 convolution, here as a 2×2 convolution module, Conv 1×1 Represented as a 1×1 convolution, here as a 1×1 convolution module.

[0081] See also Figures 1 to 3 In one embodiment of the present invention, the first fusion module, the second fusion module, the downsampling fusion module and the upsampling fusion module have the same structure, and the output feature of each fusion module is expressed by the following formula:

[0082] F c =C(F1,F2);

[0083] In the formula, F c It represents the output feature of the fusion module after connection, F1 represents the direct input feature of the fusion module, F2 represents the input feature after upsampling or downsampling, and C represents the connection operation. Among them, the direct input feature F1 of the fusion module is the feature output by the first upsampling module, the second upsampling module and the third upsampling module, and the input feature F2 after upsampling or downsampling is the feature output by the first fusion module, the second fusion module, the downsampling fusion module and the upsampling fusion module.

[0084] In this embodiment, the first fusion path and the second fusion path in parallel are then subjected to feature fusion, and the formula is as follows:

[0085] F=Conv 1×1 (F C )+Conv 3×3 (Conv 1×1 (F C ));

[0086] In the formula, F represents the meter that is finally identified, Conv 3×3 Represented as 3×3 convolution; the first fusion path uses Conv 1×1 Convolution operation generates low-dimensional features to reduce the amount of calculation and complexity. The second fusion path uses Conv 1×1 and Conv 3×3 Operations are performed to achieve deeper information extraction. Finally, the outputs of the two paths are added together to obtain a fusion result, which enables the module to improve the richness and effectiveness of feature expression while maintaining computational efficiency.

[0087] See also Figures 1 to 3 As shown, in one embodiment of the present invention, when training a lightweight recognition network:

[0088] Collect meter image data and randomly divide the data into training set and test set according to the sample ratio of 7:3. Input the training set into the lightweight recognition network for network training. When the model training is completed, input the test set and observe the target detection results. If the result error meets the requirements, perform online recognition. If it does not meet the requirements, return to continue training.

[0089] S20, cropping the identified meter, and reading the cropped meter image using a meter reading method based on text recognition and Hough transform.

[0090] In one embodiment of the present invention, the recognized meter image is cropped to preliminarily remove interference information. The cropped meter image is read using a meter reading method based on text recognition and Hough transform, including:

[0091] S21, use the canny operator to detect the edge information of the cropped dial.

[0092] In this embodiment, the dial edge information is obtained, and the specific operations are as follows:

[0093] First, use a Gaussian filter to filter the possible noise, and then use the Sobel operator to calculate the gradient of the cropped meter image to obtain the horizontal x-direction and vertical y-direction gradient G of the meter image. x With G y , then retain the maximum value of the gradient intensity on the pixel point, filter other points, and finally set the high threshold and low threshold to determine the strong edge and weak edge, and connect the weak edge with the strong edge to obtain the edge.

[0094] In this embodiment, the horizontal x-direction and vertical y-direction gradient G of the meter image are obtained. x With G y , the process is as follows:

[0095]

[0096] Where I represents the cropped meter image, and G represents the dial edge information.

[0097] S22, using the dial edge information as a mask, applying Hough circle detection to obtain the dial area.

[0098] In this embodiment, Hough circle detection is used for circular meters, and the complete dial image is extracted using the dial edge information as a mask. For each edge point in the image, it is assumed that these points are part of the circle, which can be expressed in polar coordinates as:

[0099]

[0100] In the formula, θ is the polar coordinate rotation angle, a and b are the coordinates of the center of the circle, and the potential circle on the edge point is obtained under the condition of fixed radius r. Finally, the point where the potential circles of each edge point intersect the most times is taken as the center of the circle and the radius is calculated. Then, the center of the circle and the radius are used as a mask to perform an OR operation with the original image to obtain the dial area.

[0101] S23, using a text recognition tool to identify the zero scale line in the dial area, and then using the Hough line detection method to detect the straight lines in the dial area to find the rotation center of the dial.

[0102] In this embodiment, in order to effectively obtain the position of the zero scale line, the obtained dial area is used with the pytesseract tool of Google OCR, and the smallest number recognized is marked as the zero scale line. Subsequently, in order to detect the rotation center of the dial, the Hough line detection method is used to detect the straight line in the dial, and the obtained dial straight line is threshold-screened to obtain the scale line. The screening rules used in the design are as follows:

[0103] (1) The center point is near the radius r / 2 to r. Ensure that the scale line to be detected is near the rotation center area of ​​the dial and conforms to the geometric structure of the dial.

[0104] (2) The scale line is a long and narrow area with a length-to-width ratio of more than 1:4, which conforms to the geometric rules of scale lines.

[0105] (3) When the scale line area accounts for the majority, secondary screening is performed near the statistical median. Noise and irregular shapes are filtered out, and only relatively large areas that meet the characteristics of most scale lines are retained.

[0106] S24, taking the intersection of the extended scale lines as the rotation center of the dial, removing the scale lines to obtain the pointer, and calculating the deflection angle of the pointer relative to the zero scale line to obtain the meter reading.

[0107] In this embodiment, the meter reading is obtained by the following formula:

[0108]

[0109] In the formula, T represents the meter reading, T0 represents the maximum range, θ represents the pointer deflection angle relative to the zero scale line, and δ represents the effective range angle of the dial. Specifically, the lightweight network meter pointer reading method of the present invention is applied to conduct experiments, and the experimental results are shown in Table 1.

[0110] Table 1 Experimental results

[0111]

[0112] See also Figures 1 to 4As shown, the present invention also provides a lightweight network meter pointer reading system, which applies the above-mentioned lightweight network meter pointer reading method, including:

[0113] The meter recognition module is used to apply the trained lightweight recognition network to extract and fuse the features of the collected meter diagram and identify the meters in the meter diagram.

[0114] The meter reading module is used to crop the identified meter and read the cropped meter image using a meter reading method based on text recognition and Hough transform.

[0115] It is obvious to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the present invention can be implemented in other specific forms without departing from the spirit or essential features of the present invention. Therefore, the embodiments should be regarded as exemplary and non-limiting from any point of view, and the scope of the present invention is defined by the appended claims rather than the above description, and it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims are included in the present invention, and any reference numerals in the claims should not be regarded as limiting the claims involved.

[0116] The above-described embodiments merely represent implementation methods of the invention. The protection scope of the present invention is not limited to the above-described embodiments. For those skilled in the art, several modifications and improvements may be made without departing from the concept of the present invention, which all belong to the protection scope of the present invention.

Claims

1. A lightweight network meter pointer reading method, characterized in that: include: S10, using the trained lightweight recognition network to extract and fuse features of the collected meter map, and identify the meters in the meter map; S20, cropping the identified meter, and reading the cropped meter image using a meter reading method based on text recognition and Hough transform; The constructed lightweight recognition network includes: a feature extraction module and a feature fusion module; The feature extraction module includes a lightweight EfficientViT network submodule and an upsampling submodule; the meter image is first divided into multiple small block images by the lightweight EfficientViT network submodule, and then multi-scale meter feature images are gradually extracted; then multi-stage upsampling is adopted in the upsampling submodule, and at the same time, the meter feature images of each scale outputted from the EfficientViT network submodule and the meter feature images outputted from the upsampling submodule in each stage are connected in the form of residuals; The meter feature map output by the upsampling submodule is used as the input of the feature fusion module; the feature fusion module includes a parallel first fusion path and a second fusion path. The first fusion path uses a layer of convolution operation to generate low-dimensional meter features; the second fusion path uses two layers of convolution operations to generate deep meter features; finally, the meter features output by the first fusion path and the second fusion path are added to finally obtain the meter features.

2. The method for reading a pointer of a lightweight network meter according to claim 1, characterized in that: The lightweight EfficientViT network submodules include an overlapping patch embedding module, two consecutive EfficientViTBlock and EfficientViT Subsample modules, and an EfficientViTBlock module; The collected meter map is divided into multiple Small image blocks; multiple After the small block image passes through the first consecutive EfficientViTBlock and EfficientViTSubsample modules, the output The meter characteristic graph is then passed through the second consecutive EfficientViTBlock and EfficientViTSubsample modules to output The meter feature map is finally extracted by the EfficientViTBlock module and input into the upsampling submodule.

3. The method for reading a pointer of a lightweight network meter according to claim 2, characterized in that: The upsampling submodule includes a first upsampling module, a second upsampling module and a third upsampling module; wherein a first residual connection module is provided between the first upsampling module and the second upsampling module; and a second residual connection module is provided between the second upsampling module and the third upsampling module; The first upsampling module output The meter characteristic graph is combined with the output of the first consecutive EfficientViTBlock and EfficientViTSubsample modules. The meter feature map is residually connected through the first residual connection module and then input into the second upsampling module; The second upsampling module output The meter feature map is embedded with the output of the overlapping patch module The small block image is residually connected through the second residual connection module and then input into the third upsampling module; The third upsampling module samples and extracts features and then inputs them into the feature fusion module.

4. The method for reading a pointer of a lightweight network meter according to claim 1, characterized in that: The network architecture of the feature fusion module includes: a first fusion module and a second fusion module; The output of the first fusion path is used as an input of the first fusion module; An output of the first fusion module is used as an input of the second fusion path; The output of the second fusion path is used as an input of the second fusion module; in, The first fusion path includes a first convolution module, a downsampling fusion module, and a second convolution module connected in sequence; the second fusion path includes a third convolution module, an upsampling fusion module, and a fourth convolution module connected in sequence; and the output port of the downsampling fusion module is connected to the output port of the upsampling fusion module; The multi-stage upsampling in the upsampling submodule includes a first upsampling module, a second upsampling module and a third upsampling module; in, The output of the first upsampling module is used as another input of the first fusion module; The output of the second upsampling module is used as another input of the downsampling fusion module; The third upsampling module serves as another input of the second fusion module.

5. The method for reading a pointer of a lightweight network meter according to claim 4, characterized in that: In the first fusion path and the second fusion path, the network architecture of each convolution module is the same, but the convolution kernel filling settings are different; the convolution module introduces a channel attention mechanism, including: 2×2 convolution module, channel screening module and 1×1 convolution module; After sampling in the 2×2 convolution module, it enters the channel screening module to learn the channel weight distribution from the channel perspective, and finally reduces the overall number of channels through the 1×1 convolution module.

6. The method for reading a pointer of a lightweight network meter according to claim 5, characterized in that: The output features of each convolution module in the first fusion path and the second fusion path are expressed by the following formula: F o =Conv 1×1 (SE(Conv 2×2 (F i ))); In the formula, F o It is represented as the output feature of the convolution module in the first fusion path or the second fusion path, F i is represented as the input feature of the convolution module in the first fusion path or the second fusion path, SE(·) is represented as the channel attention mechanism, Conv 2×2 Represented as 2×2 convolution, here as a 2×2 convolution module, Conv 1×1 Represented as a 1×1 convolution, here as a 1×1 convolution module.

7. The method for reading a pointer of a lightweight network meter according to claim 4, characterized in that: The structures of the first fusion module, the second fusion module, the downsampling fusion module and the upsampling fusion module are the same. The output features of each fusion module are expressed by the following formula: F c =C(F1,F2); In the formula, F c It represents the output feature of the fusion module after connection, F1 represents the direct input feature of the fusion module, F2 represents the input feature after upsampling or downsampling, and C represents the connection operation.

8. The method for reading a pointer of a lightweight network meter according to claim 7, characterized in that: The meter features output by the first fusion path and the second fusion path are added together to finally obtain the identified meter features, which are expressed by the following formula: F=Conv 1×1 (F C )+Conv 3×3 (Conv 1×1 (F C )); In the formula, F represents the meter that is finally identified, Conv 3×3 Represented as 3×3 convolution; the first fusion path uses Conv 1×1 Convolution operation, the second fusion path uses Conv 1×1 and Conv 3×3 operate.

9. The method for reading a pointer of a lightweight network meter according to claim 1, characterized in that: Table count reads include: Use the canny operator to detect the edge information of the cropped dial; Using the dial edge information as a mask, Hough circle detection is applied to obtain the dial area; Use the text recognition tool to identify the zero scale line in the dial area, and then use the Hough line detection method to detect the straight lines in the dial area to find the rotation center of the dial; The intersection of each extended scale line is taken as the rotation center of the dial, and then the scale line is removed to obtain the pointer, and the deflection angle of the pointer relative to the zero scale line is calculated to obtain the meter reading; The meter reading is obtained by the following formula: Where T is the meter reading, T0 is the maximum range, θ is the deflection angle of the pointer relative to the zero scale line, and δ is the effective range angle of the dial.

10. A lightweight network meter pointer reading system, characterized in that: The method for reading a pointer of a lightweight network meter according to any one of claims 1 to 9 comprises: The meter recognition module is used to apply the trained lightweight recognition network to extract and fuse the features of the collected meter diagram and recognize the meters in the meter diagram; The meter reading module is used to crop the identified meter and read the cropped meter image using a meter reading method based on text recognition and Hough transform.