Skip to main content
QUICK REVIEW

[Paper Review] Music Genre Classification with ResNet and Bi-GRU Using Visual Spectrograms

Junfei Zhang|arXiv (Cornell University)|Jul 20, 2023
Music and Audio ProcessingComputer Science6 citations
TL;DR

This paper proposes a hybrid deep learning model combining ResNet and bidirectional GRU (Bi-GRU) to classify music genres using visual spectrograms as input. The model achieves 81% accuracy on Mel spectrograms, outperforming traditional machine learning methods and demonstrating the effectiveness of leveraging both spatial (via ResNet) and temporal (via Bi-GRU) features in audio representation, with Mel spectrograms showing superior performance due to their alignment with human auditory perception.

ABSTRACT

Music recommendation systems have emerged as a vital component to enhance user experience and satisfaction for the music streaming services, which dominates music consumption. The key challenge in improving these recommender systems lies in comprehending the complexity of music data, specifically for the underpinning music genre classification. The limitations of manual genre classification have highlighted the need for a more advanced system, namely the Automatic Music Genre Classification (AMGC) system. While traditional machine learning techniques have shown potential in genre classification, they heavily rely on manually engineered features and feature selection, failing to capture the full complexity of music data. On the other hand, deep learning classification architectures like the traditional Convolutional Neural Networks (CNN) are effective in capturing the spatial hierarchies but struggle to capture the temporal dynamics inherent in music data. To address these challenges, this study proposes a novel approach using visual spectrograms as input, and propose a hybrid model that combines the strength of the Residual neural Network (ResNet) and the Gated Recurrent Unit (GRU). This model is designed to provide a more comprehensive analysis of music data, offering the potential to improve the music recommender systems through achieving a more comprehensive analysis of music data and hence potentially more accurate genre classification.

Motivation & Objective

  • To address the limitations of manual music genre classification in large-scale music streaming platforms.
  • To overcome the shortcomings of traditional machine learning models that rely on handcrafted features and fail to capture complex audio patterns.
  • To improve music recommendation systems by developing an automatic, accurate, and robust music genre classification system using deep learning.
  • To investigate the effectiveness of visual spectrograms—particularly Mel and STFT—as input representations for deep learning-based genre classification.
  • To explore the potential of hybrid architectures combining CNNs and RNNs to model both spatial and temporal features in audio data.

Proposed method

  • The model uses visual Mel spectrograms as input, transforming audio signals into image-like representations suitable for convolutional neural networks.
  • A ResNet18 backbone is employed to extract hierarchical spatial features from the spectrogram images, leveraging residual connections to mitigate vanishing gradient problems.
  • The output feature maps from ResNet are flattened and fed into a bidirectional Gated Recurrent Unit (Bi-GRU) to model sequential temporal dynamics in the spectrogram data.
  • The hybrid architecture enables joint learning of spatial patterns (e.g., frequency content, harmonic structures) and temporal evolution (e.g., rhythmic changes, progression over time).
  • The model is trained using cross-entropy loss with Adam optimization, and data augmentation techniques such as time shifting and pitch scaling are applied to improve robustness.
  • Transfer learning is implicitly leveraged by using ImageNet-pretrained ResNet18, enhancing feature learning on the audio spectrogram input.
Figure 1 : Raw audio waveform for jazz class
Figure 1 : Raw audio waveform for jazz class

Experimental results

Research questions

  • RQ1Can a hybrid deep learning model combining ResNet and Bi-GRU effectively classify music genres using visual spectrograms?
  • RQ2How does the performance of the proposed model compare to traditional machine learning models like KNN and SVM when using spectrogram inputs?
  • RQ3Does the choice of spectrogram representation—Mel vs. STFT—significantly affect classification accuracy in deep learning models?
  • RQ4To what extent do visual spectrograms, particularly Mel spectrograms, align with human auditory perception and improve model performance?
  • RQ5Can the proposed model achieve performance comparable to human-level genre classification accuracy?

Key findings

  • The proposed ResNet-Bi-GRU hybrid model achieved a genre classification accuracy of 81% when using Mel spectrograms as input, significantly outperforming traditional machine learning models such as KNN and SVM.
  • The model's performance surpassed the 70% benchmark of human-level genre classification, indicating strong potential for real-world deployment in music recommendation systems.
  • Mel spectrograms consistently outperformed STFT spectrograms across all deep learning architectures tested, including CNN, Bi-GRU, ResNet18, and the hybrid ResNet-Bi-GRU model.
  • The hybrid architecture demonstrated superior performance compared to standalone ResNet18 or Bi-GRU, highlighting the complementary benefits of combining spatial and temporal modeling.
  • The results suggest that visual spectrograms, especially Mel-scaled ones, are highly effective inputs for deep learning in music genre classification due to their perceptual relevance to human hearing.
  • The study confirms the feasibility of transfer learning from image classification to audio analysis by successfully adapting a pretrained ResNet to spectrogram inputs.
Figure 2 : STFT Spectrogram for jazz class
Figure 2 : STFT Spectrogram for jazz class

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.