Skip to content
BPPIMTSIH26Public

About

🌊 S.A.G.A.R. (Ocean-X) β€” AI-assisted seabed survey analysis, 14-stage acoustic processing & open-world anomaly intelligence for SIH 2026 (PS: 26057).

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

Β 

History

276 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🌊 S.A.G.A.R. β€” Ocean-X Command

AI-Assisted Underwater Anomaly Intelligence & Seabed Survey Reconnaissance

SIH 2026 Organization Problem Statement Architecture Dataset

Smart India Hackathon (SIH 2026) | Problem Statement ID: 26057
Institution: B.P. Poddar Institute of Management & Technology (BPPIMTSIH26)
Lead Architect & Deep Learning Engineer: Narayan Kumar Jha (@narayan-nkj)


πŸ“Œ Problem Statement Overview (SIH 26057)

Attribute Specification Details
Problem Statement ID 26057
Problem Statement Title AI-assisted seabed survey analysis for faster anomaly detection & classification
Category Software / Maritime Defense / Hydrographic Intelligence
Domain Bucket Smart Automation / Robotics & Autonomous Systems / Earth & Marine Sciences
Target End-Users Hydrographic Surveyors, Naval Defense Units, Port Authorities, Offshore Energy Operators
Core Innovation Open-Set Anomaly Detection & Multi-Class Target Recognition + 14-Stage Acoustic Filtering + Multi-Modal Verification

The Real-World Challenge

Side-Scan Sonar (SSS) and Synthetic Aperture Sonar (SAS) surveys generate massive volumes of acoustic backscatter data during seabed mapping operations. Traditional survey analysis faces critical bottlenecks:

  1. Severe Acoustic Noise & Artifacts: High speckle noise, non-uniform time-varied gain (TVG) attenuation, blind nadir gaps, and acoustic shadow occlusions.
  2. Open-World Anomaly Dilemma: Standard detectors fail on novel or rare underwater objects (unexploded ordnance, severed submarine cables, novel wrecks) not present in rigid training datasets.
  3. Fatigue & Latency in Manual Review: Human hydrographers take hours or days to manually scan gigabytes of waterfall acoustic imagery, delaying critical maritime safety decisions.
  4. Lack of Multi-Modal Confirmation: Sonar alone cannot definitively confirm target identity without cross-referencing optical / camera sensor feeds from Autonomous Underwater Vehicles (AUVs).

πŸ’‘ The S.A.G.A.R. Solution

S.A.G.A.R. (Sonar Anomaly Geospatial Analytical Reconnaissance) is an end-to-end maritime intelligence command system designed to autonomously process, enhance, detect, cross-verify, and report seabed anomalies with sub-meter geospatial accuracy.

graph TD
    A["Raw Sonar Swath / Survey Feed"] --> B["14-Stage Image Processing Pipeline"]
    B --> C["Acoustic Despeckling & Adaptive CLAHE"]
    C --> D["Quality Assessment & 9-Class Target Detection"]
    D --> E["Multi-Scale Feature Extractor & Baseline Normality"]
    
    E --> F{"Dual-Core Intelligence Engine"}
    F -->|"9-Class Known Hazard Classifier"| G["Ultralytics YOLO11 / ONNX Detector"]
    F -->|"Open-World Novelty Model"| H["Mahalanobis Seabed Normality Engine"]
    
    G --> I["Candidate Anomaly Georeferencing"]
    H --> I
    
    I --> J["Temporal Change Engine: Epoch Differential"]
    J --> K["Multi-Modal Optical Cross-Verification"]
    K --> L["Automated Priority Triage Matrix (P1/P2/P3)"]
    
    L --> M["Interactive MapLibre GIS Workspace"]
    L --> N["System Administrator Command & Access Console"]
    L --> O["Automated Hydrographic Mission Dossier (PDF/JSON)"]
Loading

🌟 The Five Pillars of Intelligence

1. 🌐 Local Seabed Baseline Normality Engine

  • Computes acoustic texture, roughness, and intensity statistics across local sliding windows.
  • Calculates Mahalanobis Distance against the local geological baseline to answer: "What is statistically abnormal for this specific seabed patch?"
  • Robust against variable seabed geologies (mud, sand ripples, rocky reefs, silt).

2. 🎯 Open-World Zero-Shot Anomaly Detection

  • Powered by high-speed ONNX Runtime and Ultralytics YOLO11 (trained on AquaScan-1K) for real-time edge or cloud deployment.
  • Detects high-reflectance acoustic highlights paired with physical acoustic shadows to accurately estimate 3D target height and footprint.
  • Classifies critical hazard categories:
    • Shipwrecks (Nordmeer, Grecian, Defiance, Monohansett, John J. Audubon)
    • Ghost Fishing Nets & Marine Entanglements
    • Subsea Pipelines & Structural Leaks
    • Explosive Ordnance / Mine Cylinders

3. πŸ•°οΈ Temporal Change Detection Engine

  • Compares sonar swaths from sequential survey epochs (e.g., month-over-month) using normalized cross-correlation and structural similarity indexing (SSIM).
  • Automatically flags new objects, disappeared objects, or significant shape/reflectance changes in repeated seabed transects.

4. πŸ”¬ 9-Class Multi-Target Detection & Diagnostics

Executes comprehensive pixel-accurate diagnostic overlays and classifies hazards across 9 distinct threat vectors:

  • πŸ§‘β€πŸš€ human β€” Divers or human presence anomalies
  • πŸ”© metal_debris β€” Submerged industrial metallic waste
  • πŸ•ΈοΈ ghost_net β€” Discarded fishing gear and marine entanglements
  • πŸ›Έ unknown_man_made_object β€” Unclassified artificial structures
  • πŸ¦€ crab_pot β€” Commercial fishing traps
  • 🚰 submarine_pipeline β€” Undersea energy/telecom infrastructure
  • 🚒 shipwreck β€” Submerged vessels and historic wrecks
  • πŸ›’οΈ mine_cylinder β€” Explosive ordnance and defense threats
  • πŸͺΈ reef β€” Natural underwater geological formations

5. πŸ›‘οΈ Military-Grade Access Control & System Administrator Console

  • Multi-Factor Gmail OTP Verification: High-security email dispatch for operator authentication.
  • Auto-Lookup Personnel Registry: Instant pre-filling of registered naval and hydrographic personnel details.
  • System Administrator Authorization Gateway:
    • Restricts access until new accounts are explicitly approved by the System Administrator (narayan.nkj@gmail.com).
    • Real-time approval, role upgrade (Analyst, Operator, System Administrator), or instant revocation.

πŸ–₯️ System Architecture & UI Tour

Module Route / Component Description
Tactical Dashboard / (Dashboard.tsx) Real-time mission health, sensor telemetry, active alerts, and priority triage feed.
Geospatial GIS Map /map (MapWorkspace.tsx) Full MapLibre GL map with bathymetric layers, swath navigation tracks, and bounding boxes.
14-Stage Processing Lab /image-processing (ImageProcessing.tsx) Interactive side-by-side viewer for raw, enhanced, and 9-class AI inference overlays.
Temporal Comparison /temporal (TemporalComparison.tsx) Epoch-over-epoch differential analysis to detect seabed shifts and newly submerged targets.
Survey Upload Portal /upload (UploadProcess.tsx) Ingest raw SSS/SAS waterfalls, side-scan TIFFs, and AUV optical camera survey packages.
Mission Review & Reports /review (ReviewReport.tsx) Comprehensive hazard classification, confidence breakdowns, and exportable mission dossiers.
System Administrator Console /settings (Settings.tsx) Manage operator credentials, grant/revoke clearance, and inspect system audit logs.

πŸ› οΈ Technology Stack

SIH26057-OceanX/
β”œβ”€β”€ backend/                 # FastAPI API, YOLO/ONNX Models & Services
β”‚   β”œβ”€β”€ app/                 # API Routes, services, models, utils
β”‚   β”œβ”€β”€ scripts/             # Data seeding, migration, and management scripts
β”‚   β”œβ”€β”€ tests/               # Backend tests
β”‚   β”œβ”€β”€ data/                # Local databases and uploads (Gitignored)
β”‚   └── models/              # Model weights (Gitignored)
β”œβ”€β”€ deploy/                  # Deployment configurations
β”œβ”€β”€ docs/                    # Centralized project documentation
β”œβ”€β”€ frontend/                # React 19 + TypeScript + Vite + MapLibre GL 3D
β”‚   β”œβ”€β”€ src/                 # Components, pages, hooks, services
β”‚   └── public/              # Static assets
β”œβ”€β”€ scripts/                 # Root level scripts
β”œβ”€β”€ tests/                   # Root level tests and fixtures
β”œβ”€β”€ .github/                 # CI/CD Workflows
└── README.md                # System documentation & technical specification

Core Technologies

  • Frontend: React 19, TypeScript, Vite 5, Tailwind CSS v4, MapLibre GL JS, Recharts, Lucide Icons.
  • Backend API: Python 3.11+, FastAPI, Uvicorn, SQLAlchemy, Pydantic v2.
  • Computer Vision & AI: OpenCV (cv2), PyTorch, Ultralytics YOLO11, ONNX Runtime, NumPy, SciPy, Pillow.
  • Geospatial Processing: Shapely, PyProj, GeoPandas, Turf.js.
  • Security: Argon2/PBKDF2 password hashing, JWT bearer tokens, SMTP Gmail OTP integration.
  • DevOps & Deployment: Docker Compose, Vercel (frontend), Render (backend), Shell Automation (start.sh, stop.sh).

☁️ Cloud Data Storage

All production data is stored on Neon β€” a serverless, auto-scaling cloud platform:

Layer Service Details
Relational Database Neon Serverless PostgreSQL Stores all mission records, anomaly detections, user accounts, image processing jobs, and audit logs via SQLAlchemy ORM. Connection pooling is handled by Neon's built-in PgBouncer (-pooler endpoint).
Blob / Object Storage Neon S3-Compatible Blob Store All uploaded sonar imagery, processed outputs (enhanced tiles, quality masks, inference overlays), and report assets are stored in an S3-compatible bucket (assets) hosted on Neon's integrated blob storage. Accessed via boto3 with S3v4 signatures.
Local Fallback Filesystem (data/uploads/) When cloud storage is unavailable (e.g., local development without credentials), the backend gracefully falls back to the local data/uploads/ directory. All API image URLs are transparently served from either source.

Configuration: All cloud credentials are set via environment variables (DATABASE_URL, AWS_ENDPOINT_URL_S3, AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_BUCKET_NAME). See .env.example for the full template.


πŸ—„οΈ S.A.G.A.R. Side-Scan Sonar Dataset

The sonar training dataset is maintained separately on Hugging Face by Narayan Kumar Jha and is automatically fetched at startup β€” it is not bundled with this repository to keep cloning instant.

πŸ“¦ Dataset: narayan-nkj/sagar-sss on Hugging Face Hub
πŸ‘€ Curator: Narayan Kumar Jha (@narayan-nkj)
πŸ“ Format: YOLO β€” {split}/images/*.jpg + {split}/labels/*.txt, 640 px tiles
🏷️ License: CC-BY-SA-4.0

Split Images Labels
train 3,875 3,875
val 630 630
test 700 700
total 5,205 5,205

Detected Classes:

Detected 9-Class Topology:

ID Class Category Detection Status
0 human βœ“ Operational
1 metal_debris βœ“ Operational
2 ghost_net βœ“ Operational (Synthetic Augmented)
3 unknown_man_made_object βœ“ Operational
4 crab_pot βœ“ Operational
5 submarine_pipeline βœ“ Operational
6 shipwreck βœ“ Operational
7 mine_cylinder βœ“ Operational
8 reef βœ“ Operational

The dataset is fetched automatically on first startup by backend/scripts/fetch_huggingface_dataset.py. No manual download needed.


πŸš€ Quick Start Guide

Prerequisites

  • Node.js (v18.0 or higher)
  • Python (v3.10 or higher)
  • Git
  • (Optional) Docker & Docker Compose

Option A: One-Command Startup (Recommended)

From the project root directory, execute:

# Preferred: Launch entire platform (Backend on :8000 & Frontend on :5173)
npm start

Or directly via the orchestration script:

bash backend/auditing/scripts/start.sh

To gracefully stop all background services:

npm stop
  • Frontend Application: http://localhost:5173
  • Backend Swagger API: http://localhost:8000/docs
  • Interactive Backend Root: http://localhost:8000

Option B: Manual Setup

1. Backend Service (FastAPI)

cd backend

# Create and activate virtual environment
python3 -m venv venv
source venv/bin/activate    # On Windows: venv\Scripts\activate

# Install dependencies
pip install -r requirements.txt

# Configure environment
cp .env.example .env

# Launch FastAPI server
uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload

2. Frontend Application (React + Vite)

cd frontend

# Install packages
npm install

# Launch Vite development server
npm run dev

Option C: Docker Compose

docker-compose up --build

πŸ›‘οΈ Personnel Access Governance & Clearance Tiers

Role Authorized Identifier Clearance & Operational Capabilities
System Administrator narayan.nkj@gmail.com Full System Governance, Operator Approval & Clearance Delegation, Access Revocation, Mission Triage
Senior Operator admin@sonarnetra.mil Mission Command, 14-Stage Processing, Model Execution, Report Export
Field Analyst analyst@sonarnetra.mil Sonar Swath View, Anomaly Inspection, Optical Verification

Security & Authentication Protocol: All operator credentials are encrypted with salted hashes (Argon2 / PBKDF2) and validated dynamically via multi-factor Gmail OTP dispatch. Direct plaintext passwords are strictly prohibited across documentation and repositories.


⚠️ Model Limitations & Prototype Results

NOTE: All performance metrics, confidence scores, and processing benchmarks presented in this documentation and within the application represent prototype results derived from controlled testing environments.

Primary Limitations

  1. Highly Turbid Environments: The model struggles in areas with excessive suspended sediment or organic material which causes severe acoustic scattering.
  2. Depth Constraints: Operations beyond 100 meters depth or in extreme thermocline layers may result in degraded detection accuracy due to sound velocity profile variations.
  3. Nadir Blind Spots: Standard side-scan sonar limitations apply; the model cannot detect objects directly beneath the towfish (the nadir gap) unless complementary downward-facing sensors are fused.
  4. Novel Geologies: While the Mahalanobis novelty engine handles most seabeds, extreme volcanic rock formations can currently trigger higher false-positive anomaly rates.

πŸ“‘ REST API Reference

Method Endpoint Description
POST /api/auth/login Authenticate operator and generate JWT token
GET /api/auth/lookup-operator Auto-lookup registered personnel by email
POST /api/auth/send-otp Dispatch 6-digit verification code to Gmail
POST /api/auth/verify-otp Validate submitted OTP code
GET /api/auth/users List all registered personnel (System Administrator only)
PATCH /api/auth/users/{id}/access Grant or revoke operator access clearance
GET /api/anomalies Retrieve all detected seabed anomalies with coordinates
GET /api/missions Query active and archived survey missions
POST /api/v1/image-processing/jobs Submit sonar image for 14-stage enhancement & QA masking
GET /api/v1/image-processing/jobs/{id} Inspect processing progress and download enhanced artifacts
GET /api/reports/generate/{id} Generate formal hydrographic anomaly dossier (PDF/JSON)

Training & Model Details

Dataset Used

  • AquaScan-1K Dataset: 2.7GB side-scan sonar images
  • SAGAR Training Dataset: Custom underwater anomaly dataset
  • Total Classes: 9 anomaly types
  • Classes: human, metal_debris, ghost_net, unknown_man_made_object, crab_pot, submarine_pipeline, shipwreck, mine_cylinder, reef
  • Total Training Images: 5,205
  • Training Strategy: Unified 9-class mapping with class balancing

Model Training

  • Framework: YOLOv8 β†’ ONNX export
  • Training Epochs: 100
  • Final mAP50: 0.764
  • Confidence Threshold: 80%+ for anomaly detection
  • Training Time: 9.5+ hours
  • Validation Success Rate: 75%+ detection accuracy

Model Performance

The trained model successfully identifies all 9 anomaly classes with:

  • βœ… Average confidence: 80%+
  • βœ… Success rate: 75%+ (tested on validation dataset)
  • βœ… No overfitting detected (validation β‰ˆ training performance)
  • βœ… Ready for production deployment

Trained Model Access

Files Included

  • src/models/sonar_detector.onnx - Trained model weights
  • validation_report.json - Validation metrics and results
  • reports/model_performance_report.json - Performance statistics
  • scripts/validate_model.py - Model validation script
  • scripts/test_anomaly_detection.py - Anomaly detection testing
  • scripts/upload_to_huggingface.py - HF deployment pipeline

How to Use the Model

import onnxruntime as ort
import numpy as np
from PIL import Image

# Load model
session = ort.InferenceSession("src/models/sonar_detector.onnx")

# Load and preprocess image
img = Image.open("sonar_image.jpg")
img_array = np.array(img) / 255.0
img_array = np.expand_dims(img_array, 0).astype(np.float32)

# Run inference
input_name = session.get_inputs()[0].name
predictions = session.run(None, {input_name: img_array})

# Parse predictions (boxes, confidences, class IDs)

πŸ‘₯ Hackathon Team & Acknowledgements

  • Team Name: Team (ORION)⁢⁹ ((ORION)⁢⁹)
  • Organization: BPPIMTSIH26 (B.P. Poddar Institute of Management and Technology)
  • Smart India Hackathon 2026: Problem Statement 26057
  • Project Title: Ocean-X (S.A.G.A.R. Command)

Team Structure & Contributions:

🌟 Core Project Leadership

  • πŸ‘‘ Narayan Kumar Jha (@narayan-nkj) β€” Team Lead, System Architect & Full-Stack Intelligence Lead (System Administrator)
  • πŸ’‘ Ahana (@I-Lawrence) β€” Core Lead: Deep Learning & Acoustic Feature Modeling
  • 🎯 Ishika Chowdhury (@i5hika0x) β€” Core Lead: Sonar Vision & Geospatial Intelligence

βš“ Engineering & Domain Specialists

  • 🌐 Sayantan Pachal (@sayantan-pachal) β€” Geospatial Processing & GIS Swath Pipeline Specialist
  • βš™οΈ Shivam Gupta (@shiv2345king) β€” Backend Infrastructure & Model Optimization Engineer
  • πŸ”¬ Shougata Sikder (@Shougata2003) β€” Hydrographic Anomaly Verification & QA Pipeline Specialist

πŸ”’ Copyright, Proprietary License & Anti-Copying Policy

Copyright © 2026 Team (ORION)⁢⁹ / NetraSonar (S.A.G.A.R. Project - SIH26057). All Rights Reserved.

Caution

PROPRIETARY & NON-COPYABLE SOURCE MATERIAL

  • This repository (https://github.com/BPPIMTSIH26/SIH26057), source code, frontend React components, FastAPI backend services, machine learning models, bathymetric data processing scripts, and visual assets are proprietary to Team (ORION)⁢⁹.
  • ANY UNAUTHORIZED COPYING, REPRODUCTION, CLONING, FORKING, SCRAPING, OR REDISTRIBUTION IS STRICTLY PROHIBITED.
  • Viewing access on GitHub is provided exclusively for official review and evaluation under Smart India Hackathon (SIH26057). Public visibility does not convey any right or license to copy, reuse, or adapt any part of this software.
  • For full legal terms, inspect the LICENSE and LICENSE.md files or visit the in-app Copyright page at /copyright.

Engineered with precision for Smart India Hackathon 2026 by Team (ORION)⁢⁹. S.A.G.A.R. Command System. Copyright © 2026 Team (ORION)⁢⁹. All Rights Reserved.

About

🌊 S.A.G.A.R. (Ocean-X) β€” AI-assisted seabed survey analysis, 14-stage acoustic processing & open-world anomaly intelligence for SIH 2026 (PS: 26057).

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages