An improved ViT model for music genre classification based on mel spectrogram

P Pingping Wu W Weijie Gao Y Yitao Chen F Fangfang Xu (State Key Laboratory of High Performance Ceramics and Superfine Microstructures, Shanghai Institute of Ceramics) Y Yanzhe Ji J Juan Tu H Han Lin

Abstract

Automating the task of music genre classification offers opportunities to enhance user experiences, streamline music management processes, and unlock insights into the rich and diverse world of music. In this paper, an improved ViT model is proposed to extract more comprehensive music genre features from Mel spectrograms by leveraging the strengths of both convolutional neural networks and Transformers. Also, the paper incorporates a channel attention mechanism by amplifying differences between channels within the Mel spectrograms of individual music genres, thereby facilitating more precise classification. Experimental results on the GTZAN dataset show that the proposed model achieves an accuracy of 86.8%, paving the way for more accurate and efficient music genre classification methods compared to earlier approaches.

Article Details

Journal PLoS ONE
Volume / Issue Vol. 20, Issue 3
Published March 13, 2025
Pages e0319027
ISSN 1932-6203
Publisher Public Library of Science

Journal Info

PLoS ONE

Public Library of Science

ISSN: 1932-6203 Open Access Health Sciences

Authors (7)

P

Pingping Wu

W

Weijie Gao

Y

Yitao Chen

F

Fangfang Xu

State Key Laboratory of High Performance Ceramics and Superfine Microstructures, Shanghai Institute of Ceramics

Y

Yanzhe Ji

J

Juan Tu

H

Han Lin