atrostan / 4107_Final_Project

CNN model for classifying Psytrance Subgenres

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

4107_Final_Project

Thanks to:

Requirements:

Seen in requirements.txt

Library Version
pandas 0.23.4
matplotlib 3.0.2
numpy 1.15.4
tensorflow 1.12.0
scipy 1.1.0
librosa 0.6.2
ipython 7.2.0
keras 2.2.4
scikit_learn 0.20.1

Download Tracks

Either download your own music from http://www.ektoplazm.com/, or download music tracks from data_urls.txt

Convert Tracks to TFRecords

Detailed in read_mp3s.ipynb

Train model

Detailed in train_model.ipynb.
You can skip this step, and just extract best_model.tar.gz: a Keras model I've trained.
Load this model using load_model(best_psy_cnn.h5)

Test model

Detailed in test_model.ipynb.
You can skip this step, and just extract best_model.tar.gz: a Keras model I've trained.

Predict using the model

Detailed in predict_model.ipynb.
The model was trained on 5 genres:

Download your own psytrance tracks (that can be characterized as one of the above genres) and see how the model does!

To do this, make sure to compute the mel-spectrogram of your track, and feed the model with slices of your spectrogram.

Visualize Convolutional Filters

Detailed in visualize_filters.ipynb and examples in ./tex/diagrams/stitched_filters

Report

The report outlining the development of this project is here

Production of graphs for the report are outlined in plot_results.ipynb

About

CNN model for classifying Psytrance Subgenres


Languages

Language:Jupyter Notebook 86.9%Language:TeX 8.1%Language:Python 5.0%