Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

🎵 Trained CNN model for Genre classification on GTZAN dataset [CNN Model:https://github.com/Hguimaraes/gtzan.keras]

License

NotificationsYou must be signed in to change notification settings

NazarPonochevnyi/Trained-CNN-for-Genre-classification

Repository files navigation

🎵 Trained CNN model for Genre classification on GTZAN dataset [CNN Model:https://github.com/Hguimaraes/gtzan.keras]

Test trained CNN model

In the./weights/ you can find trained model weights and model architecture.Also, you can download .h5 file and place it manually to ./weights/ directory using thislink.

For test this trained model, you can runpython3 predict_vgg16.py.

Also, if you want to test your custom song or turn off debug messages, you can change code in theget_genre()'s function arguments.For example, you can input your song path instead default./audios/classical_music.mp3 path or toggle next boolean function's argument to turn off debug messages.

Overview

For train CNN model of deep learning:

  1. Read the audios as melspectrograms, spliting then into 3s windows with 50% overlaping resulting in a dataset with the size 19000x129x128x1 (samples x time x frequency x channels)**.
  2. Shuffle the input and split into train and test (70%/30%)
  3. Train the CNN and validate using the validation dataset

** In the case of the VGG, the channel need to have 3 channels

Dependencies

Accuracy

  • Training (at Epoch 35):

    • Training loss: 0.1283

    • Training accuracy: 0.9596

  • Testing:

    • Test loss: 0.3936

    • Test accuracy: 0.8921

Accuracy, Loss and Confusion matrix graphs

alt textalt text

License

MIT Licence

Releases

No releases published

[8]ページ先頭

©2009-2025 Movatter.jp