CPJKU/madmom

How to track the progress of the analysis

giray123 opened this issue · 2 comments

Is there a way to printout the progress of the running processor?

import os
import sys, getopt
import numpy
from madmom.features.downbeats import DBNDownBeatTrackingProcessor
from madmom.features.downbeats import RNNDownBeatProcessor

# parameters
ytid = sys.argv[1]
file = os.path.abspath(filePath)
beats_per_bar = [3, 4]
frames_per_second = 100
transition_lambda=200

# extract downbeats
proc = DBNDownBeatTrackingProcessor(beats_per_bar=beats_per_bar, fps=frames_per_second, transition_lambda=transition_lambda)
act = RNNDownBeatProcessor()(file)
downbeat_times = proc(act)

print(downbeat_times)
sys.stdout.flush()

If you refer to as how far in the song the individual steps have progressed: unfortunately no. For all processors iterating over the individual frames (e.g. spectrogram processors, RNN layers) this would be possible, but is not implemented. For others (e.g. conv layers) this would lead to further slowdown, because they perform certain operations on whole length featuers and without doing so certain calculations would have to be performed multiple times.

I am using this downbeat tracker, I just wanted it to output some kind of progress number so that I can convert it to percentage. Because sometimes, analyzing long songs can take time and I want to know how much time remains. But yeah, if it is not implemented, thanks anyway. Great library!