Beat This! ONNX Models
ONNX conversions of the Beat This! beat and downbeat tracking models from Johannes Kepler University Linz (ISMIR 2024).
Models
| Model | Parameters | Size | Description |
|---|---|---|---|
final0.onnx |
20.3M | ~80 MB | Main model, seed 0 (default) |
final1.onnx |
20.3M | ~80 MB | Main model, seed 1 |
final2.onnx |
20.3M | ~80 MB | Main model, seed 2 |
small0.onnx |
2.1M | ~10 MB | Small model, seed 0 |
small1.onnx |
2.1M | ~10 MB | Small model, seed 1 |
small2.onnx |
2.1M | ~10 MB | Small model, seed 2 |
The final and small variants are the same architecture trained with different random seeds for statistical robustness. Performance is essentially equivalent across seeds. The small models are faster but slightly less accurate.
Input/Output
- Input:
input_spectrogramโ mel spectrogram tensor of shape(batch, time, 128)where time is variable length (128 mel bins) - Output:
beatโ beat logits of shape(batch, time),downbeatโ downbeat logits of shape(batch, time)
Apply sigmoid to convert logits to probabilities, then use peak picking to extract beat/downbeat positions.
Usage with Rust (beat-this crate)
use beat_this::{BeatThis, OrtRuntime};
let runtime = OrtRuntime;
let tracker = BeatThis::new(&runtime, "final0.onnx")?;
let analysis = tracker.analyze_file("audio.wav")?;
See danigb/beat-this-rs for the Rust implementation.
Usage with Python (ONNX Runtime)
import onnxruntime as ort
import numpy as np
sess = ort.InferenceSession("final0.onnx")
# spect: mel spectrogram of shape (1, num_frames, 128)
beat, downbeat = sess.run(None, {"input_spectrogram": spect})
Citation
@inproceedings{foscarin2024beatthis,
title={Beat This! Accurate Beat Tracking Without DBN Postprocessing},
author={Foscarin, Francesco and Schl{\"u}ter, Jan and Widmer, Gerhard},
booktitle={Proceedings of the 25th International Society for Music Information Retrieval Conference (ISMIR)},
year={2024}
}
License
MIT โ same as the original CPJKU/beat_this.
Converted by
Converted from upstream PyTorch Lightning checkpoints hosted at cloud.cp.jku.at using torch.onnx.export (opset 14, TorchScript tracer). Verified with ONNX Runtime (max abs diff < 0.00002 vs PyTorch).
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐ Ask for provider support