Automatic music genre classification typically operates on mel spectrograms
computed over fixed-length time windows, a representation that ignores
musical structure and varies with tempo. This thesis examines whether
bar-normalized, tempo-independent mel spectrograms improve genre
classification compared with the standard time-based representation.
Recordings are segmented into musical bars (beats are detected automatically
and verified manually), each bar is mapped to a mel spectrogram of fixed
size, and beat-offset augmentation is introduced to avoid the need for
downbeat detection. The comparison covers six architectures, from a
lightweight convolutional network to ImageNet- and AudioSet-pretrained
models, including the Audio Spectrogram Transformer and CNN14, on a
manually validated, artist-disjoint subset of GTZAN with artist-grouped
five-fold cross-validation. On these leakage-free data, bar normalization
shows no statistically significant accuracy difference from the time baseline
on any architecture. The same holds on a held-out test split, and an
apparent reduction in cross-fold variance proves to be an artefact of window
sampling in the baseline. The strongest model is the audio-pretrained
convolutional network CNN14, reaching approximately 80 % accuracy. The
main contribution is the direct comparison of the two representations under
a leakage-free protocol. The finding that lax evaluation distorts results on a
small dataset corroborates known caveats about GTZAN.
|