How nirmalkumar31/water-body-segmentation-repro works
Satellite Water Segmentation prepares satellite imagery, trains and evaluates segmentation models, promotes and packages a selected model, then serves water masks and overlays. The main request path is user → FastAPI service → inference → returned mask. Training, recovery, experiment tracking, release checks, cloud workflows, and monitoring are separate capabilities. Edges reflect sampled calls, SOURCE INDEX references, or README statements; unsampled subsystem links are omitted where their wiring is not evidenced.
Main entry points: serve.py Inference API · train.py Training loop · inference.py Image inference · patch_dataset.py Patch sampling
Components 24
Data preparation
- Dataset audit
data_pipeline/audit.py - Patch sampling
data_pipeline/patch_dataset.py - Tile dataset
data_pipeline/tile_dataset.py - Tile operations
data_pipeline/tiling.py - Image transforms
data_pipeline/transforms.py - Prediction stitching
data_pipeline/stitch.py
Training and evaluation
- Training loop
training/train.py - Segmentation model
training/model.py - Training loss
training/loss.py - Training recovery
training/resume.py - Experiment tracking
training/tracking.py - MLflow utilities
common/mlflow_utils.py
Model release
- Model promotion
deployment/promote_model.py - Model export
deployment/export_model.py - Release verification
tools/release.py - Modal workflows
cloud/modal_app.py
Inference and operations
- Inference API
deployment/serve.py - Image inference
deployment/inference.py - Web interface
deployment/static/app.js - Prediction log
deployment/prediction_log.py - Service metrics
deployment/metrics_exporter.py - Modal web app
cloud/modal_web.py
Other components
- Image user
- Water mask
Connections 25
- Image user → Inference API: uploads image
README.md - Inference API → Image inference: runs inference
deployment/serve.py - Image inference → Tile operations: tiles image
deployment/inference.py - Image inference → Image transforms: preprocesses tiles
deployment/inference.py - Image inference → Prediction stitching: stitches predictions
deployment/inference.py - Inference API → Water mask: returns mask
README.md - Inference API → Web interface: serves interface
deployment/serve.py - Inference API → Prediction log: logs predictions
deployment/serve.py - Inference API → Service metrics: exports metrics
deployment/serve.py - Modal web app → Inference API: routes to
cloud/modal_web.py - Dataset audit → Patch sampling: filters data
- Training loop → Patch sampling: loads data
training/train.py - Training loop → Segmentation model: builds model
training/train.py - Training loop → Training loss: computes loss
training/train.py - Training loop → Training recovery: resumes state
training/train.py - Training loop → Experiment tracking: tracks runs
training/train.py - Experiment tracking → MLflow utilities: uses helpers
- Tile dataset → Tile operations: uses tile operations
data_pipeline/tile_dataset.py - Patch sampling → Image transforms: augments patches
data_pipeline/transforms.py - Model promotion → MLflow utilities: uses tracking helpers
deployment/promote_model.py - Model export → Model promotion: uses promotion logic
deployment/export_model.py - Model export → MLflow utilities: selects model run
deployment/export_model.py - Release verification → Image inference: checks parity
tools/release.py - Release verification → Model promotion: checks release
tools/release.py - Modal workflows → Training loop: runs cloud training