Titung/urban-surveillance-mode-classifier-finetuned-v_final-v3
YAMNet fine-tuned end-to-end (not just a frozen-embedding head), for a personal safety wearable. Trained on a merge of two datasets:
Titung/urban-surveillance-audio-raw(primary source; includes a fix for acrash_clipsempty-audio bug -- rebuilt fromTitung/car-crash-audio-clips)Titung/emergency-surveillance-sounds(addedFire,Car Crash,Screams,Siren, andBackgroundexamples; introducedFireas a new 9th class not present in the original taxonomy)
Thin classes (Tire Skidding, Vehicle Mechanical Sound) were additionally oversampled
during training. Classes: ['Background', 'Car Crash', 'Glass Breaking', 'Gunshots', 'Screams', 'Siren', 'Tire Skidding', 'Vehicle Mechanical Sound', 'Fire']
⚠️ Known issues in this checkpoint (not yet resolved)
Firehad zero positive examples in the validation split (a group-aware split bug), so its alert threshold inthresholds.json/alert_policy.jsonis an uncalibrated default (0.5), not a real calibration. TreatFirealerting as unreliable until retrained.Car CrashandFiresubstantially confuse each other on the test set -- ~26% of trueCar Crashexamples are misclassified asFire, draggingFiretest precision to ~0.07 despite good recall. Likely acoustic similarity +Fire's high class weight.Tire Skiddingshows a large val/test precision gap (val precision 0.86 vs. test precision 0.19 at the same recall) -- consistent with overfitting from 4x oversampling on only ~136 source clips.Vehicle Mechanical Soundhas only 4 test examples -- its reported metrics are not statistically meaningful at this sample size.
This is the fine-tuned counterpart to the frozen-head baseline. Compare metrics.json
against that run before deciding which to ship -- fine-tuning only wins if it improves the
thin classes without collapsing generalization (check the train/val macro-F1 gap in Cell 11).
Files
saved_model/yamnet_finetuned.weights.h5+saved_model/head.weights.h5-- weights-only export (SavedModel export hit a known TF export bug -- see metrics.jsonexport_formatfield; reload pattern is in the training notebook)class_names.json-- index-to-class-name mapping (model output order, 9 classes)thresholds.json-- per-class calibrated decision thresholds (recalibrated for this model; see known issues re: Fire)alert_policy.json-- per-mode (driving / trek / night_walk / standby) class thresholdsmetrics.json-- test macro-F1, per-class test F1, and the LRs/epochs used
Test performance
Macro-F1: 0.7430 (see known issues above -- several classes have specific, understood problems)