Digital meter reading identification method and device, electronic equipment and storage medium

Through the yolov8 and ResNet34 network models combined with object detection method and feature point matching method, the problem of lighting and tilt influence in digital meter reading recognition is solved, achieving more accurate digital meter reading recognition and improving work efficiency.

CN119169278AInactive Publication Date: 2024-12-20CHANGSHA NENGCHUAN INFORMATION TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411605008.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-12
Publication Date
2024-12-20
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The prior art is susceptible to factors such as light and tilt of digital regions when identifying digital meter readings, resulting in inaccurate identification.

Method used

采用yolov8网络模型和ResNet34网络模型结合目标检测法和特征点匹配法,通过获取初始建模图和测试图进行矫正处理,计算预置位偏移量,确保数字表盘区域的准确识别,并进行第二矫正处理以提高识别准确性。

Benefits of technology

It improves the accuracy of identification of digital meter readings, reduces interference from external environmental factors, and improves work efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119169278A_ABST
    Figure CN119169278A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a digital meter reading identification method and device, electronic equipment and a storage medium, and relates to the field of image identification, and the method comprises the steps: obtaining an initial modeling graph and a test graph of a digital meter, carrying out the first correction processing of the initial modeling graph, and obtaining a corrected modeling graph; judging whether the correction modeling graph and the test graph can identify the digital dial plate area or not based on a yov8 network model, if the digital dial plate area can be identified, calculating the preset bit offset of the correction modeling graph and the test graph based on a target detection method, and if the digital dial plate area cannot be identified, calculating the preset bit offset of the correction modeling graph and the test graph based on a feature point matching method; and performing second correction processing on the test chart according to the preset bit offset to obtain a final test chart, and identifying the final test chart based on the ResNet34 network model to obtain a digital meter reading. The offset is calculated and the digital area is calibrated based on the target detection method and the feature point matching method, so that the accuracy of identifying the reading of the digital meter can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image recognition, and in particular to a method, device, electronic equipment and storage medium for recognizing digital meter readings. Background Art

[0002] As a traditional measuring tool, digital meters are simple in structure, cheap, reliable in performance and easy to maintain, so they are widely used in various industrial production and substations. Since digital meter readings are usually read manually, they are easily interfered by subjective and environmental factors, resulting in inaccurate data.

[0003] In the current prior art, when identifying the readings in a digital meter image, an image processing method is usually used to segment the image, and each number is identified after the position of each number is determined. In the image segmentation process, the image segmentation is greatly affected by the illumination, and problems such as inaccurate segmentation and incomplete numbers are prone to occur, thereby affecting the accuracy of number recognition. When the image segmentation is performed by dividing the rectangular small area into small blocks and performing a global search to determine whether there are numbers in the small area, the accuracy of the digital model and the tilt of the digital area of ​​the image will also lead to inaccurate number recognition. Therefore, there is an urgent need for a method that can accurately recognize numbers even when the digital area is tilted. Summary of the invention

[0004] In view of this, the purpose of the present invention is to overcome the deficiencies in the prior art and to provide a method, device, electronic device and storage medium for identifying digital meter readings.

[0005] The present invention provides the following technical solutions: In a first aspect, an embodiment of the present disclosure provides a method for identifying a digital meter reading, the method comprising: Acquire an initial modeling diagram and a test diagram of the digital meter, and perform a first correction process on the initial modeling diagram to obtain a corrected modeling diagram; Based on the yolov8 network model, it is judged whether the correction modeling diagram and the test diagram can identify the digital dial area. If the digital dial area can be identified, the preset position offset of the correction modeling diagram and the test diagram is calculated based on the target detection method. If the digital dial area cannot be identified, the preset position offset of the correction modeling diagram and the test diagram is calculated based on the feature point matching method. Performing a second correction process on the test image according to the preset position offset to obtain a final test image; The final test image is recognized based on the ResNet34 network model to obtain the digital meter reading.

[0006] According to a specific implementation method disclosed in the present application, the step of obtaining an initial modeling diagram and a test diagram of a digital meter, and performing a first correction process on the initial modeling diagram to obtain a corrected modeling diagram includes: Determining whether the digital area of ​​the initial modeling diagram is tilted; If it is tilted, calibrate the correction point of the tilt line in the digital area, and perform a first correction process on the initial modeling diagram according to the correction point; If it is not tilted, the digital area is calibrated according to a preset calibration method.

[0007] According to a specific implementation method disclosed in the present application, the step of judging whether the correction modeling diagram and the test diagram can identify the digital dial area based on the yolov8 network model includes: Loading and pre-training the yolov8 model to obtain a pre-trained yolov8 model; Collecting digital meter images, and performing target annotation on the digital meter images to obtain a data set; The pre-trained yolov8 model is trained by the data set to obtain a target area recognition model; The correction modeling image and the test image are input into the target area recognition model, and the target area is output.

[0008] According to a specific implementation method disclosed in the present application, if the digital dial area can be identified, the step of calculating the preset position offset of the correction modeling image and the test image based on the target detection method includes: Determine whether the difference between the width-to-height ratio of the corrected modeling image and the width-to-height ratio of the test image is within a preset difference range, and if the difference is above the preset difference range, calculate the preset position offset of the corrected modeling image and the test image based on a feature point matching method; If the difference is smaller than the preset difference range, the center points of the rectangular frames of the correction modeling image and the test image are determined, and the preset position offsets of the correction modeling image and the test image are calculated according to the center points of the rectangular frames.

[0009] According to a specific implementation method disclosed in the present application, if the digital dial area cannot be identified, the step of calculating the preset position offset of the correction modeling image and the test image based on the feature point matching method includes: Preprocessing the correction modeling image and the test image to obtain feature points of the correction modeling image and the test image; Performing feature point matching processing on the feature points to obtain matching feature points; Calculating the offset of the matching feature points to obtain an offset value; The offset values ​​are clustered to obtain preset position offsets of the correction modeling image and the test image.

[0010] According to a specific implementation manner disclosed in the present application, the step of performing a second correction process on the test image according to the preset position offset to obtain a final test image includes: Determine whether the preset position offset is within a preset offset range; if the preset position offset is above the preset offset range, reset the preset position offset to 0 and determine whether the preset position offset is calculated for the first time; if the preset position offset is less than the preset offset range, determine whether the preset position offset is calculated for the first time; If the preset position offset is calculated for the first time, it is determined whether the digital area in the correction modeling diagram is tilted. If the digital area in the correction modeling diagram is tilted, the correction modeling diagram and the test diagram are subjected to a first correction process and the process returns to the step of determining whether the correction modeling diagram and the test diagram can identify the digital dial area based on the yolov8 network model. If the digital area in the correction modeling diagram is not tilted, the test diagram is subjected to a second correction process to obtain a final test diagram. If it is not the first time to calculate the preset position offset, a second correction process is performed on the test image to obtain a final test image.

[0011] According to a specific implementation method disclosed in the present application, the step of identifying the final test image based on the ResNet34 network model to obtain the digital meter reading includes: Defining a network structure of the ResNet34 network model, wherein the network structure includes a convolutional layer, a pooling layer, and a residual block; Setting the training parameters of the ResNet34 network model, wherein the training parameters include learning rate, optimizer, loss function, training rounds and batch size; Constructing a data set, and training the ResNet34 network model with the data set to obtain a reading recognition model; The final test pattern is input into the reading recognition model, and the digital meter reading is output.

[0012] In a second aspect, an embodiment of the present disclosure provides a device for identifying a digital meter reading, the device comprising: An acquisition module, used for acquiring an initial modeling diagram and a test diagram of the digital meter, and performing a first correction process on the initial modeling diagram to obtain a corrected modeling diagram; A calculation module, used for judging whether the correction modeling diagram and the test diagram can identify the digital dial area based on the yolov8 network model; if the digital dial area can be identified, the preset position offset of the correction modeling diagram and the test diagram is calculated based on the target detection method; if the digital dial area cannot be identified, the preset position offset of the correction modeling diagram and the test diagram is calculated based on the feature point matching method; A correction module, used for performing a second correction process on the test image according to the preset position offset to obtain a final test image; The recognition module is used to recognize the final test image based on the ResNet34 network model to obtain the digital meter reading.

[0013] In a third aspect, an electronic device is provided in an embodiment of the present disclosure, the electronic device comprising a memory and a processor, the memory storing a computer program, and the processor implementing the steps of the method for identifying digital meter readings described in any one of the first aspects when executing the computer program.

[0014] In a fourth aspect, a computer-readable storage medium is provided in an embodiment of the present disclosure, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method for identifying digital meter readings described in any one of the first aspects are implemented.

[0015] The above-mentioned method for identifying digital meter readings provided by the present application obtains the initial modeling diagram and the test diagram of the digital meter, performs a first correction process on the initial modeling diagram to obtain a correction modeling diagram, and judges whether the correction modeling diagram and the test diagram can identify the digital dial area based on the yolov8 network model. If the digital dial area can be identified, the preset position offset of the correction modeling diagram and the test diagram is calculated based on the target detection method. If the digital dial area cannot be identified, the preset position offset of the correction modeling diagram and the test diagram is calculated based on the feature point matching method. According to the preset position offset, the test diagram is subjected to a second correction process to obtain a final test diagram, and the final test diagram is identified based on the ResNet34 network model to obtain the digital meter reading. Calculating the offset based on the target detection method and the feature point matching method and calibrating the digital area can improve the accuracy of identifying the digital meter reading and improve work efficiency.

[0016] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and understandable, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. It should be understood that the following drawings only illustrate certain embodiments of the present invention and should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work. In each of the drawings, similar components are numbered similarly.

[0018] Figure 1 A schematic flow chart of a method for identifying a digital meter reading provided in an embodiment of the present application is shown; Figure 2 A schematic diagram of calculating a preset position offset by a target detection method provided in an embodiment of the present application is shown, wherein (a) is a modeling diagram provided in an embodiment of the present application, and (b) is a test diagram provided in an embodiment of the present application; Figure 3 A schematic diagram of the structure of a digital meter reading recognition device provided in an embodiment of the present application is shown; Figure 4 A schematic structural diagram of an electronic device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0019] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be understood as limiting the present invention.

[0020] It should be noted that when an element is referred to as being "fixed to" another element, it may be directly on the other element or there may be a central element. When an element is considered to be "connected to" another element, it may be directly connected to the other element or there may be a central element at the same time. In contrast, when an element is referred to as being "directly on" another element, there is no intermediate element. The terms "vertical", "horizontal", "left", "right" and similar expressions used herein are for illustrative purposes only.

[0021] In the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", "connected", "fixed" and the like should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, it can be the internal connection of two elements or the interaction relationship between two elements. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0022] In addition, 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. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the present invention, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.

[0023] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein in the specification of the template are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The term "and / or" used herein includes any and all combinations of one or more of the related listed items.

[0024] Example 1 like Figure 1 FIG. 1 is a flow chart of a method for identifying a digital meter reading provided in an embodiment of the present application. The method for identifying a digital meter reading provided in an embodiment of the present application comprises the following steps: Step S101, obtaining an initial modeling diagram and a test diagram of a digital meter, and performing a first correction process on the initial modeling diagram to obtain a corrected modeling diagram.

[0025] It can be understood that the digital meter refers to a meter that displays readings by numbers on the dial, such as a water meter, an electricity meter, a gas meter, etc. The initial modeling diagram and the test diagram can be obtained by setting the camera position.

[0026] Specifically, the step of obtaining an initial modeling diagram and a test diagram of the digital meter, and performing a first correction process on the initial modeling diagram to obtain a corrected modeling diagram includes: Determining whether the digital area of ​​the initial modeling diagram is tilted; If it is tilted, calibrate the correction point of the tilt line in the digital area, and perform a first correction process on the initial modeling diagram according to the correction point; If it is not tilted, the digital area is calibrated according to a preset calibration method.

[0027] In a specific implementation, the digital area is the area in the dial of a digital meter where the reading is displayed, and each number is a digital area. The first correction process is to calculate the center point of the image as the rotation point, calculate the inclination angle of the left and right points of the inclined line, calculate the rotation matrix according to the center point of the image and the inclination angle, and perform an affine transformation on the image according to the rotation matrix. The correction points are the left and right points of the inclined line. The preset calibration method is to calibrate each digital area from left to right. By performing the first correction process on the initial modeling diagram, the reading of the digital meter can be accurately identified even if the acquired initial modeling diagram has a tilted digital area.

[0028] Step S102, based on the yolov8 network model, determine whether the correction modeling image and the test image can identify the digital dial area. If the digital dial area can be identified, calculate the preset position offset of the correction modeling image and the test image based on the target detection method. If the digital dial area cannot be identified, calculate the preset position offset of the correction modeling image and the test image based on the feature point matching method.

[0029] Specifically, the preset position offset is the offset between the correction modeling diagram and the test diagram. In order to ensure the accuracy of digital dial area recognition and reduce the interference of external environmental factors, the preset position offset between the correction modeling diagram and the test diagram is calculated by using target detection method and feature point matching method.

[0030] The step of judging whether the correction modeling diagram and the test diagram can identify the digital dial area based on the yolov8 network model includes: Loading and pre-training the yolov8 model to obtain a pre-trained yolov8 model; Collecting digital meter images, and performing target annotation on the digital meter images to obtain a data set; The pre-trained yolov8 model is trained by the data set to obtain a target area recognition model; The correction modeling image and the test image are input into the target area recognition model, and the target area is output.

[0031] In a specific implementation, the training efficiency and the model performance of the yolov8 network model can be improved by pre-training the yolov8 network model, and the target annotation is to annotate the digital dial area in the digital meter image.

[0032] If the digital dial area can be identified, the step of calculating the preset position offset of the correction modeling image and the test image based on the target detection method includes: Determine whether the difference between the width-to-height ratio of the corrected modeling image and the width-to-height ratio of the test image is within a preset difference range, and if the difference is above the preset difference range, calculate the preset position offset of the corrected modeling image and the test image based on a feature point matching method; If the difference is smaller than the preset difference range, the center points of the rectangular frames of the correction modeling image and the test image are determined, and the preset position offsets of the correction modeling image and the test image are calculated according to the center points of the rectangular frames.

[0033] Specifically, in actual applications, the test image may not be accurately obtained, and the width-to-height ratio of the test image will be significantly different from the width-to-height ratio of the correction modeling image. In order to improve the correction efficiency, a preset difference range is set and it is determined whether the difference between the width-to-height ratio of the correction modeling image and the width-to-height ratio of the test image is within the preset difference range. The preset difference range includes 0.1.

[0034] Further, see Figure 2 , Figure 2 A schematic diagram of calculating a preset position offset by a target detection method provided in an embodiment of the present application, wherein (a) is a modeling diagram provided in an embodiment of the present application, and (b) is a test diagram provided in an embodiment of the present application. Figure 2 The square box in (a) is the digital dial area. The reference point in the upper left corner of the digital dial area in the correction modeling diagram is , the black dot is a target point in the detection target , the width and height of the corrected modeling graph are , Figure 2 The reference point of the upper left corner of the digital dial area in the test image (b) is , width and height are The preset position offset is the distance in the x and y directions between the center point of the digital dial area detected by the correction modeling target and the center point of the digital dial area detected by the test target. Calculate the corresponding target point after calibration in the test image ,but , Calculating the preset position offset by the target detection method can effectively calculate the offset when the external environment such as lighting has a great influence, and the offset in the x and y directions and the front and rear focal length changes can be adjusted.

[0035] If the digital dial area cannot be identified, the step of calculating the preset position offset of the correction modeling image and the test image based on the feature point matching method includes: Preprocessing the correction modeling image and the test image to obtain feature points of the correction modeling image and the test image; Performing feature point matching processing on the feature points to obtain matching feature points; Calculating the offset of the matching feature points to obtain an offset value; The offset values ​​are clustered to obtain preset position offsets of the correction modeling image and the test image.

[0036] Specifically, the preprocessing is to unify the resolution of the correction modeling image and the test image, and to cut off the watermarked area on the correction modeling image and the test image. The feature point matching process includes brute force matching, calculating the offset of the matching points in the x and y directions to obtain the offset value, performing DBSCAN (Density-Based Spatial Clustering of Applications with Noise, a density-based spatial clustering algorithm) clustering on the offset value, and taking the average value with the most matching points in the cluster as the final x and y offset value.

[0037] Step S103: performing a second correction process on the test image according to the preset position offset to obtain a final test image.

[0038] The step of performing a second correction process on the test image according to the preset position offset to obtain a final test image comprises: Determine whether the preset position offset is within a preset offset range; if the preset position offset is above the preset offset range, reset the preset position offset to 0 and determine whether the preset position offset is calculated for the first time; if the preset position offset is less than the preset offset range, determine whether the preset position offset is calculated for the first time; If the preset position offset is calculated for the first time, it is determined whether the digital area in the correction modeling diagram is tilted. If the digital area in the correction modeling diagram is tilted, the correction modeling diagram and the test diagram are subjected to a first correction process and the process returns to the step of determining whether the correction modeling diagram and the test diagram can identify the digital dial area based on the yolov8 network model. If the digital area in the correction modeling diagram is not tilted, the test diagram is subjected to a second correction process to obtain a final test diagram. If it is not the first time to calculate the preset position offset, a second correction process is performed on the test image to obtain a final test image.

[0039] Specifically, after calculating the preset offset of the correction modeling diagram and the test diagram, determine whether the dial digital area of ​​the correction modeling diagram is tilted. If there is a tilt, the correction modeling diagram needs to be corrected. Correspondingly, after the correction modeling diagram is corrected, the test diagram also needs to be corrected. If there is no tilt, the test diagram is directly subjected to the second correction processing to obtain the final test diagram. By setting a preset offset range, invalid data exceeding the preset offset range can be eliminated, thereby improving the correction efficiency. The second correction processing includes image processing, adaptive fill light processing, and backlight processing. By performing the second correction processing on the test diagram, the influence of external lighting factors on the image can be overcome, thereby improving the accuracy of reading recognition of digital meters.

[0040] Step S104, identifying the final test image based on the ResNet34 network model to obtain a digital meter reading.

[0041] The step of identifying the final test image based on the ResNet34 network model to obtain the digital meter reading includes: Defining a network structure of the ResNet34 network model, wherein the network structure includes a convolutional layer, a pooling layer, and a residual block; Setting the training parameters of the ResNet34 network model, wherein the training parameters include learning rate, optimizer, loss function, training rounds and batch size; Constructing a data set, and training the ResNet34 network model with the data set to obtain a reading recognition model; The final test pattern is input into the reading recognition model, and the digital meter reading is output.

[0042] Specifically, the ResNet34 network model consists of multiple residual blocks, each of which contains two or three convolutional layers and a cross-layer identity mapping. The data set is 0-9 numbers and decimal points. In each training round, the training data is sent to the ResNet34 network model in batches for forward propagation, loss values ​​are calculated, and backpropagation is performed to update the model parameters.

[0043] The present embodiment provides a method for identifying digital meter readings, which obtains an initial modeling diagram and a test diagram of a digital meter, performs a first correction process on the initial modeling diagram to obtain a corrected modeling diagram, and determines whether the corrected modeling diagram and the test diagram can identify a digital dial area based on a yolov8 network model. If the digital dial area can be identified, the preset position offset of the corrected modeling diagram and the test diagram is calculated based on a target detection method. If the digital dial area cannot be identified, the preset position offset of the corrected modeling diagram and the test diagram is calculated based on a feature point matching method. According to the preset position offset, a second correction process is performed on the test diagram to obtain a final test diagram, and the final test diagram is identified based on a ResNet34 network model to obtain a digital meter reading. Calculating the offset based on the target detection method and the feature point matching method and calibrating the digital area can improve the accuracy of identifying digital meter readings and improve work efficiency.

[0044] Example 2 like Figure 3 FIG. 1 is a schematic diagram of a digital meter reading recognition device 300 provided in an embodiment of the present application, wherein the device comprises: The acquisition module 301 is used to acquire an initial modeling diagram and a test diagram of the digital meter, and perform a first correction process on the initial modeling diagram to obtain a corrected modeling diagram; The calculation module 302 is used to determine whether the correction modeling diagram and the test diagram can identify the digital dial area based on the yolov8 network model. If the digital dial area can be identified, the preset position offset of the correction modeling diagram and the test diagram is calculated based on the target detection method. If the digital dial area cannot be identified, the preset position offset of the correction modeling diagram and the test diagram is calculated based on the feature point matching method. A correction module 303, configured to perform a second correction process on the test image according to the preset position offset to obtain a final test image; The recognition module 304 is used to recognize the final test image based on the ResNet34 network model to obtain the digital meter reading.

[0045] The digital meter reading recognition device 300 provided in this embodiment can implement the digital meter reading recognition method shown in Example 1, which will not be described again to avoid repetition.

[0046] The digital meter reading recognition device provided in the embodiment of the present application obtains the initial modeling diagram and the test diagram of the digital meter, performs a first correction process on the initial modeling diagram to obtain a correction modeling diagram, and judges whether the correction modeling diagram and the test diagram can identify the digital dial area based on the yolov8 network model. If the digital dial area can be identified, the preset position offset of the correction modeling diagram and the test diagram is calculated based on the target detection method. If the digital dial area cannot be identified, the preset position offset of the correction modeling diagram and the test diagram is calculated based on the feature point matching method. According to the preset position offset, the test diagram is subjected to a second correction process to obtain a final test diagram, and the final test diagram is recognized based on the ResNet34 network model to obtain the digital meter reading. Calculating the offset based on the target detection method and the feature point matching method and calibrating the digital area can improve the accuracy of identifying the digital meter reading and improve work efficiency.

[0047] Example 3 In addition, an embodiment of the present disclosure provides an electronic device 400, including a memory and a processor, wherein the memory stores a computer program.

[0048] For details, see Figure 4 The electronic device 400 includes: a receiver 401, a bus interface and a processor 402.

[0049] In the embodiment of the present invention, the electronic device 400 further includes a memory 403. Figure 4 In the embodiment, the bus architecture may include any number of interconnected buses and bridges, specifically linking various circuits of one or more processors represented by processor 402 and memory represented by memory 403. The bus architecture may also link various other circuits such as peripherals, voltage regulators, and power management circuits, which are well known in the art and are therefore not further described herein. The bus interface provides an interface. The receiver 401 may be a plurality of components, namely, a transmitter and a receiver, providing a unit for communicating with various other devices on a transmission medium. The processor 402 is responsible for managing the bus architecture and general processing, and the memory 403 may store data used by the processor 402 when performing operations.

[0050] The electronic device 400 provided in the embodiment of the present invention can implement the method for identifying the digital meter reading shown in Embodiment 1, which will not be described again to avoid repetition.

[0051] The electronic device provided in this embodiment obtains the initial modeling diagram and the test diagram of the digital meter, performs a first correction process on the initial modeling diagram to obtain a correction modeling diagram, and judges whether the correction modeling diagram and the test diagram can identify the digital dial area based on the yolov8 network model. If the digital dial area can be identified, the preset position offset of the correction modeling diagram and the test diagram is calculated based on the target detection method. If the digital dial area cannot be identified, the preset position offset of the correction modeling diagram and the test diagram is calculated based on the feature point matching method. According to the preset position offset, the test diagram is subjected to a second correction process to obtain a final test diagram, and the final test diagram is identified based on the ResNet34 network model to obtain the digital meter reading. Calculating the offset based on the target detection method and the feature point matching method and calibrating the digital area can improve the accuracy of identifying the digital meter reading and improve work efficiency.

[0052] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and structure diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present invention. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in an alternative implementation, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the structure diagram and / or the flow chart, and the combination of boxes in the structure diagram and / or the flow chart, can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.

[0053] In addition, the functional modules or units in the various embodiments of the present invention may be integrated together to form an independent part, or each module may exist independently, or two or more modules may be integrated to form an independent part.

[0054] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a smart phone, a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program codes.

[0055] The above description is only a specific implementation mode of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.

Claims

1. A method for identifying digital meter readings, characterized in that: The method comprises: Acquire an initial modeling diagram and a test diagram of the digital meter, and perform a first correction process on the initial modeling diagram to obtain a corrected modeling diagram; Based on the yolov8 network model, it is judged whether the correction modeling diagram and the test diagram can identify the digital dial area. If the digital dial area can be identified, the preset position offset of the correction modeling diagram and the test diagram is calculated based on the target detection method. If the digital dial area cannot be identified, the preset position offset of the correction modeling diagram and the test diagram is calculated based on the feature point matching method. Performing a second correction process on the test image according to the preset position offset to obtain a final test image; The final test image is recognized based on the ResNet34 network model to obtain the digital meter reading.

2. The method for identifying digital meter readings according to claim 1, characterized in that: The step of obtaining an initial modeling diagram and a test diagram of the digital meter, and performing a first correction process on the initial modeling diagram to obtain a corrected modeling diagram comprises: Determining whether the digital area of ​​the initial modeling diagram is tilted; If it is tilted, calibrate the correction point of the tilt line in the digital area, and perform a first correction process on the initial modeling diagram according to the correction point; If it is not tilted, the digital area is calibrated according to a preset calibration method.

3. The method for identifying digital meter readings according to claim 1, characterized in that: The step of judging whether the correction modeling diagram and the test diagram can identify the digital dial area based on the yolov8 network model includes: Loading and pre-training the yolov8 network model to obtain a pre-trained yolov8 model; Collecting digital meter images, and performing target annotation on the digital meter images to obtain a data set; The pre-trained yolov8 model is trained by the data set to obtain a target area recognition model; The correction modeling image and the test image are input into the target area recognition model, and the target area is output.

4. The method for identifying digital meter readings according to claim 1, characterized in that: If the digital dial area can be identified, the step of calculating the preset position offset of the correction modeling image and the test image based on the target detection method includes: Determine whether the difference between the width-to-height ratio of the corrected modeling image and the width-to-height ratio of the test image is within a preset difference range, and if the difference is above the preset difference range, calculate the preset position offset of the corrected modeling image and the test image based on a feature point matching method; If the difference is smaller than the preset difference range, the center points of the rectangular frames of the correction modeling image and the test image are determined, and the preset position offsets of the correction modeling image and the test image are calculated according to the center points of the rectangular frames.

5. The method for identifying digital meter readings according to claim 1, characterized in that: If the digital dial area cannot be identified, the step of calculating the preset position offset of the correction modeling image and the test image based on the feature point matching method includes: Preprocessing the correction modeling image and the test image to obtain feature points of the correction modeling image and the test image; Performing feature point matching processing on the feature points to obtain matching feature points; Calculating the offset of the matching feature points to obtain an offset value; The offset values ​​are clustered to obtain preset position offsets of the correction modeling image and the test image.

6. The method for identifying digital meter readings according to claim 1, characterized in that: The step of performing a second correction process on the test image according to the preset position offset to obtain a final test image comprises: Determine whether the preset position offset is within a preset offset range; if the preset position offset is above the preset offset range, reset the preset position offset to 0 and determine whether the preset position offset is calculated for the first time; if the preset position offset is less than the preset offset range, determine whether the preset position offset is calculated for the first time; If the preset position offset is calculated for the first time, it is determined whether the digital area in the correction modeling diagram is tilted. If the digital area in the correction modeling diagram is tilted, the correction modeling diagram and the test diagram are subjected to a first correction process and the process returns to the step of determining whether the correction modeling diagram and the test diagram can identify the digital dial area based on the yolov8 network model. If the digital area in the correction modeling diagram is not tilted, the test diagram is subjected to a second correction process to obtain a final test diagram. If it is not the first time to calculate the preset position offset, a second correction process is performed on the test image to obtain a final test image.

7. The method for identifying digital meter readings according to claim 1, characterized in that: The step of identifying the final test image based on the ResNet34 network model to obtain the digital meter reading includes: Defining a network structure of the ResNet34 network model, wherein the network structure includes a convolutional layer, a pooling layer, and a residual block; Setting the training parameters of the ResNet34 network model, wherein the training parameters include learning rate, optimizer, loss function, training rounds and batch size; Constructing a data set, and training the ResNet34 network model with the data set to obtain a reading recognition model; The final test pattern is input into the reading recognition model, and the digital meter reading is output.

8. A device for identifying digital meter readings, characterized in that: The device comprises: An acquisition module, used for acquiring an initial modeling diagram and a test diagram of the digital meter, and performing a first correction process on the initial modeling diagram to obtain a corrected modeling diagram; A calculation module, used for judging whether the correction modeling diagram and the test diagram can identify the digital dial area based on the yolov8 network model; if the digital dial area can be identified, the preset position offset of the correction modeling diagram and the test diagram is calculated based on the target detection method; if the digital dial area cannot be identified, the preset position offset of the correction modeling diagram and the test diagram is calculated based on the feature point matching method; A correction module, used for performing a second correction process on the test image according to the preset position offset to obtain a final test image; The recognition module is used to recognize the final test image based on the ResNet34 network model to obtain the digital meter reading.

9. An electronic device, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method for identifying the digital meter reading according to any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method for identifying a digital meter reading according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Instrument positioning and recognition system based on deep learning

    CN111814919A

  • Substation equipment state abnormity identification method and system

    CN116363573A

  • Digital instrument identification method based on deep learning

    CN117765246A

  • Spherical camera preset bit offset automatic correction system based on image recognition

    CN117915186A