🌊 SIH26057 Sonar Debris Intelligence - YOLOv8s-seg v4
AI-powered detection of underwater debris and hazards from side-scan sonar imagery. Trained on 4,450 images with leakage-free validation for Smart India Hackathon 2026.
🔴 Live Demo • 📖 Full Documentation • 🐳 Docker Setup
📊 Model Description
Architecture: YOLOv8s-seg (instance segmentation with polygon masks)
Input: 640×640 px (RGB or grayscale sonar images)
Output: Bounding boxes + polygon masks + confidence scores
Classes: 5 underwater object types
🎯 Performance (v4 Production Model)
| Class | AP50 | Precision | Recall | Notes |
|---|---|---|---|---|
| Pipe | 0.978 | 0.946 | 0.914 | Subsea pipelines, conduits |
| Shipwreck | 0.823 | 0.824 | 0.832 | Vessel debris, hull sections |
| Cylinder | 0.728 | 0.666 | 0.684 | Unexploded ordnance, mines |
| Natural Object | 0.539 | 0.499 | 0.568 | Rocks, boulders, reef features |
| Fishing Gear | 0.386 | 0.670 | 0.248 | Derelict crab pots (not nets) |
| Overall | 0.691 | 0.721 | 0.649 | Survey-disjoint validation |
Validation: 901 images, zero frame overlap, leakage-free group splits
Inference Speed: ~0.4s (640px image), ~4s (500×5000 strip) on CPU
🚀 Quick Start
Option 1: Ultralytics (Simplest)
from ultralytics import YOLO
from PIL import Image
# Load model from Hugging Face
model = YOLO("Ganesh-0509/sih26057-sonar-debris")
# Run inference
image = Image.open("sonar_scan.png")
results = model.predict(image, conf=0.5, imgsz=640)
# Extract detections
for result in results:
boxes = result.boxes # Bounding boxes
masks = result.masks # Segmentation masks
for box in boxes:
cls = int(box.cls)
conf = float(box.conf)
print(f"Class: {result.names[cls]}, Confidence: {conf:.2f}")
Option 2: Full System with Docker
# Clone repository with complete backend + frontend
git clone https://github.com/Ganesh-0509/SIH26057.git
cd SIH26057
# Start services (auto-downloads model)
docker-compose -f docker-compose.optimized.yml up --build
# Access dashboard
# Frontend: http://localhost:3000
# Backend API: http://localhost:8000/docs
Option 3: ONNX Export (Edge Deployment)
# Export to ONNX for Jetson, Raspberry Pi, or Coral Edge TPU
model = YOLO("Ganesh-0509/sih26057-sonar-debris")
model.export(format="onnx", imgsz=640, opset=12)
# Output: best.onnx (~22MB)
Performance:
- Jetson Nano: ~1.2s per image (GPU)
- Raspberry Pi 4: ~5s per image (CPU)
- Coral Edge TPU: ~0.3s per image (quantized)
🎯 Intended Use
Primary Use Cases
✅ Marine Survey Operations (MoES/NIOT)
- Automated debris detection in side-scan sonar surveys
- Reduces operator review time by 80% (10,000+ frames → 2,000 flagged)
- Georeferenced GeoJSON/PDF reports for GIS integration
✅ Navigation Safety (Indian Navy, Port Authorities)
- Hazard detection for safe channel maintenance
- Shipwreck mapping for navigation charts
- Pipeline integrity monitoring (offshore energy)
✅ Marine Conservation (Ghost Fishing Gear)
- Derelict crab pot identification
- Marine debris mapping for cleanup operations
- Blue Economy impact assessment
✅ Underwater Infrastructure
- Pipeline inspection (ONGC, offshore wind farms)
- Cable route surveys (telecom, power transmission)
- Munitions detection (UXO clearance operations)
Out of Scope
❌ Real-time video streams (optimized for static images)
❌ Bathymetric sonar (designed for side-scan sonar only)
❌ Biological targets (fish, marine mammals - not trained on)
❌ Fishing nets (model trained on crab pots, not nets)
📚 Training Data
Datasets Used (All Public, CC-BY/CC-BY-SA Licenses)
| Dataset | Images | Objects | License | Source |
|---|---|---|---|---|
| SeabedObjects-KLSG | 1,874 | Shipwrecks, natural objects | CC-BY-4.0 | Germany |
| SubPipe | 842 | Subsea pipelines | CC-BY-4.0 | UK |
| Marine_PULSE | 515 | Munitions, cylinders | Public Domain | U.S. Navy |
| GhostVision | 3,225 | Derelict crab pots | CC-BY-SA-4.0 | Delaware Bay |
| China Offshore SSS-AI | 668 | Fishing gear, seabed | CC-BY-4.0 | China |
| Total | 11,223 | 5 classes | - | Multi-national |
Splits:
- Training: 4,450 images (survey-disjoint groups)
- Validation: 901 images (zero frame overlap)
- Test: 1,872 images (held out)
Augmentation: Geometric (flip, rotate, scale), intensity (brightness, contrast), limited to 2× per image to prevent synthetic overfitting
Leakage Audit: Full report
⚠️ Limitations & Biases
Known Weaknesses
Data Limitations:
- ⚠️ No operational Indian sonar data - Trained on Mediterranean, North Sea, Delaware Bay
- ⚠️ Domain shift expected on different sonar types (frequency, resolution differences)
- ⚠️ Fishing gear = crab pots only (0.386 AP50) - NOT trained on actual fishing nets
- ⚠️ Natural objects weak (0.539 AP50) - Rocky reefs hard to distinguish from debris
Performance Issues:
- ⚠️ False positives: ~35% on complex seabeds (shadow physics helps reduce this)
- ⚠️ Small objects: May miss debris < 0.5m diameter on consumer-grade sonar
- ⚠️ Side-scan only: Not suitable for multibeam or bathymetric sonar
Bias Considerations:
- Geographic bias: Training data from non-Indian waters
- Equipment bias: Consumer + research-grade sonar (not military-grade)
- Class imbalance: Natural objects 28% of data, fishing gear 22%
Mitigation Strategies
✅ Fine-tune on operational data (3-month NIOT pilot planned)
✅ Probability calibration reduces confidence overconfidence
✅ Physics verification (acoustic shadow metrics) reduces false positives
✅ Human-in-the-loop review for high-stakes decisions
🧪 Evaluation Methodology
Validation Protocol
Metrics: COCO mAP50 (IoU threshold 0.5), precision, recall, F1-score
Split Method: Survey-disjoint group splits (no frame overlap across splits)
Validation Set: 901 images from 5 source datasets
Comparison: v1 (4 classes): 0.733 mAP50 → v4 (5 classes): 0.691 mAP50
Why mAP decreased?
- Added fishing_gear class (0.386 AP50 - very hard)
- More rigorous leakage-free validation (v1 had frame overlaps)
- Natural objects reclassified (rocks now separate from debris)
Full Results: GitHub ml/reports/
Test Suite
✅ 103 tests passing (100% success rate)
- 22 backend API tests
- 81 ML pipeline tests
- 18 acoustic shadow physics tests
- 15 probability calibration tests
- 18 GLCM texture analysis tests
🏗️ System Features
Advanced Capabilities
- Instance Segmentation - Pixel-perfect polygon masks (not just boxes)
- Enhanced Acoustic Shadow Physics - 6-metric verification:
- Shadow contrast ratio
- Shadow length measurement (px → meters)
- Target height estimation (slant-range geometry)
- Beam collinearity score
- Shadow confidence (0-1, physics-verified)
- Beam angle calculation
- Probability Calibration - Isotonic regression + Platt scaling (74% ECE reduction)
- Geolocation - Pixel → WGS84 coordinate transforms with survey metadata
- Indian Operations Mode - Distance/transit time to 6 major ports
Full Documentation: docs/SHADOW_PHYSICS.md
📦 Model Files
Available Formats:
best.pt- PyTorch weights (45MB) - Full precision, all featuresbest.onnx- ONNX Runtime (22MB) - CPU/GPU inference, cross-platformbest-fp16.onnx- FP16 quantized (11MB) - Edge devices, slight accuracy lossbest-int8.tflite- TensorFlow Lite (6MB) - Mobile, ~3% mAP drop
Download:
# Using Hugging Face CLI
huggingface-cli download Ganesh-0509/sih26057-sonar-debris best.pt
# Using Python
from huggingface_hub import hf_hub_download
model_path = hf_hub_download(repo_id="Ganesh-0509/sih26057-sonar-debris", filename="best.pt")
🏆 Competition Context
Smart India Hackathon 2026
Problem Statement: PS26057 - Automated Detection of Underwater Debris from Sonar Images
Organized By: Ministry of Earth Sciences (MoES) / National Institute of Ocean Technology (NIOT)
Project Status:
- ✅ All deliverables complete (technical, business, field work)
- ✅ 103 tests passing (100% success rate)
- ✅ Docker deployment verified
- ✅ Live demo ready (deployment in progress)
GitHub Repository: Ganesh-0509/SIH26057
📞 Contact & Support
Lead Developer: Ganesh Kumar
Email: ganesh957kumar@gmail.com
GitHub: @Ganesh-0509
Technical Support:
Business Inquiries: ganesh957kumar@gmail.com
📜 Citation
If you use this model in research or commercial applications, please cite:
@software{sih26057_sonar_debris_2026,
author = {Kumar, Ganesh},
title = {SIH26057 Sonar Debris Intelligence System},
year = {2026},
publisher = {Hugging Face},
url = {https://huggingface.co/Ganesh-0509/sih26057-sonar-debris},
version = {v4-production},
note = {Smart India Hackathon 2026, Problem Statement 26057}
}
📄 License
AGPL-3.0 (required due to Ultralytics YOLOv8 dependency)
Dataset Licenses:
- GhostVision: CC-BY-SA-4.0
- SeabedObjects-KLSG: CC-BY-4.0
- SubPipe: CC-BY-4.0
- Marine_PULSE: Public domain (U.S. Navy)
- China Offshore SSS-AI: CC-BY-4.0
Commercial Use: Contact for licensing options if AGPL-3.0 is incompatible with your use case.
🙏 Acknowledgments
Built with:
- Ultralytics YOLOv8
- FastAPI
- Next.js
- Public sonar datasets (see Training Data section)
Developed for Smart India Hackathon 2026 with support from MoES/NIOT
🇮🇳 Made in India • 🌊 For Indian Ocean • 🌍 For the World
Last Updated: October 2026