DeepRhythm
A CNN that classifies HCQM tempo features of 8 second music clips into 256 bpm classes.
Audio and speech · 20 operations Checked
Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.
At a glance
- Task
- Audio and speech
- Parameters
- 1.4M
- Operations
- 20
- Framework
- PyTorch
- Recurrent
- No
- Published
- 2024
- Authors
- bleugreen
- Source
- GitHub: bleugreen/deeprhythm
- License
- GPL-3.0
- Checked
- Passed: the trace was replayed operation by operation and matched the model's own output for this input.
Files
The file opened in a new tab. Use your browser's Save command there to keep it.
The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.
Details
- Stable ID
- m15999
- Graph hash
- f83af39b8d1bfcf52954a3604af2879b8fb1a9cae03799e6fdd14eac48dde03c
- Skeleton hash
- b484dc9b36f78c876d0fcf18cfc831370f4190b833310923f4baf963188ec883
- Architecture hash
- 3cf20e9819878fbf79aa2bf20522a2b380f24ec348b10d5b04310997be19f99f
- Diagram SHA-256
- 9d798a1e92ee52d28b673101ce46cea523f5c98b1f12280b9dd53a19c1a5cd11
- TorchLens version
- 2.36.0
- Renderer
- graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
- Check
- Forward pass replayed in PyTorch
What it is
DeepRhythm is a convolutional neural network that predicts the tempo of modern music. Its author wanted a tempo estimator that was accurate and also small and fast enough to run on a Raspberry Pi.
The network does not read raw audio: each 8 second clip is first turned into a harmonic constant-Q modulation (HCQM), and the CNN classifies that. The HCQM comes from Constant-Q transforms that pick out low tempo frequencies instead of the usual pitch frequencies. Computed across eight frequency bands and six harmonics, it is a 3D tensor of the relative strength of the tempos present in the audio. The CNN then classifies this tensor into 256 output classes covering 30 to 286 bpm. In the author's words, the CNN works more as a filter that reduces the dimensionality of the HCQM than as a learner of onset patterns.
The architecture is the same as in the original paper by Foroughmand and Peeters. The author's own contribution is the feature step, rewritten with pytorch and nnAudio so that it runs on the GPU. In the author's benchmark, DeepRhythm on a GPU scored 95.91% on Acc1 at an average of 0.021 seconds per song. That test used 953 songs, mostly electronic, hip hop, pop and rock, and the timing covers audio loading, feature extraction and model inference.
Key idea. DeepRhythm pairs a tempo-classification CNN with a vectorized, batch-processed HCQM feature step that reduces the time spent on feature extraction.
- deeprhythm
- tempo estimation
- tempo prediction
- bpm detection
- hcqm
- harmonic constant-q modulation
- music tempo
- tempo classification
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
Cite the paper
@misc{deeprhythm2024,
title = {DeepRhythm: High-Speed Tempo Prediction},
author = {bleugreen},
year = {2024}
}