KaushalB/ViTForMusicClassification
Image Classification
•
Updated
•
5
•
1
image
imagewidth (px) 640
640
| label
class label 12
classes |
---|---|
8pop
|
|
8pop
|
|
5jazz
|
|
1classical
|
|
8pop
|
|
0afro
|
|
6latin
|
|
1classical
|
|
11rock
|
|
4electro
|
|
5jazz
|
|
4electro
|
|
11rock
|
|
0afro
|
|
9rap
|
|
6latin
|
|
0afro
|
|
6latin
|
|
9rap
|
|
4electro
|
|
2country
|
|
8pop
|
|
2country
|
|
7metal
|
|
6latin
|
|
7metal
|
|
8pop
|
|
4electro
|
|
2country
|
|
3disco
|
|
9rap
|
|
6latin
|
|
3disco
|
|
7metal
|
|
0afro
|
|
6latin
|
|
3disco
|
|
8pop
|
|
6latin
|
|
4electro
|
|
2country
|
|
9rap
|
|
8pop
|
|
0afro
|
|
0afro
|
|
4electro
|
|
2country
|
|
6latin
|
|
4electro
|
|
5jazz
|
|
6latin
|
|
6latin
|
|
1classical
|
|
1classical
|
|
11rock
|
|
5jazz
|
|
0afro
|
|
7metal
|
|
0afro
|
|
8pop
|
|
7metal
|
|
3disco
|
|
5jazz
|
|
6latin
|
|
6latin
|
|
11rock
|
|
0afro
|
|
0afro
|
|
6latin
|
|
2country
|
|
6latin
|
|
7metal
|
|
4electro
|
|
9rap
|
|
11rock
|
|
10reggae
|
|
7metal
|
|
0afro
|
|
11rock
|
|
4electro
|
|
3disco
|
|
0afro
|
|
8pop
|
|
8pop
|
|
0afro
|
|
3disco
|
|
9rap
|
|
0afro
|
|
8pop
|
|
11rock
|
|
8pop
|
|
7metal
|
|
9rap
|
|
11rock
|
|
0afro
|
|
3disco
|
|
9rap
|
|
6latin
|
|
11rock
|
|
11rock
|
The egtzan_plus dataset is an GTZAN like dataset for musical genre classification in the vision domain. In egtzan_plus, new classes such as Electro and Afro have been added to the original GTZAN dataset. Each audio track (30s) is transformed into a Mel-frequency spectrogram using Librosa:
# Mel-frequency spectrogram generation
y, sr = librosa.load(audio_file)
ms = librosa.feature.melspectrogram(y=y, sr=sr, n_mels=128, fmax=8000)
log_ms = librosa.power_to_db(ms, ref=np.max)
librosa.display.specshow(log_ms)
The dataset contains the following classes:
The dataset is split into train and test sets as follows: