https://github.com/yashpotdar-py/flood-vision
Flood Vision - A deep learningβbased computer vision system for flood mapping and damage assessment using aerial imagery.
https://github.com/yashpotdar-py/flood-vision
cuda deep-learning flood-detection iot python
Last synced: 2 months ago
JSON representation
Flood Vision - A deep learningβbased computer vision system for flood mapping and damage assessment using aerial imagery.
- Host: GitHub
- URL: https://github.com/yashpotdar-py/flood-vision
- Owner: yashpotdar-py
- Created: 2025-10-05T16:16:19.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2025-10-05T18:53:32.000Z (9 months ago)
- Last Synced: 2025-10-13T10:55:09.409Z (8 months ago)
- Topics: cuda, deep-learning, flood-detection, iot, python
- Language: Python
- Homepage:
- Size: 38.1 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# π Flood Vision: Flood Mapping and Damage Segmentation System





> **Flood Vision** - A deep learningβbased computer vision system for flood mapping and damage assessment using aerial imagery.
---
## π§ Overview
**Flood Vision** is a computer vision system designed to automatically analyze aerial or drone footage from flood-affected regions.
It uses **semantic segmentation** to identify and label key terrain types such as **water**, **flooded buildings**, **vegetation**, and **roads**, helping researchers and responders estimate affected areas efficiently.
The project focuses on **robust image segmentation** and **high-speed inference** on CUDA-enabled devices.
---
## βοΈ Features Implemented
- β
4-class **semantic segmentation model**
- β
**Weighted loss** for handling class imbalance
- β
**CUDA acceleration** for efficient GPU training
- β
**Video and image inference**
- β
**Color-coded visual outputs**
- β
**FloodNet dataset** integration
- β
Modular and extendable PyTorch architecture
---
## π§ͺ Tech Stack
| Component | Technology |
|------------|-------------|
| **Language** | Python 3.13 |
| **Framework** | PyTorch |
| **GPU Acceleration** | NVIDIA CUDA |
| **Data Augmentation** | Albumentations |
| **Video/Image Processing** | OpenCV |
| **Visualization** | Matplotlib |
| **Loss Function** | Weighted Cross-Entropy |
---
## ποΈ Dataset
This project uses the **FloodNet** dataset for supervised training.
π **Dataset Link:**
[https://github.com/BinaLab/FloodNet-Supervised_v1.0](https://github.com/BinaLab/FloodNet-Supervised_v1.0)
### π Citation
```bibtex
@ARTICLE{9460988,
author={Rahnemoonfar, Maryam and Chowdhury, Tashnim and Sarkar, Argho and Varshney, Debvrat and Yari, Masoud and Murphy, Robin Roberson},
journal={IEEE Access},
title={FloodNet: A High Resolution Aerial Imagery Dataset for Post Flood Scene Understanding},
year={2021},
volume={9},
pages={89644-89654},
doi={10.1109/ACCESS.2021.3090981}
}
````
---
## π§° Installation
### 1οΈβ£ Clone the repository
```bash
git clone https://github.com/yashpotdar-py/flood-vision.git
cd flood-vision
```
### 2οΈβ£ Create and activate a virtual environment
```bash
python -m venv .venv
.\.venv\Scripts\activate
```
### 3οΈβ£ Install dependencies
```bash
pip install -r requirements.txt
```
### 4οΈβ£ (Optional) Verify CUDA availability
```bash
python -c "import torch; print(torch.cuda.is_available())"
```
---
## ποΈββοΈ Training
Train the segmentation model with:
```bash
python -m train.train_segmentation_4class
```
The training script:
- Loads images and masks from the FloodNet dataset
- Applies Albumentations-based augmentations
- Uses a **weighted loss** for balanced learning
- Logs metrics like IoU and validation loss
---
## π Inference
Run segmentation on an image or video:
```bash
python -m inference.run_inference --input data/videos/test1.mp4 --output results/output.mp4
```
### Color Legend
| Class | Color | Description |
| ----------------- | --------- | --------------------|
| Water | π¦ Blue | Flooded water areas|
| Flooded Buildings | π₯ Red | Buildings under water|
| Vegetation & Roads| π© Green | Trees, fields, grass, Streets and infrastructure|
The processed video will be saved in `results/output_videos/`.
---
## π Project Structure
```plaintext
flood-vision/
β
βββ data/
β βββ images/
β βββ masks/
β βββ videos/
β
βββ train/
β βββ train_segmentation_4class.py
β βββ utils/
β
βββ inference/
β βββ run_inference.py
β
βββ models/
β βββ unet.py
β βββ loss_utils.py
β
βββ results/
β βββ output_videos/
β
βββ README.md
```
---
## π Sample Metrics (Training Snapshot)
| Metric | Value |
| --------------- | ----- |
| Mean IoU | 0.74 |
| Pixel Accuracy | 0.90 |
| Validation Loss | 0.27 |
---
## π¨βπ» Authors
**Developed by:**
- **Yash Potdar** - Model architecture & deployment, CUDA optimizations
- **Sahil Pawar** - Data preprocessing, model training, testing& evaluation
- **Akanksha Singh** - Web interface design, documentation, and system integration
**Affiliation:**
π Final-Year B.E. Project,
Department of Artiticial Intelligence & Data Science
AISSMS Institute of Information Technology (AISSMS)
---
## π License
This project is intended for **academic and research purposes**.
The **FloodNet dataset** belongs to its original authors.
Please cite the dataset and this repository when used in derivative works.
---
## π Acknowledgments
- [FloodNet Dataset](https://github.com/BinaLab/FloodNet-Supervised_v1.0)
- [PyTorch](https://pytorch.org/)
- [Albumentations](https://albumentations.ai/)
- [OpenCV](https://opencv.org/)
---
> *"Mapping floods through vision - towards smarter, data-driven disaster response."*
---