CPJKU / madmom

Python audio and music signal processing library
https://madmom.readthedocs.io
Other
1.35k stars 206 forks source link

My script extracting downbeats 4-5x slower than /bin/DBNDownBeatTracker #476

Closed carrus2049 closed 3 years ago

carrus2049 commented 3 years ago

Hi there!

With this track (44100*2, length of 5:22), using DBNDownBeatTracker takes around 18 seconds. Though using interfaces as below takes up to 70-80 seconds. Is there something missing or wrong with my script? Thanks!

Steps needed to reproduce the behaviour

import madmom.features.downbeats as dbt
from madmom.audio.signal import SignalProcessor

afp = '1_2A625C32C21F1FC15669DC793B89B850.mp3'
proc = SignalProcessor(sample_rate=22050, num_channels=1)
sig = proc(afp)
act = dbt.RNNDownBeatProcessor()(sig)
proc = dbt.DBNDownBeatTrackingProcessor(beats_per_bar=4, fps=100, transition_lambda=250)
dbeats = proc(act)

Information about installed software

Please provide some information about installed software. madmom==0.16.1 numpy==1.20.3 scipy==1.6.3

superbock commented 3 years ago

There's nothing really wrong with it per se, try passing num_threads=4 to RNNDownBeatProcessor to see if you get the desired speedup.

carrus2049 commented 3 years ago

There's nothing really wrong with it per se, try passing num_threads=4 to RNNDownBeatProcessor to see if you get the desired speedup.

Works like a charm. Thank you alot sir!