Image processing and computer vision on low-cost microcontrollers: a case study on water meter reading
Sohrab Jalali, Filiz Ersöz, Babak Taeb
Abstract
Despite the worldwide move towards smart meters, mechanical water meters are still used extensively in residential and municipal networks. Upgrading them with computer vision avoids costly infrastructure replacement, yet most approaches send data to cloud servers for processing. This paper introduces an end-to-end on-device solution for recognizing water meter digits on the ESP32CAM board, which costs below $15 and features only 520 KB SRAM. A MobileNetV2-based digit classifier is quantized to INT8. Three firmware improvements extend the inference loop: i) a temporal check confirming a reading only when three consecutive detections match, ii) on-device anomaly detection without server support and iii) adaptive sampling between 3 s during water usage and 60 s when idle. A Flask-based internet of things (IoT) dashboard named MeterWatch provides live monitoring. The model achieves 2 ms latency and 235.6 KB peak memory. On a 553-image test subset from a custom 6,155-image dataset with 13,470 digit annotations it reaches 99.60% cell-level accuracy including background, 96.89% digit-only accuracy and 87.70% exact five-digit reading accuracy. To the best of our knowledge, this is the first system combining on-device INT8 deployment, water meter digit recognition and intelligent firmware behaviour on the ESP32-CAM. Evaluations used a single meter brand under fixed flash illumination.
Keywords
Adaptive sampling; Anomaly detection; Embedded computer vision; ESP32-CAM; INT8 quantization; TinyML; Water meter reading