Smart Buildings: Water Leakage Detection Using TinyML
Keywords:
EfficientNet, TinyML, accelerometer, acoustic data, scalogramAbstract
Rising global water demand and urban water shortages underscore the need for effective water management. This study explores leveraging TinyML in smart buildings to enhance water management by integrating sensors and embedded Machine Learning models. TinyML enables real-time data collection, analysis, and precise decision-making for optimal water utilization, reducing reliance on centralized entities. The proposed solution adapts to real-world scenarios, detecting leaks with minimal human intervention. Following a machine learning lifecycle, the study utilizes an acoustic dataset, applying transfer learning to five Convolutional Neural Network (CNN) variants. The EfficientNet model achieves notable results, with a maximum testing accuracy, recall, precision, and F1 score of 97.45%, 98.57%, 96.70%, and 97.63%, respectively. For deployment on the Arduino Nano 33 BLE edge device, the EfficientNet model undergoes quantization, ensuring low inference time (1932 ms), peak RAM usage (255.3 KB), and flash usage (48.7 KB).
References
Salehi, M. Global water shortage and potable water safety; Today’s concern and tomorrow’s crisis. Environ. Int. 2022, 158, 106936.
Hope, W.; Bircumshaw, J. The Waste of Water in Public Supplies, and Its Prevention. In Proceedings of the Minutes of the Proceedings
of the Institution of Civil Engineers; Thomas Telford-ICE Virtual Library; Emerald Publishing Limited: Leeds, UK 1996; Volume 115,
pp. 68–75.
Fahmy, M.; Moselhi, O. Automated detection and location of leaks in water mains using infrared photography. J. Perform. Constr.
Facil. 2010, 24, 242–248.
Kadi, M.A. From water scarcity to water security in the Maghreb Region: The Moroccan Case. In Proceedings of the
Environmental Challenges in the Mediterranean 2000–2050: Proceedings of the NATO Advanced Research Workshop on
Environmental Challenges in the Mediterranean 2000–2050. Madrid, Spain, 2–5 October 2002; Springer Science & Business Media:
Berlin/Heidelberg, Germany, 2012; Volume 37, p. 175.
Shah, J.; Mishra, B. Customized IoT enabled wireless sensing and monitoring platform for smart buildings. Procedia Technol. 2016,
, 256–263.
Ray, P.P. A review on TinyML: State-of-the-art and prospects. J. King Saud Univ.-Comput. Inf. Sci. 2022, 34, 1595–1623.
Sensors 2023, 23, 9210 17 of 17
Abadade, Y.; Temouden, A.; Bamoumen, H.; Benamar, N.; Chtouki, Y.; Hafid, A.S. A Comprehensive Survey on TinyML. IEEE
Access 2023, 11, 96892–96922.
Merenda, M.; Porcaro, C.; Iero, D. Edge machine learning for ai-enabled iot devices: A review. Sensors 2020, 20, 2533.
Garcia Lopez, P.; Montresor, A.; Epema, D.; Datta, A.; Higashino, T.; Iamnitchi, A.; Barcellos, M.; Felber, P.; Riviere, E. Edge-centric
computing: Vision and challenges. ACM SIGCOMM Comput. Commun. Rev. 2015, 45, 37–42.
Yussof, N.A.M.; Ho, H.W. Review of Water Leak Detection Methods in Smart Building Applications. Buildings 2022, 12, 1535.
Fang, Q.; Zhang, J.; Xie, C.; Yang, Y. Detection of multiple leakage points in water distribution networks based on convolutional
neural networks. Water Supply 2019, 19, 2231–2239.
Kang, J.; Park, Y.J.; Lee, J.; Wang, S.H.; Eom, D.S. Novel leakage detection by ensemble CNN-SVM and graph-based localization
in water distribution systems. IEEE Trans. Ind. Electron. 2017, 65, 4279–4289.
Cody, R.A.; Tolson, B.A.; Orchard, J. Detecting leaks in water distribution pipes using a deep autoencoder and hydroacoustic
spectrograms. J. Comput. Civ. Eng. 2020, 34, 04020001.
Shukla, H.; Piratla, K. Leakage detection in water pipelines using supervised classification of acceleration signals. Autom. Constr.
, 117, 103256.
Krizhevsky, A.; Sutskever, I.; Hinton, G. Imagenet classification with deep convolutional neural networks. In Proceedings of the
Advances in Neural Information Processing Systems 25: 26th Annual Conference on Neural Information Processing Systems 201,
Lake Tahoe, NV, USA, 3–6 December 2012.
Alves Coelho, J.; Glória, A.; Sebastião, P. Precise water leak detection using machine learning and real-time sensor data. IoT 2020,
, 474–493.
Loukatos, D.; Lygkoura, K.A.; Maraveas, C.; Arvanitis, K.G. Enriching IOT modules with edge AI functionality to detect water
misuse events in a decentralized manner. Sensors 2022, 22, 4874.
Zese, R.; Bellodi, E.; Luciani, C.; Alvisi, S. Neural Network Techniques for Detecting Intra-Domestic Water Leaks of Different
Magnitude. IEEE Access 2021, 9, 126135–126147.
He, K.; Zhang, X.; Ren, S.; Sun, J. Deep residual learning for image recognition. In Proceedings of the IEEE Conference On
Computer Vision and Pattern Recognition, Las Vegas, NV, USA, 27–30 June 2016; pp. 770–778.
Howard, A.; Zhu, M.; Chen, B.; Kalenichenko, D.; Wang, W.; Wey, ; T.; Andreetto, M.; Adam, H. Mobilenets: Efficient convolutional
neural networks for mobile vision applications. arXiv 2017, arXiv:1704.04861.
Tan, M.; Le Q. Efficientnetv2: Smaller models and faster training. In Proceedings of the International Conference on Machine
Learning, Virtual, 18–24 July 2021; pp. 10096–10106.
Yazdekhasti, S.; Piratla, K.R.; Atamturktur, S.; Khan, A.A. Novel vibration-based technique for detecting water pipeline leakage.
Struct. Infrastruct. Eng. 2017, 13, 731–742.
Yazdekhasti, S.; Piratla, K.R.; Atamturktur, S.; Khan, A. Experimental evaluation of a vibration-based leak detection technique for
water pipelines. Struct. Infrastruct. Eng. 2018, 14, 46–55.
Gurley, K.; Kareem, A. Applications of wavelet transforms in earthquake, wind and ocean engineering. Eng. Struct. 1999,
, 149–167.
Sandler, M.; Howard, A.; Zhu, M.; Zhmoginov, A.; Chen, L. Mobilenetv2: Inverted residuals and linear bottlenecks. In Proceedings
of the IEEE Conference on Computer Vision and Pattern Recognition, Salt Lake City, UT, USA, 18–23 June 2018; pp. 4510–4520.
Kingma, D.P.; Jimmy, B. Adam: A method for stochastic optimization. arXiv 2014, arXiv:1412.6980.
Son, H.; Choi, H.; Seong, H.; Kim, C. Detection of construction workers under varying poses and changing background in image
sequences via very deep residual networks. Autom. Constr. 2019, 99, 27–38.
Dung, C.V.; Sekiya, H.; Hirano, S.; Okatani, T.; Miki, C. A vision-based method for crack detection in gusset plate welded joints of
steel bridges using deep convolutional neural networks. Autom. Constr. 2019, 102, 217–229.