Beat This! final0, ONNX
A modified version of the final0 checkpoint of Beat This!,
© 2024 Institute of Computational Perception, JKU Linz, licensed under MIT. The licence is in
LICENSE.
Where the weights come from
JKU's checkpoint server was unreachable when this export was made, so the weights were taken from
the mirror safe-models/beat-this-final0
(revision 39ec64821baf38aa16fafa500a91379c16db0062, model.safetensors SHA-256
f758c77ba5d862cad3718a95705964e9af55298b1fb3544c62c9d79184ea0f2e). They have not been compared
with JKU's final0.ckpt. They load strictly into beat-this 1.1.0's BeatThis with final0's
hyperparameters (20,252,917 parameters), and convert_mirror.py turns them into the checkpoint
format beat_this.inference.load_model reads.
Changes from the original
- Exported to ONNX (opset 18), returning beat and downbeat logits.
- Feature extraction built in. The graph takes 32 kHz mono samples and holds a windowed-sinc
resampler to 22.05 kHz (Beat This! uses soxr) and the model's log-mel front end (
LogMelSpect: 1024-point Hann frames, hop 441, 128 slaney mels from 30 Hz to 11 kHz, magnitude normalized by frame length, log1p(1000 x)).
Weights are unchanged (float32). export_beat_this.py (with common.py) made this file. Against
the PyTorch model it differs by at most 3.5e-5; against Beat This!'s own pipeline, whose soxr
resampler differs from the one in the graph, logits differ by up to 1.5, and on a 20 s, 124 BPM
test pattern all 42 beat frames are the same and downbeats are within one frame.
File
beat-this-final0.onnx, a single file of 84,973,959 bytes,
SHA-256 af7b99f72844d464ac87a379ce4fa98e81b8f46735a743ce23b5972a21c78be3.
| input | type | shape | meaning |
|---|---|---|---|
samples |
f32 | [N] |
mono 32 kHz audio, 1 s to 31 s |
| output | type | shape | meaning |
|---|---|---|---|
beat |
f32 | [F] |
beat logit per 20 ms frame |
downbeat |
f32 | [F] |
downbeat logit per 20 ms frame |
Frames are centred on multiples of 20 ms from the first sample. Predictions in the outer 6 frames of a chunk are unreliable, so overlap chunks by 12 frames.