mtg-jamendo-dataset icon indicating copy to clipboard operation
mtg-jamendo-dataset copied to clipboard

Faulty melspectrogram calculation

Open raraz15 opened this issue 9 months ago • 0 comments

https://github.com/MTG/mtg-jamendo-dataset/blob/master/scripts/melspectrograms.py

There is a faulty multiplication during power conversion which can complicate things for unaware users.

Line 45, Will create a power mel-spectrogram (magnitude squared, let's denote it by mag_spec^2) Line 46, amp2db = UnaryOperator(type='lin2db', scale=2) applies 2*(10*log10(mag_spec^2))

However, since the mag_spec was already squared in Line 45 we have an additional multiplication by 2. When dynamic range is important it could be problematic. See the figure attached.

Line 62 says Duration for the Choi's VGG model.

Choi's kapre also suffers from the same issue. Some researchers are aware of it (can provide a paper) but many others are not.

faulty_melspec

raraz15 avatar May 29 '24 14:05 raraz15