-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathREADME.me
More file actions
54 lines (35 loc) · 2.37 KB
/
Copy pathREADME.me
File metadata and controls
54 lines (35 loc) · 2.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
Music Genre Classification
-------------------------------------------------------------------------------------
Dataset: GTZAN, 1000 Songs in 10 Genres (100 Songs per Genre)
Link to Dataset: http://marsyas.info/downloads/datasets.html
Used Libraries:
- numpy (Installation: pip install numpy)
- tensorflow (Installation: pip install tensorflow)
- matplotlib (Installation: pip install matplotlib)
- librosa (Installation: pip install librosa )
- scikit-learn (Installation: pip install scikit-learn)
-------------------------------------------------------------------------------------
---------------------------- .py Script Documentation -------------------------------
-------------------------------------------------------------------------------------
Script "file_processor.py":
The script "file_processor.py" loads the GTZAN data set and extracts 4 Audio Feaures:
Spectral Centroid, Spectral Rolloff, Chroma Frequencies, MFCCs. As a result, a .json
file is saved, which contains all features and the corresponding genre label.
This .json file is used by the other scripts for genre classification.
-------------------------------------------------------------------------------------
Script "main_cnn_adjusted.py"
This script contains the customized CNN to which the paper refers. The file "main_cnn_adjusted.py"
loads a .json file, which was created by the "file_processor.py" script. The data contained
in it is then prepared and used for input in a CNN and divided into training/testing and
validation data. Afterwards the CNN training process starts. When the training is finished,
the classification of the test data set, as well as the visualization of the result
in a confusion matrix follows. At the end the training process is graphically shown.
-------------------------------------------------------------------------------------
Script "main_cnn_original.py"
This script contains the original CNN from https://www.youtube.com/watch?v=dOG-HxpbMSw.
The procedure is identical to the script "main_cnn_adjusted.py". The original CNN is
therefore included here again, so that you can compare both CNNs.
-------------------------------------------------------------------------------------
Script "main_tsne.py"
When this script is executed, a .json file created by the "file_processor.py" script
is read and visualized with the t-SNE method. Parameters are: perplexity=20 and n_iter=1000.