Logo Lanfrica

Naman-Gayakwad/Water-Issues-Prediction-Model

Domain:

environment and energy

Record type:

modelsoftware
Creator:
Nam
Host:
# 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 …