# dimasmaulana99/deep-learning-using-unet-for-radar-imagery-flood-mapping architecture

> Architecture diagram of the GitHub repository dimasmaulana99/deep-learning-using-unet-for-radar-imagery-flood-mapping, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-04-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/dimasmaulana99/deep-learning-using-unet-for-radar-imagery-flood-mapping
- Repository: https://github.com/dimasmaulana99/deep-learning-using-unet-for-radar-imagery-flood-mapping

## Overview

##### Project Type and Purpose
- This is a machine learning research project designed for semantic segmentation of radar imagery to detect floods.
- It uses TensorFlow for building and training a U-Net model and is primarily executed through Jupyter notebooks (as seen in the Notebook directory).

##### File Structure
- The Notebook directory contains two Jupyter notebooks (UNet.ipynb and unet2122.ipynb) which are your main interactive modules for training, testing, and visualization.
- The presence of a model file (unet_flood.h5) inside the Notebook folder indicates that model checkpoints or the final trained model are stored here.
- The README and configuration file (_config.yml) provide guidance on project usage and setup, though most of the work is done interactively via the notebooks.

##### Key Architectural Components
a. Data Layer:
- Dataset Source – Indicate the external dataset (from Kaggle) that comprises the Sentinel-1 radar imagery tiles (128 x 128) used for training, testing, and validation.
- Preprocessing Module – Include an element that represents any data preprocessing or augmentation steps, even if they are implicitly done in the notebooks.

b. Model and Training:
- U-Net Architecture – Represent the neural network design (clearly mark the U-Net structure, including the downsampling and upsampling paths).
- TensorFlow/Keras Framework – Indicate that TensorFlow is used as the deep learning framework.
- Training Environment – Highlight that the model was trained on GPU hardware (specifically, RTX 2060 Super 6GB), which might be important for performance considerations.

c. Execution and Experimentation:
- Jupyter Notebook / Interactive Environment – Illustrate that experiments, model training, and validation are performed through interactive notebooks.
- Checkpoint / Model Artifact – Show how the resulting trained model (unet_flood.h5) is stored and used for predictions.

d. Output and Visualization:
- Predictions – Include a component for output visualization (segmentation results/predictions) wherein the network results are interpreted.
- Result Analysis – Clearly show how the visual interpretation and final predictions are analyzed from the notebooks.

##### Relationships and Interactions
- From the Data Preprocessing module, point to the TensorFlow-based U-Net training component.
- Couple the Training Module with the hardware specification (GPU) to emphasize performance requirements.

##### Architectural Patterns and Design Principles
- Clearly separate the data ingestion/preparation stage from the model training stage.
- Experimental nature of the project by showing how notebooks act as both the development environment and the user interface for visual analysis.
- Incorporate separation of concerns: one module for data processing, one for modeling, and one for result analysis.

##### Relevant Technologies to Emphasize
- TensorFlow and possibly Keras (for model definition and training).
- Jupyter Notebook as the interactive interface.
- GPU (RTX 2060 Super 6GB) as the underlying training hardware.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Data Layer
    subgraph "Data Layer"
        DS["Dataset (Kaggle: Sentinel-1 Tiles)"]:::data
        PP["Data Preprocessing Module"]:::process
    end

    %% Model & Training Layer
    subgraph "Model & Training"
        TU["TensorFlow U-Net Model"]:::model
        GPU["GPU Training Environment (RTX2060Super6GB)"]:::hardware
        CP["Model Checkpoint Storage (unet_flood.h5)"]:::artifact
    end

    %% Execution & Experimentation
    subgraph "Execution & Experimentation"
        NB["Jupyter Notebook Interface"]:::notebook
    end

    %% Project Configuration & Guidance
    subgraph "Project Config"
        PC1["Config (_config.yml)"]:::config
        PC2["README Documentation"]:::config
    end

    %% Output & Visualization
    subgraph "Output & Visualization"
        P["Predictions/Segmentation Output"]:::output
        RA["Result Analysis"]:::analysis
    end

    %% Data Flow
    DS -->|"ingests"| PP
    PP -->|"processes data for"| TU
    TU -->|"trains on"| GPU
    GPU -->|"saves model to"| CP
    TU -->|"executes in"| NB
    CP -->|"provides model for"| P
    NB -->|"generates"| P
    NB -->|"analyzes"| RA
    NB -->|"feedback to"| TU

    %% Project Config Flow
    PC1 -->|"guides"| NB
    PC2 -->|"guides"| NB

    %% Click Events
    click NB "https://github.com/dimasmaulana99/deep-learning-using-unet-for-radar-imagery-flood-mapping/blob/main/Notebook/UNet.ipynb"
    click NB "https://github.com/dimasmaulana99/deep-learning-using-unet-for-radar-imagery-flood-mapping/blob/main/Notebook/unet2122.ipynb"
    click TU "https://github.com/dimasmaulana99/deep-learning-using-unet-for-radar-imagery-flood-mapping/blob/main/Notebook/UNet.ipynb"
    click CP "https://github.com/dimasmaulana99/deep-learning-using-unet-for-radar-imagery-flood-mapping/blob/main/Notebook/unet_flood.h5"
    click PC1 "https://github.com/dimasmaulana99/deep-learning-using-unet-for-radar-imagery-flood-mapping/blob/main/_config.yml"
    click PC2 "https://github.com/dimasmaulana99/deep-learning-using-unet-for-radar-imagery-flood-mapping/blob/main/README.md"

    %% Styles and Colors
    classDef data fill:#ADD8E6,stroke:#000,stroke-width:2px;
    classDef process fill:#90EE90,stroke:#000,stroke-width:2px;
    classDef model fill:#F08080,stroke:#000,stroke-width:2px;
    classDef hardware fill:#FFD700,stroke:#000,stroke-width:2px;
    classDef notebook fill:#DDA0DD,stroke:#000,stroke-width:2px;
    classDef artifact fill:#FFB6C1,stroke:#000,stroke-width:2px;
    classDef config fill:#F5DEB3,stroke:#000,stroke-width:2px;
    classDef output fill:#FFA07A,stroke:#000,stroke-width:2px;
    classDef analysis fill:#98FB98,stroke:#000,stroke-width:2px;
```
