# Deep Learning-Powered System for Real-Time Digital Meter Reading on Edge Devices
## 2 Materials and Methods  
### Dataset  
The dataset used in this work, named SINATRA, comprises digital meter images acquired by different mobile devices in a series of visits from November 2021 to November 2022 to the company _Aguas e Energia do Porto, EM (AEdP)_. There are two distinct types of equipment that display different information: the HACH Sc200 universal controller (UC) and the Krohne UFC 300 flow meter (FM). The first presents four values, from which ORP and OD values must be extracted, while the flow rate is shown in the latter. The pictures were captured by the authors and different operators at different angles and at different times of the day. Furthermore, the distance of acquisition to the equipment varies according to its location and depending on the position which best suits the operator. All photos taken are approximately 1 meter from the device. However, since zoom is available, the operators can use it further away (which means that the picture will have lower quality). This way, we ensured variability in terms of lighting, perspective and distance. In Figure 1, it is possible to observe examples of normal pictures ((a), (d) and (f)), pictures taken with too much light (b), dark (c) and also in perspective view (e). Some samples with poorer imaging conditions, such as blur, dirt, glare or reflections, were also included in the dataset. For image acquisition, we used different mobile devices: Samsung Tab Active3 (SM-T575), Xiaomi M11 (M2011K2G), Poco X3 (M2007J20 CG), Samsung S20 FE (SM-G781B/DS), Samsung Tab S7 (SM-T870, iPhone SE 2020 (A2296) and iPad Pro (MHQR3 TY/A). The devices have cameras that range from 12 to 108 Megapixels, creating images with resolutions of 1920 by 1080 or 3840 by 2160 and apertures between f1/8 and f2/0. There are no other relevant features of the devices that have implications for the population of the dataset.  
The dataset distribution is described in Table 1. The test images correspond to images acquired by operators. The ratio between images from UC and FM is considerably different in the test set because the first is located outside, which means that it is necessary to capture more images in different acquisition conditions to evaluate the robustness of the reading pipeline.  
The dataset is manipulated for training each of the steps of the pipeline. For screen detection, the raw images are cropped to a square at the center (with a width equal to 90% of the shortest side), and their respective ground truth annotations are used. For text detection, the annotations are performed on images containing only the screen with a corrected perspective, while text recognition uses images of text regions. Note that not all of the images in the training dataset are used to train each module. Illustrative examples are shown in Figure 2.  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Equipment** & **Train Set** & **Test Set** \\ \hline UC & 584 & 222 \\ FM & 461 & 68 \\ \hline Total & 1045 & 290 \\ \hline \hline \end{tabular}
\end{table}
Table 1: SINATRA dataset: train and test set distribution.  
Figure 1: Examples from the SINATRA dataset at different acquisition conditions. **(a)** Normal, **(b)** Daylight, **(c)** Dark, **(d)** Normal, **(e)** Perspective, **(f)** Normal.