Towards computer vision technologies: Semi-automated reading of automated utility meters

In this report we analysed a possibility of using computer vision techniques for automated reading of utility meters. In our study, we focused on two computer vision techniques: an open-source solution Tensorflow Object Detection (Tensorflow) and a commercial solution Anyline. This report extends our previous publication: We start with presentation of a structured analysis of related approaches. After that we provide a detailed comparison of two computer vision technologies, Tensorflow Object Detection (Tensorflow) and Anyline, applied to semi-automated reading of utility meters. In this paper, we discuss limitations and benefits of each solution applied to utility meters reading, especially focusing on aspects such as accuracy and inference time. Our goal was to determine the solution that is the most suitable for this particular application area, where there are several specific challenges.


Introduction
Smart solutions are extensively used for many kind of utilities, e.g., electricity and gas. Therefore, development and application of smart devices, including smart meters, is an active research topic over the last decades [8,15,60]. Smart meters have many advantages, where the most important is the capability to record the data on energy consumption and sent this data automatically to the provider and/or to the corresponding customer. Having this detailed data we can provide additional monitoring and billing features, as well as a much more detailed analysis of the consumption patterns. On this basis, we could also provide suggestions to a customer on how to reduce consumption or to schedule the energy-consuming tasks for the time, which is mostly suitable for the energy network (in the terms of payment or the energy load).
However, even when smart utility meters provide many benefits and can be seen as the future direction of the industry, they also have a number of disadvantage that prevents an immediate replacement of old meters by the new smart solutions: • Cost: Implementation of smart meters on a large scale is expensive. In the case the upgrade is optional/voluntary, customers might prefer to refuse or delay an upgrade to a smart meter, if they have to pay for an upgrade. In the case the upgrade is compulsory, customers might struggle with payment of an extensive bill, and a subsidy from government might be needed.
• Learning curve: A customer can benefit from using a smart meter only if they know well how exactly to use it. Some customers might refuse or delay an upgrade to a smart meter because they perceive that using smart meters is not so easy and requires reasonable learning efforts.
• Privacy concerns: The data collected from the smart meters might be used to extract information on the usage pattern, which could provide a basis for identification whether/when the residents are currently at home, how many of residents are at home during the particular weekdays or day times, etc. This fact together with increased number of cyber-security attacks over recent years prevents some customers from using the smart meters.
By these reasons, in some countries the roll out to the smart meter systems is done phase-wise, where on the initial phase the roll out is voluntary. As the initial phase might take many years, we believe that even during this period a semi-automated solution would be beneficial. For example, a semi-automated solution it might benefit people with vision impairment.
In this report we analysed a possibility of using computer vision techniques for semi-automated reading of utility meters. This report extends our previous publication [51]. We start with presentation of a structured analysis of related approaches. After that we provide a detailed comparison of two computer vision technologies, Tensorflow Object Detection (Tensorflow) and Anyline, applied to semi-automated reading of utility meters. We compare application of these technologies with each other, as well as with our previous results presented in our earlier work [53].
In our earlier study, we conducted a project in collaboration with Energy Australia, which is an electricity and gas retailing private company that supplies electricity and natural gas to more than 2.6 million residential and business customers throughout Australia. Their solution for non-smart meters was to provide an online portal, where the consumers can update the records on the utility readings. While this solution provided many benefits for the customers during the initial phase of smart meters introduction, it also had some disadvantages: the consumers had to provide a lot of additional details, and to calculate their utility readings manually. The goal of our previous project was to elaborate an alternative method for the existing system, which would allow for a higher degree of automation to increase the usability of the system. The proposed solution was to use computer vision techniques for capturing readings. We analysed there the following computer-vision technologies: Google Cloud Vision (GCV), Amazon Web Services (AWS) Rekognition, Tesseract OCR, and Azure's Computer Vision. The study demonstrated that AWS Rekognition provides better results for this application domain. However, it's accuracy was far from ideal: the average accuracy values AWS Rekognition was only 36%. In the current study, we used the same data sets, but applied other approaches. The current results are significantly better in the terms of recognition accuracy than the results of our early investigation study: the results of the current study demonstrate the accuracy up to 92.35%, which is promising for real-life application of the proposed solution.

Smart meters
The research on the smart meter devices and the corresponding analytic was actively conducted over many years, which was reflected not only in research publications but also in patents, see e.g., [17,23,26,28,31,37,55].
Over the last decade, there were two core research directions in this area: (1) privacy and security aspects of the smart meter application, and (2) smart meters in combination with a smart grid system. In the rest of the section we discuss the most cited (as per Google Scholar, retrieved 23 November 2022) publications, grouped by the research directions.
A summary of most cited papers on privacy and security aspects of smart meters is presented in Table 1. This research direction is currently the most active one among the mentioned directions, because the privacy and security concerns provide one of the biggest obstacles for the (potential) users of smart meters. In many cases, data mining and data analytics techniques were applied on the meter reading data, to investigate the above issues questions. A summary of most cited papers on design of smart meters for smart grid is presented in Table 2.

Computer-vision technologies
There are many computer-vision technologies that are potentially applicable for semi-automated reading of smart meters, for example, • Google Cloud Vision 1 is a computer-vision technology provided by the Google platform ((Vertex AI Vision)), • AWS Rekognition 2 is another cloud-based solution, provided by Amazon Web Services, • Tesseract OCR [44] is an optical character recognition engine, which is released under the Apache License.
• Computer Vision AI service provided by Microsoft Azure 3 , • Tensorflow 4 is an open-source machine learning system that operates at large scale and offers a multitude of models to be retrained (more than 30), see [1,2]. It provides visualisation tool Ten-sorBoard [56] that allows to visualise TensorFlow graphs, plot corresponding quantitative metrics, etc.
• Anyline 5 is a commercial solution intended to read utility meters, which also offers a free sample app Anyline OCR Scanner that has been used during tests within our project. [24] Multimedia content identification through smart meter power usage profiles 256 [42] Theoretical framework to analyse privacy aspects of smart meters 271 [5] Survey on smart meter data privacy 203 [19] Survey on privacy-aware smart metering 97 [35] analysis on balancing consumer privacy concerns with legitimate applications 406 [18] Influence of data granularity on smart meter privacy 112 [30] An approach for occupancy detection from electricity consumption data 268 [29] Household occupancy monitoring using electricity meters 140 [27] Occupancy sensing using smart meters 107 [61] Occupancy sensing using smart meters in commercial buildings 96 [40] Formal framework to quantify the privacy trade off problem in smart meter data 220 [7] Extraction of the households characteristics from the the smart meter data 282 [3] Analysis on customer profiles based the consumption patterns from the smart meter data 278 [11] Non-intrusive occupancy monitoring using smart meters, energy-efficiency optimisations 207 [10] approach for re-identification of smart meter data 82 [9] A privacy model for smart metering 265 Study on design and development of smart energy meter for the smart grid 103 [6] Analysis of energy meters evolution in smart grids 212 [58] Detection of energy theft and defective smart meters in smart grids using linear regression 141

Challenges of application of computer vision technologies
There are many challenges for application of computer vision technologies for the reading of utility meters. In what follows we discuss the most critical of them: • Reflections: Most meter models encountered has a transparent protective cover, which lead to reflections from it. This becomes problematic for computer vision technologies which includes thresholding/flooding techniques. Thresholding techniques are usually applied to OCR technologies in-order to minimize noise and or to convert to black-and-white images.
Flooding is a technique used to find similar neighbouring pixels. This technique can be used when finding contours of shapes.
• Clipped digits: The final digit in analogue meters usually rotate freely. This becomes problematic as the digit becomes clipped and the full digit is not displayed -instead of this a half of one digit and a half of another digit are presented. The computer vision technology would need to be able to deal with this issue and recognise clipped digits effectively. • Not all characters and digits, which can be identified on the meter, actually belong to the meter reading: Utility meters commonly include other text consisting of letters and digits. The computer vision technology would need to be able to discriminate which digits are part of the meter reading, and which have to be ignored. noise to the observed meter. Grime with reflection creates a blur effect around some digits. Digits are also observed to be warped along with the shape of the cover, e.g., the digits appear "stretched" or "squashed" depending on observation angle. Furthermore, there can be a significant contrast difference in scenarios where the colour of the digits is mixed.
• Different representation styles (scales, dials and digits) mixed within a meter interface, see Figure 2. The reading value of utility meters is not represented in a consistent manner. Utility models observed during the project presented their reading value either through: using rotational dials, using cyclometers, a combination of rotational dials and cyclometers or a singular digital display. The challenge becomes even more complex when the numeric value is displayed on a scale, e.g., as presented in Figure 2: -The meter (a) should be read as 5762.615m 3 gas and not 57626, -The meter (b) should be read as 14485.68kWh energy and not 14485, -The meter (c) should be read as 75691.1kWh energy and not 756911.
The meters commonly include a decimal point. Most meters include the decimal point as the last digit and can be read and a tenth. Sometimes it is a mixture of a digit and a dial as in Figures 2(b) and (c). Some models display three decimal points as seen in Figure 1 (the digits after decimal points are highlighted with red colour), which should read as 2550.883m 3 and not 2550883. It's easy to see from the image, that the red colour might make it more difficult to identify the digits in the case of manual reading. The aim of our work is to identify a computer vision technology that is capable of distinguishing between different numeric scales and be able to detect both digits and rotation of dials.

METHODOLOGY
To determine which of these technologies is most suitable for reading utility meters, we elaborated a set of tests that allows us to identify the limitations of each technology by gradually adjusting image blur, noise, gamma or scale.
The following methodology was applied to analyse the techniques: 1. To create a training dataset for the Tensorflow Object Detection framework.
2. To train all the different models using the dataset, which was elaborated at Step 1. This was done through Google ML Engine.
3. To create evaluation datasets for which the technologies can be tested against.

4.
To create a test harness for the involved technologies.

To run the test harness on the evaluation datasets created from
Step 3.
The training dataset is a set of all images found during project duration. The final training dataset consisted of 395 images and 2000 annotations. Unfortunately, this is still considered limited as supplied Tensorflow models were created based upon 2000+ annotations per object.
As the evaluation dataset we used the same images as in our earlier work [53], which allowed us to compare the results of application of Tensorflow and Anyline not only with each other, but also with the results of AWS Rekognition (which demonstrated the best but not good enough accuracy in our previous study). Thus, in [53], a total of 30 images were selected based on their "uniqueness" -images with unique meters or images with unique lighting. These images were duplicated and modified with various effects in order to test the limitations of the different technologies. These effects are: • Scaling: The dataset was scaled in steps of 0.1 ranging from a scale of 0.1 to 0.9 (10% to 90%) of the original dataset. • Blurring: Blurring was done in steps of 10 from 10 to 90 with an open source blur algorithm that is based on the normalised box filter, see [38]. The algorithm uses a normalised box filter, the numeral value adjusts the kernel size. • Gamma: The gamma algorithm was used with an open source lookup table algorithm [38]. The gamma correction to simulate different lightning conditions. • Noise: The noise algorithm is based upon the salt and pepper noise algorithm that adds sharp and sudden disturbances in the image in the form of sparsely occurring white and black pixels, see [22]. This algorithm was included to further test the performance of the various technologies as noise arguably emulates "dirt" on meters.
Our initial hypotheses in terms of accuracy and detection rates were as follows: H1: FRCNN model would significantly outperform other models. H2: SSD model would perform significantly worse than the other models in terms of accuracy. H3: The lower the image resolution is, the faster inference would occur. H4: FRCNN would require significantly more time than FPN and SSD models. As Tensorflow Object Detection only detects objects, the results have to be filtered in order to give a reading. We applied the filtering algorithm presented in Algorithm 1 to • remove any junk data, i.e., any detected objects for what the identification confidence is ≤ 10%, • remove all duplicates within the geometric region, keeping the results withe the highest identification confidence. The filtering algorithm can be further improved, if the previous reading of the meter is considered, for which an access to the customer's account is required. We haven't applied this improvement within the comparison study, as the supplied Anyline app cannot include any customer related data. Results from each dataset and each technology were produced in csv files (a comma-separated values file that allows data to be saved in a tabular format) with the following structure: FileName, InferTime, FilteredReading, ExpectedReading, IsCorrect where InferTime denotes the interference time, which was measured in ms.
Similarly to [53], we calculated the accuracy of recognition calculated as the following simple formula (we measure the accuracy in percents, where where CorrectResults is the number of results that match with the original readings completely, Total presents the total number of images in a dataset. As in our study, we had 30 images in each of the datasets, Total = 30. It is important to mention that both Tensorflow and Anyline were less sensitive to salt and paper issues (Figure 3), scaling ( Figure 6), gamma issues ( Figure 5), and than to blurring ( Figure 4). However, for all data sets, the accuracy of Tensorflow was almost twice higher:

RESULTS AND DISCUSSION
• With low blurring (10BLUR and 20BLUR), Tensorflow performed with 100% accuracy, where the accuracy of Anyline dropped to approx. 63% and 50% respectively.
• For the effect of 50BLUR, the accuracy of Tensorflow FPN and Anyline were approx. 87% and 37% respectively.
• For the effect of 90BLUR, the accuracy for Tensorflow FRCNN, Tensorflow SSD and Anyline was only 10%, where the accuracy of Tensorflow FPN was approx. 33%. However, the 90BLUR effect means a very blurry image.
The overall performance of the Tensorflow models greatly surpass expectations in terms of accuracy, having an average performance of 88.14%, 89.51% and 92.35% for FRCNN, SSD, and FPN, respectively. This is especially remarkable, if we compare it with the average accuracy values from AWS Rekognition was only 36% that demonstrated the best (but not really satisfactory) results within the study presented in [53]. TensorBoard confirms the accuracy of the trained models. Scoring a near perfect score of 1.0 is extremely significant is a strong indication that Tensorflow Object Detection is a suitable framework for the automated meter reading. Anyline performed arguably well having an average performance of 57.16%, and struggled on several utility meter models. The results indicate that Anyline may not have trained or tested their product on a similar utility meters models as used within the Australian market.     With respect to our hypotheses H1-H4, the results of the conducted study can be summarises as follows: • H1 and H2 were disproved by the conducted study, see Table 3: In the terms of accuracy, the best performing model was FPN, where FRCNN and SSD were performing slightly worse than the other models.
• H3 was proved as correct, see Table 4 (rows presenting the results for 0.1-0.09SCALE as well as the original dataset).
• H4 was also proved as correct, see Table 4: In average, FRCNN was approx. 2.5 slower than FPM and approx. 3.2 times slower than SSD.
The results for both Tensorflow and Anyline are also significantly better than the results of our early investigation study conducted for the domain of meter reading recognition, where we analysed Google Cloud Vision (GCV) and Amazon Web Services (AWS) Rekognition using the same data sets. The average accuracy values for GCV and AWS Rekognition were just 29% and 36% respectively, see [53].
For an overall comparison of the the accuracy scores over all datasets, see also Table 3.
On this basis, we also performed interference analysis for Tensorflow models, see Table 4. The tests were run in the background of a laptop with an Intel i7-6700HQ CPU. However, the inference time could improve significantly (more than 10-fold) if a serverbased CPU is used for the same experiment, see [25].

CONCLUSIONS
We presented the results of a research project, which goal was to provide an alternative, semiautomated, method for the current system to update the meter reading data, collected from non-smart utility meters.
Our early investigation study on the recognition accuracy of Google Cloud Vision and AWS Rekognition applied for recognition in utility meter readings, demonstrated very low average accuracy values (29% and 36%, respectively). For this reasons, we conducted a further study to analyse two other computer vision technologies, applied for recognition in utility meter readings: • an open-source Tensorflow technique (FRCNN, FPN, and SSD models), and • a commercial solution Anyline.
The study demonstrated that Tensorflow provides significantly better results for our application domain (92.35% for the FPN model), in comparison to Anyline, as well as to Google Cloud Vision and AWS Rekognition. This research project was conducted under the initiative Research embedded in teaching, see [43,47,49,59]. This initiative was proposed at the RMIT University (Melbourne, Australia) within the Software Engineering projects (SEPs) conducted in collaboration with industrial partners. The aim of this initiative is to encourage students' curiosity for Software Engineering and Computer Science research. To reach this aim we include research components as bonus tasks in the final year projects (on both undergraduate and postgraduate levels), which typically focus on software and system development.
Few weeks long research projects have been sponsored by industrial partners, who collaborated with the students and academic advisers through the final year projects. Respectively, the topics of these short research projects focus align the topics final year projects. The successful results of this initiative are presented in [12-14, 20, 21, 45, 46, 48, 50, 52-54].
Future Work: We are going to implement a Tensorflow-based solution within the prototype we presented earlier in [53], where the implementation was based on AWS Rekognition. The prototype includes a mobile application for automated capturing of the meter readings and managing the customer's account details, and a Web application for management customers' accounts, details on the electricity and gas meters, etc.