Smart India Hackathon (SIH) | AI-Powered Coastal Environmental Monitoring & Fishery Risk Prediction System
- Overview
- The Problem
- Key Features
- System Architecture
- Machine Learning & Explainable AI (XAI)
- Role-Based Workflows
- Tech Stack
- Getting Started
- Demo Credentials
- API Endpoints
AquaTrace is a proactive coastal intelligence platform designed to protect marine ecosystems and coastal livelihoods along India's coastline (specifically focused on the Konkan Belt — Palghar, Raigad, Ratnagiri, Sindhudurg).
By fusing multi-spectral satellite telemetry, meteorological models, and explainable machine learning, AquaTrace forecasts environmental risk, harmful algal blooms (HAB), and fishery disruption up to 7 days in advance.
- Reactive Governance: Authorities traditionally detect pollution, thermal anomalies, or toxic blooms only after mass fish mortality occurs.
- Data Silos: Pollution regulators (MPCB), fisheries departments, and marine researchers work with disconnected datasets.
- The "Black Box" Barrier: Decision-makers cannot enforce regulatory actions without scientific trust and feature-level attribution for AI predictions.
- 🛰️ Multi-Spectral Ocean Telemetry: Real-time tracking of Sea Surface Temperature (SST), Particulate Backscattering (
$b_{bp}$ / Turbidity), Colored Dissolved Matter (CDM), Chlorophyll-a, Wind Speed, and Rainfall. - 🔮 Multi-Horizon Risk Prediction: Forecasts coastal hazards across 24 Hours, 3 Days, and 7 Days with seasonal and parameter drift simulations.
- 🧠 Explainable AI (TreeSHAP): Granular feature attribution explaining why a risk level was assigned (e.g.,
$+35%$ risk due to SST heatwave,$+20%$ due to stagnant wind). - 🗺️ Interactive GIS Map: Dynamic GIS overlays for SST heatmaps, turbidity dispersal, HAB danger zones, and wind vector grids.
- 👥 Role-Based Access Control (RBAC): Custom dashboards tailored to MPCB Regulators, Fisheries Officers, and Marine Analysts.
- 🚨 Automated Alerting & Audit Reports: Real-time notification dispatching and one-click regulatory PDF/CSV report generation.
┌────────────────────────────────────────────────────────────────────────┐
│ 1. DATA INGESTION │
│ Multi-spectral Satellite (Sentinel-3, MODIS) & Meteorological Data │
│ (SST, BBP Turbidity, CDM, Chlorophyll-a, Wind Speed, Rainfall, NDVI) │
└───────────────────────────────────┬────────────────────────────────────┘
│
▼
┌────────────────────────────────────────────────────────────────────────┐
│ 2. MACHINE LEARNING ENGINE │
│ • RandomForestClassifier (19 engineered features + lag/delta) │
│ • Multi-horizon environmental drift simulation (24h, 3d, 7d) │
│ • TreeSHAP Explainability (calculates exact feature attribution) │
│ • Serialized joblib bundle (fishery_model.pkl) │
└───────────────────────────────────┬────────────────────────────────────┘
│
▼
┌────────────────────────────────────────────────────────────────────────┐
│ 3. BACKEND (FastAPI / Python) │
│ • /api/v1/predict → ML inference + HAB risk calculation │
│ • /api/shap/:zone → SHAP feature impact attribution │
│ • /api/v1/zones → Live district GIS telemetry │
│ • /api/auth/login → Role-Based JWT Authentication (MPCB/Fish/Analyst)│
└───────────────────────────────────┬────────────────────────────────────┘
│ REST API (JSON over HTTP)
▼
┌────────────────────────────────────────────────────────────────────────┐
│ 4. FRONTEND (React 18 + TypeScript + Vite) │
│ • Interactive GIS Map: Dynamic layer toggles (SST, BBP, HAB, Wind) │
│ • Recharts: Real-time telemetry, risk trend lines, SHAP bar charts │
│ • Role-Adaptive Dashboards: MPCB / Fisheries / Research Analyst │
└────────────────────────────────────────────────────────────────────────┘
-
Algorithm:
RandomForestClassifiertrained on historical oceanographic indices and coastal water quality parameters across 4 Konkan districts. -
Input Vector (19 features): Baseline categories, spatial coordinates, current telemetry (
$SST, b_{bp}, CDM, \text{Wind}, \text{Rainfall}, NDVI$ ), and historical lag deltas ($\Delta SST, \Delta b_{bp}, \Delta \text{Rainfall}$ ). -
HAB Thresholds: Incorporates 75th-percentile optical water quality boundaries (
$b_{bp} \ge 0.0081\text{ m}^{-1}$ and$CDM \ge 0.1084\text{ m}^{-1}$ ). -
TreeSHAP: Uses
shap.TreeExplainerto calculate local Shapley values in real time, converting raw probabilities into transparent, audit-ready bar charts.
| Role | Target Organization | Key Capabilities & Views |
|---|---|---|
| MPCB Officer | Maharashtra Pollution Control Board | Hotspot triage, effluent discharge tracking, HAB alerts, field inspector dispatch. |
| Fisheries Officer | State Fisheries Department | Potential Fishing Zones (PFZ), fish mortality risk index, artisanal catch advisories. |
| Research Analyst | ICAR-CMFRI / Marine Scientists | Multi-parameter time-series correlations, longitudinal environmental trends, PDF export. |
- Framework: React 18 with TypeScript & Vite
- Styling: Tailwind CSS & Lucide Icons
- Data Visualization: Recharts & Custom GIS MapPanel
- Framework: FastAPI (Python 3.11)
- Server: Uvicorn ASGI
- Authentication: JWT (python-jose) & Passlib
- Libraries: Scikit-Learn, Pandas, NumPy, Joblib, SHAP (TreeSHAP)
- Node.js (v18+) & npm
- Python (v3.10+)
# Navigate to backend directory
cd backend
# Create and activate virtual environment
python3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Start the FastAPI server
uvicorn main:app --reload --port 8000The backend will be available at
http://localhost:8000(Interactive Swagger docs:http://localhost:8000/docs).
# Navigate to project root
cd ..
# Install dependencies
npm install
# Start development server
npm run devOpen
http://localhost:5174(orhttp://localhost:5173) in your browser.
Click any role tile in the login modal to auto-fill credentials:
| Role | Password | |
|---|---|---|
| MPCB Officer | mpcb@aquatrace.gov.in |
mpcb123 |
| Fisheries Officer | fisheries@aquatrace.gov.in |
fish123 |
| Research Analyst | analyst@aquatrace.gov.in |
analyst123 |
| Method | Endpoint | Description |
|---|---|---|
POST |
/api/auth/login |
Authenticate and obtain JWT token |
GET |
/api/v1/zones |
Retrieve real-time telemetry for all 4 coastal zones |
GET |
/api/v1/zones/{district} |
Retrieve detailed parameters for a single district |
POST |
/api/v1/predict |
Run multi-horizon ML risk prediction ( |
GET |
/api/shap/{district} |
Retrieve SHAP feature attribution values |
GET |
/api/alerts |
Retrieve active coastal alerts and severity levels |
GET |
/api/health |
Health check endpoint |
This project is open source and available under the MIT License.