Manual:The baseline
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, …) form88configuration groups. With--seed 0and--test-fraction 0.25,135files (65groups) went to training and33files (23groups) to testing. All three models used the exact same test split. - Total labelled audio:
engine14,126 s(3.9 h),interference2,696 s(45 min),background734 s(12 min). - Test split composition:
30engine 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) andA00000T02N00(water bucket + quiet gaps) — totalling679.5 sof interference and168.7 sof background. - Test windows: background
248–260, interference1,259–1,313, engine7,058–7,330(YAMNet's0.48 shop produces slightly more windows than band features'0.5 shop). Both trained models use logistic regression withC = 1andclass_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) inweights.npzwere bitwise identical (max_abs_diff = 0.0, identical SHA-256), both with the warm feature cache and on a cold cache recomputing all372.npzfiles from scratch. - The side-note figures for "3 consecutive windows" mentioned in
docs/treenimise_tulemused.md(277 / 257 / 459false alarms/h) were not reproduced because that ad-hoc script was not part of commit91121a7.
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:
- Background is only tank silence. All
backgroundcomes from quiet gaps in5transient groups (~734 stotal,2groups /168 sin test), labelled heuristically. There are no waves, rain, marine life or distant vessels. A100%background score only shows that this tank's silence is easy to recognise. - 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.
- The same 5 motors appear in train and test. Testing on an unseen boat requires holding an entire motor out of training (LOEO split).
- Very few negative test groups. With only
3non-engine groups in the test set, one file shifts metrics by roughly±5–10percentage points and hourly false-alarm rates are rough extrapolations. - No underwater drones (UUV/AUV/ROV) exist in the dataset. No claims can be made about detecting them.
See also¶
- Metrics: why 2-class vs 3-class scores and denominators differ
- Labels and provenance: how Wolfset labels were derived and why they are weak
- Splits: testing generalisation to an unseen engine (LOEO)
- The evaluation contract: what must be agreed before the final test