Skip to main content

A fast, accurate Tempo Predictor

Project description

DeepRhythm: High-Speed Tempo Prediction

Introduction

DeepRhythm is a Convolutional Neural Network (CNN) designed for rapid, precise tempo prediction, specifically on modern music.

The implementation is heavily inspired by [1].

Audio is batch-processed using a vectorized HCQM, drastically reducing computation time by avoiding the common bottlenecks encountered in feature extraction.

Benchmarks

Method Acc1 (%) Acc2 (%) Avg. Time (s) Total Time (s)
Essentia (multifeature) 79.15 94.19 2.78 1635.48
Essentia (Percival) 80.51 94.87 1.46 851.91
Essentia (degara) 77.26 91.97 1.40 820.85
Librosa 52.82 63.93 0.51 299.68
DeepRhythm (cpu) 90.77 96.75 0.127 74.43
DeepRhythm (cuda) 90.77 96.75 0.0235 13.74
  • Test done on 586 songs, mostly Hip Hop, Electronic, Pop, and Rock
  • Acc1 = Prediction within +/- 2% of actual bpm
  • Acc2 = Prediction within +/- 2% of actual bpm or a multiple (e.g. 120 ~= 60)

Installation

To install DeepRhythm, ensure you have Python and pip installed. Then run:

pip install git+https://github.com/KinWaiCheuk/nnAudio.git#subdirectory=Installation

pip install deeprhythm==0.0.6

Note: nnAudio currently needs to be installed separately since the pip package is out of date. Hopefully this will be resolved soon.

Usage

To predict the tempo of a song with DeepRhythm:

from deeprhythm import DeepRhythmPredictor

model = DeepRhythmPredictor()
tempo = model.predict('path/to/song.mp3')
print(f"Predicted Tempo: {tempo} BPM")

References

[1] Hadrien Foroughmand and Geoffroy Peeters, “Deep-Rhythm for Global Tempo Estimation in Music”, in Proceedings of the 20th International Society for Music Information Retrieval Conference, Delft, The Netherlands, Nov. 2019, pp. 636–643. doi: 10.5281/zenodo.3527890.

[2] K. W. Cheuk, H. Anderson, K. Agres and D. Herremans, "nnAudio: An on-the-Fly GPU Audio to Spectrogram Conversion Toolbox Using 1D Convolutional Neural Networks," in IEEE Access, vol. 8, pp. 161981-162003, 2020, doi: 10.1109/ACCESS.2020.3019084.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

deeprhythm-0.0.7.tar.gz (5.3 MB view details)

Uploaded Source

Built Distribution

deeprhythm-0.0.7-py3-none-any.whl (27.1 kB view details)

Uploaded Python 3

File details

Details for the file deeprhythm-0.0.7.tar.gz.

File metadata

  • Download URL: deeprhythm-0.0.7.tar.gz
  • Upload date:
  • Size: 5.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.13

File hashes

Hashes for deeprhythm-0.0.7.tar.gz
Algorithm Hash digest
SHA256 da38c9042c2ce8c105732d167546570d67d3857a76e9099887b8daf6dde008d2
MD5 8de83034960cfbd532f40c5a00667290
BLAKE2b-256 5f70f1d932b57dae5a59986a10716817a5c489c9a1d063a573f228e0e44e6989

See more details on using hashes here.

File details

Details for the file deeprhythm-0.0.7-py3-none-any.whl.

File metadata

  • Download URL: deeprhythm-0.0.7-py3-none-any.whl
  • Upload date:
  • Size: 27.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.13

File hashes

Hashes for deeprhythm-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 b95a1a21b39b9c1fab10359be925122846d03c421a4d7d3a251b20876131e60b
MD5 d43040510302f21db1c4322cc1b6c739
BLAKE2b-256 650acd8e7d70d051d0e6e160b6d0ac0890da911f08e9619fba4b17f601307d8b

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page