Skip to main content

Marine Acoustic Event Triage

4-channel ResonatorBank flags which frequency-stable acoustic event is dominant on a hydrophone stream — fin-whale pulses, blue-whale A-calls, ship cavitation, humpback tonal components — in 3,800 bytes. Designed as a sub-mW triage front-end for a solar-powered smart buoy.

Validation status: synthetic MBARI-style hydrophone streams only. Real MARS archive validation is planned.

Triage, not species ID. Flags acoustic-frequency signatures only — no source localisation (TDOA / bearing), no rich-spectrogram analysis (humpback song phrases, dolphin whistles), not a substitute for PAMGuard or full-size marine CNNs. Targets the earlier layer in the bioacoustic monitoring chain.

v0.2 update: wider Gaussian tuning recovers boundary frequencies · multi-label output flags whale and ship simultaneously

View Source All Use Cases

Key Metrics

Measured 2026-04-24 on synthetic MBARI MARS-style hydrophone streams spanning fin whale 20-Hz pulses, blue whale A-calls, ship cavitation, and humpback song.

90.0%
Synthetic-window accuracy (200 windows)
6.18
d' Sensitivity (SDT)
0.900
Macro F1 Score
3,800
Bytes RAM (20 neurons)
0.21
µs / step (avg)
5
Event Classes

Classification Results

EventFrequencyTPFPPrecisionRecallF1
Ambient1910.9500.9500.950
Fin Whale20 Hz1930.8640.9500.905
Blue Whale (A-call)80 Hz1730.8500.8500.850
Ship Noise140 Hz1730.8500.8500.850
Humpback Song200 Hz1801.0000.9000.947

Ship Traffic & Stress Tests

Ship Transits (vessel sailing past the hydrophone)

Transit LengthShip WindowsTotal WindowsShip Ratio
500 steps71070.0%
1500 steps203066.7%
3000 steps396065.0%
5000 steps5910059.0%

Every closest-point-of-approach window is flagged as Ship Noise. Approach and recede tails produce Ambient — the physically correct answer because the ship is below the noise floor at those ranges.

Noise Resilience

Noise LevelAccuracyVerdict
0%100%OK
10%96%OK
20%90%DEGRADED
30%82%DEGRADED
50%76%DEGRADED

The 50-step energy accumulation window averages short random transients. Sustained broadband contamination (storms, surf) above ~20 % degrades accuracy.

Sea-State Compensation

Sea StateAmbient preservedFalse-positive species
0 (calm)100%0
2100%0
4100%0
6 (rough)100%0
8 (very rough)100%0
Verified: det.set_sea_state(state) raises the ambient threshold 25 % per step on the Douglas scale. Zero false alarms across all five states on 1000-step ambient-noise runs.

Whale Under Ship Noise

Fin-whale pulses interleaved with a simultaneous ship passage (2000-step mixed recording).

EventWindows
Fin Whale32
Ship Noise8

In the synthetic mixed scene, fin-whale pulses remain separately detectable during overlapping ship-noise windows. Real-ocean masking behaviour is pending MARS validation.

Remaining Limitations

LimitationStatusImpact
Single-label outputFixed in v0.2step_multi() flags whale + ship together (100% coverage)
Boundary frequenciesFixed in v0.2with_bandwidth(0.20) catches 110 Hz and 170 Hz (50 Hz still Ambient)
No source localisationOpenAnswers what, not where or how far
Synthetic data onlyOpenReal MARS hydrophone data validation pending

v0.2 Improvements

Two additive, backwards-compatible API extensions address the biggest v0.1 limitations identified in review. All 20 v0.1 tests still pass; 5 new v0.2 tests cover the new paths (25 / 25 green).

1. Wider Gaussian Tuning — with_bandwidth(0.20)

Each Neuron::bandwidth is writable through the public API. v0.2 widens every channel past the library's auto-clamped 0.10 so the between-channel gaps no longer fall through to Ambient.

Input Frequencyv0.1 (bw=0.10)v0.2 (bw=0.20, recommended)v0.2 (bw=0.30)
50 HzAmbientAmbientAmbient
110 Hz (between Blue & Ship)AmbientShip NoiseShip Noise
170 Hz (between Ship & Hump)AmbientHumpbackHumpback
260 Hz (above Hump)AmbientAmbientHumpback
15 Hz (below Fin)AmbientAmbientFin Whale
80 Hz (exact Blue)Blue WhaleBlue WhaleBlue Whale

Bandwidth vs. CSV accuracy — sweet spot at 0.20

BandwidthCSV AccuracyVerdict
0.10 (v0.1 default)90.0%strict — drops boundary signals
0.1590.0%partial recovery
0.20 (v0.2 recommended)90.0%catches 110 Hz + 170 Hz, no regression
0.2289.0%slight regression starts
0.2579.0%200 Hz channel picks up 260 Hz noise
0.3075.0%too wide — false positives on ambient

2. Multi-Label Output — step_multi()

Thresholds every channel independently and returns a MultiLabelDecision listing all active sources — so a fin whale calling through a simultaneous ship passage produces the label [FinWhale, ShipNoise].

Whale-under-ship scene (2,000 steps)Windows flagging BOTH speciesCoverage
v0.1 single-label0 / 400%
v0.2 multi-label (bw=0.20)40 / 40100%
v0.2 multi-label (bw=0.30)40 / 40100%

Regression check: zero false-positive species on 2,000 steps of pure ambient ocean at bandwidth 0.20 — the multi-label path is strictly additive.

Usage

Rust
// v0.2: wider Gaussian tuning + multi-label output
let mut det = MarineDetector::with_bandwidth(0.20);

while let Some(d) = det.step_multi(freq) {
    // d.events may be [FinWhale, ShipNoise] simultaneously
    // d.energies == [FIN, BLUE, SHIP, HUMP] snapshot
}

Reproduce the full comparison locally: cargo run --release --example marine_v02.

Remaining Gap — 50 Hz

The 50 Hz window (between Fin=20 and Blue=80) is still reported as Ambient even at bandwidth 0.30 — the relative gap (80–20)/20 = 300% is too wide for any reasonable Gaussian to bridge. Species in this range (sei whale downsweeps 40–60 Hz) would need their own dedicated channel in a 5- or 6-channel bank.

How It Compares

Against classical DSP (Goertzel / matched filter), TinyML stacks (TensorFlow Lite Micro, Edge Impulse) and full-size marine CNNs. All TinyML numbers from vendor docs; all CNN numbers from peer-reviewed papers.

RAM, ROM & Latency

SystemRAMFlash / ROMLatency
CricketBrain UC03 v0.23.7 KB~20 KB49 ms (10 µs compute)
TFLite Micro — micro_speech10 KB22 KB~1 s audio window
Edge Impulse audio — Cortex-M7 @ 216 MHz19.6 KB47.3 KB54 ms + 1 s buffer
Edge Impulse audio — Cortex-M4F @ 80 MHz19.6 KB47.3 KB225 ms + 1 s buffer
Typical TinyML audio CNN20-100 KB50-500 KB10-100 ms
Humpback CNN (Allen 2021)>100 MB>100 MBGPU / Jetson only

CricketBrain is ~3× smaller than TFLite Micro's smallest audio example and ~5× smaller than a typical Edge Impulse audio model.

Average Power at 1 Hz Decision Rate

SystemActive powerDuty cycleAverage power
CricketBrain — STM32F0 @ 48 MHz~15 mW0.001%< 0.5 µW compute
Edge Impulse — Cortex-M7 @ 216 MHz~100 mW5.4%~5.4 mW
Edge Impulse — Cortex-M4F @ 80 MHz~50 mW22.5%~11 mW
TFLite Micro — STM32F1 continuous~30 mW~100%~30 mW
DeepAcoustics / ORCA-SPOT (RPi-class)~5 W~10%~500 mW

Edge Impulse doesn't publish mW numbers directly; estimates use the documented latency × ST datasheet power curves. At sub-1 mW budgets a solar-charged smart buoy can afford CricketBrain but not Edge Impulse.

Training Data & Accuracy Trade-off

SystemTraining dataReported accuracy
CricketBrain UC03 v0.2Zero90.0% (4 classes), d' = 6.18
Classical Goertzel / matched filterZero~85-90% on clean fin-whale 20 Hz
Edge Impulse audio~100-1,000 clips/classtypical 85-95%
TFLite Micro keyword~1,000 clips/classtypical 90-95%
Humpback CNN (Allen 2021)187,000 h labelledAP 0.97, AUC 0.992
Custom mel-spectrogram CNNLarge corpus98.92% (FN 0.75%)
Marine mammal DNN (Shiu 2020)Large corpusF1 0.87 over 32 species

On complex spectrograms (humpback song) CNNs beat CricketBrain on accuracy. On frequency-stable tonal signals (fin whale 20-Hz pulse, ship cavitation) the gap closes — and CricketBrain pulls ahead on every non-accuracy axis. Schall et al. (2024) note in their baleen-whale benchmark that deep-learning detectors "tend to be too computationally expensive to run on existing wildlife monitoring systems".

When to Pick Which

ScenarioRecommendation
Solar buoy, < 1 mW budget, multi-year deploymentCricketBrain
Known frequency-stable sources (fin whale, ship cavitation)CricketBrain
No labelled training data existsCricketBrain
Regulatory / auditable / explainable requiredCricketBrain
Power budget > 10 mW, complex spectrogram classesEdge Impulse / TFLite Micro
Post-hoc analysis of archived hydrophone dataPAMGuard / Jetson CNN
Research-grade accuracy (> 95%) on 30+ speciesJetson / RPi CNN

Full sourced breakdown (vendor docs, peer-reviewed papers): docs/competitive_analysis.md.

Dataset & License

FieldValue
DatasetMBARI MARS Cabled Observatory Hydrophone
LicenseCC BY 4.0
URLmbari.org/technology/mars/
LocationMonterey Bay, CA — 891 m depth
Sampling256 kHz broadband, 2 kHz decimated for baleen-whale work
HostingAWS Open Data Sponsorship (s3://pacific-sound-2khz/)
License: CricketBrain source is AGPL-3.0. Commercial use requires paid license (details). MBARI MARS data is CC BY 4.0 — attribution required.

Quick Start

Terminal
cd use_cases/03_marine_acoustic
cargo run --release                                   # Synthetic demo
cargo run --release -- --ship-transit                    # Cargo-ship transit
cargo run --release -- --csv data/processed/sample_marine.csv # CSV mode
cargo run --release --example marine_sdt                # SDT benchmark
cargo run --release --example marine_stress             # Stress test
cargo run --release --example marine_v02                # v0.1 vs v0.2 comparison