How thekarak/varuna works
V.A.R.U.N.A. is a maritime oil-spill forensics platform. Its principal workflow accepts a SAR scene and detection parameters through the API, asynchronously enhances and segments the imagery, estimates spill age and volume, hindcasts drift, and correlates the likely discharge window with AIS tracks to score suspect vessels. Results support a tactical GIS dashboard and forensic case-file generation. The sampled code confirms orchestration and several stage calls; other product capabilities and presentation links are retained where documented in the README, with evidence limits reflected in the graph.
Main entry points: tasks.py Pipeline worker · main.py Analysis API · esrgan_inference.py Image enhancement · unet_inference.py Slick segmentation
Components 17
API orchestration
- Analysis API
backend/app/main.py - Pipeline worker
backend/app/workers/tasks.py
Forensic analysis
- Image enhancement
ml_pipeline/super_resolution/esrgan_inference.py - Slick segmentation
ml_pipeline/segmentation/unet_inference.py - Oil classifier
ml_pipeline/segmentation/train_oil_classifier.py - Lookalike training
ml_pipeline/segmentation/train_lookalike_stage2.py - Drift hindcast
ml_pipeline/drift_engine/lagrangian_simulator.py
Vessel attribution
- AIS correlation scoring
backend/app/services/ais_service.py - AIS trajectory store
backend/app/models/db_models.py - Forensic case file
backend/app/workers/tasks.py
Operations interface
- Tactical GIS dashboard
frontend/components/DashboardApp.jsx - 3D mission globe
frontend/components/Globe.jsx - Forensic API client
frontend/services/forensicApi.js - Login interface
frontend/components/LoginApp.jsx
Other components
- Maritime analyst
- SAR scene
- Metocean feeds
Connections 14
- Maritime analyst → Analysis API: submits analysis
backend/app/main.py - Analysis API → Pipeline worker: dispatches task
backend/app/main.py - SAR scene → Image enhancement: supplies scene
- Pipeline worker → Image enhancement: calls
backend/app/workers/tasks.py - Image enhancement → Slick segmentation: upscaled image
backend/app/workers/tasks.py - Slick segmentation → Oil classifier: classifies oil
ml_pipeline/segmentation/unet_inference.py - Pipeline worker → Drift hindcast: calls
backend/app/workers/tasks.py - Drift hindcast → Metocean feeds: fetches forcing
ml_pipeline/drift_engine/lagrangian_simulator.py - Pipeline worker → AIS correlation scoring: queries and scores
backend/app/workers/tasks.py - AIS correlation scoring → AIS trajectory store: queries trajectories
backend/app/services/ais_service.py - Pipeline worker → Forensic case file: generates evidence
backend/app/workers/tasks.py - Pipeline worker → Tactical GIS dashboard: provides forensic results
- Forensic API client → Analysis API: requests analysis
- Tactical GIS dashboard → 3D mission globe: links mission view