DesalGuard — AI-Powered Water Infrastructure Security

Inspiration

Desalination is vital for water-scarce regions like the UAE. We built DesalGuard to explore how machine learning can identify unusual sensor behaviour and support cybersecurity monitoring for critical water infrastructure.

How I Built It

DesalGuard uses HTML, CSS, JavaScript, Python, FastAPI, NumPy, and Scikit-learn. An Isolation Forest model is trained on 1,600 synthetic normal sensor samples covering pressure, flow rate, and salinity. The dashboard sends readings to the backend through a REST API and displays predictions, anomaly scores, and alerts.

I also integrated the USGS Water Data APIto fetch recent streamflow observations from the Potomac River at Little Falls in the United States. FastAPI retrieves and processes the public data, then sends it to the dashboard as JSON. This real river data is displayed separately and is not used by the ML model.

Challenges

The main challenges were connecting the frontend and backend, handling external API responses, and demonstrating anomaly detection without real desalination-plant data. I used simulated readings and an abnormal scenario to demonstrate the workflow.

What I Learned

I learned to build REST APIs, integrate public data, use machine learning for anomaly detection, and handle data and network errors. Future work includes testing with authorised industrial telemetry and improving detection accuracy.

Share this project:

Updates