Beat This! โ€” verified FP32 browser ONNX exports

OpenMIRLab-maintained exports of the official CPJKU Beat This! small0 and final0 inference networks. Original research, architecture and weights belong to Francesco Foscarin, Jan Schlรผter and Gerhard Widmer (Institute of Computational Perception, JKU Linz). This is a format conversion, not retraining or a new accuracy claim.

Stable input/output contract

  • Input spect: float32 [batch, frames, 128], dynamic batch and frame count.
  • Outputs in order: beat, then downbeat, each float32 [batch, frames] logits, not probabilities or event times.
  • Front-end stays in the consumer: mono 22050 Hz, hop441 (50 fps), n_fft1024, 128 Slaney mel bins, magnitude spectrogram, log1p(1000*x). Preserve the pinned package frontend's centering/padding/filter settings; see its source.
  • FP32, ONNX opset17, legacy Torch exporter (dynamo=False). No frontend, peak picker or DBN is embedded.
  • For the verified event conversion use the unchanged package Postprocessor(type="minimal", fps=50). The package's native DBN is a separate companion. Its earlier 72/72 TypeScript comparison is not new verification of this artifact or all decoders.

Provenance and reproduction

Export command, run from the tested source checkout with its verified environment (the explicit checkout/environment paths are machine-local):

PYTHONPATH=<export-checkout>/src uv run --project <verified-beat-this-environment> --no-sync --with onnx --with onnxruntime python tools/export_onnx.py <new-output-directory>

Equivalent fresh-checkout entry: install the appropriate Torch build, uv sync --extra onnx, then uv run python tools/export_onnx.py <new-output-directory> small0 final0 --threads 2. Pin the exact versions in verification.json for reproduction: Python3.13.5, Torch2.14.0+cu130, ONNX1.23.2, ONNX Runtime1.32.0; dependency versions are also recorded there. Export failure publishes no accepted directory and never replaces an existing one.

Export-only rewrite

Three PartialFTTransformer instances in the export copy bind b = x.shape[0] instead of b = len(x). Legacy tracing otherwise freezes the batch size despite a dynamic batch annotation. This changes shape access only; an independent test proves arithmetic identity and that the runtime class/unpatched reference is unchanged. Native inference and DBN code are not modified.

These files intentionally differ from audiorective's earlier models-beat-this-1 conversion because of this dynamic-batch repair and tool versions. Do not substitute the old file hashes. The original source checkpoints are unchanged.

Verification and file hashes

Both profiles compare against separately loaded, unpatched PyTorch on the original generated12-second groove, its6-second crop and a two-item batch. Maximum logit difference must be <=1e-3; peak-picked beat AND downbeat arrays must match exactly and beats must be nonempty. Source tests:9 ONNX tests and93 ordinary tests pass; hosted Python3.10โ€“3.13, real-golden, ONNX and wheel-from-sdist checks pass.

File Bytes SHA-256 Worst Python max abs logit difference
beat_this_small0.onnx 10557237 74b5d843cf6ace5fd67045b3fa3825a1ed1d4c04ccc6063631484efa2455846d 2.76565552e-05
beat_this_final0.onnx 83164295 44405c59fe2448e89bada9b2aba865268f510a4e7643cec91023fdf92497981d 4.38690186e-05

Actual Chromium150 / onnxruntime-web1.23.2 WASM on the six-second fixture gives maximum logit errors2.288818359375e-5 (small0) and2.4318695068359375e-5 (final0); beat/downbeat times are exact against the unpatched native reference. Final commit-pinned download/CORS checks are recorded in the publication receipt after upload. These are fixture parity checks, not a new beat-tracking accuracy benchmark or a GPU/WebGPU certification.

Additional payload hashes:

  • LICENSE: 909ab6549794a18e9bb243aacfadda4a5f308436fc2846f350755c53c4f06ae1.
  • verification.json: e70fea6449d460d5462ad3ef1f40e5b3dd841d97110200ebc5bd07ae5a5fe0f2.

The final publication receipt reports every repository file's SHA-256, including this card and server-generated .gitattributes; a file does not embed its own digest. Pin the returned Hugging Face commit and check the model SHA-256 before loading, e.g. https://huggingface.co/openmirlab/beat-this-onnx/resolve/<commit>/beat_this_small0.onnx. New exports are new commits; existing commit-pinned URLs remain immutable.

License and training-data note

MIT. Copyright (c) 2024 Institute of Computational Perception, JKU Linz, Austria. See LICENSE.

The following upstream note is retained verbatim:

Note that some of the training files are fully copyrighted or under limited Creative Commons licenses, and it is up to the user to assess whether this may impact their use case.

Citation

@inproceedings{foscarin2024beatthis,
    author = {Francesco Foscarin and Jan Schl{\"u}ter and Gerhard Widmer},
    title = {Beat this! Accurate beat tracking without {DBN} postprocessing},
    year = 2024,
    month = nov,
    booktitle = {Proceedings of the 25th International Society for Music Information Retrieval Conference (ISMIR)},
    address = {San Francisco, CA, United States},
}
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support