How WaterScope is Using Machine Learning to Ensure Safe Drinking Water

by Lily Adelstein

September 13, 2021 10 min read

As part of our Machine Learning in Product series, I spoke with Sammy Madhi, lead project engineer at WaterScope, about using machine learning to help provide safe drinking water worldwide. While operationalizing machine learning is still challenging, as you'll hear in this interview, there is massive potential for machine learning to take small teams with big ideas to the next level and WaterScope is a great example of that. Find out more about WaterScope at or on Twitter @WaterScope_org, and check out our full conversation below.

We love talking to companies about the novel ways they are using machine learning and we want to share those conversations with you. Our hope is that these conversations inspire new and interesting ways of using machine learning to solve big problems. That is why we started this series.

If you have any feedback on this or any other conversations, or want to be part of a future interview, please feel free to contact

Lily: The following is a conversation with Sammy Mahdi, the senior project engineer at WaterScope. WaterScope is an organization with a goal to provide safe drinking water to everyone and they're using machine learning to do it. They also recently won the Cisco Global Problem Solver Challenge of 2021 which is an annual competition that awards cash prizes to early-stage tech entrepreneurs solving the world's toughest problems. I hope you enjoy the interview.

Lily: Okay. Hello, thank you so much for joining me today.

Sammy: Thank you for the invitation.

Lily: Yeah, of course. So, I'd love to start things off with, if you could just tell me a little bit about WaterScope.

Sammy: Sure, yeah so WaterScope is a spin out from the University of Cambridge. We were founded five or six years ago now and what we're trying to solve is the problem of water inequality around the world and we're trying to achieve that by developing a system that is easy to use, digital and affordable.

Lily: Got it and so what has the, can you tell me a little bit more about like the problem that you all are solving.

Sammy: Yeah, so globally around 2 billion people drink contaminated water every day which leads to significant health consequences and I think 500,000 people a year would die from water-borne diseases and we think one of the reasons why this problem is so widespread is because people don't actually know what's the quality of the water and yeah we're trying to solve that problem by providing a system that anyone can use at any place.

Lily: Got it. Great and can you tell me a little bit about yourself and maybe your background and your role at WaterScope?

Sammy: Yeah so I'm Sammy and so my background is in electronic engineering so and I also have a almost have a PhD in nanotechnology but I’ve joined WaterScope on the side during my PhD and basically my role at the moment is basically lead engineer so I’m responsible for the prototype development overseeing the software development establishing a supply chain and just in general whatever company business there is.

Lily: Got it and are you guys, you're a small team right now or how many people do you have on board?

Sammy: Yeah so we have three full-time people me, Alex and Alicia and we also have part-time helpers that you know would come in you know 10-20 hours a week so we have maybe four or five of these and yeah.

Lily: Cool, that's great and so you know I kind of discovered you guys because you were winners of the Cisco Global Problem Solver Challenge which is amazing. Congratulations.

Sammy: Thank you

Lily: and in this great article that they did of you guys and an interview with your CEO they talked about how you all are using machine learning in your in your product so I was wondering if you could tell us a little bit about that.

Sammy: Yeah, I mean first as a sort of background the way that the WaterScope system works in two sentences is we have a water sample that we want to test so what we would do is we would filter all of this water through like a tiny filter paper then we would add some nutrient media to that filter paper and then the bacteria on that filter paper that we've captured would grow over time and change color and then once we have these colored bacteria we will take an image of them with a microscope and then this is where the machine learning comes in we need to quantify we need to quantify how many bacteria we have and also identify the type of bacteria so the type we just look at the colors we have blue colonies which are E.coli and we have purple colonies which are purple/pink which are other coliforms. So just based on the color we can we can tell what the strain is and then with the machine learning algorithm we also count how many colony forming units we have which is essentially what we're looking for is one but here in a hundred milliliters of water which is quite small and yeah the machine learning part helps us identify these columns because sometimes they're quite faint so you can't exactly see them by eye and the other problem is so if you have 150 of those tiny colonies on your filter paper counting them by hand like manually it's quite a tedious task and you also need to be quite an expert in the field to actually be able to tell apart whether the region that you're looking at if it's a bacteria or like some sort of debris from your sample.

Lily: Got it, so is the can you tell me a little bit about the data that you work with is it mainly images?

Sammy: Yeah so we work entirely with image data so we would capture a very high resolution image which is magnified for lens and then we have a 12 megapixel camera and then we would do some very basic image processing and then we would sort of scale down everything so that it can then be fed into the machine learning model.

Lily: It's very cool and so was that the original plan for the product to use machine learning or did it kind of evolve?

Sammy: So we yeah we weren't sure initially whether we would need a machine learning solution because you can like these type of problems sometimes you can afford them with a traditional image processing and basically over one summer we had two projects running in parallel we had a you know a more traditional approach with these image processing techniques like using image j and open c and so on and then we also had a you know a more wild machine learning project that would basically look at how we can use that and after three months the well initially the image processing approach was giving better results but then over time the machine learning sort of kept getting better and better and better and then until the end it was very clear that the machine learning approach would give better results given the amount of data that we had and also the internal expertise of the team so that's sort of how we decided to stick with machine learning.

Lily: Wow and has it been easy what kind of challenges have you all been tackling as you use machine learning?

Sammy: So I mean there were obviously the technical challenges of you know getting the right amount of data labeling the data you know training the algorithms and yeah that was you know there we yeah we sort of managed but a bigger problem that we had is finding the right people to do this work for us yeah so at the moment the sort of high-end machine learning engineers they're being scoped up by you know Google and Microsoft and so on so you know it's not exactly appealing to tell someone oh can you do like a little project for us and like you know we'll pay you maybe something maybe not. So in that regard we were quite lucky because we we're working with a student in Cambridge who had you know quite a bit of interest in machine learning so he was still early on in his career so he was you know willing to work with us but for example at the moment. Yeah, one of the challenges that we have is like how do we get someone on board that has that expertise and doesn't want to you know charge us a lot of money?

Lily: Yeah, and it's definitely a big challenge but hopefully you know with this kind of a problem it's so inspiring that you know i would imagine that people who get in this business to solve big problems are the kind of people that would be coming to you guys hopefully.

Sammy: Yeah hopefully

Lily: Yeah, so do you see opportunities for growth with machine learning? Do you see kind of using it more in the future or differently in the future?

Sammy:  I think so yeah so one of the advantages of our system that we have is basically we can so at the moment we look at E.coli bacteria in water but there are like other types of bacteria that we can we can look at so like cholera or yeah other I’m not the biologist so well basically by changing one ingredient in our sort of nutrient media we can we can look at different bacteria now if you have to like do a new algorithm every time with like traditional image processing that's quite a tedious task whereas with machine learning the way that we envision it is we just you know collect the data label it and then we pass it to the same algorithm that we've developed before and this would allow us to really expand our portfolio in terms of what type of water tests we offer the other growth opportunity for us with machine learning is bringing the time to detection earlier so at the moment we look at 18 hours but we for a fact know that at nine hours the bacteria they're visible already so the question is can we now train an algorithm that can identify these bacteria even earlier so say at six hours because there are some thing changes to the way that our image looks in six hours and we think that for a machine learning algorithm this would be easier to distinguish than for a human eye and this would yeah again make our product much better.

Lily: Yeah, I mean that's a big difference nine hours vs 18 hours.

Sammy: Yeah

Lily: So, what do you see for the future of machine learning? I mean I think you talked about it a little bit but for the future of machine learning and your product potentially, but do you see kind of like outside of your product in this field that you are working in?

Sammy: Yeah, what we would like to see in the future and what I think might happen is you know there will be more and more sort of no hands machine learning services. So you would have, you know, you wouldn't need a machine learning specialist to be able to leverage some of the you know the novel stuff that's happening out there and I think yeah there are quite a few promising platforms at the moment that you know would at some point allow us to not have a, you know, a machine learning specialist in our team but you know just feed the data and then the tool will sort of take care of that so this is what we definitely see in the future because yeah I think training enough machine learning specialists is a challenging task.

Lily: Yeah, absolutely and you know especially for a small team introducing machine learning as you talked about before bringing on a specialist can be very daunting, and you know takes a lot of time away from the team.

Sammy: Yeah.

Lily: Well cool, and then I also wanted to ask you are there ways that people can support WaterScope?

Sammy: So, you can sign for a newsletter on where we send updates. You can follow us on twitter and we're always looking for people to help so even if you're not able to commit you know 20 hours a week even you know a couple of hours a week you know we will be more than happy to welcome you to our team so just yeah get in touch through our website and yeah, we can find something.

Lily: Awesome yeah, I love what you guys are doing. I think that you know, I hope in the future we see machine learning and AI more in international development and supporting you know people in other countries. So yeah, thank you.

Sammy: There are big opportunities at the moment

Lily: yeah definitely. Okay well, have a wonderful day.

Sammy: You too. Bye

Want products news and updates?

Sign up for our newsletter to stay up to date.