CN114898367A - Intelligent identification method, device, equipment and medium for electric meter dial numbers - Google Patents

Intelligent identification method, device, equipment and medium for electric meter dial numbers Download PDF

Info

Publication number
CN114898367A
CN114898367A CN202210549315.6A CN202210549315A CN114898367A CN 114898367 A CN114898367 A CN 114898367A CN 202210549315 A CN202210549315 A CN 202210549315A CN 114898367 A CN114898367 A CN 114898367A
Authority
CN
China
Prior art keywords
image
dial
ammeter
model
electric meter
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210549315.6A
Other languages
Chinese (zh)
Inventor
李林
林琳
窦小峰
丁武
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Liaoning Huadun Safety Technology Co ltd
Original Assignee
Liaoning Huadun Safety Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Liaoning Huadun Safety Technology Co ltd filed Critical Liaoning Huadun Safety Technology Co ltd
Priority to CN202210549315.6A priority Critical patent/CN114898367A/en
Publication of CN114898367A publication Critical patent/CN114898367A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition
    • G06V30/14Image acquisition
    • G06V30/1444Selective acquisition, locating or processing of specific regions, e.g. highlighted text, fiducial marks or predetermined fields
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/044Recurrent networks, e.g. Hopfield networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/77Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
    • G06V10/774Generating sets of training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/82Arrangements for image or video recognition or understanding using pattern recognition or machine learning using neural networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V2201/00Indexing scheme relating to image or video recognition or understanding
    • G06V2201/02Recognising information on displays, dials, clocks
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Evolutionary Computation (AREA)
  • General Physics & Mathematics (AREA)
  • Artificial Intelligence (AREA)
  • Multimedia (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • Software Systems (AREA)
  • Medical Informatics (AREA)
  • Databases & Information Systems (AREA)
  • Biomedical Technology (AREA)
  • Mathematical Physics (AREA)
  • General Engineering & Computer Science (AREA)
  • Molecular Biology (AREA)
  • Data Mining & Analysis (AREA)
  • Computational Linguistics (AREA)
  • Biophysics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Character Discrimination (AREA)

Abstract

The invention relates to the field of artificial intelligence, and discloses an intelligent identification method, an intelligent identification device, electronic equipment and a storage medium for electric meter dial numbers, wherein the method comprises the following steps: preprocessing the dial plate image of the historical ammeter to obtain a target dial plate image, and labeling a real ammeter area and a real ammeter number of the target dial plate image; inputting the target dial image into a pre-constructed image digital recognition model, and training an area detection network and a character recognition network in the image digital recognition model through the target dial image to obtain a trained image digital recognition model; and carrying out digital recognition on the dial plate image of the current ammeter by using the trained image digital recognition model to obtain the dial plate number of the current ammeter. The invention can realize the automatic identification method of the electric meter number and improve the reading efficiency of the electric meter number.

Description

Intelligent identification method, device, equipment and medium for electric meter dial numbers
Technical Field
The invention relates to the field of artificial intelligence, in particular to an intelligent identification method and device for electricity meter dial numbers, electronic equipment and a computer readable storage medium.
Background
The electric meter is an instrument for measuring electric energy, also called watt-hour meter, gas meter, electric energy meter, kilowatt hour meter, and refers to an instrument for measuring various electric quantities, and is applied to different fields of life, for example, the electric meter can be used for counting the electricity consumption state of daily life of residents, so that how to read the numbers in the electric meter efficiently is more important.
At present, most of the numerical values of the electric meters still depend on a manual mode, namely, the numerical values are read by a meter reader through door-to-door meter reading, so that not only is the manual cost, but also the timeliness of the reading of the numerical values of the electric meters is influenced to a certain extent, and therefore, an automatic identification method of the numerical values of the electric meters is urgently needed to improve the reading efficiency of the numerical values of the electric meters.
Disclosure of Invention
In order to solve the technical problems, the invention provides an intelligent identification method, an intelligent identification device, electronic equipment and a computer readable storage medium for the number of an electric meter dial, which can realize an automatic identification method for the number of the electric meter and improve the reading efficiency of the number of the electric meter.
In a first aspect, the invention provides an intelligent identification method for numbers on a dial of an electric meter, which comprises the following steps:
acquiring a dial plate image of a historical ammeter, preprocessing the dial plate image to obtain a target dial plate image, and labeling a real ammeter area and a real ammeter number of the target dial plate image;
inputting the target dial image into a pre-constructed image digital recognition model, detecting a predicted ammeter area of the target dial image through an area detection network in the image digital recognition model, and recognizing the predicted ammeter number of the predicted ammeter area by using a character recognition network in the image digital recognition model;
calculating model loss of the image digital recognition model according to the real electric meter area, the predicted electric meter number and the real electric meter number;
judging whether the model loss meets a preset condition or not;
if the model loss does not meet the preset condition, adjusting parameters of the image digital recognition model, and returning to execute the step of inputting the target dial image into the pre-constructed image digital recognition model;
if the model loss meets the preset condition, obtaining a trained image digital recognition model;
and carrying out digital recognition on the dial plate image of the current ammeter by using the trained image digital recognition model to obtain the dial plate number of the current ammeter.
The method and the device have the advantages that firstly, the dial plate images of the historical ammeter are preprocessed to obtain the target dial plate images, so that useless training data of a subsequent model can be reduced, the model training speed and quality are improved, the real ammeter area and the real ammeter number of the target dial plate images are marked, the real ammeter area and the real ammeter number can be used as data references of a subsequent model training result, the learning of the model is supervised, and the recognition capability of the model is improved; secondly, the target dial image is input into the pre-constructed image digital recognition model, and the area detection network and the character recognition network in the image digital recognition model are trained through the target dial image to obtain the trained image digital recognition model, so that the follow-up manual work participating in reading the electricity meter number is reduced, and the follow-up reading efficiency of the electricity meter is improved; further, the embodiment of the invention utilizes the trained image digital recognition model to perform digital recognition on the dial plate image of the current ammeter to obtain the dial plate number of the current ammeter, thereby realizing digital intelligent reading of the current ammeter. Therefore, the intelligent identification method for the electricity meter dial numbers provided by the embodiment of the invention can realize the automatic identification method for the electricity meter numbers and improve the reading efficiency of the electricity meter numbers.
In a possible implementation manner of the first aspect, the performing a preprocessing operation on the dial plate image to obtain a target dial plate image includes:
detecting whether a damage image exists in the dial image, if the damage image exists in the dial image, removing the damage image and detecting whether a repeated image exists in the dial image;
and if the repeated images exist in the dial plate images, the repeated images are removed to generate target dial plate images.
In a possible implementation manner of the first aspect, the detecting whether there is a damage image in the dial plate image includes:
calculating the damage value of each image in the dial image;
if the damage value is larger than a preset threshold value, taking the image as a damage image;
and if the damage value is not larger than the preset threshold value, taking the image as an undamaged image.
In a possible implementation manner of the first aspect, the detecting, by an area detection network in the image digital recognition model, a predicted meter area of the target dial image includes:
carrying out image feature extraction on the target dial plate image by using the convolution layer in the area detection network to obtain a feature dial plate image;
carrying out standardization operation on the characteristic dial plate image by utilizing a batch standardization layer in the area detection network to obtain a standard dial plate image;
and outputting the detection result of the standard dial plate image by using an activation function in the area detection network to generate a predicted electric meter area of the target dial plate image.
In a possible implementation manner of the first aspect, the normalizing the characteristic dial plate image by using a batch normalization layer in the area detection network to obtain a standard dial plate image includes:
carrying out standardization operation on the characteristic dial image by using the following formula:
Figure BDA0003653979160000031
wherein, x' i As a standard dial image, x i Is a characteristic dial image, mu is the mean value of the characteristic dial image, sigma 2 And epsilon is a random number with infinitesimal size for the variance of the characteristic dial image.
In one possible implementation manner of the first aspect, the identifying the predicted meter number of the predicted meter area by using a character recognition network in the image number recognition model includes:
calculating the state value of the prediction electric meter area by using an input gate in the character recognition network;
calculating the activation value of the prediction ammeter area by utilizing a forgetting gate in the character recognition network;
calculating a state update value of the prediction electric meter region according to the state value and the activation value;
and calculating the number sequence of the state updating value by using an output gate in the character recognition network to obtain the predicted electric meter number.
8. In one possible implementation manner of the first aspect, the calculating a model loss of the image number recognition model according to the real meter area and the predicted meter area, and the predicted meter number and the real meter number includes:
calculating a first loss of the image digital recognition model according to the real electric meter area and the prediction electric meter area;
calculating a second loss of the image number recognition model according to the predicted electric meter number and the real electric meter number;
and calculating the model loss of the image digital recognition model according to the first loss and the second loss.
In a second aspect, the present invention provides an apparatus for intelligently identifying numbers on a dial of an electric meter, the apparatus comprising:
the image preprocessing module is used for acquiring a dial plate image of a historical ammeter, preprocessing the dial plate image to obtain a target dial plate image, and marking a real ammeter area and a real ammeter number of the target dial plate image;
the model training module is used for inputting the target dial image into a pre-constructed image digital recognition model, detecting a predicted ammeter area of the target dial image through an area detection network in the image digital recognition model, and recognizing the predicted ammeter number of the predicted ammeter area by using a character recognition network in the image digital recognition model;
the model training module is further used for calculating the model loss of the image digital recognition model according to the real ammeter area, the predicted ammeter number and the real ammeter number;
the model training module is also used for judging whether the model loss meets a preset condition;
the model training module is further configured to adjust parameters of the image digital recognition model when the model loss does not meet the preset condition, and return to perform the step of inputting the target dial image into the pre-constructed image digital recognition model;
the model training module is further used for obtaining a trained image digital recognition model when the model loss meets the preset condition;
and the ammeter digital identification module is used for carrying out digital identification on the dial plate image of the current ammeter by utilizing the trained image digital identification model to obtain the dial plate number of the current ammeter.
In a third aspect, the present invention provides an electronic device comprising:
at least one processor; and a memory communicatively coupled to the at least one processor;
wherein the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the method for smart identification of a number on an electricity meter dial as defined in any one of the above first aspects.
In a fourth aspect, the present invention provides a computer-readable storage medium, in which a computer program is stored, and the computer program, when executed by a processor, implements the method for intelligently identifying the numbers on the dial of an electric meter according to any one of the first aspect.
It is understood that the beneficial effects of the second to fourth aspects can be seen from the description of the first aspect, and are not described herein again.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without inventive exercise.
Fig. 1 is a schematic flow chart of a method for intelligently identifying numbers on a dial of an electric meter according to an embodiment of the present invention;
fig. 2 is a schematic flow chart illustrating one step of the intelligent identification method for the numbers on the dial of the electric meter provided in fig. 1 according to an embodiment of the present invention;
fig. 3 is a schematic flow chart illustrating another step of the method for intelligently identifying numbers on the dial of the electric meter provided in fig. 1 according to an embodiment of the present invention;
fig. 4 is a schematic block diagram of an intelligent identification apparatus for numbers on a dial of an electric meter according to an embodiment of the present invention;
fig. 5 is a schematic view of an internal structure of an electronic device for implementing an intelligent identification method for numbers on a dial of an electric meter according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be obtained by a person skilled in the art without any inventive step based on the embodiments of the present invention, are within the scope of the present invention.
Fig. 1 is a schematic flow chart of an intelligent identification method for numbers on a dial of an electric meter according to an embodiment of the present invention. The intelligent identification method for the electric meter dial numbers described in the figure 1 comprises the following steps:
s1, acquiring dial plate images of the historical electric meters, preprocessing the dial plate images to obtain target dial plate images, and labeling real electric meter areas and real electric meter numbers of the target dial plate images.
In the embodiment of the invention, the historical electric meter is a meter for measuring electric energy, and can be divided into various types of electric meters based on different electric meter attributes, such as industrial and civil meters, electronic standard meters, maximum demand meters, complex charge meters and the like according to the application of the electric meters, alternating current meters, direct current meters and the like according to the access power supply property of the electric meters, single-phase, three-phase three-wire, three-phase four-wire electric energy meters and the like according to the electric equipment of the electric meters, and the dial image is used for reading an electric energy numerical value area image of the historical electric meter.
It should be understood that, due to the complexity of the service scene, the acquired dial plate images may have a damage or repetition phenomenon, and therefore, in the embodiment of the present invention, some useless images in the dial plate images are screened out by performing the preprocessing operation on the dial plate images, so that the useless data for the subsequent model training is reduced, and the speed and quality of the model training are improved.
As an embodiment of the present invention, the performing a preprocessing operation on the dial plate image to obtain a target dial plate image includes: detecting whether a damage image exists in the dial plate image, if the damage image exists in the dial plate image, rejecting the damage image, detecting whether a repeated image exists in the dial plate image, and if the repeated image exists in the dial plate image, rejecting the repeated image, and generating a target dial plate image. If there is neither a damaged image nor a duplicate image in the dial image, the dial image is taken as the target dial image.
Further, in an optional embodiment of the present invention, the detecting whether there is a damage image in the dial image includes: and calculating a damage value of each image in the dial image, if the damage value is greater than a preset threshold value, taking the image as a damaged image, and if the damage value is not greater than the preset threshold value, taking the image as an undamaged image. The loss value may be set to 0.1, or may be set according to an actual service scenario.
Further, in another optional embodiment of the present invention, the damage value of each image in the dial image is calculated by using the following formula:
Figure BDA0003653979160000071
γ=αln(b+1)
wherein L is b (x) The damage value is represented, x represents the pixel value of the image in the dial image, alpha and b represent the weight and the offset of the image in the dial image respectively, and C represents the normalization parameter of the image in the dial image.
Further, in an optional embodiment of the present invention, the repeated image detection of the dial plate image may be implemented by an image detection algorithm, such as an OpenCV algorithm.
Furthermore, the real ammeter area and the real ammeter number of the target dial image are marked to serve as data reference of a subsequent model training result, so that model learning is supervised, and the identification capability of the model is improved, wherein the real ammeter area refers to an area where the number in the dial image is located, and the real ammeter number refers to an ammeter value in the dial image.
S2, inputting the target dial image into a pre-constructed image digital recognition model, detecting the predicted electric meter area of the target dial image through an area detection network in the image digital recognition model, and recognizing the predicted electric meter number of the predicted electric meter area by using a character recognition network in the image digital recognition model.
In the embodiment of the invention, the pre-constructed image digital recognition model comprises an area detection network and a character recognition network, the area detection network can be constructed by a YOLO algorithm and is used for detecting the electric meter area in the target dial image, and the character recognition network comprises a Long Short-Term Memory network (LSTM) which is used for carrying out electric meter digital reading on the electric meter area identified by the area detection network.
Further, before the target dial image is input into the pre-constructed image digital recognition model, the embodiment of the present invention further includes: unifying the image format of the target dial plate image to convert the target dial plate image into a format image which can be recognized by the image digital recognition model, and improving the model training speed, wherein optionally, the image format unification of the target dial plate image can be realized by a CV2 instruction.
Further, as an embodiment of the present invention, referring to fig. 2, the detecting a predicted meter area of the target dial image through an area detection network in the image digital recognition model includes:
s201, extracting image features of the target dial image by using the convolution layer in the area detection network to obtain a feature dial image;
s202, carrying out standardization operation on the characteristic dial plate image by utilizing a batch standardization layer in the area detection network to obtain a standard dial plate image;
s203, outputting the detection result of the standard dial plate image by using an activation function in the area detection network to generate a prediction electric meter area of the target dial plate image.
In an optional implementation of the present invention, the image feature extraction is implemented by a convolution kernel in the convolution layer, and the batch normalization layer normalizes the extracted image features to accelerate model convergence.
In an optional embodiment of the present invention, the feature dial image is normalized using the following formula:
Figure BDA0003653979160000081
wherein, x' i As a standard dial image, x i Is a characteristic dial image, mu is the mean value of the characteristic dial image, sigma 2 And epsilon is a random number with infinitesimal size for the variance of the characteristic dial image.
In an optional embodiment of the present invention, the activation function includes:
Figure BDA0003653979160000082
wherein s' represents the activated electric meter, and s represents a standard dial image.
In an optional embodiment of the present invention, the detection result includes: x, y, height, width, category and the like, wherein x and y represent the central point of the target feature image, the category represents whether the target feature image is an electricity meter area, namely, category 0 represents that the target feature image is not an electricity meter area, and category 1 represents that the target feature image is an electricity meter area, so that the electricity meter with category 1 is selected as the predicted electricity meter area.
Further, as an embodiment of the present invention, the identifying the predicted meter number of the predicted meter area by using the character recognition network in the image number recognition model includes: calculating the state value of the prediction electric meter area by using an input gate in the character recognition network; calculating the activation value of the prediction ammeter area by utilizing a forgetting gate in the character recognition network; calculating a state update value of the prediction electric meter region according to the state value and the activation value; and calculating the number sequence of the state updating value by using an output gate in the character recognition network to obtain the predicted electric meter number.
And S3, calculating the model loss of the image digital recognition model according to the real electric meter area, the prediction electric meter number and the real electric meter number.
In an embodiment of the present invention, referring to fig. 3, the calculating a model loss of the image number recognition model according to the real electric meter area, the predicted electric meter number, and the real electric meter number includes:
s301, calculating a first loss of the image digital recognition model according to the real ammeter area and the predicted ammeter area;
s302, calculating a second loss of the image digital identification model according to the predicted electric meter number and the real electric meter number;
and S303, calculating the model loss of the image digital recognition model according to the first loss and the second loss.
In an alternative embodiment, the first loss of the image digital recognition model is calculated using the following formula:
L1=m g logm p +(1-m g )log(1-m p )
wherein L1 denotes the first loss, m g Pixel value, m, of the g-th pixel point representing the predicted electricity meter region p And expressing the pixel value of the p-th pixel point of the real electric meter area.
In an alternative embodiment, the second loss of the image digital recognition model is calculated using the following formula:
L2=|α pg |
wherein L2 denotes the second, loss, α g Representing a predicted number, alpha, of the meter p Representing a real meter number.
In an alternative embodiment, the model loss of the image digital recognition model is calculated using the following formula:
L=αL1+βL2
where L represents the model penalty, α represents the weight of the first penalty, and β represents the weight of the second penalty. It should be noted that, in the embodiment of the present invention, the final output result of the image number recognition model is a meter number, and therefore, the value of β may be set to be much larger than α, for example, β is set to 0.8, and α is set to 0.2.
Based on the calculation of the model loss, the method can be used as a judgment basis for judging whether the image digital recognition model has stronger recognition capability, so that whether the image digital recognition model needs to be trained continuously or not can be judged
And S4, judging whether the model loss meets a preset condition.
The embodiment of the invention identifies whether the image digital identification model needs to be trained continuously by judging whether the model loss meets a preset condition, wherein the preset condition can be set to be whether the model loss is less than a preset loss, namely, the model loss is less than the preset loss, the model loss meets the preset condition, the model loss is not less than the preset loss, the model loss does not meet the preset condition, optionally, the preset loss can be set to be 0.1, and the preset loss can also be set according to an actual service scene.
And if the model loss does not meet the preset condition, executing S5, adjusting the parameters of the image digital recognition model, and returning to execute the step of inputting the target dial image into the pre-constructed image digital recognition model.
It should be understood that when the model loss does not meet the preset condition, it indicates that the image digital recognition model does not have a strong image digital recognition capability, so in the embodiment of the present invention, by adjusting parameters of the image digital recognition model and returning to the step of inputting the target dial image into the pre-constructed image digital recognition model, the continuous training of the image digital recognition model is realized, and the recognition capability of the image digital recognition model is ensured. Wherein, the parameters of the image digital recognition model comprise weight and bias, and the parameter adjustment of the image digital recognition model can be realized by a gradient descent algorithm, such as a random gradient descent algorithm.
And if the model loss meets the preset condition, executing S6 to obtain the trained image digital recognition model.
It should be understood that when the model loss meets the preset condition, the image digital recognition model has stronger image digital recognition capability, so the invention directly generates the trained image digital recognition model.
And S7, carrying out digital recognition on the dial plate image of the current ammeter by using the trained image digital recognition model to obtain the dial plate number of the current ammeter.
In the embodiment of the invention, the dial plate image of the current ammeter is an image needing to identify the number of the ammeter, and the dial plate image of the current ammeter is input into the trained image number identification model so as to intelligently output the dial plate number of the current ammeter and improve the dial plate number identification efficiency of the current ammeter.
The method and the device have the advantages that firstly, the dial plate images of the historical ammeter are preprocessed to obtain the target dial plate images, so that useless training data of a subsequent model can be reduced, the model training speed and quality are improved, the real ammeter area and the real ammeter number of the target dial plate images are marked, the real ammeter area and the real ammeter number can be used as data references of a subsequent model training result, the learning of the model is supervised, and the recognition capability of the model is improved; secondly, the target dial image is input into the pre-constructed image digital recognition model, and the area detection network and the character recognition network in the image digital recognition model are trained through the target dial image to obtain the trained image digital recognition model, so that the follow-up manual work participating in reading the electricity meter number is reduced, and the follow-up reading efficiency of the electricity meter is improved; further, the embodiment of the invention utilizes the trained image digital recognition model to perform digital recognition on the dial plate image of the current ammeter to obtain the dial plate number of the current ammeter, thereby realizing digital intelligent reading of the current ammeter. Therefore, the intelligent identification method for the electricity meter dial numbers provided by the embodiment of the invention can realize the automatic identification method for the electricity meter numbers and improve the reading efficiency of the electricity meter numbers.
Fig. 4 is a functional block diagram of the intelligent identification device for numbers on a dial of an electric meter according to the present invention.
The intelligent identification device 400 for the number of the dial of the electric meter can be installed in electronic equipment. According to the realized functions, the intelligent identification device for the electricity meter dial numbers can comprise an image preprocessing module 401, a model training module 402 and an electricity meter number identification module 403. The module of the present invention, which may also be referred to as a unit, refers to a series of computer program segments that can be executed by a processor of an electronic device and that can perform a fixed function, and that are stored in a memory of the electronic device.
In the present embodiment, the functions regarding the respective modules/units are as follows:
the image preprocessing module 401 is configured to collect a dial image of a historical electric meter, perform preprocessing operation on the dial image to obtain a target dial image, and label a real electric meter area and a real electric meter number of the target dial image;
the model training module 402 is configured to input the target dial image into a pre-constructed image digital recognition model, so as to detect a predicted electric meter area of the target dial image through an area detection network in the image digital recognition model, and recognize a predicted electric meter number of the predicted electric meter area by using a character recognition network in the image digital recognition model;
the model training module 402 is further configured to calculate a model loss of the image number recognition model according to the real electric meter region, the predicted electric meter number and the real electric meter number;
the model training module 402 is further configured to determine whether the model loss meets a preset condition;
the model training module 402 is further configured to adjust parameters of the image digital recognition model when the model loss does not satisfy the preset condition, and return to perform the step of inputting the target dial image into the pre-constructed image digital recognition model;
the model training module 402 is further configured to obtain a trained image digital recognition model when the model loss meets the preset condition;
the ammeter number recognition module 403 is configured to perform number recognition on the dial image of the current ammeter by using the trained image number recognition model, so as to obtain the dial number of the current ammeter.
In detail, when the intelligent identification device 400 for the electricity meter dial numbers in the embodiment of the present invention is used, the same technical means as the intelligent identification method for the electricity meter dial numbers described in fig. 1 to fig. 3 are adopted, and the same technical effects can be produced, which is not described herein again.
Fig. 5 is a schematic structural diagram of an electronic device for implementing the method for intelligently identifying numbers on a dial of an electric meter according to the present invention.
The electronic device may include a processor 50, a memory 51, a communication bus 52 and a communication interface 53, and may further include a computer program, such as an intelligent identification program of a meter dial number, stored in the memory 51 and operable on the processor 50. In some embodiments, the processor 50 may be composed of an integrated circuit, for example, a single packaged integrated circuit, or may be composed of a plurality of integrated circuits packaged with the same function or different functions, and includes one or more Central Processing Units (CPUs), a microprocessor, a digital Processing chip, a graphics processor, a combination of various control chips, and the like. The processor 50 is a Control Unit (Control Unit) of the electronic device, connects various components of the electronic device by using various interfaces and lines, and executes various functions and processes data of the electronic device by operating or executing programs or modules (for example, an intelligent identification program for executing numbers of a meter dial) stored in the memory 51 and calling data stored in the memory 51.
The memory 51 includes at least one type of readable storage medium including flash memory, removable hard disks, multimedia cards, card-type memory (e.g., SD or DX memory, etc.), magnetic memory, magnetic disks, optical disks, etc. The memory 51 may in some embodiments be an internal storage unit of the electronic device, for example a removable hard disk of the electronic device. The memory 51 may also be an external storage device of the electronic device in other embodiments, such as a plug-in mobile hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like provided on the electronic device. Further, the memory 51 may also include both an internal storage unit and an external storage device of the electronic device. The memory 51 may be used to store not only application software installed in the electronic device and various types of data, such as codes of a smart identification program for numbers on a dial of an electric meter, but also data that has been output or will be output temporarily.
The communication bus 52 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. The bus is arranged to enable connection communication between the memory 51 and at least one processor 50 or the like.
The communication interface 53 is used for communication between the electronic device and other devices, and includes a network interface and a user interface. Optionally, the network interface may include a wired interface and/or a wireless interface (e.g., WI-FI interface, bluetooth interface, etc.), which are typically used to establish a communication connection between the electronic device and other electronic devices. The user interface may be a Display (Display), an input unit such as a Keyboard (Keyboard), and optionally a standard wired interface, a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, or the like. The display, which may also be referred to as a display screen or display unit, is suitable, among other things, for displaying information processed in the electronic device and for displaying a visualized user interface.
Fig. 5 shows only an electronic device having components, and those skilled in the art will appreciate that the structure shown in fig. 5 does not constitute a limitation of the electronic device, and may include fewer or more components than those shown, or some components may be combined, or a different arrangement of components.
For example, although not shown, the electronic device may further include a power supply (such as a battery) for supplying power to each component, and preferably, the power supply may be logically connected to the at least one processor 50 through a power management device, so that functions of charge management, discharge management, power consumption management and the like are realized through the power management device. The power supply may also include any component of one or more dc or ac power sources, recharging devices, power failure detection circuitry, power converters or inverters, power status indicators, and the like. The electronic device may further include various sensors, a bluetooth module, a Wi-Fi module, and the like, which are not described herein again.
It is to be understood that the embodiments described are for illustrative purposes only and that the scope of the claimed invention is not limited to this configuration.
The smart identification program of the electricity meter dial numbers stored in the memory 51 of the electronic device is a combination of a plurality of computer programs, which when executed in the processor 50, can realize:
acquiring a dial plate image of a historical ammeter, preprocessing the dial plate image to obtain a target dial plate image, and labeling a real ammeter area and a real ammeter number of the target dial plate image;
inputting the target dial image into a pre-constructed image digital recognition model, detecting a predicted ammeter area of the target dial image through an area detection network in the image digital recognition model, and recognizing the predicted ammeter number of the predicted ammeter area by using a character recognition network in the image digital recognition model;
calculating model loss of the image digital recognition model according to the real electric meter area, the predicted electric meter number and the real electric meter number;
judging whether the model loss meets a preset condition or not;
if the model loss does not meet the preset condition, adjusting parameters of the image digital recognition model, and returning to execute the step of inputting the target dial image into the pre-constructed image digital recognition model;
if the model loss meets the preset condition, obtaining a trained image digital recognition model;
and carrying out digital recognition on the dial plate image of the current ammeter by using the trained image digital recognition model to obtain the dial plate number of the current ammeter.
Specifically, the processor 50 may refer to the description of the relevant steps in the embodiment corresponding to fig. 1 for a specific implementation method of the computer program, which is not described herein again.
Further, the electronic device integrated module/unit, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in a non-volatile computer-readable storage medium. The computer readable storage medium may be volatile or non-volatile. For example, the computer-readable medium may include: any entity or device capable of carrying said computer program code, recording medium, U-disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM).
The present invention also provides a computer-readable storage medium, storing a computer program which, when executed by a processor of an electronic device, may implement:
acquiring a dial plate image of a historical ammeter, preprocessing the dial plate image to obtain a target dial plate image, and labeling a real ammeter area and a real ammeter number of the target dial plate image;
inputting the target dial image into a pre-constructed image digital recognition model, detecting a predicted ammeter area of the target dial image through an area detection network in the image digital recognition model, and recognizing the predicted ammeter number of the predicted ammeter area by using a character recognition network in the image digital recognition model;
calculating model loss of the image digital recognition model according to the real electric meter area, the predicted electric meter number and the real electric meter number;
judging whether the model loss meets a preset condition or not;
if the model loss does not meet the preset condition, adjusting parameters of the image digital recognition model, and returning to execute the step of inputting the target dial image into the pre-constructed image digital recognition model;
if the model loss meets the preset condition, obtaining a trained image digital recognition model;
and carrying out digital recognition on the dial plate image of the current ammeter by using the trained image digital recognition model to obtain the dial plate number of the current ammeter.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus, device and method can be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is only one logical functional division, and other divisions may be realized in practice.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, functional modules in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional module.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential attributes thereof.
The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference signs in the claims shall not be construed as limiting the claim concerned.
It is noted that, in this document, relational terms such as "first" and "second," and the like, may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The foregoing are merely exemplary embodiments of the present invention, which enable those skilled in the art to understand or practice the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. An intelligent identification method for the number of an electric meter dial is characterized by comprising the following steps:
acquiring a dial plate image of a historical ammeter, preprocessing the dial plate image to obtain a target dial plate image, and labeling a real ammeter area and a real ammeter number of the target dial plate image;
inputting the target dial image into a pre-constructed image digital recognition model, detecting a predicted ammeter area of the target dial image through an area detection network in the image digital recognition model, and recognizing the predicted ammeter number of the predicted ammeter area by using a character recognition network in the image digital recognition model;
calculating model loss of the image digital recognition model according to the real electric meter area, the predicted electric meter number and the real electric meter number;
judging whether the model loss meets a preset condition or not;
if the model loss does not meet the preset condition, adjusting parameters of the image digital recognition model, and returning to execute the step of inputting the target dial image into the pre-constructed image digital recognition model;
if the model loss meets the preset condition, obtaining a trained image digital recognition model;
and carrying out digital recognition on the dial plate image of the current ammeter by using the trained image digital recognition model to obtain the dial plate number of the current ammeter.
2. The intelligent identification method for the numbers on the dial of the electric meter according to claim 1, wherein said pre-processing the dial images to obtain the target dial images comprises:
detecting whether a damage image exists in the dial image, if so, rejecting the damage image and then detecting whether a repeated image exists in the dial image;
and if the repeated images exist in the dial plate images, the repeated images are removed to generate target dial plate images.
3. The intelligent identification method for the number of the dial of the electric meter according to claim 2, wherein the detecting whether the damage image exists in the dial image comprises:
calculating the damage value of each image in the dial image;
if the damage value is larger than a preset threshold value, taking the image as a damage image;
and if the damage value is not larger than the preset threshold value, taking the image as an undamaged image.
4. The intelligent identification method for the number of the electric meter dial according to claim 1, wherein the detecting the predicted electric meter area of the target dial image through the area detection network in the image number identification model comprises:
carrying out image feature extraction on the target dial plate image by using the convolution layer in the area detection network to obtain a feature dial plate image;
carrying out standardization operation on the characteristic dial plate image by utilizing a batch standardization layer in the area detection network to obtain a standard dial plate image;
and outputting the detection result of the standard dial plate image by using an activation function in the area detection network to generate a predicted electric meter area of the target dial plate image.
5. The intelligent identification method for the numbers of the meter dials according to claim 4, wherein said normalizing said characteristic dial images using a lot normalization layer in said area detection network to obtain standard dial images comprises:
carrying out standardization operation on the characteristic dial image by using the following formula:
Figure RE-FDA0003709172320000021
wherein, x' i As a standard dial image, x i Is a characteristic dial image, mu is the mean value of the characteristic dial image, sigma 2 And epsilon is a random number with infinitesimal size for the variance of the characteristic dial image.
6. The intelligent identification method for the numbers on the dial of the electric meter according to claim 1, wherein the identification of the predicted electric meter numbers of the predicted electric meter area by using the character recognition network in the image number recognition model comprises the following steps:
calculating the state value of the prediction electric meter area by using an input gate in the character recognition network;
calculating the activation value of the prediction ammeter area by utilizing a forgetting gate in the character recognition network;
calculating a state update value of the prediction electric meter region according to the state value and the activation value;
and calculating the number sequence of the state updating value by using an output gate in the character recognition network to obtain the predicted electric meter number.
7. The method for intelligently identifying numbers on a meter dial according to any one of claims 1 to 6, wherein said calculating a model loss of said image number identification model based on said real meter area and said predicted meter area, and said predicted meter number and said real meter number comprises:
calculating a first loss of the image digital recognition model according to the real electric meter area and the prediction electric meter area;
calculating a second loss of the image number recognition model according to the predicted electric meter number and the real electric meter number;
and calculating the model loss of the image digital recognition model according to the first loss and the second loss.
8. An intelligent identification device for the number of a dial of an electric meter, characterized in that the device comprises:
the image preprocessing module is used for acquiring a dial plate image of a historical ammeter, preprocessing the dial plate image to obtain a target dial plate image, and marking a real ammeter area and a real ammeter number of the target dial plate image;
the model training module is used for inputting the target dial image into a pre-constructed image digital recognition model, detecting a predicted ammeter area of the target dial image through an area detection network in the image digital recognition model, and recognizing the predicted ammeter number of the predicted ammeter area by using a character recognition network in the image digital recognition model;
the model training module is further used for calculating the model loss of the image digital recognition model according to the real ammeter area, the predicted ammeter number and the real ammeter number;
the model training module is also used for judging whether the model loss meets a preset condition;
the model training module is further configured to adjust parameters of the image digital recognition model when the model loss does not meet the preset condition, and return to perform the step of inputting the target dial image into the pre-constructed image digital recognition model;
the model training module is further used for obtaining a trained image digital recognition model when the model loss meets the preset condition;
and the ammeter digital identification module is used for carrying out digital identification on the dial plate image of the current ammeter by utilizing the trained image digital identification model to obtain the dial plate number of the current ammeter.
9. An electronic device, characterized in that the electronic device comprises:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the method of smart identification of electricity meter dial numbers according to any of claims 1 to 7.
10. A computer-readable storage medium, storing a computer program, characterized in that said computer program, when executed by a processor, implements the method for smart identification of the digits of an electricity meter dial according to any one of claims 1 to 7.
CN202210549315.6A 2022-05-20 2022-05-20 Intelligent identification method, device, equipment and medium for electric meter dial numbers Pending CN114898367A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210549315.6A CN114898367A (en) 2022-05-20 2022-05-20 Intelligent identification method, device, equipment and medium for electric meter dial numbers

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210549315.6A CN114898367A (en) 2022-05-20 2022-05-20 Intelligent identification method, device, equipment and medium for electric meter dial numbers

Publications (1)

Publication Number Publication Date
CN114898367A true CN114898367A (en) 2022-08-12

Family

ID=82723099

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210549315.6A Pending CN114898367A (en) 2022-05-20 2022-05-20 Intelligent identification method, device, equipment and medium for electric meter dial numbers

Country Status (1)

Country Link
CN (1) CN114898367A (en)

Similar Documents

Publication Publication Date Title
CN113159147B (en) Image recognition method and device based on neural network and electronic equipment
CN113705462B (en) Face recognition method, device, electronic equipment and computer readable storage medium
CN112699775A (en) Certificate identification method, device and equipment based on deep learning and storage medium
CN115469590B (en) Low-power consumption control method, device and equipment for intelligent electric meter interface and storage medium
CN112528908B (en) Living body detection method, living body detection device, electronic equipment and storage medium
CN112132016B (en) Bill information extraction method and device and electronic equipment
CN112580684A (en) Target detection method and device based on semi-supervised learning and storage medium
CN114399212A (en) Ecological environment quality evaluation method and device, electronic equipment and storage medium
CN114708461A (en) Multi-modal learning model-based classification method, device, equipment and storage medium
CN113657385B (en) Data detection method and device of electronic metering device and electronic equipment
CN112113638B (en) Water meter function self-checking device and method
CN111460293B (en) Information pushing method and device and computer readable storage medium
CN112115714A (en) Deep learning sequence labeling method and device and computer readable storage medium
CN114898367A (en) Intelligent identification method, device, equipment and medium for electric meter dial numbers
CN115796398A (en) Intelligent demand analysis method, system, equipment and medium based on electric power materials
CN115641186A (en) Intelligent analysis method, device and equipment for preference of live broadcast product and storage medium
CN114267064A (en) Face recognition method and device, electronic equipment and storage medium
CN114240924A (en) Power grid equipment quality evaluation method based on digitization technology
CN114973374A (en) Expression-based risk evaluation method, device, equipment and storage medium
CN114742801A (en) B-ultrasonic image intelligent identification method and device based on PSO-SVM algorithm
CN114708073A (en) Intelligent detection method and device for surrounding mark and serial mark, electronic equipment and storage medium
CN114398890A (en) Text enhancement method, device, equipment and storage medium
CN113139129A (en) Virtual reading track map generation method and device, electronic equipment and storage medium
CN114742828B (en) Intelligent analysis method and device for workpiece damage assessment based on machine vision
CN113963215A (en) Precision calibration method and device based on artificial intelligence and readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination