import React, { useState } from 'react'; import { UploadCloud, Activity, CheckCircle, Layers, BarChart2, ArrowRight, ShieldCheck, Zap, Globe, Cpu, Settings, User } from 'lucide-react'; import './App.css'; interface HistoryRecord { id: number; timestamp: string; filename: string; confidence: number; thumbnail: string; } function LandingPage({ onEnter }: { onEnter: () => void }) { return (
DeepOceans v1.2 Engine Live

Protecting Marine Life with Precision AI.

Enterprise-grade anomaly detection for satellite telemetry. Monitor coastal regions and detect oceanic oil spills automatically using our state-of-the-art segmentation network.

Real-Time Inference

Achieve sub-200ms latency on 256x256 image segmentation masks utilizing optimized T4 compute instances.

Satellite Agnostic

Process telemetry from SAR, Sentinel-1, or multi-spectral sources effortlessly through our robust API.

Validated Accuracy

Averaging 0.84 IoU against validation datasets, ensuring you capture maximum spill events with minimal noise.

Seamless Integration

Plug predictions directly into your existing command center via standard REST protocols.

Streamlined Operations

From raw signal to actionable intelligence in three steps.

01

Data Ingestion

Upload your optical or synthetic aperture radar imagery directly into our secure pipeline.

02

Neural Processing

Our proprietary U-Net architecture isolates hydrocarbon signatures instantly.

03

Spatial Analytics

Generate highly accurate masks and probability scores to dispatch cleanup crews faster.

app.deepoceans.ai/workspace

Ready to revolutionize your monitoring?

Join the marine conservation operations running on DeepOceans.

); } function Dashboard() { const [selectedFile, setSelectedFile] = useState(null); const [preview, setPreview] = useState(null); const [maskSrc, setMaskSrc] = useState(null); const [isLoading, setIsLoading] = useState(false); const [confidence, setConfidence] = useState(null); const [latency, setLatency] = useState(null); const [threshold, setThreshold] = useState(0.5); const [history, setHistory] = useState([ { id: 1, timestamp: new Date(Date.now() - 14400000).toLocaleTimeString([], {hour: '2-digit', minute:'2-digit'}), filename: 'sentinel_scan_alpha.png', confidence: 84.2, thumbnail: 'https://images.unsplash.com/photo-1621213038477-9dfaf942dcde?auto=format&fit=crop&w=48&h=48' } ]); const [isDragActive, setIsDragActive] = useState(false); const handleFile = (file: File) => { setSelectedFile(file); const url = URL.createObjectURL(file); setPreview(url); setMaskSrc(null); setConfidence(null); setLatency(null); }; const handleFileChange = (e: React.ChangeEvent) => { if (e.target.files && e.target.files.length > 0) handleFile(e.target.files[0]); }; const onDragOver = (e: React.DragEvent) => { e.preventDefault(); setIsDragActive(true); }; const onDragLeave = () => { setIsDragActive(false); }; const onDrop = (e: React.DragEvent) => { e.preventDefault(); setIsDragActive(false); if (e.dataTransfer.files && e.dataTransfer.files.length > 0) handleFile(e.dataTransfer.files[0]); }; const handleUpload = async () => { if (!selectedFile || !preview) return; setIsLoading(true); const formData = new FormData(); formData.append("file", selectedFile); const API_URL = import.meta.env.VITE_API_URL || ""; try { const response = await fetch(`${API_URL}/predict`, { method: "POST", body: formData, }); if (response.ok) { const confHeader = response.headers.get("X-Confidence-Score"); const latHeader = response.headers.get("X-Inference-Latency-Ms"); let confValue = 0; if (confHeader) { confValue = parseFloat(confHeader); setConfidence(confValue); } if (latHeader) setLatency(parseInt(latHeader)); const blob = await response.blob(); const maskUrl = URL.createObjectURL(blob); setMaskSrc(maskUrl); const newRecord: HistoryRecord = { id: Date.now(), timestamp: new Date().toLocaleTimeString([], {hour: '2-digit', minute:'2-digit'}), filename: selectedFile.name, confidence: confValue, thumbnail: preview }; setHistory(prev => [newRecord, ...prev].slice(0, 10)); } else { alert("Inference server returned an error. Ensure backend is running."); } } catch (error) { console.error(error); alert("Connection failure to inference node."); } finally { setIsLoading(false); } }; return (
{/* SaaS App Header */}
DeepOceans Workspace
Node Operational
{/* Top Row: Metrics Grid */}
Spill Probability
50 ? 'var(--alert)' : 'var(--text-primary)' }}> {confidence !== null ? `${confidence.toFixed(1)}%` : '--'}
Inference Latency
{latency !== null ? `${latency}ms` : '--'}
Model IoU (Validation)
0.842
Detection Threshold
setThreshold(parseFloat(e.target.value))} /> {threshold.toFixed(2)}
{/* Left: Uploader */}

Data Ingestion

Click to upload or drag and drop
JPG or PNG (Optimal size: 256x256)
{selectedFile &&
{selectedFile.name}
}
{/* Right: History Log */}

Analysis History

{history.length} Records
{history.length === 0 ? (
No telemetry analyzed yet.
) : ( history.map(record => (
snapshot
{record.filename}
{record.timestamp}
50 ? 'alert' : 'clear'}`}> {record.confidence > 50 ? 'Anomaly Detected' : 'All Clear'}
{record.confidence.toFixed(1)}%
)) )}
{/* Bottom Row: Visualizations */}

Spatial Rendering Analysis

U-Net Feature Map
Source Imagery
{preview ? Raw :
Awaiting Feed
}
Segmentation Mask
{maskSrc ? Mask :
No Output
}
Anomaly Overlay
{preview && maskSrc ? ( <> Base Overlay ) :
No Output
}
); } function App() { const [view, setView] = useState<'landing' | 'dashboard'>('landing'); return ( <> {view === 'landing' ? setView('dashboard')} /> : } ); } export default App;