jsalbert / Music-Genre-Classification-with-Deep-Learning

Using deep learning to predict the genre of a song.
https://jsalbert.github.io/Music-Genre-Classification-with-Deep-Learning/
MIT License
155 stars 38 forks source link

How should it work on GTZAN dataset? #1

Closed AmberLau closed 7 years ago

AmberLau commented 7 years ago

I fill the music folder with the dataset & write filenames in list_example.txt, after I run the program I got an error which is: Traceback (most recent call last): File "quick_test.py", line 47, in X_test, num_frames_test= extract_melgrams(test_songs_list, MULTIFRAMES, process_all_song=False, num_songs_genre='') File "/home/lauyick/Workspaces/python/DLR-DQN/utils.py", line 124, in extract_melgrams melgrams = np.concatenate((melgrams, melgram), axis=0) ValueError: all the input array dimensions except for the concatenation axis must match exactly It seems that something wrong with the array size when using numpy.

AmberLau commented 7 years ago

maybe i've fixed it, sry!

jsalbert commented 7 years ago

I have added the lists containing the name of the GTZAN dataset, if you change the paths to your dataset it should work. If you want to test it using GTZAN I suggest using the script train_tagger_net.py and putting the paths of the song list while setting TEST mode.

AmberLau commented 7 years ago

Thanks a lot! Have you try it with Million Song Dataset or its subset?

jsalbert commented 7 years ago

No, we trained with a custom dataset and tested on gtzan. I think we had 300 songs in total, 30 per genre.

AmberLau commented 7 years ago

Do I need to change other parameters while using train_tagger_net.py ?I've changed the paths to my dataset & also got an error like I posted in the issue. I tried to set process_all_song in to True but it didn't work...

jsalbert commented 7 years ago

@AmberLau this is an old project and we are currently don't working on it, but I suggest you look at here to see the models and maybe you could take our train code as example.