frame_mn10 (ONNX): frame-level sound event detection
An ONNX export of frame_mn10 from PretrainedSED by Florian Schmid et al.: a 3.8M-parameter MobileNet trained on AudioSet's frame-level (strong) labels. It takes raw audio and returns a probability for each of 447 sound classes every 40 ms. The spectrogram front end is part of the graph, and the model runs in browsers with ONNX Runtime Web.
This copy is hosted for SoundScope, a browser app for finding sounds in long recordings. It is a format conversion; no weights were retrained, fine-tuned or quantized.
Files
| File | Size | What |
|---|---|---|
frame_mn10.onnx | 14.85 MB | the model (opset 17, float32) |
frame_mn10.onnx.gz | 13.48 MB | the same bytes, gzip-compressed (Hugging Face serves files uncompressed); unpack with DecompressionStream("gzip") |
labels.json | the 447 class names, in output order | |
LICENSE | upstream MIT licence |
SHA-256 of frame_mn10.onnx: b81b1fe44bdffec6b39bfdae535cceb2164a14fc26acb788203b42b543598ab0
Input and output
- Input
waveform: float32, shape[1, samples], mono, 16 kHz, values in [-1, 1]. Any length works. The authors run 10 s chunks (160,000 samples). - Output
scores: float32, shape[1, frames, 447], sigmoid probabilities, one row per 40 ms (250 rows per 10 s).
import * as ort from "onnxruntime-web";
const session = await ort.InferenceSession.create("frame_mn10.onnx");
const audio = new Float32Array(160000); // 10 s of 16 kHz mono
const { scores } = await session.run({ waveform: new ort.Tensor("float32", audio, [1, audio.length]) });
// scores.dims = [1, 250, 447]
Changes from the original
- The upstream front end uses
torch.stft. For the export it was replaced by an equivalent conv1d DFT (same Hann window centred in a 512-point FFT, hop 160, reflect padding, pre-emphasis, Kaldi mel banks, log,(x + 4.5) / 5), so the graph uses only ops that ONNX Runtime Web supports. - Sigmoid is applied inside the graph, and the output is transposed to
[1, frames, classes]. - Only the strong (frame-level) head is exported.
Checked against the original PyTorch model on real audio: front end max difference 2.8e-5, output max difference 4e-7; ONNX Runtime (Python) 1.3e-6; ONNX Runtime Web (WASM, Edge) 3.1e-6.
Measured (SoundScope's own tests)
- Speed, ONNX Runtime Web WASM on an Intel i5-1340P laptop: about 0.21 s per minute of audio (4 threads) in Edge, 0.23 s in Firefox 158, 0.57 s on 1 thread.
- Timing: a short real sound slid in 40 ms steps was located within 0.04 s.
- Real street recordings (TUT Sound Events 2017, 6 sound types, thresholds tuned per sound): "present in this second" average precision 0.59 and F1 0.62. A small internal check, not a benchmark.
Credit and licence
The model, weights and training are by the PretrainedSED authors, released under the MIT licence (see LICENSE, copyright (c) 2024 Florian Schmid). The upstream repository has no separate licence statement for the weights; this copy follows the repository's MIT licence.
Please cite the original paper:
Florian Schmid, Tobias Morocutti, Francesco Foscarin, Jan Schlüter, Paul Primus, Gerhard Widmer. "Effective Pre-Training of Audio Transformers for Sound Event Detection." ICASSP 2025. arXiv:2409.09546
The model was trained on AudioSet (Gemmeke et al., 2017) and its strong labels (Hershey et al., 2021). The label data is CC BY 4.0. The audio is from YouTube and belongs to its uploaders.