Intelligent water analysis powered by Hybrid AI (Machine Learning + Explainable Logic)
AquaOS is a data-driven water quality monitoring platform designed to evaluate, interpret, and track water safety using a combination of machine learning models and AI-based reasoning.
The system transforms raw sensor inputs into:
- Clear safety decisions
- Quantifiable risk scores
- Structured explanations
It is built to simulate real-world monitoring environments such as:
- Water treatment facilities
- Environmental monitoring systems
- Reservoir and river analysis
Unlike traditional systems that only classify results, AquaOS uses a multi-layered AI architecture:
| Layer | Function |
|---|---|
| ML Model (Random Forest) | Predicts water quality score |
| Rule-Based Engine | Explains decisions |
| Risk Engine | Evaluates future degradation |
| AI Advisor | Provides domain-level insights |
This enables the system to be both:
✔ Predictive
✔ Explainable
The system evaluates key indicators of water safety:
- pH Level — acidity/alkalinity balance
- Turbidity — suspended particles
- Total Dissolved Solids (TDS) — dissolved substances
- Dissolved Oxygen — oxygen availability
- Predicts Water Quality Score (0–100)
- Classifies:
- SAFE
- UNSAFE
- Processes real-time or simulated data
- Identifies root causes of contamination
- Provides scientific reasoning
- Generates corrective recommendations
Not just what happened, but why it happened
| Score Range | Classification |
|---|---|
| 90 – 100 | Excellent |
| 70 – 89 | Good |
| 50 – 69 | Fair |
| 25 – 49 | Poor |
| 0 – 24 | Hazardous |
- Evaluates future degradation probability
- Categorizes risk:
- LOW
- MODERATE
- HIGH
- Modify parameters dynamically
- Observe impact on water safety
- Enables predictive experimentation
- Persistent storage using SQL (SQLite + SQLAlchemy)
- User-specific report tracking
- AI explanations stored with each record
- Downloadable analysis reports
- JWT-based authentication
- Role-based system:
| Role | Access |
|---|---|
| Admin | Full system control |
| Staff | Analysis + monitoring |
| Student | Limited access |
- Answers water-related queries
- Provides contextual explanations
- Supports learning and decision-making
- Runs as standalone software
- Built using:
- PyWebView
- PyInstaller
Frontend (Streamlit UI)
↓
FastAPI Backend (API Layer)
↓
Hybrid AI Engine
├── ML Model (Prediction)
├── Rule Engine (Explainability)
└── Risk Engine
↓
Database (SQLite)
↓
Reports & Visualization
- Python
- FastAPI
- SQLAlchemy
- Uvicorn
- Streamlit
- Plotly
- Pandas
- Scikit-learn (Random Forest)
- Hybrid AI Logic
- JWT Authentication
- Role-Based Access Control
- SQLite
- PyWebView
- PyInstaller
backend/
├── main.py
├── ai_engine.py
├── ai_advisor.py
├── auth.py
├── models.py
├── database.py
├── report_generator.py
├── train_model.py
├── model.pkl
frontend/
├── pages/
│ ├── _Dashboard.py
│ ├── _AI_Analysis.py
│ ├── _Reports.py
│ ├── _Devices.py
│ ├── _About_System.py
│ └── _User_Management.py
│
├── components/
desktop_launcher.py
water_quality.db
git clone https://github.com/your-username/aquaos-water-monitoring.git
cd aquaos-water-monitoring
pip install -r requirements.txtpython desktop_launcher.pyBackend:
uvicorn backend.main:app --reloadFrontend:
streamlit run frontend/pages/_Dashboard.py| Parameter | Value |
|---|---|
| pH | 7.2 |
| Turbidity | 3 |
| TDS | 350 |
| Dissolved Oxygen | 6 |
- Hybrid AI (ML + Explainability)
- Real-time decision system
- Scenario simulation engine
- User-specific data tracking
- Structured reporting system
- IoT sensor integration
- Real-time streaming pipelines
- Cloud deployment
- Advanced anomaly detection
- Continuous model retraining
For educational and research purposes.