Atanane Othmane, Mourhir Asmaa, Benamar Nabil, Zennaro Marco
School of Science and Engineering, Al Akhawayn University in Ifrane, P.O. Box 104, Hassan II Avenue, Ifrane 53000, Morocco.
School of Technology, Moulay Ismail University of Meknes, Meknes 50050, Morocco.
Sensors (Basel). 2023 Nov 16;23(22):9210. doi: 10.3390/s23229210.
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' 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.
全球水资源使用量不断攀升,以及水资源短缺给各大城市带来的压力与日俱增,这凸显了高效水资源管理措施的迫切需求。在全球水资源紧张的地区,大量水资源浪费主要归因于漏水、低效使用以及老化的基础设施。建筑物管道中未被发现的漏水加剧了水资源浪费问题。为解决这一问题,需要一种有效的漏水检测方法。在本文中,我们探讨了边缘计算在智能建筑中的应用,以加强水资源管理。通过集成传感器和嵌入式机器学习模型(即TinyML),智能水资源管理系统可以收集实时数据、进行分析,并为高效用水做出准确决策。向TinyML的转变实现了更快且更具成本效益的本地决策,减少了对集中式实体的依赖。在这项工作中,我们提出了一种解决方案,该方案可通过TinyML在最少人工干预的情况下适用于现实场景中的有效漏水检测。我们采用了一种类似于生产中典型机器学习生命周期的方法,涵盖数据收集、训练、超参数调整、离线评估以及在部署前针对设备资源效率进行模型优化等阶段。在这项工作中,我们考虑了一个现有的聚氯乙烯管道漏水声学数据集。为了准备用于分析的声学数据,我们进行了预处理,将其转换为小波图。我们通过将迁移学习应用于五个不同的卷积神经网络(CNN)变体(即EfficientNet、ResNet、AlexNet、MobileNet V1和MobileNet V2)设计了一种漏水检测方法。使用EfficientNet模型时,发现CNN模型能够检测漏水,其最大测试准确率、召回率、精确率和F1分数分别为97.45%、98.57%、96.70%和97.63%。为了能够在Arduino Nano 33 BLE边缘设备上无缝部署,使用量化对EfficientNet模型进行压缩,从而实现了低推理时间(1932毫秒)、峰值RAM使用量为255.3千字节以及仅48.7千字节的闪存使用需求。