Hydrofon wikiThe manual of an underwater listening app 文A eesti

Manual:The baseline

Other languages: eesti English

Hydrofon's current baseline evaluates three models — built-in YAMNet with no extra training, logistic regression on YAMNet embeddings (wolfset-yamnet-v1), and logistic regression on 30 third-octave band features (wolfset-bands-v1) — on the exact same seed=0 test split of the Wolfset pool dataset. These figures give a reproducible reference point for future work; they are not proof of performance at sea.

Data and the seed=0 split

The baseline uses the full local copy of Wolfset: 168 WAV files (17,914 s, ~4.98 h), 44.1 kHz mono, recorded in an anechoic test tank with a B&K 8104 laboratory hydrophone. None of our own recordings are included yet.

  • Group-wise split: file names without the take suffix (x01, x02, …) form 88 configuration groups. With --seed 0 and --test-fraction 0.25, 135 files (65 groups) went to training and 33 files (23 groups) to testing. All three models used the exact same test split.
  • Total labelled audio: engine 14,126 s (3.9 h), interference 2,696 s (45 min), background 734 s (12 min).
  • Test split composition: 30 engine files (~59 min, covering all 5 motors, including bubbles, water and impacts) and only 3 non-engine files (3 groups): A00000T00N09 (water + air, 302 s), A00000T01N00 (air bursts + quiet gaps) and A00000T02N00 (water bucket + quiet gaps) — totalling 679.5 s of interference and 168.7 s of background.
  • Test windows: background 248–260, interference 1,259–1,313, engine 7,058–7,330 (YAMNet's 0.48 s hop produces slightly more windows than band features' 0.5 s hop). Both trained models use logistic regression with C = 1 and class_weight="balanced".

Why raw YAMNet alone is not enough

In an initial check (docs/yamnet_baseline.md), unmodified YAMNet was run on the first 60 seconds of 10 Wolfset files. All four Mercury outboards received strong Vehicle/Engine scores (0.36–0.68, peaks up to 0.94, top-1 in 94–100% of frames). The small RC model-ship electric motor barely registered (0.19 slow, 0.005 fast, labelled Electric shaver or Mains hum).

The real blocker was engine-free noise: compressed-air bubbles and running water hoses scored 0.23–0.36 on average (peaks up to 0.84), with the strong water hose (0.36) matching the 4.5 hp outboard (0.36). Because YAMNet was trained on in-air YouTube audio up to 8 kHz, no threshold separated engines from bubbles and flowing water.

Results on the seed=0 split

The table below summarises docs/treenimise_tulemused.md (computed prior to the unified app/evaluation.py core):

Model Balanced accuracy Engine recall Engine precision False alarms / h (legacy) Interference called engine Background called engine
Raw YAMNet (threshold 0.3, 2-class) 0.572* 0.657 0.857 601 61% 0%
YAMNet + LR (wolfset-yamnet-v1, 3-class) 0.803 0.944 0.947 1,116 29% 4%
Bands + LR (wolfset-bands-v1, 3-class) 0.837 0.949 0.925 1,032 43% 0%

* Comparison caveat (Metrics): raw YAMNet's 0.572 is 2-class balanced accuracy at threshold 0.3, whereas 0.803 and 0.837 are 3-class argmax scores. Evaluated fairly on the same binary engine vs non-engine scale (docs/evaluation.md, layer 2), balanced accuracy is 57.19% for raw YAMNet (FPR 51.3%), 84.87% for YAMNet + LR (FPR 24.6%), and 79.32% for bands + LR (FPR 36.2%). The band model leads on 3-class balanced accuracy because it scored 100% on the 248 quiet-tank background windows.

Raw YAMNet shows fewer legacy false-alarm runs per hour (601 vs 1,116 / 1,032) despite misclassifying more windows (807 vs 387 / 546) because it errs in long unbroken stretches, whereas the trained models flicker between interference and engine and each flicker starts a new run. The legacy denominator also spans only 12.6 minutes of mostly bubbles and water.

Confusion matrices (test windows)

Rows are ground truth; columns are model predictions.

Raw YAMNet (threshold 0.3):

Actual \ predicted Non-engine Engine
Background 260 0
Interference 506 807
Engine 2,515 4,815

YAMNet embeddings + LR (wolfset-yamnet-v1):

Actual \ predicted Background Interference Engine
Background 203 47 10
Interference 36 900 377
Engine 28 386 6,916

Band features + LR (wolfset-bands-v1):

Actual \ predicted Background Interference Engine
Background 248 0 0
Interference 5 708 546
Engine 4 358 6,696

Bitwise-identical reproduction (2026-12-06)

On 6 December 2026, the full baseline training and YAMNet evaluation were re-run in an isolated git worktree of audited commit 91121a7 under new model names (audit-yamnet-baseline, audit-bands-baseline) without touching the v1 models (docs/baseline_reproduction.md).

  • Every split, window count, confusion matrix and metric matched with zero difference.
  • All four weight arrays (mean, std, W, b) in weights.npz were bitwise identical (max_abs_diff = 0.0, identical SHA-256), both with the warm feature cache and on a cold cache recomputing all 372 .npz files from scratch.
  • The side-note figures for "3 consecutive windows" mentioned in docs/treenimise_tulemused.md (277 / 257 / 459 false alarms/h) were not reproduced because that ad-hoc script was not part of commit 91121a7.

The big weakness: bubbles and flowing water

Training raises engine recall from 66% to 94–95%, but the core weakness remains: bubbles and water flow are frequently called engine. YAMNet + LR calls 29% of interference windows engine, and bands + LR calls 43% engine. Conversely, an engine mixed with bubbles or heavy water is sometimes labelled interference (386 and 358 windows).

Neither trained model dominates across the board: band features are much smaller and faster (32 features instead of 1,024, no TensorFlow/YAMNet needed) and stronger on engine + air clips, whereas YAMNet + LR handles heavy water-hose noise better (A00000T00N09: 0.78 vs 0.40; A04000T00N08: 0.93 vs 0.57). Both score 98% accuracy on training data against 89–90% on test data, indicating moderate overfitting.

Why these numbers do not mean sea performance

Pool accuracy is not sea accuracy

These numbers only measure how well the models recognise the same 5 motors seen during training in new recordings from the same anechoic tank with a lab hydrophone. They do not show whether the system works at sea, with unfamiliar boats, or with our own cheap hydrophone.

Five limits matter most:

  1. Background is only tank silence. All background comes from quiet gaps in 5 transient groups (~734 s total, 2 groups / 168 s in test), labelled heuristically. There are no waves, rain, marine life or distant vessels. A 100% background score only shows that this tank's silence is easy to recognise.
  2. One tank and one lab hydrophone. A B&K 8104 lab hydrophone in a damped tank is nothing like Aaron's budget hydrophone chain in open water with surface reflections.
  3. The same 5 motors appear in train and test. Testing on an unseen boat requires holding an entire motor out of training (LOEO split).
  4. Very few negative test groups. With only 3 non-engine groups in the test set, one file shifts metrics by roughly ±5–10 percentage points and hourly false-alarm rates are rough extrapolations.
  5. No underwater drones (UUV/AUV/ROV) exist in the dataset. No claims can be made about detecting them.

See also

This page has not been saved yet.

The Hydrofon project · volli.page