# chinthanipravi/satellite-oil-spill-dashboard architecture

> Architecture diagram of the GitHub repository chinthanipravi/satellite-oil-spill-dashboard, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-06). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/chinthanipravi/satellite-oil-spill-dashboard
- Repository: https://github.com/chinthanipravi/satellite-oil-spill-dashboard

## Overview

This is a single-file Streamlit dashboard for satellite SAR oil-spill inspection. An analyst supplies an image and target coordinates, selects a detection mode, and receives segmentation, patch measurements, quality metrics, charts, and a map. The sampled code shows the image-processing and reporting flow; the README documents the advertised U-Net capability, though the excerpt does not establish a separate trained-model implementation. All runtime components therefore point to app.py.

Main entry points: [`app.py`](https://github.com/chinthanipravi/satellite-oil-spill-dashboard/blob/main/app.py) (Patch Analysis)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interaction["Dashboard Interaction"]
  node_dashboard["Dashboard UI<br/>[app.py]"]
  node_image_input["Image Upload<br/>[app.py]"]
  node_region_input["GPS Selection<br/>[app.py]"]
end

subgraph group_detection["Image Detection"]
  node_image_decode["Image Decode<br/>[app.py]"]
  node_engine_choice["Engine Selection<br/>[app.py]"]
  node_opencv["OpenCV Segmentation<br/>[app.py]"]
  node_unet["U-Net Processing<br/>[app.py]"]
  node_patch_analysis["Patch Analysis<br/>[app.py]"]
end

subgraph group_reporting["Analysis Outputs"]
  node_patch_details["Patch Measurements<br/>[app.py]"]
  node_metrics["Detection Metrics<br/>[app.py]"]
  node_image_results["Image Results<br/>[app.py]"]
  node_analytics["Analytics Charts<br/>[app.py]"]
  node_map["GPS Map<br/>[app.py]"]
  node_inspection_table["Inspection Table<br/>[app.py]"]
end

node_analyst(("Marine Analyst"))

node_analyst -->|"uses"| node_dashboard
node_dashboard -->|"accepts image"| node_image_input
node_dashboard -->|"sets coordinates"| node_region_input
node_image_input -->|"decodes image"| node_image_decode
node_image_decode -->|"provides grayscale"| node_engine_choice
node_engine_choice -->|"selects Classic"| node_opencv
node_engine_choice -->|"selects U-Net"| node_unet
node_opencv -->|"returns mask"| node_patch_analysis
node_unet -->|"returns mask"| node_patch_analysis
node_patch_analysis -->|"measures regions"| node_patch_details
node_patch_analysis -->|"sets metrics"| node_metrics
node_patch_analysis -->|"renders overlays"| node_image_results
node_patch_details -->|"plots areas"| node_analytics
node_region_input -->|"plots coordinates"| node_map
node_patch_details -->|"displays details"| node_inspection_table

click node_dashboard "https://github.com/chinthanipravi/satellite-oil-spill-dashboard/blob/main/app.py"
click node_image_input "https://github.com/chinthanipravi/satellite-oil-spill-dashboard/blob/main/app.py"
click node_region_input "https://github.com/chinthanipravi/satellite-oil-spill-dashboard/blob/main/app.py"
click node_image_decode "https://github.com/chinthanipravi/satellite-oil-spill-dashboard/blob/main/app.py"
click node_engine_choice "https://github.com/chinthanipravi/satellite-oil-spill-dashboard/blob/main/app.py"
click node_opencv "https://github.com/chinthanipravi/satellite-oil-spill-dashboard/blob/main/app.py"
click node_unet "https://github.com/chinthanipravi/satellite-oil-spill-dashboard/blob/main/app.py"
click node_patch_analysis "https://github.com/chinthanipravi/satellite-oil-spill-dashboard/blob/main/app.py"
click node_patch_details "https://github.com/chinthanipravi/satellite-oil-spill-dashboard/blob/main/app.py"
click node_metrics "https://github.com/chinthanipravi/satellite-oil-spill-dashboard/blob/main/app.py"
click node_image_results "https://github.com/chinthanipravi/satellite-oil-spill-dashboard/blob/main/app.py"
click node_analytics "https://github.com/chinthanipravi/satellite-oil-spill-dashboard/blob/main/app.py"
click node_map "https://github.com/chinthanipravi/satellite-oil-spill-dashboard/blob/main/app.py"
click node_inspection_table "https://github.com/chinthanipravi/satellite-oil-spill-dashboard/blob/main/app.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_dashboard,node_image_input,node_region_input toneBlue
class node_image_decode,node_engine_choice,node_opencv,node_unet,node_patch_analysis toneAmber
class node_patch_details,node_metrics,node_image_results,node_analytics,node_map,node_inspection_table toneMint
class node_analyst toneIndigo
```

## Components

### Dashboard Interaction

- [Dashboard UI](https://github.com/chinthanipravi/satellite-oil-spill-dashboard/blob/main/app.py): `app.py`
- [Image Upload](https://github.com/chinthanipravi/satellite-oil-spill-dashboard/blob/main/app.py): `app.py`
- [GPS Selection](https://github.com/chinthanipravi/satellite-oil-spill-dashboard/blob/main/app.py): `app.py`

### Image Detection

- [Image Decode](https://github.com/chinthanipravi/satellite-oil-spill-dashboard/blob/main/app.py): `app.py`
- [Engine Selection](https://github.com/chinthanipravi/satellite-oil-spill-dashboard/blob/main/app.py): `app.py`
- [OpenCV Segmentation](https://github.com/chinthanipravi/satellite-oil-spill-dashboard/blob/main/app.py): `app.py`
- [U-Net Processing](https://github.com/chinthanipravi/satellite-oil-spill-dashboard/blob/main/app.py): `app.py`
- [Patch Analysis](https://github.com/chinthanipravi/satellite-oil-spill-dashboard/blob/main/app.py): `app.py`

### Analysis Outputs

- [Patch Measurements](https://github.com/chinthanipravi/satellite-oil-spill-dashboard/blob/main/app.py): `app.py`
- [Detection Metrics](https://github.com/chinthanipravi/satellite-oil-spill-dashboard/blob/main/app.py): `app.py`
- [Image Results](https://github.com/chinthanipravi/satellite-oil-spill-dashboard/blob/main/app.py): `app.py`
- [Analytics Charts](https://github.com/chinthanipravi/satellite-oil-spill-dashboard/blob/main/app.py): `app.py`
- [GPS Map](https://github.com/chinthanipravi/satellite-oil-spill-dashboard/blob/main/app.py): `app.py`
- [Inspection Table](https://github.com/chinthanipravi/satellite-oil-spill-dashboard/blob/main/app.py): `app.py`

### Other components

- **Marine Analyst**

## Connections

- Marine Analyst → Dashboard UI: uses (evidence: `README.md`)
- Dashboard UI → Image Upload: accepts image (evidence: `app.py`)
- Dashboard UI → GPS Selection: sets coordinates (evidence: `app.py`)
- Image Upload → Image Decode: decodes image (evidence: `app.py`)
- Image Decode → Engine Selection: provides grayscale (evidence: `app.py`)
- Engine Selection → OpenCV Segmentation: selects Classic (evidence: `app.py`)
- Engine Selection → U-Net Processing: selects U-Net (evidence: `app.py`)
- OpenCV Segmentation → Patch Analysis: returns mask (evidence: `app.py`)
- U-Net Processing → Patch Analysis: returns mask (evidence: `app.py`)
- Patch Analysis → Patch Measurements: measures regions (evidence: `app.py`)
- Patch Analysis → Detection Metrics: sets metrics (evidence: `app.py`)
- Patch Analysis → Image Results: renders overlays (evidence: `app.py`)
- Patch Measurements → Analytics Charts: plots areas (evidence: `app.py`)
- GPS Selection → GPS Map: plots coordinates (evidence: `app.py`)
- Patch Measurements → Inspection Table: displays details (evidence: `app.py`)
