{"title":"A novel approach for testing water safety using deep learning inference of microscopic images of unincubated water samples","authors":"Sanjay Srinivasan","doi":"10.1007/s13201-026-02974-z","DOIUrl":null,"url":null,"abstract":"Abstract Fecal-contaminated water causes diseases and even death. Current microbial water safety tests require pathogen incubation, taking 24–72 h and costing $20-$50 per test. This paper presents a solution (DeepScope) that classifies microscopic images of unincubated water samples by a composite water-safety determination, meeting UNICEF’s ideal Target Product Profile numerical performance thresholds for presence/absence testing, with an estimated per-test cost of $0.44. By eliminating the need for pathogen incubation, DeepScope reduces testing time by over 98%. In DeepScope, a dataset of microscope images of bacteria and water samples was assembled from the public DIBaS bacterial image collection and water samples from multiple source types, with labels cross-validated using color-change coliform tests. A novel tile-swap augmentation technique was developed to expand dataset diversity and mitigate overfitting, swapping random tile pairs to preserve bacterial morphology while producing a large space of augmented images. Four convolutional neural network models (ResNet-18 and ResNet-50 backbones, with and without dropout regularization) were developed using transfer learning, then evaluated on a field-test dataset comprising 100,000 microscope images of unseen, real-world water samples collected from fourteen different water sources across Sammamish, WA. On the 160 original microscope acquisitions underlying this dataset, the DeepScope model (ResNet-50 with dropout) achieved 96.88% accuracy, 98.61% recall, and 94.67% precision, corresponding to a 1.39% false-negative rate and a 4.55% false-positive rate. A larger field test was then carried out on the 100,000 augmented images derived from these acquisitions, with the operating threshold set to fix precision at 90%. Under these conditions the model achieved recall of 94.48% ±0.11%, accuracy of 92.79% ±0.08%, and F1 of 92.19% ±0.09%—a 5.52% false-negative rate, well below UNICEF’s 10% ceiling and competitive with membrane filtration and color-change coliform tests without requiring pathogen incubation. The DeepScope model was tested in a web server environment using mobile applications for Android and iOS. The testing validated Internet-based or smartphone-based water safety testing, with results obtained in seconds.","PeriodicalId":8374,"journal":{"name":"Applied Water Science","volume":"64 1","pages":""},"PeriodicalIF":5.7000,"publicationDate":"2026-10-15","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Applied Water Science","FirstCategoryId":"93","ListUrlMain":"https://doi.org/10.1007/s13201-026-02974-z","RegionNum":3,"RegionCategory":"环境科学与生态学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q1","JCRName":"WATER RESOURCES","Score":null,"Total":0}
引用次数: 0
Abstract
Abstract Fecal-contaminated water causes diseases and even death. Current microbial water safety tests require pathogen incubation, taking 24–72 h and costing $20-$50 per test. This paper presents a solution (DeepScope) that classifies microscopic images of unincubated water samples by a composite water-safety determination, meeting UNICEF’s ideal Target Product Profile numerical performance thresholds for presence/absence testing, with an estimated per-test cost of $0.44. By eliminating the need for pathogen incubation, DeepScope reduces testing time by over 98%. In DeepScope, a dataset of microscope images of bacteria and water samples was assembled from the public DIBaS bacterial image collection and water samples from multiple source types, with labels cross-validated using color-change coliform tests. A novel tile-swap augmentation technique was developed to expand dataset diversity and mitigate overfitting, swapping random tile pairs to preserve bacterial morphology while producing a large space of augmented images. Four convolutional neural network models (ResNet-18 and ResNet-50 backbones, with and without dropout regularization) were developed using transfer learning, then evaluated on a field-test dataset comprising 100,000 microscope images of unseen, real-world water samples collected from fourteen different water sources across Sammamish, WA. On the 160 original microscope acquisitions underlying this dataset, the DeepScope model (ResNet-50 with dropout) achieved 96.88% accuracy, 98.61% recall, and 94.67% precision, corresponding to a 1.39% false-negative rate and a 4.55% false-positive rate. A larger field test was then carried out on the 100,000 augmented images derived from these acquisitions, with the operating threshold set to fix precision at 90%. Under these conditions the model achieved recall of 94.48% ±0.11%, accuracy of 92.79% ±0.08%, and F1 of 92.19% ±0.09%—a 5.52% false-negative rate, well below UNICEF’s 10% ceiling and competitive with membrane filtration and color-change coliform tests without requiring pathogen incubation. The DeepScope model was tested in a web server environment using mobile applications for Android and iOS. The testing validated Internet-based or smartphone-based water safety testing, with results obtained in seconds.
被粪便污染的水会导致疾病甚至死亡。目前的微生物水安全测试需要病原体孵育,耗时24-72小时,每次测试花费20- 50美元。本文提出了一种解决方案(DeepScope),通过复合水安全测定对未孵育水样的显微图像进行分类,满足联合国儿童基金会理想的目标产品概况存在/不存在测试的数值性能阈值,估计每次测试成本为0.44美元。通过消除病原体孵育的需要,DeepScope将测试时间缩短了98%以上。在DeepScope中,从公共DIBaS细菌图像收集和来自多个来源类型的水样中组装了细菌和水样的显微镜图像数据集,并使用变色大肠菌群测试交叉验证标签。开发了一种新的瓦片交换增强技术来扩展数据集的多样性并减轻过拟合,通过交换随机瓦片对来保留细菌形态,同时产生大空间的增强图像。使用迁移学习开发了四个卷积神经网络模型(ResNet-18和ResNet-50骨架,带和不带dropout正则化),然后在现场测试数据集上进行了评估,该数据集包括从华盛顿州Sammamish的14个不同水源收集的未见过的真实水样的100,000个显微镜图像。在该数据集的160个原始显微镜采集数据上,DeepScope模型(ResNet-50 with dropout)的准确率为96.88%,召回率为98.61%,精密度为94.67%,对应的假阴性率为1.39%,假阳性率为4.55%。然后对从这些获取的100,000张增强图像进行了更大的现场测试,将操作阈值设置为将精度固定在90%。在此条件下,该模型的召回率为94.48%±0.11%,准确率为92.79%±0.08%,F1为92.19%±0.09%,假阴性率为5.52%,远低于联合国儿童基金会10%的上限,与膜过滤和变色大肠菌群检测相竞争,无需病原体孵育。DeepScope模型在使用Android和iOS移动应用程序的web服务器环境中进行了测试。该测试验证了基于互联网或智能手机的水安全测试,并在几秒钟内获得结果。