# Water Issues Prediction Model
This repository contains a **machine learning model** designed to predict water-related issues such as **urban floods, drainage blockages, and sanitation problems** using image analysis.
## π Repository Structure
```
Water-Issues-Prediction-Model/
β-- convert_model.py # Converts Keras model to TFLite format
β-- infer.py # Runs inference using the trained model
β-- predict_tflite.py # Runs inference using the TFLite model
β
βββ Model/
β β-- model_tf.keras # Trained Keras model
β β-- model.tflite # Converted TFLite model
β β-- sklearn_model.p # Scikit-learn trained model
β
βββ Prediction Using Model/
β β-- Sample Images/
β β β-- dirtylaketest.jpg
β β β-- drainagehole.jpg
β β β-- drainagetest.jpeg
β β β-- flood_test.jpg
β
βββ Training/
β β-- data/
β β β-- train/ # Training dataset
β β β-- val/ # Validation dataset
β β-- sklearn_trained_model.py # Sklearn training script
β β-- tflitemodel.py # Converts the trained model to TFLite
```
## π Features
- Predicts water-related issues from images.
- Uses **Scikit-Learn, Keras**, and **TFLite** for efficient model deployment.
- Includes both **standard and lightweight models (TFLite)** for mobile-friendly inference.
- Provides scripts for training, conversion, and prediction.
## π Installation
To set up the environment, install the required dependencies:
```sh
pip install -r requirements.txt
```
## π Model Training
To train the model using **Scikit-Learn**:
```sh
python Training/sklearn_trained_model.py
```
To train and convert the model to **TFLite**:
```sh
python Training/tflitemodel.py
```
## π Model Conversion
To convert the Keras model to **TFLite** format:
```sh
python convert_model.py
```
## ποΈ Running Inference
Run inference using the standard model:
```sh
python infer.py --image_path Sample Images/d β¦