{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,7,16]],"date-time":"2026-07-16T20:54:09Z","timestamp":1784235249137,"version":"3.55.0"},"reference-count":28,"publisher":"MDPI AG","issue":"22","license":[{"start":{"date-parts":[[2023,11,16]],"date-time":"2023-11-16T00:00:00Z","timestamp":1700092800000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0\/"}],"content-domain":{"domain":[],"crossmark-restriction":false},"short-container-title":["Sensors"],"abstract":"<jats:p>The escalating global water usage and the increasing strain on major cities due to water shortages highlights the critical need for efficient water management practices. In water-stressed regions worldwide, significant water wastage is primarily attributed to leakages, inefficient use, and aging infrastructure. Undetected water leakages in buildings\u2019 pipelines contribute to the water waste problem. To address this issue, an effective water leak detection method is required. In this paper, we explore the application of edge computing in smart buildings to enhance water management. By integrating sensors and embedded Machine Learning models, known as TinyML, smart water management systems can collect real-time data, analyze it, and make accurate decisions for efficient water utilization. The transition to TinyML enables faster and more cost-effective local decision-making, reducing the dependence on centralized entities. In this work, we propose a solution that can be adapted for effective leakage detection in real-world scenarios with minimum human intervention using TinyML. We follow an approach that is similar to a typical machine learning lifecycle in production, spanning stages including data collection, training, hyperparameter tuning, offline evaluation and model optimization for on-device resource efficiency before deployment. In this work, we considered an existing water leakage acoustic dataset for polyvinyl chloride pipelines. To prepare the acoustic data for analysis, we performed preprocessing to transform it into scalograms. We devised a water leak detection method by applying transfer learning to five distinct Convolutional Neural Network (CNN) variants, which are namely EfficientNet, ResNet, AlexNet, MobileNet V1, and MobileNet V2. The CNN models were found to be able to detect leakages where a maximum testing accuracy, recall, precision, and F1 score of 97.45%, 98.57%, 96.70%, and 97.63%, respectively, were observed using the EfficientNet model. To enable seamless deployment on the Arduino Nano 33 BLE edge device, the EfficientNet model is compressed using quantization resulting in a low inference time of 1932 ms, a peak RAM usage of 255.3 kilobytes, and a flash usage requirement of merely 48.7 kilobytes.<\/jats:p>","DOI":"10.3390\/s23229210","type":"journal-article","created":{"date-parts":[[2023,11,16]],"date-time":"2023-11-16T08:19:43Z","timestamp":1700122783000},"page":"9210","update-policy":"https:\/\/doi.org\/10.3390\/mdpi_crossmark_policy","source":"Crossref","is-referenced-by-count":40,"title":["Smart Buildings: Water Leakage Detection Using TinyML"],"prefix":"10.3390","volume":"23","author":[{"given":"Othmane","family":"Atanane","sequence":"first","affiliation":[{"name":"School of Science and Engineering, Al Akhawayn University in Ifrane, P.O. Box 104, Hassan II Avenue, Ifrane 53000, Morocco"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0003-2841-2739","authenticated-orcid":false,"given":"Asmaa","family":"Mourhir","sequence":"additional","affiliation":[{"name":"School of Science and Engineering, Al Akhawayn University in Ifrane, P.O. Box 104, Hassan II Avenue, Ifrane 53000, Morocco"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-1804-6977","authenticated-orcid":false,"given":"Nabil","family":"Benamar","sequence":"additional","affiliation":[{"name":"School of Science and Engineering, Al Akhawayn University in Ifrane, P.O. Box 104, Hassan II Avenue, Ifrane 53000, Morocco"},{"name":"School of Technology, Moulay Ismail University of Meknes, Meknes 50050, Morocco"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-0578-0830","authenticated-orcid":false,"given":"Marco","family":"Zennaro","sequence":"additional","affiliation":[{"name":"The Abdus Salam International Centre for Theoretical Physics, 34151 Trieste, Italy"}],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"1968","published-online":{"date-parts":[[2023,11,16]]},"reference":[{"key":"ref_1","doi-asserted-by":"crossref","first-page":"106936","DOI":"10.1016\/j.envint.2021.106936","article-title":"Global water shortage and potable water safety; Today\u2019s concern and tomorrow\u2019s crisis","volume":"158","author":"Salehi","year":"2022","journal-title":"Environ. Int."},{"key":"ref_2","first-page":"68","article-title":"The Waste of Water in Public Supplies, and Its Prevention","volume":"Volume 115","author":"Hope","year":"1996","journal-title":"Proceedings of the Minutes of the Proceedings of the Institution of Civil Engineers"},{"key":"ref_3","doi-asserted-by":"crossref","first-page":"242","DOI":"10.1061\/(ASCE)CF.1943-5509.0000094","article-title":"Automated detection and location of leaks in water mains using infrared photography","volume":"24","author":"Fahmy","year":"2010","journal-title":"J. Perform. Constr. Facil."},{"key":"ref_4","first-page":"175","article-title":"From water scarcity to water security in the Maghreb Region: The Moroccan Case","volume":"Volume 37","author":"Kadi","year":"2012","journal-title":"Proceedings of the Environmental Challenges in the Mediterranean 2000\u20132050: Proceedings of the NATO Advanced Research Workshop on Environmental Challenges in the Mediterranean 2000\u20132050"},{"key":"ref_5","doi-asserted-by":"crossref","first-page":"256","DOI":"10.1016\/j.protcy.2016.03.025","article-title":"Customized IoT enabled wireless sensing and monitoring platform for smart buildings","volume":"23","author":"Shah","year":"2016","journal-title":"Procedia Technol."},{"key":"ref_6","first-page":"1595","article-title":"A review on TinyML: State-of-the-art and prospects","volume":"34","author":"Ray","year":"2022","journal-title":"J. King Saud Univ.-Comput. Inf. Sci."},{"key":"ref_7","doi-asserted-by":"crossref","first-page":"96892","DOI":"10.1109\/ACCESS.2023.3294111","article-title":"A Comprehensive Survey on TinyML","volume":"11","author":"Abadade","year":"2023","journal-title":"IEEE Access"},{"key":"ref_8","doi-asserted-by":"crossref","first-page":"2533","DOI":"10.3390\/s20092533","article-title":"Edge machine learning for ai-enabled iot devices: A review","volume":"20","author":"Merenda","year":"2020","journal-title":"Sensors"},{"key":"ref_9","doi-asserted-by":"crossref","first-page":"37","DOI":"10.1145\/2831347.2831354","article-title":"Edge-centric computing: Vision and challenges","volume":"45","author":"Montresor","year":"2015","journal-title":"ACM SIGCOMM Comput. Commun. Rev."},{"key":"ref_10","doi-asserted-by":"crossref","first-page":"1535","DOI":"10.3390\/buildings12101535","article-title":"Review of Water Leak Detection Methods in Smart Building Applications","volume":"12","author":"Yussof","year":"2022","journal-title":"Buildings"},{"key":"ref_11","doi-asserted-by":"crossref","first-page":"2231","DOI":"10.2166\/ws.2019.105","article-title":"Detection of multiple leakage points in water distribution networks based on convolutional neural networks","volume":"19","author":"Fang","year":"2019","journal-title":"Water Supply"},{"key":"ref_12","doi-asserted-by":"crossref","first-page":"4279","DOI":"10.1109\/TIE.2017.2764861","article-title":"Novel leakage detection by ensemble CNN-SVM and graph-based localization in water distribution systems","volume":"65","author":"Kang","year":"2017","journal-title":"IEEE Trans. Ind. Electron."},{"key":"ref_13","doi-asserted-by":"crossref","first-page":"04020001","DOI":"10.1061\/(ASCE)CP.1943-5487.0000881","article-title":"Detecting leaks in water distribution pipes using a deep autoencoder and hydroacoustic spectrograms","volume":"34","author":"Cody","year":"2020","journal-title":"J. Comput. Civ. Eng."},{"key":"ref_14","doi-asserted-by":"crossref","first-page":"103256","DOI":"10.1016\/j.autcon.2020.103256","article-title":"Leakage detection in water pipelines using supervised classification of acceleration signals","volume":"117","author":"Shukla","year":"2020","journal-title":"Autom. Constr."},{"key":"ref_15","unstructured":"Krizhevsky, A., Sutskever, I., and Hinton, G. (2012, January 3\u20136). Imagenet classification with deep convolutional neural networks. Proceedings of the Advances in Neural Information Processing Systems 25: 26th Annual Conference on Neural Information Processing Systems 201, Lake Tahoe, NV, USA."},{"key":"ref_16","doi-asserted-by":"crossref","first-page":"474","DOI":"10.3390\/iot1020026","article-title":"Precise water leak detection using machine learning and real-time sensor data","volume":"1","year":"2020","journal-title":"IoT"},{"key":"ref_17","doi-asserted-by":"crossref","first-page":"4874","DOI":"10.3390\/s22134874","article-title":"Enriching IOT modules with edge AI functionality to detect water misuse events in a decentralized manner","volume":"22","author":"Loukatos","year":"2022","journal-title":"Sensors"},{"key":"ref_18","doi-asserted-by":"crossref","first-page":"126135","DOI":"10.1109\/ACCESS.2021.3111113","article-title":"Neural Network Techniques for Detecting Intra-Domestic Water Leaks of Different Magnitude","volume":"9","author":"Zese","year":"2021","journal-title":"IEEE Access"},{"key":"ref_19","doi-asserted-by":"crossref","unstructured":"He, K., Zhang, X., Ren, S., and Sun, J. (2016, January 27\u201330). Deep residual learning for image recognition. Proceedings of the IEEE Conference On Computer Vision and Pattern Recognition, Las Vegas, NV, USA.","DOI":"10.1109\/CVPR.2016.90"},{"key":"ref_20","unstructured":"Howard, A., Zhu, M., Chen, B., Kalenichenko, D., Wang, W., Wey, T., Andreetto, M., and Adam, H. (2017). Mobilenets: Efficient convolutional neural networks for mobile vision applications. arXiv."},{"key":"ref_21","unstructured":"Tan, M., and Le, Q. (2021, January 18\u201324). Efficientnetv2: Smaller models and faster training. Proceedings of the International Conference on Machine Learning, Virtual."},{"key":"ref_22","doi-asserted-by":"crossref","first-page":"731","DOI":"10.1080\/15732479.2016.1188318","article-title":"Novel vibration-based technique for detecting water pipeline leakage","volume":"13","author":"Yazdekhasti","year":"2017","journal-title":"Struct. Infrastruct. Eng."},{"key":"ref_23","doi-asserted-by":"crossref","first-page":"46","DOI":"10.1080\/15732479.2017.1327544","article-title":"Experimental evaluation of a vibration-based leak detection technique for water pipelines","volume":"14","author":"Yazdekhasti","year":"2018","journal-title":"Struct. Infrastruct. Eng."},{"key":"ref_24","first-page":"149","article-title":"Applications of wavelet transforms in earthquake, wind and ocean engineering","volume":"21","author":"Gurley","year":"1999","journal-title":"Eng. Struct."},{"key":"ref_25","doi-asserted-by":"crossref","unstructured":"Sandler, M., Howard, A., Zhu, M., Zhmoginov, A., and Chen, L. (2018, January 18\u201323). Mobilenetv2: Inverted residuals and linear bottlenecks. Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Salt Lake City, UT, USA.","DOI":"10.1109\/CVPR.2018.00474"},{"key":"ref_26","unstructured":"Kingma, D.P., and Jimmy, B. (2014). Adam: A method for stochastic optimization. arXiv."},{"key":"ref_27","doi-asserted-by":"crossref","first-page":"27","DOI":"10.1016\/j.autcon.2018.11.033","article-title":"Detection of construction workers under varying poses and changing background in image sequences via very deep residual networks","volume":"99","author":"Son","year":"2019","journal-title":"Autom. Constr."},{"key":"ref_28","doi-asserted-by":"crossref","first-page":"217","DOI":"10.1016\/j.autcon.2019.02.013","article-title":"A vision-based method for crack detection in gusset plate welded joints of steel bridges using deep convolutional neural networks","volume":"102","author":"Dung","year":"2019","journal-title":"Autom. Constr."}],"container-title":["Sensors"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/www.mdpi.com\/1424-8220\/23\/22\/9210\/pdf","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,10,10]],"date-time":"2025-10-10T21:23:51Z","timestamp":1760131431000},"score":1,"resource":{"primary":{"URL":"https:\/\/www.mdpi.com\/1424-8220\/23\/22\/9210"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2023,11,16]]},"references-count":28,"journal-issue":{"issue":"22","published-online":{"date-parts":[[2023,11]]}},"alternative-id":["s23229210"],"URL":"https:\/\/doi.org\/10.3390\/s23229210","relation":{},"ISSN":["1424-8220"],"issn-type":[{"value":"1424-8220","type":"electronic"}],"subject":[],"published":{"date-parts":[[2023,11,16]]}}}