├── .gitignore ├── LICENSE ├── README.md ├── demo ├── cifar10_predict.py ├── cifar10_tensorflow_classifier.py ├── cifar10_tensorflow_export_model.py ├── cifar10_train.py ├── compare_models.py ├── data │ ├── audio_samples │ │ └── example.mp3 │ ├── lists │ │ ├── test_gt_gtzan_list.txt │ │ └── test_songs_gtzan_list.txt │ └── output │ │ └── .gitignore ├── models │ ├── .gitignore │ ├── cifar10-architecture.json │ ├── cifar10-config.npy │ ├── cifar10-history.npy │ ├── cifar10-weights.h5 │ ├── resnet-v2-architecture.json │ ├── resnet-v2-config.npy │ ├── resnet-v2-history.npy │ ├── resnet-v2-weights.h5 │ ├── tensorflow_models │ │ └── cifar10 │ │ │ └── cifar10.pb │ └── training-history-comparison.png ├── resnet50_predict.py ├── resnet50_train.py ├── resnet_v2_predict.py ├── resnet_v2_train.py ├── utility │ ├── gtzan_loader.py │ └── melgram.py └── very_large_data │ ├── .gitignore │ └── gtzan │ └── .gitignore ├── keras_audio ├── __init__.py └── library │ ├── __init__.py │ ├── cifar10.py │ ├── resnet50.py │ ├── resnet_v2.py │ ├── resnets_utils.py │ └── utility │ ├── __init__.py │ ├── audio_utils.py │ ├── download_utils.py │ └── gtzan_loader.py ├── requirements.txt ├── setup.cfg └── setup.py /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | 6 | # C extensions 7 | *.so 8 | 9 | .idea/ 10 | *.iml 11 | 12 | # Distribution / packaging 13 | .Python 14 | env/ 15 | build/ 16 | develop-eggs/ 17 | dist/ 18 | downloads/ 19 | eggs/ 20 | .eggs/ 21 | lib/ 22 | lib64/ 23 | parts/ 24 | sdist/ 25 | var/ 26 | wheels/ 27 | *.egg-info/ 28 | .installed.cfg 29 | *.egg 30 | 31 | # PyInstaller 32 | # Usually these files are written by a python script from a template 33 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 34 | *.manifest 35 | *.spec 36 | 37 | # Installer logs 38 | pip-log.txt 39 | pip-delete-this-directory.txt 40 | 41 | # Unit test / coverage reports 42 | htmlcov/ 43 | .tox/ 44 | .coverage 45 | .coverage.* 46 | .cache 47 | nosetests.xml 48 | coverage.xml 49 | *.cover 50 | .hypothesis/ 51 | 52 | # Translations 53 | *.mo 54 | *.pot 55 | 56 | # Django stuff: 57 | *.log 58 | local_settings.py 59 | 60 | # Flask stuff: 61 | instance/ 62 | .webassets-cache 63 | 64 | # Scrapy stuff: 65 | .scrapy 66 | 67 | # Sphinx documentation 68 | docs/_build/ 69 | 70 | # PyBuilder 71 | target/ 72 | 73 | # Jupyter Notebook 74 | .ipynb_checkpoints 75 | 76 | # pyenv 77 | .python-version 78 | 79 | # celery beat schedule file 80 | celerybeat-schedule 81 | 82 | # SageMath parsed files 83 | *.sage.py 84 | 85 | # dotenv 86 | .env 87 | 88 | # virtualenv 89 | .venv 90 | venv/ 91 | ENV/ 92 | 93 | # Spyder project settings 94 | .spyderproject 95 | .spyproject 96 | 97 | # Rope project settings 98 | .ropeproject 99 | 100 | # mkdocs documentation 101 | /site 102 | 103 | # mypy 104 | .mypy_cache/ 105 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Xianshun Chen 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # keras-audio 2 | 3 | keras project for audio deep learning 4 | 5 | # Features 6 | 7 | ### Audio Classification 8 | 9 | * The classifier [ResNetV2AudioClassifier](keras_audio/library/resnet_v2.py) converts audio into mel-spectrogram and uses a simplified 10 | resnet DCnn architecture to classifier audios based on its associated labels. 11 | * The classifier [Cifar10AudioClassifier](keras_audio/library/cifar10.py) converts audio into mel-spectrogram and uses the cifar-10 12 | DCnn architecture to classifier audios based on its associated labels. 13 | * The classifier [ResNet50AudioClassifier](keras_audio/library/resnet50.py) converts audio into mel-spectrogram and uses the resnet-50 14 | DCnn architecture to classifier audios based on its associated labels. 15 | 16 | The classifiers differ from those used in image classification in that: 17 | * they use ELU instead RELU. 18 | * they have elongated max pooling shape (as the mel-spectrogram is elongated "image") 19 | * Dropout being added 20 | 21 | 22 | # Usage: Audio Classification 23 | 24 | ### Train a audio classifier 25 | 26 | The audio classification uses [Gtzan](http://opihi.cs.uvic.ca/sound/genres.tar.gz) data set to train the 27 | music classifier to recognize the genre of songs. 28 | 29 | The classification works by converting audio or song file into a mel-spectrogram which can be thought of 30 | a 3-dimension matrix in a similar manner to an image 31 | 32 | To train on the Gtzan data set, run the following command: 33 | 34 | ```bash 35 | cd demo 36 | python cifar10_train.py 37 | ``` 38 | 39 | The [sample codes](demo/cifar10_train.py) below show how to train Cifar10AudioClassifier to classify songs 40 | based on its genre labels: 41 | 42 | ```python 43 | from keras_audio.library.cifar10 import Cifar10AudioClassifier 44 | from keras_audio.library.utility.gtzan_loader import download_gtzan_genres_if_not_found 45 | 46 | 47 | def load_audio_path_label_pairs(max_allowed_pairs=None): 48 | download_gtzan_genres_if_not_found('./very_large_data/gtzan') 49 | audio_paths = [] 50 | with open('./data/lists/test_songs_gtzan_list.txt', 'rt') as file: 51 | for line in file: 52 | audio_path = './very_large_data/' + line.strip() 53 | audio_paths.append(audio_path) 54 | pairs = [] 55 | with open('./data/lists/test_gt_gtzan_list.txt', 'rt') as file: 56 | for line in file: 57 | label = int(line) 58 | if max_allowed_pairs is None or len(pairs) < max_allowed_pairs: 59 | pairs.append((audio_paths[len(pairs)], label)) 60 | else: 61 | break 62 | return pairs 63 | 64 | 65 | def main(): 66 | audio_path_label_pairs = load_audio_path_label_pairs() 67 | print('loaded: ', len(audio_path_label_pairs)) 68 | 69 | classifier = Cifar10AudioClassifier() 70 | batch_size = 8 71 | epochs = 100 72 | history = classifier.fit(audio_path_label_pairs, model_dir_path='./models', batch_size=batch_size, epochs=epochs) 73 | 74 | 75 | if __name__ == '__main__': 76 | main() 77 | 78 | ``` 79 | 80 | After training, the trained models are saved to [demo/models](demo/models). 81 | 82 | * The training accuracy reached over 80% after 29 epochs. 83 | * The training accuracy reached over 90% after 38 epochs. 84 | * The training accuracy after 100 epochs is 98.13%, with validation accuracy of 71%. 85 | 86 | 87 | ### Model Comparison 88 | 89 | Currently [ResNet50AudioClassifier](keras_audio/library/resnet50.py) is too expensive to run on my hardware (OOM exception 90 | from GPU). Below compares training quality of 91 | [ResNetV2AudioClassifier](keras_audio/library/resnet_v2.py) and [Cifar10AudioClassifier](keras_audio/library/cifar10.py): 92 | 93 | ![training-comppare](demo/models/training-history-comparison.png) 94 | 95 | 96 | ### Test trained model 97 | 98 | To test the trained Cifar10AudioClassifier model, run the following command: 99 | 100 | ```bash 101 | cd demo 102 | python cifar10_predict.py 103 | ``` 104 | 105 | The [sample codes](demo/cifar10_predict.py) shows how to test the trained Cifar10AudioClassifier model: 106 | 107 | ```python 108 | from random import shuffle 109 | 110 | from keras_audio.library.cifar10 import Cifar10AudioClassifier 111 | from keras_audio.library.utility.gtzan_loader import download_gtzan_genres_if_not_found, gtzan_labels 112 | 113 | 114 | def load_audio_path_label_pairs(max_allowed_pairs=None): 115 | download_gtzan_genres_if_not_found('./very_large_data/gtzan') 116 | audio_paths = [] 117 | with open('./data/lists/test_songs_gtzan_list.txt', 'rt') as file: 118 | for line in file: 119 | audio_path = './very_large_data/' + line.strip() 120 | audio_paths.append(audio_path) 121 | pairs = [] 122 | with open('./data/lists/test_gt_gtzan_list.txt', 'rt') as file: 123 | for line in file: 124 | label = int(line) 125 | if max_allowed_pairs is None or len(pairs) < max_allowed_pairs: 126 | pairs.append((audio_paths[len(pairs)], label)) 127 | else: 128 | break 129 | return pairs 130 | 131 | 132 | def main(): 133 | audio_path_label_pairs = load_audio_path_label_pairs() 134 | shuffle(audio_path_label_pairs) 135 | print('loaded: ', len(audio_path_label_pairs)) 136 | 137 | classifier = Cifar10AudioClassifier() 138 | classifier.load_model(model_dir_path='./models') 139 | 140 | for i in range(0, 20): 141 | audio_path, actual_label_id = audio_path_label_pairs[i] 142 | predicted_label_id = classifier.predict_class(audio_path) 143 | print(audio_path) 144 | predicted_label = gtzan_labels[predicted_label_id] 145 | actual_label = gtzan_labels[actual_label_id] 146 | 147 | print('predicted: ', predicted_label, 'actual: ', actual_label) 148 | 149 | 150 | if __name__ == '__main__': 151 | main() 152 | 153 | ``` 154 | 155 | # Configure to run on GPU on Windows 156 | 157 | * Step 1: Change tensorflow to tensorflow-gpu in requirements.txt and install tensorflow-gpu 158 | * Step 2: Download and install the [CUDA® Toolkit 9.0](https://developer.nvidia.com/cuda-90-download-archive) (Please note that 159 | currently CUDA® Toolkit 9.1 is not yet supported by tensorflow, therefore you should download CUDA® Toolkit 9.0) 160 | * Step 3: Download and unzip the [cuDNN 7.4 for CUDA@ Toolkit 9.0](https://developer.nvidia.com/cudnn) and add the 161 | bin folder of the unzipped directory to the $PATH of your Windows environment 162 | 163 | 164 | # Note 165 | 166 | ### On pre-processing 167 | 168 | To pre-generate the mel-spectrograms from the audio files for classification, one can also first run the following scripts 169 | before starting training, which will make the training faster: 170 | 171 | ```bash 172 | cd demo/utility 173 | python gtzan_loader.py 174 | ``` 175 | 176 | ### audioread.NoBackend 177 | 178 | The audio processing depends on librosa version 0.6 which depends on audioread. 179 | 180 | If you are on Windows and sees the error "audioread.NoBackend", go to [ffmpeg](https://ffmpeg.zeranoe.com/builds/) 181 | and download the shared linking build, unzip to a local directory and then add the bin folder of the 182 | ffmpeg to the Windows $PATH environment variable. Restart your cmd or powershell, Python should now be 183 | able to locate the backend for audioread in librosa 184 | 185 | ### Export trained model as tensorflow pb model file 186 | 187 | To export the trained keras model as tensorflow graph model file, run the following command: 188 | 189 | ```bash 190 | cd demo 191 | python cifar10_tensorflow_export_model.py 192 | ``` 193 | 194 | The script [demo/cifar10_tensorflow_export_model.py](demo/cifar10_tensorflow_export_model.py) export the trained model 195 | as [demo/mdoels/tensorflow_models/cifar10/cifar10.pb](demo/models/tensorflow_models/cifar10/cifar10.pb) 196 | 197 | To test the exported tensorflow graph model file, run the following command: 198 | 199 | ```bash 200 | cd demo 201 | python cifar10_tensorflow_classifier.py 202 | ``` 203 | 204 | The script [demo/cifar10_tensorflow_classifier.py](demo/cifar10_tensorflow_classifier.py) uses pure tensorflow code 205 | to load the [cifar10.pb](demo/models/tensorflow_models/cifar10/cifar10.pb) and uses it to predict genres of the 206 | songs 207 | 208 | 209 | 210 | 211 | -------------------------------------------------------------------------------- /demo/cifar10_predict.py: -------------------------------------------------------------------------------- 1 | from random import shuffle 2 | 3 | from keras_audio.library.cifar10 import Cifar10AudioClassifier 4 | from keras_audio.library.utility.gtzan_loader import download_gtzan_genres_if_not_found, gtzan_labels 5 | 6 | 7 | def load_audio_path_label_pairs(max_allowed_pairs=None): 8 | download_gtzan_genres_if_not_found('./very_large_data/gtzan') 9 | audio_paths = [] 10 | with open('./data/lists/test_songs_gtzan_list.txt', 'rt') as file: 11 | for line in file: 12 | audio_path = './very_large_data/' + line.strip() 13 | audio_paths.append(audio_path) 14 | pairs = [] 15 | with open('./data/lists/test_gt_gtzan_list.txt', 'rt') as file: 16 | for line in file: 17 | label = int(line) 18 | if max_allowed_pairs is None or len(pairs) < max_allowed_pairs: 19 | pairs.append((audio_paths[len(pairs)], label)) 20 | else: 21 | break 22 | return pairs 23 | 24 | 25 | def main(): 26 | audio_path_label_pairs = load_audio_path_label_pairs() 27 | shuffle(audio_path_label_pairs) 28 | print('loaded: ', len(audio_path_label_pairs)) 29 | 30 | classifier = Cifar10AudioClassifier() 31 | classifier.load_model(model_dir_path='./models') 32 | 33 | for i in range(0, 20): 34 | audio_path, actual_label_id = audio_path_label_pairs[i] 35 | predicted_label_id = classifier.predict_class(audio_path) 36 | print(audio_path) 37 | predicted_label = gtzan_labels[predicted_label_id] 38 | actual_label = gtzan_labels[actual_label_id] 39 | 40 | print('predicted: ', predicted_label, 'actual: ', actual_label) 41 | 42 | 43 | if __name__ == '__main__': 44 | main() 45 | -------------------------------------------------------------------------------- /demo/cifar10_tensorflow_classifier.py: -------------------------------------------------------------------------------- 1 | from random import shuffle 2 | import tensorflow as tf 3 | import numpy as np 4 | 5 | from keras_audio.library.utility.audio_utils import compute_melgram 6 | from keras_audio.library.utility.gtzan_loader import download_gtzan_genres_if_not_found, gtzan_labels 7 | 8 | 9 | def load_audio_path_label_pairs(max_allowed_pairs=None): 10 | download_gtzan_genres_if_not_found('./very_large_data/gtzan') 11 | audio_paths = [] 12 | with open('./data/lists/test_songs_gtzan_list.txt', 'rt') as file: 13 | for line in file: 14 | audio_path = './very_large_data/' + line.strip() 15 | audio_paths.append(audio_path) 16 | pairs = [] 17 | with open('./data/lists/test_gt_gtzan_list.txt', 'rt') as file: 18 | for line in file: 19 | label = int(line) 20 | if max_allowed_pairs is None or len(pairs) < max_allowed_pairs: 21 | pairs.append((audio_paths[len(pairs)], label)) 22 | else: 23 | break 24 | return pairs 25 | 26 | 27 | def main(): 28 | audio_path_label_pairs = load_audio_path_label_pairs() 29 | shuffle(audio_path_label_pairs) 30 | print('loaded: ', len(audio_path_label_pairs)) 31 | 32 | with tf.gfile.FastGFile('./models/tensorflow_models/cifar10/cifar10.pb', 'rb') as f: 33 | graph_def = tf.GraphDef() 34 | graph_def.ParseFromString(f.read()) 35 | _ = tf.import_graph_def(graph_def, name='') 36 | 37 | with tf.Session() as sess: 38 | [print(n.name) for n in sess.graph.as_graph_def().node] 39 | predict_op = sess.graph.get_tensor_by_name('output_node0:0') 40 | for i in range(0, 20): 41 | audio_path, actual_label_id = audio_path_label_pairs[i] 42 | 43 | mg = compute_melgram(audio_path) 44 | mg = np.expand_dims(mg, axis=0) 45 | 46 | predicted = sess.run(predict_op, feed_dict={"conv2d_1_input:0": mg}) 47 | 48 | predicted_label_idx = np.argmax(predicted, axis=1)[0] 49 | predicted_label = gtzan_labels[predicted_label_idx] 50 | actual_label = gtzan_labels[actual_label_id] 51 | 52 | print('predicted: ', predicted_label, 'actual: ', actual_label) 53 | 54 | 55 | if __name__ == '__main__': 56 | main() 57 | -------------------------------------------------------------------------------- /demo/cifar10_tensorflow_export_model.py: -------------------------------------------------------------------------------- 1 | from keras_audio.library.cifar10 import Cifar10AudioClassifier 2 | 3 | 4 | def main(): 5 | 6 | classifier = Cifar10AudioClassifier() 7 | classifier.load_model(model_dir_path='./models') 8 | 9 | classifier.export_tensorflow_model(output_fld='./models/tensorflow_models/cifar10') 10 | 11 | 12 | if __name__ == '__main__': 13 | main() 14 | -------------------------------------------------------------------------------- /demo/cifar10_train.py: -------------------------------------------------------------------------------- 1 | from keras_audio.library.cifar10 import Cifar10AudioClassifier 2 | from keras_audio.library.utility.gtzan_loader import download_gtzan_genres_if_not_found 3 | 4 | 5 | def load_audio_path_label_pairs(max_allowed_pairs=None): 6 | download_gtzan_genres_if_not_found('./very_large_data/gtzan') 7 | audio_paths = [] 8 | with open('./data/lists/test_songs_gtzan_list.txt', 'rt') as file: 9 | for line in file: 10 | audio_path = './very_large_data/' + line.strip() 11 | audio_paths.append(audio_path) 12 | pairs = [] 13 | with open('./data/lists/test_gt_gtzan_list.txt', 'rt') as file: 14 | for line in file: 15 | label = int(line) 16 | if max_allowed_pairs is None or len(pairs) < max_allowed_pairs: 17 | pairs.append((audio_paths[len(pairs)], label)) 18 | else: 19 | break 20 | return pairs 21 | 22 | 23 | def main(): 24 | audio_path_label_pairs = load_audio_path_label_pairs() 25 | print('loaded: ', len(audio_path_label_pairs)) 26 | 27 | classifier = Cifar10AudioClassifier() 28 | batch_size = 8 29 | epochs = 100 30 | history = classifier.fit(audio_path_label_pairs, model_dir_path='./models', batch_size=batch_size, epochs=epochs) 31 | 32 | 33 | if __name__ == '__main__': 34 | main() 35 | -------------------------------------------------------------------------------- /demo/compare_models.py: -------------------------------------------------------------------------------- 1 | import os 2 | import numpy as np 3 | from matplotlib import pyplot as plt 4 | 5 | 6 | def main(): 7 | model_dir_path = './models' 8 | models = ['cifar10', 'resnet-v2'] 9 | acc_cmp = dict() 10 | val_acc_cmp = dict() 11 | labels = list() 12 | for model_name in models: 13 | acc_cmp[model_name] = list() 14 | val_acc_cmp[model_name] = list() 15 | history_file_name = model_name + '-history.npy' 16 | history_file_path = os.path.join(model_dir_path, history_file_name) 17 | history = np.load(history_file_path).item() 18 | labels_not_set = len(labels) == 0 19 | for index in range(0, 100, 2): 20 | acc_data = history['acc'] 21 | val_acc_data = history['val_acc'] 22 | epoch = min(len(acc_data)-1, index) 23 | acc = acc_data[epoch] 24 | val_acc = val_acc_data[epoch] 25 | acc_cmp[model_name].append(acc) 26 | val_acc_cmp[model_name].append(val_acc) 27 | if labels_not_set: 28 | labels.append(epoch) 29 | 30 | plt.subplot(211) 31 | plt.title('Training Accuracy') 32 | for model_name, acc_data in acc_cmp.items(): 33 | plt.plot(labels, acc_data, label=model_name) 34 | plt.legend(loc='best') 35 | 36 | plt.subplot(212) 37 | plt.title('Validation Accuracy') 38 | for model_name, acc_data in val_acc_cmp.items(): 39 | plt.plot(labels, acc_data, label=model_name) 40 | plt.legend(loc='best') 41 | 42 | plt.xlabel('training epoch') 43 | 44 | plt.tight_layout() 45 | 46 | file_path = os.path.join(model_dir_path, 'training-history-comparison.png') 47 | plt.savefig(file_path) 48 | 49 | plt.show() 50 | 51 | 52 | if __name__ == '__main__': 53 | main() 54 | -------------------------------------------------------------------------------- /demo/data/audio_samples/example.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chen0040/keras-audio/c34c30695169e0f274c0f3d175dba2b4c9dc301a/demo/data/audio_samples/example.mp3 -------------------------------------------------------------------------------- /demo/data/lists/test_gt_gtzan_list.txt: -------------------------------------------------------------------------------- 1 | 0 2 | 0 3 | 0 4 | 0 5 | 0 6 | 0 7 | 0 8 | 0 9 | 0 10 | 0 11 | 0 12 | 0 13 | 0 14 | 0 15 | 0 16 | 0 17 | 0 18 | 0 19 | 0 20 | 0 21 | 0 22 | 0 23 | 0 24 | 0 25 | 0 26 | 0 27 | 0 28 | 0 29 | 0 30 | 0 31 | 0 32 | 0 33 | 0 34 | 0 35 | 0 36 | 0 37 | 0 38 | 0 39 | 0 40 | 0 41 | 0 42 | 0 43 | 0 44 | 0 45 | 0 46 | 0 47 | 0 48 | 0 49 | 0 50 | 0 51 | 0 52 | 0 53 | 0 54 | 0 55 | 0 56 | 0 57 | 0 58 | 0 59 | 0 60 | 0 61 | 0 62 | 0 63 | 0 64 | 0 65 | 0 66 | 0 67 | 0 68 | 0 69 | 0 70 | 0 71 | 0 72 | 0 73 | 0 74 | 0 75 | 0 76 | 0 77 | 0 78 | 0 79 | 0 80 | 0 81 | 0 82 | 0 83 | 0 84 | 0 85 | 0 86 | 0 87 | 0 88 | 0 89 | 0 90 | 0 91 | 0 92 | 0 93 | 0 94 | 0 95 | 0 96 | 0 97 | 0 98 | 0 99 | 0 100 | 0 101 | 1 102 | 1 103 | 1 104 | 1 105 | 1 106 | 1 107 | 1 108 | 1 109 | 1 110 | 1 111 | 1 112 | 1 113 | 1 114 | 1 115 | 1 116 | 1 117 | 1 118 | 1 119 | 1 120 | 1 121 | 1 122 | 1 123 | 1 124 | 1 125 | 1 126 | 1 127 | 1 128 | 1 129 | 1 130 | 1 131 | 1 132 | 1 133 | 1 134 | 1 135 | 1 136 | 1 137 | 1 138 | 1 139 | 1 140 | 1 141 | 1 142 | 1 143 | 1 144 | 1 145 | 1 146 | 1 147 | 1 148 | 1 149 | 1 150 | 1 151 | 1 152 | 1 153 | 1 154 | 1 155 | 1 156 | 1 157 | 1 158 | 1 159 | 1 160 | 1 161 | 1 162 | 1 163 | 1 164 | 1 165 | 1 166 | 1 167 | 1 168 | 1 169 | 1 170 | 1 171 | 1 172 | 1 173 | 1 174 | 1 175 | 1 176 | 1 177 | 1 178 | 1 179 | 1 180 | 1 181 | 1 182 | 1 183 | 1 184 | 1 185 | 1 186 | 1 187 | 1 188 | 1 189 | 1 190 | 1 191 | 1 192 | 1 193 | 1 194 | 1 195 | 1 196 | 1 197 | 1 198 | 1 199 | 1 200 | 1 201 | 2 202 | 2 203 | 2 204 | 2 205 | 2 206 | 2 207 | 2 208 | 2 209 | 2 210 | 2 211 | 2 212 | 2 213 | 2 214 | 2 215 | 2 216 | 2 217 | 2 218 | 2 219 | 2 220 | 2 221 | 2 222 | 2 223 | 2 224 | 2 225 | 2 226 | 2 227 | 2 228 | 2 229 | 2 230 | 2 231 | 2 232 | 2 233 | 2 234 | 2 235 | 2 236 | 2 237 | 2 238 | 2 239 | 2 240 | 2 241 | 2 242 | 2 243 | 2 244 | 2 245 | 2 246 | 2 247 | 2 248 | 2 249 | 2 250 | 2 251 | 2 252 | 2 253 | 2 254 | 2 255 | 2 256 | 2 257 | 2 258 | 2 259 | 2 260 | 2 261 | 2 262 | 2 263 | 2 264 | 2 265 | 2 266 | 2 267 | 2 268 | 2 269 | 2 270 | 2 271 | 2 272 | 2 273 | 2 274 | 2 275 | 2 276 | 2 277 | 2 278 | 2 279 | 2 280 | 2 281 | 2 282 | 2 283 | 2 284 | 2 285 | 2 286 | 2 287 | 2 288 | 2 289 | 2 290 | 2 291 | 2 292 | 2 293 | 2 294 | 2 295 | 2 296 | 2 297 | 2 298 | 2 299 | 2 300 | 2 301 | 3 302 | 3 303 | 3 304 | 3 305 | 3 306 | 3 307 | 3 308 | 3 309 | 3 310 | 3 311 | 3 312 | 3 313 | 3 314 | 3 315 | 3 316 | 3 317 | 3 318 | 3 319 | 3 320 | 3 321 | 3 322 | 3 323 | 3 324 | 3 325 | 3 326 | 3 327 | 3 328 | 3 329 | 3 330 | 3 331 | 3 332 | 3 333 | 3 334 | 3 335 | 3 336 | 3 337 | 3 338 | 3 339 | 3 340 | 3 341 | 3 342 | 3 343 | 3 344 | 3 345 | 3 346 | 3 347 | 3 348 | 3 349 | 3 350 | 3 351 | 3 352 | 3 353 | 3 354 | 3 355 | 3 356 | 3 357 | 3 358 | 3 359 | 3 360 | 3 361 | 3 362 | 3 363 | 3 364 | 3 365 | 3 366 | 3 367 | 3 368 | 3 369 | 3 370 | 3 371 | 3 372 | 3 373 | 3 374 | 3 375 | 3 376 | 3 377 | 3 378 | 3 379 | 3 380 | 3 381 | 3 382 | 3 383 | 3 384 | 3 385 | 3 386 | 3 387 | 3 388 | 3 389 | 3 390 | 3 391 | 3 392 | 3 393 | 3 394 | 3 395 | 3 396 | 3 397 | 3 398 | 3 399 | 3 400 | 3 401 | 4 402 | 4 403 | 4 404 | 4 405 | 4 406 | 4 407 | 4 408 | 4 409 | 4 410 | 4 411 | 4 412 | 4 413 | 4 414 | 4 415 | 4 416 | 4 417 | 4 418 | 4 419 | 4 420 | 4 421 | 4 422 | 4 423 | 4 424 | 4 425 | 4 426 | 4 427 | 4 428 | 4 429 | 4 430 | 4 431 | 4 432 | 4 433 | 4 434 | 4 435 | 4 436 | 4 437 | 4 438 | 4 439 | 4 440 | 4 441 | 4 442 | 4 443 | 4 444 | 4 445 | 4 446 | 4 447 | 4 448 | 4 449 | 4 450 | 4 451 | 4 452 | 4 453 | 4 454 | 4 455 | 4 456 | 4 457 | 4 458 | 4 459 | 4 460 | 4 461 | 4 462 | 4 463 | 4 464 | 4 465 | 4 466 | 4 467 | 4 468 | 4 469 | 4 470 | 4 471 | 4 472 | 4 473 | 4 474 | 4 475 | 4 476 | 4 477 | 4 478 | 4 479 | 4 480 | 4 481 | 4 482 | 4 483 | 4 484 | 4 485 | 4 486 | 4 487 | 4 488 | 4 489 | 4 490 | 4 491 | 4 492 | 4 493 | 4 494 | 4 495 | 4 496 | 4 497 | 4 498 | 4 499 | 4 500 | 4 501 | 5 502 | 5 503 | 5 504 | 5 505 | 5 506 | 5 507 | 5 508 | 5 509 | 5 510 | 5 511 | 5 512 | 5 513 | 5 514 | 5 515 | 5 516 | 5 517 | 5 518 | 5 519 | 5 520 | 5 521 | 5 522 | 5 523 | 5 524 | 5 525 | 5 526 | 5 527 | 5 528 | 5 529 | 5 530 | 5 531 | 5 532 | 5 533 | 5 534 | 5 535 | 5 536 | 5 537 | 5 538 | 5 539 | 5 540 | 5 541 | 5 542 | 5 543 | 5 544 | 5 545 | 5 546 | 5 547 | 5 548 | 5 549 | 5 550 | 5 551 | 5 552 | 5 553 | 5 554 | 5 555 | 5 556 | 5 557 | 5 558 | 5 559 | 5 560 | 5 561 | 5 562 | 5 563 | 5 564 | 5 565 | 5 566 | 5 567 | 5 568 | 5 569 | 5 570 | 5 571 | 5 572 | 5 573 | 5 574 | 5 575 | 5 576 | 5 577 | 5 578 | 5 579 | 5 580 | 5 581 | 5 582 | 5 583 | 5 584 | 5 585 | 5 586 | 5 587 | 5 588 | 5 589 | 5 590 | 5 591 | 5 592 | 5 593 | 5 594 | 5 595 | 5 596 | 5 597 | 5 598 | 5 599 | 5 600 | 5 601 | 6 602 | 6 603 | 6 604 | 6 605 | 6 606 | 6 607 | 6 608 | 6 609 | 6 610 | 6 611 | 6 612 | 6 613 | 6 614 | 6 615 | 6 616 | 6 617 | 6 618 | 6 619 | 6 620 | 6 621 | 6 622 | 6 623 | 6 624 | 6 625 | 6 626 | 6 627 | 6 628 | 6 629 | 6 630 | 6 631 | 6 632 | 6 633 | 6 634 | 6 635 | 6 636 | 6 637 | 6 638 | 6 639 | 6 640 | 6 641 | 6 642 | 6 643 | 6 644 | 6 645 | 6 646 | 6 647 | 6 648 | 6 649 | 6 650 | 6 651 | 6 652 | 6 653 | 6 654 | 6 655 | 6 656 | 6 657 | 6 658 | 6 659 | 6 660 | 6 661 | 6 662 | 6 663 | 6 664 | 6 665 | 6 666 | 6 667 | 6 668 | 6 669 | 6 670 | 6 671 | 6 672 | 6 673 | 6 674 | 6 675 | 6 676 | 6 677 | 6 678 | 6 679 | 6 680 | 6 681 | 6 682 | 6 683 | 6 684 | 6 685 | 6 686 | 6 687 | 6 688 | 6 689 | 6 690 | 6 691 | 6 692 | 6 693 | 6 694 | 6 695 | 6 696 | 6 697 | 6 698 | 6 699 | 6 700 | 6 701 | 7 702 | 7 703 | 7 704 | 7 705 | 7 706 | 7 707 | 7 708 | 7 709 | 7 710 | 7 711 | 7 712 | 7 713 | 7 714 | 7 715 | 7 716 | 7 717 | 7 718 | 7 719 | 7 720 | 7 721 | 7 722 | 7 723 | 7 724 | 7 725 | 7 726 | 7 727 | 7 728 | 7 729 | 7 730 | 7 731 | 7 732 | 7 733 | 7 734 | 7 735 | 7 736 | 7 737 | 7 738 | 7 739 | 7 740 | 7 741 | 7 742 | 7 743 | 7 744 | 7 745 | 7 746 | 7 747 | 7 748 | 7 749 | 7 750 | 7 751 | 7 752 | 7 753 | 7 754 | 7 755 | 7 756 | 7 757 | 7 758 | 7 759 | 7 760 | 7 761 | 7 762 | 7 763 | 7 764 | 7 765 | 7 766 | 7 767 | 7 768 | 7 769 | 7 770 | 7 771 | 7 772 | 7 773 | 7 774 | 7 775 | 7 776 | 7 777 | 7 778 | 7 779 | 7 780 | 7 781 | 7 782 | 7 783 | 7 784 | 7 785 | 7 786 | 7 787 | 7 788 | 7 789 | 7 790 | 7 791 | 7 792 | 7 793 | 7 794 | 7 795 | 7 796 | 7 797 | 7 798 | 7 799 | 7 800 | 7 801 | 8 802 | 8 803 | 8 804 | 8 805 | 8 806 | 8 807 | 8 808 | 8 809 | 8 810 | 8 811 | 8 812 | 8 813 | 8 814 | 8 815 | 8 816 | 8 817 | 8 818 | 8 819 | 8 820 | 8 821 | 8 822 | 8 823 | 8 824 | 8 825 | 8 826 | 8 827 | 8 828 | 8 829 | 8 830 | 8 831 | 8 832 | 8 833 | 8 834 | 8 835 | 8 836 | 8 837 | 8 838 | 8 839 | 8 840 | 8 841 | 8 842 | 8 843 | 8 844 | 8 845 | 8 846 | 8 847 | 8 848 | 8 849 | 8 850 | 8 851 | 8 852 | 8 853 | 8 854 | 8 855 | 8 856 | 8 857 | 8 858 | 8 859 | 8 860 | 8 861 | 8 862 | 8 863 | 8 864 | 8 865 | 8 866 | 8 867 | 8 868 | 8 869 | 8 870 | 8 871 | 8 872 | 8 873 | 8 874 | 8 875 | 8 876 | 8 877 | 8 878 | 8 879 | 8 880 | 8 881 | 8 882 | 8 883 | 8 884 | 8 885 | 8 886 | 8 887 | 8 888 | 8 889 | 8 890 | 8 891 | 8 892 | 8 893 | 8 894 | 8 895 | 8 896 | 8 897 | 8 898 | 8 899 | 8 900 | 8 901 | 9 902 | 9 903 | 9 904 | 9 905 | 9 906 | 9 907 | 9 908 | 9 909 | 9 910 | 9 911 | 9 912 | 9 913 | 9 914 | 9 915 | 9 916 | 9 917 | 9 918 | 9 919 | 9 920 | 9 921 | 9 922 | 9 923 | 9 924 | 9 925 | 9 926 | 9 927 | 9 928 | 9 929 | 9 930 | 9 931 | 9 932 | 9 933 | 9 934 | 9 935 | 9 936 | 9 937 | 9 938 | 9 939 | 9 940 | 9 941 | 9 942 | 9 943 | 9 944 | 9 945 | 9 946 | 9 947 | 9 948 | 9 949 | 9 950 | 9 951 | 9 952 | 9 953 | 9 954 | 9 955 | 9 956 | 9 957 | 9 958 | 9 959 | 9 960 | 9 961 | 9 962 | 9 963 | 9 964 | 9 965 | 9 966 | 9 967 | 9 968 | 9 969 | 9 970 | 9 971 | 9 972 | 9 973 | 9 974 | 9 975 | 9 976 | 9 977 | 9 978 | 9 979 | 9 980 | 9 981 | 9 982 | 9 983 | 9 984 | 9 985 | 9 986 | 9 987 | 9 988 | 9 989 | 9 990 | 9 991 | 9 992 | 9 993 | 9 994 | 9 995 | 9 996 | 9 997 | 9 998 | 9 999 | 9 1000 | 9 1001 | -------------------------------------------------------------------------------- /demo/data/lists/test_songs_gtzan_list.txt: -------------------------------------------------------------------------------- 1 | gtzan/genres/blues/blues.00000.au 2 | gtzan/genres/blues/blues.00001.au 3 | gtzan/genres/blues/blues.00002.au 4 | gtzan/genres/blues/blues.00003.au 5 | gtzan/genres/blues/blues.00004.au 6 | gtzan/genres/blues/blues.00005.au 7 | gtzan/genres/blues/blues.00006.au 8 | gtzan/genres/blues/blues.00007.au 9 | gtzan/genres/blues/blues.00008.au 10 | gtzan/genres/blues/blues.00009.au 11 | gtzan/genres/blues/blues.00010.au 12 | gtzan/genres/blues/blues.00011.au 13 | gtzan/genres/blues/blues.00012.au 14 | gtzan/genres/blues/blues.00013.au 15 | gtzan/genres/blues/blues.00014.au 16 | gtzan/genres/blues/blues.00015.au 17 | gtzan/genres/blues/blues.00016.au 18 | gtzan/genres/blues/blues.00017.au 19 | gtzan/genres/blues/blues.00018.au 20 | gtzan/genres/blues/blues.00019.au 21 | gtzan/genres/blues/blues.00020.au 22 | gtzan/genres/blues/blues.00021.au 23 | gtzan/genres/blues/blues.00022.au 24 | gtzan/genres/blues/blues.00023.au 25 | gtzan/genres/blues/blues.00024.au 26 | gtzan/genres/blues/blues.00025.au 27 | gtzan/genres/blues/blues.00026.au 28 | gtzan/genres/blues/blues.00027.au 29 | gtzan/genres/blues/blues.00028.au 30 | gtzan/genres/blues/blues.00029.au 31 | gtzan/genres/blues/blues.00030.au 32 | gtzan/genres/blues/blues.00031.au 33 | gtzan/genres/blues/blues.00032.au 34 | gtzan/genres/blues/blues.00033.au 35 | gtzan/genres/blues/blues.00034.au 36 | gtzan/genres/blues/blues.00035.au 37 | gtzan/genres/blues/blues.00036.au 38 | gtzan/genres/blues/blues.00037.au 39 | gtzan/genres/blues/blues.00038.au 40 | gtzan/genres/blues/blues.00039.au 41 | gtzan/genres/blues/blues.00040.au 42 | gtzan/genres/blues/blues.00041.au 43 | gtzan/genres/blues/blues.00042.au 44 | gtzan/genres/blues/blues.00043.au 45 | gtzan/genres/blues/blues.00044.au 46 | gtzan/genres/blues/blues.00045.au 47 | gtzan/genres/blues/blues.00046.au 48 | gtzan/genres/blues/blues.00047.au 49 | gtzan/genres/blues/blues.00048.au 50 | gtzan/genres/blues/blues.00049.au 51 | gtzan/genres/blues/blues.00050.au 52 | gtzan/genres/blues/blues.00051.au 53 | gtzan/genres/blues/blues.00052.au 54 | gtzan/genres/blues/blues.00053.au 55 | gtzan/genres/blues/blues.00054.au 56 | gtzan/genres/blues/blues.00055.au 57 | gtzan/genres/blues/blues.00056.au 58 | gtzan/genres/blues/blues.00057.au 59 | gtzan/genres/blues/blues.00058.au 60 | gtzan/genres/blues/blues.00059.au 61 | gtzan/genres/blues/blues.00060.au 62 | gtzan/genres/blues/blues.00061.au 63 | gtzan/genres/blues/blues.00062.au 64 | gtzan/genres/blues/blues.00063.au 65 | gtzan/genres/blues/blues.00064.au 66 | gtzan/genres/blues/blues.00065.au 67 | gtzan/genres/blues/blues.00066.au 68 | gtzan/genres/blues/blues.00067.au 69 | gtzan/genres/blues/blues.00068.au 70 | gtzan/genres/blues/blues.00069.au 71 | gtzan/genres/blues/blues.00070.au 72 | gtzan/genres/blues/blues.00071.au 73 | gtzan/genres/blues/blues.00072.au 74 | gtzan/genres/blues/blues.00073.au 75 | gtzan/genres/blues/blues.00074.au 76 | gtzan/genres/blues/blues.00075.au 77 | gtzan/genres/blues/blues.00076.au 78 | gtzan/genres/blues/blues.00077.au 79 | gtzan/genres/blues/blues.00078.au 80 | gtzan/genres/blues/blues.00079.au 81 | gtzan/genres/blues/blues.00080.au 82 | gtzan/genres/blues/blues.00081.au 83 | gtzan/genres/blues/blues.00082.au 84 | gtzan/genres/blues/blues.00083.au 85 | gtzan/genres/blues/blues.00084.au 86 | gtzan/genres/blues/blues.00085.au 87 | gtzan/genres/blues/blues.00086.au 88 | gtzan/genres/blues/blues.00087.au 89 | gtzan/genres/blues/blues.00088.au 90 | gtzan/genres/blues/blues.00089.au 91 | gtzan/genres/blues/blues.00090.au 92 | gtzan/genres/blues/blues.00091.au 93 | gtzan/genres/blues/blues.00092.au 94 | gtzan/genres/blues/blues.00093.au 95 | gtzan/genres/blues/blues.00094.au 96 | gtzan/genres/blues/blues.00095.au 97 | gtzan/genres/blues/blues.00096.au 98 | gtzan/genres/blues/blues.00097.au 99 | gtzan/genres/blues/blues.00098.au 100 | gtzan/genres/blues/blues.00099.au 101 | gtzan/genres/classical/classical.00000.au 102 | gtzan/genres/classical/classical.00001.au 103 | gtzan/genres/classical/classical.00002.au 104 | gtzan/genres/classical/classical.00003.au 105 | gtzan/genres/classical/classical.00004.au 106 | gtzan/genres/classical/classical.00005.au 107 | gtzan/genres/classical/classical.00006.au 108 | gtzan/genres/classical/classical.00007.au 109 | gtzan/genres/classical/classical.00008.au 110 | gtzan/genres/classical/classical.00009.au 111 | gtzan/genres/classical/classical.00010.au 112 | gtzan/genres/classical/classical.00011.au 113 | gtzan/genres/classical/classical.00012.au 114 | gtzan/genres/classical/classical.00013.au 115 | gtzan/genres/classical/classical.00014.au 116 | gtzan/genres/classical/classical.00015.au 117 | gtzan/genres/classical/classical.00016.au 118 | gtzan/genres/classical/classical.00017.au 119 | gtzan/genres/classical/classical.00018.au 120 | gtzan/genres/classical/classical.00019.au 121 | gtzan/genres/classical/classical.00020.au 122 | gtzan/genres/classical/classical.00021.au 123 | gtzan/genres/classical/classical.00022.au 124 | gtzan/genres/classical/classical.00023.au 125 | gtzan/genres/classical/classical.00024.au 126 | gtzan/genres/classical/classical.00025.au 127 | gtzan/genres/classical/classical.00026.au 128 | gtzan/genres/classical/classical.00027.au 129 | gtzan/genres/classical/classical.00028.au 130 | gtzan/genres/classical/classical.00029.au 131 | gtzan/genres/classical/classical.00030.au 132 | gtzan/genres/classical/classical.00031.au 133 | gtzan/genres/classical/classical.00032.au 134 | gtzan/genres/classical/classical.00033.au 135 | gtzan/genres/classical/classical.00034.au 136 | gtzan/genres/classical/classical.00035.au 137 | gtzan/genres/classical/classical.00036.au 138 | gtzan/genres/classical/classical.00037.au 139 | gtzan/genres/classical/classical.00038.au 140 | gtzan/genres/classical/classical.00039.au 141 | gtzan/genres/classical/classical.00040.au 142 | gtzan/genres/classical/classical.00041.au 143 | gtzan/genres/classical/classical.00042.au 144 | gtzan/genres/classical/classical.00043.au 145 | gtzan/genres/classical/classical.00044.au 146 | gtzan/genres/classical/classical.00045.au 147 | gtzan/genres/classical/classical.00046.au 148 | gtzan/genres/classical/classical.00047.au 149 | gtzan/genres/classical/classical.00048.au 150 | gtzan/genres/classical/classical.00049.au 151 | gtzan/genres/classical/classical.00050.au 152 | gtzan/genres/classical/classical.00051.au 153 | gtzan/genres/classical/classical.00052.au 154 | gtzan/genres/classical/classical.00053.au 155 | gtzan/genres/classical/classical.00054.au 156 | gtzan/genres/classical/classical.00055.au 157 | gtzan/genres/classical/classical.00056.au 158 | gtzan/genres/classical/classical.00057.au 159 | gtzan/genres/classical/classical.00058.au 160 | gtzan/genres/classical/classical.00059.au 161 | gtzan/genres/classical/classical.00060.au 162 | gtzan/genres/classical/classical.00061.au 163 | gtzan/genres/classical/classical.00062.au 164 | gtzan/genres/classical/classical.00063.au 165 | gtzan/genres/classical/classical.00064.au 166 | gtzan/genres/classical/classical.00065.au 167 | gtzan/genres/classical/classical.00066.au 168 | gtzan/genres/classical/classical.00067.au 169 | gtzan/genres/classical/classical.00068.au 170 | gtzan/genres/classical/classical.00069.au 171 | gtzan/genres/classical/classical.00070.au 172 | gtzan/genres/classical/classical.00071.au 173 | gtzan/genres/classical/classical.00072.au 174 | gtzan/genres/classical/classical.00073.au 175 | gtzan/genres/classical/classical.00074.au 176 | gtzan/genres/classical/classical.00075.au 177 | gtzan/genres/classical/classical.00076.au 178 | gtzan/genres/classical/classical.00077.au 179 | gtzan/genres/classical/classical.00078.au 180 | gtzan/genres/classical/classical.00079.au 181 | gtzan/genres/classical/classical.00080.au 182 | gtzan/genres/classical/classical.00081.au 183 | gtzan/genres/classical/classical.00082.au 184 | gtzan/genres/classical/classical.00083.au 185 | gtzan/genres/classical/classical.00084.au 186 | gtzan/genres/classical/classical.00085.au 187 | gtzan/genres/classical/classical.00086.au 188 | gtzan/genres/classical/classical.00087.au 189 | gtzan/genres/classical/classical.00088.au 190 | gtzan/genres/classical/classical.00089.au 191 | gtzan/genres/classical/classical.00090.au 192 | gtzan/genres/classical/classical.00091.au 193 | gtzan/genres/classical/classical.00092.au 194 | gtzan/genres/classical/classical.00093.au 195 | gtzan/genres/classical/classical.00094.au 196 | gtzan/genres/classical/classical.00095.au 197 | gtzan/genres/classical/classical.00096.au 198 | gtzan/genres/classical/classical.00097.au 199 | gtzan/genres/classical/classical.00098.au 200 | gtzan/genres/classical/classical.00099.au 201 | gtzan/genres/country/country.00000.au 202 | gtzan/genres/country/country.00001.au 203 | gtzan/genres/country/country.00002.au 204 | gtzan/genres/country/country.00003.au 205 | gtzan/genres/country/country.00004.au 206 | gtzan/genres/country/country.00005.au 207 | gtzan/genres/country/country.00006.au 208 | gtzan/genres/country/country.00007.au 209 | gtzan/genres/country/country.00008.au 210 | gtzan/genres/country/country.00009.au 211 | gtzan/genres/country/country.00010.au 212 | gtzan/genres/country/country.00011.au 213 | gtzan/genres/country/country.00012.au 214 | gtzan/genres/country/country.00013.au 215 | gtzan/genres/country/country.00014.au 216 | gtzan/genres/country/country.00015.au 217 | gtzan/genres/country/country.00016.au 218 | gtzan/genres/country/country.00017.au 219 | gtzan/genres/country/country.00018.au 220 | gtzan/genres/country/country.00019.au 221 | gtzan/genres/country/country.00020.au 222 | gtzan/genres/country/country.00021.au 223 | gtzan/genres/country/country.00022.au 224 | gtzan/genres/country/country.00023.au 225 | gtzan/genres/country/country.00024.au 226 | gtzan/genres/country/country.00025.au 227 | gtzan/genres/country/country.00026.au 228 | gtzan/genres/country/country.00027.au 229 | gtzan/genres/country/country.00028.au 230 | gtzan/genres/country/country.00029.au 231 | gtzan/genres/country/country.00030.au 232 | gtzan/genres/country/country.00031.au 233 | gtzan/genres/country/country.00032.au 234 | gtzan/genres/country/country.00033.au 235 | gtzan/genres/country/country.00034.au 236 | gtzan/genres/country/country.00035.au 237 | gtzan/genres/country/country.00036.au 238 | gtzan/genres/country/country.00037.au 239 | gtzan/genres/country/country.00038.au 240 | gtzan/genres/country/country.00039.au 241 | gtzan/genres/country/country.00040.au 242 | gtzan/genres/country/country.00041.au 243 | gtzan/genres/country/country.00042.au 244 | gtzan/genres/country/country.00043.au 245 | gtzan/genres/country/country.00044.au 246 | gtzan/genres/country/country.00045.au 247 | gtzan/genres/country/country.00046.au 248 | gtzan/genres/country/country.00047.au 249 | gtzan/genres/country/country.00048.au 250 | gtzan/genres/country/country.00049.au 251 | gtzan/genres/country/country.00050.au 252 | gtzan/genres/country/country.00051.au 253 | gtzan/genres/country/country.00052.au 254 | gtzan/genres/country/country.00053.au 255 | gtzan/genres/country/country.00054.au 256 | gtzan/genres/country/country.00055.au 257 | gtzan/genres/country/country.00056.au 258 | gtzan/genres/country/country.00057.au 259 | gtzan/genres/country/country.00058.au 260 | gtzan/genres/country/country.00059.au 261 | gtzan/genres/country/country.00060.au 262 | gtzan/genres/country/country.00061.au 263 | gtzan/genres/country/country.00062.au 264 | gtzan/genres/country/country.00063.au 265 | gtzan/genres/country/country.00064.au 266 | gtzan/genres/country/country.00065.au 267 | gtzan/genres/country/country.00066.au 268 | gtzan/genres/country/country.00067.au 269 | gtzan/genres/country/country.00068.au 270 | gtzan/genres/country/country.00069.au 271 | gtzan/genres/country/country.00070.au 272 | gtzan/genres/country/country.00071.au 273 | gtzan/genres/country/country.00072.au 274 | gtzan/genres/country/country.00073.au 275 | gtzan/genres/country/country.00074.au 276 | gtzan/genres/country/country.00075.au 277 | gtzan/genres/country/country.00076.au 278 | gtzan/genres/country/country.00077.au 279 | gtzan/genres/country/country.00078.au 280 | gtzan/genres/country/country.00079.au 281 | gtzan/genres/country/country.00080.au 282 | gtzan/genres/country/country.00081.au 283 | gtzan/genres/country/country.00082.au 284 | gtzan/genres/country/country.00083.au 285 | gtzan/genres/country/country.00084.au 286 | gtzan/genres/country/country.00085.au 287 | gtzan/genres/country/country.00086.au 288 | gtzan/genres/country/country.00087.au 289 | gtzan/genres/country/country.00088.au 290 | gtzan/genres/country/country.00089.au 291 | gtzan/genres/country/country.00090.au 292 | gtzan/genres/country/country.00091.au 293 | gtzan/genres/country/country.00092.au 294 | gtzan/genres/country/country.00093.au 295 | gtzan/genres/country/country.00094.au 296 | gtzan/genres/country/country.00095.au 297 | gtzan/genres/country/country.00096.au 298 | gtzan/genres/country/country.00097.au 299 | gtzan/genres/country/country.00098.au 300 | gtzan/genres/country/country.00099.au 301 | gtzan/genres/disco/disco.00000.au 302 | gtzan/genres/disco/disco.00001.au 303 | gtzan/genres/disco/disco.00002.au 304 | gtzan/genres/disco/disco.00003.au 305 | gtzan/genres/disco/disco.00004.au 306 | gtzan/genres/disco/disco.00005.au 307 | gtzan/genres/disco/disco.00006.au 308 | gtzan/genres/disco/disco.00007.au 309 | gtzan/genres/disco/disco.00008.au 310 | gtzan/genres/disco/disco.00009.au 311 | gtzan/genres/disco/disco.00010.au 312 | gtzan/genres/disco/disco.00011.au 313 | gtzan/genres/disco/disco.00012.au 314 | gtzan/genres/disco/disco.00013.au 315 | gtzan/genres/disco/disco.00014.au 316 | gtzan/genres/disco/disco.00015.au 317 | gtzan/genres/disco/disco.00016.au 318 | gtzan/genres/disco/disco.00017.au 319 | gtzan/genres/disco/disco.00018.au 320 | gtzan/genres/disco/disco.00019.au 321 | gtzan/genres/disco/disco.00020.au 322 | gtzan/genres/disco/disco.00021.au 323 | gtzan/genres/disco/disco.00022.au 324 | gtzan/genres/disco/disco.00023.au 325 | gtzan/genres/disco/disco.00024.au 326 | gtzan/genres/disco/disco.00025.au 327 | gtzan/genres/disco/disco.00026.au 328 | gtzan/genres/disco/disco.00027.au 329 | gtzan/genres/disco/disco.00028.au 330 | gtzan/genres/disco/disco.00029.au 331 | gtzan/genres/disco/disco.00030.au 332 | gtzan/genres/disco/disco.00031.au 333 | gtzan/genres/disco/disco.00032.au 334 | gtzan/genres/disco/disco.00033.au 335 | gtzan/genres/disco/disco.00034.au 336 | gtzan/genres/disco/disco.00035.au 337 | gtzan/genres/disco/disco.00036.au 338 | gtzan/genres/disco/disco.00037.au 339 | gtzan/genres/disco/disco.00038.au 340 | gtzan/genres/disco/disco.00039.au 341 | gtzan/genres/disco/disco.00040.au 342 | gtzan/genres/disco/disco.00041.au 343 | gtzan/genres/disco/disco.00042.au 344 | gtzan/genres/disco/disco.00043.au 345 | gtzan/genres/disco/disco.00044.au 346 | gtzan/genres/disco/disco.00045.au 347 | gtzan/genres/disco/disco.00046.au 348 | gtzan/genres/disco/disco.00047.au 349 | gtzan/genres/disco/disco.00048.au 350 | gtzan/genres/disco/disco.00049.au 351 | gtzan/genres/disco/disco.00050.au 352 | gtzan/genres/disco/disco.00051.au 353 | gtzan/genres/disco/disco.00052.au 354 | gtzan/genres/disco/disco.00053.au 355 | gtzan/genres/disco/disco.00054.au 356 | gtzan/genres/disco/disco.00055.au 357 | gtzan/genres/disco/disco.00056.au 358 | gtzan/genres/disco/disco.00057.au 359 | gtzan/genres/disco/disco.00058.au 360 | gtzan/genres/disco/disco.00059.au 361 | gtzan/genres/disco/disco.00060.au 362 | gtzan/genres/disco/disco.00061.au 363 | gtzan/genres/disco/disco.00062.au 364 | gtzan/genres/disco/disco.00063.au 365 | gtzan/genres/disco/disco.00064.au 366 | gtzan/genres/disco/disco.00065.au 367 | gtzan/genres/disco/disco.00066.au 368 | gtzan/genres/disco/disco.00067.au 369 | gtzan/genres/disco/disco.00068.au 370 | gtzan/genres/disco/disco.00069.au 371 | gtzan/genres/disco/disco.00070.au 372 | gtzan/genres/disco/disco.00071.au 373 | gtzan/genres/disco/disco.00072.au 374 | gtzan/genres/disco/disco.00073.au 375 | gtzan/genres/disco/disco.00074.au 376 | gtzan/genres/disco/disco.00075.au 377 | gtzan/genres/disco/disco.00076.au 378 | gtzan/genres/disco/disco.00077.au 379 | gtzan/genres/disco/disco.00078.au 380 | gtzan/genres/disco/disco.00079.au 381 | gtzan/genres/disco/disco.00080.au 382 | gtzan/genres/disco/disco.00081.au 383 | gtzan/genres/disco/disco.00082.au 384 | gtzan/genres/disco/disco.00083.au 385 | gtzan/genres/disco/disco.00084.au 386 | gtzan/genres/disco/disco.00085.au 387 | gtzan/genres/disco/disco.00086.au 388 | gtzan/genres/disco/disco.00087.au 389 | gtzan/genres/disco/disco.00088.au 390 | gtzan/genres/disco/disco.00089.au 391 | gtzan/genres/disco/disco.00090.au 392 | gtzan/genres/disco/disco.00091.au 393 | gtzan/genres/disco/disco.00092.au 394 | gtzan/genres/disco/disco.00093.au 395 | gtzan/genres/disco/disco.00094.au 396 | gtzan/genres/disco/disco.00095.au 397 | gtzan/genres/disco/disco.00096.au 398 | gtzan/genres/disco/disco.00097.au 399 | gtzan/genres/disco/disco.00098.au 400 | gtzan/genres/disco/disco.00099.au 401 | gtzan/genres/hiphop/hiphop.00000.au 402 | gtzan/genres/hiphop/hiphop.00001.au 403 | gtzan/genres/hiphop/hiphop.00002.au 404 | gtzan/genres/hiphop/hiphop.00003.au 405 | gtzan/genres/hiphop/hiphop.00004.au 406 | gtzan/genres/hiphop/hiphop.00005.au 407 | gtzan/genres/hiphop/hiphop.00006.au 408 | gtzan/genres/hiphop/hiphop.00007.au 409 | gtzan/genres/hiphop/hiphop.00008.au 410 | gtzan/genres/hiphop/hiphop.00009.au 411 | gtzan/genres/hiphop/hiphop.00010.au 412 | gtzan/genres/hiphop/hiphop.00011.au 413 | gtzan/genres/hiphop/hiphop.00012.au 414 | gtzan/genres/hiphop/hiphop.00013.au 415 | gtzan/genres/hiphop/hiphop.00014.au 416 | gtzan/genres/hiphop/hiphop.00015.au 417 | gtzan/genres/hiphop/hiphop.00016.au 418 | gtzan/genres/hiphop/hiphop.00017.au 419 | gtzan/genres/hiphop/hiphop.00018.au 420 | gtzan/genres/hiphop/hiphop.00019.au 421 | gtzan/genres/hiphop/hiphop.00020.au 422 | gtzan/genres/hiphop/hiphop.00021.au 423 | gtzan/genres/hiphop/hiphop.00022.au 424 | gtzan/genres/hiphop/hiphop.00023.au 425 | gtzan/genres/hiphop/hiphop.00024.au 426 | gtzan/genres/hiphop/hiphop.00025.au 427 | gtzan/genres/hiphop/hiphop.00026.au 428 | gtzan/genres/hiphop/hiphop.00027.au 429 | gtzan/genres/hiphop/hiphop.00028.au 430 | gtzan/genres/hiphop/hiphop.00029.au 431 | gtzan/genres/hiphop/hiphop.00030.au 432 | gtzan/genres/hiphop/hiphop.00031.au 433 | gtzan/genres/hiphop/hiphop.00032.au 434 | gtzan/genres/hiphop/hiphop.00033.au 435 | gtzan/genres/hiphop/hiphop.00034.au 436 | gtzan/genres/hiphop/hiphop.00035.au 437 | gtzan/genres/hiphop/hiphop.00036.au 438 | gtzan/genres/hiphop/hiphop.00037.au 439 | gtzan/genres/hiphop/hiphop.00038.au 440 | gtzan/genres/hiphop/hiphop.00039.au 441 | gtzan/genres/hiphop/hiphop.00040.au 442 | gtzan/genres/hiphop/hiphop.00041.au 443 | gtzan/genres/hiphop/hiphop.00042.au 444 | gtzan/genres/hiphop/hiphop.00043.au 445 | gtzan/genres/hiphop/hiphop.00044.au 446 | gtzan/genres/hiphop/hiphop.00045.au 447 | gtzan/genres/hiphop/hiphop.00046.au 448 | gtzan/genres/hiphop/hiphop.00047.au 449 | gtzan/genres/hiphop/hiphop.00048.au 450 | gtzan/genres/hiphop/hiphop.00049.au 451 | gtzan/genres/hiphop/hiphop.00050.au 452 | gtzan/genres/hiphop/hiphop.00051.au 453 | gtzan/genres/hiphop/hiphop.00052.au 454 | gtzan/genres/hiphop/hiphop.00053.au 455 | gtzan/genres/hiphop/hiphop.00054.au 456 | gtzan/genres/hiphop/hiphop.00055.au 457 | gtzan/genres/hiphop/hiphop.00056.au 458 | gtzan/genres/hiphop/hiphop.00057.au 459 | gtzan/genres/hiphop/hiphop.00058.au 460 | gtzan/genres/hiphop/hiphop.00059.au 461 | gtzan/genres/hiphop/hiphop.00060.au 462 | gtzan/genres/hiphop/hiphop.00061.au 463 | gtzan/genres/hiphop/hiphop.00062.au 464 | gtzan/genres/hiphop/hiphop.00063.au 465 | gtzan/genres/hiphop/hiphop.00064.au 466 | gtzan/genres/hiphop/hiphop.00065.au 467 | gtzan/genres/hiphop/hiphop.00066.au 468 | gtzan/genres/hiphop/hiphop.00067.au 469 | gtzan/genres/hiphop/hiphop.00068.au 470 | gtzan/genres/hiphop/hiphop.00069.au 471 | gtzan/genres/hiphop/hiphop.00070.au 472 | gtzan/genres/hiphop/hiphop.00071.au 473 | gtzan/genres/hiphop/hiphop.00072.au 474 | gtzan/genres/hiphop/hiphop.00073.au 475 | gtzan/genres/hiphop/hiphop.00074.au 476 | gtzan/genres/hiphop/hiphop.00075.au 477 | gtzan/genres/hiphop/hiphop.00076.au 478 | gtzan/genres/hiphop/hiphop.00077.au 479 | gtzan/genres/hiphop/hiphop.00078.au 480 | gtzan/genres/hiphop/hiphop.00079.au 481 | gtzan/genres/hiphop/hiphop.00080.au 482 | gtzan/genres/hiphop/hiphop.00081.au 483 | gtzan/genres/hiphop/hiphop.00082.au 484 | gtzan/genres/hiphop/hiphop.00083.au 485 | gtzan/genres/hiphop/hiphop.00084.au 486 | gtzan/genres/hiphop/hiphop.00085.au 487 | gtzan/genres/hiphop/hiphop.00086.au 488 | gtzan/genres/hiphop/hiphop.00087.au 489 | gtzan/genres/hiphop/hiphop.00088.au 490 | gtzan/genres/hiphop/hiphop.00089.au 491 | gtzan/genres/hiphop/hiphop.00090.au 492 | gtzan/genres/hiphop/hiphop.00091.au 493 | gtzan/genres/hiphop/hiphop.00092.au 494 | gtzan/genres/hiphop/hiphop.00093.au 495 | gtzan/genres/hiphop/hiphop.00094.au 496 | gtzan/genres/hiphop/hiphop.00095.au 497 | gtzan/genres/hiphop/hiphop.00096.au 498 | gtzan/genres/hiphop/hiphop.00097.au 499 | gtzan/genres/hiphop/hiphop.00098.au 500 | gtzan/genres/hiphop/hiphop.00099.au 501 | gtzan/genres/jazz/jazz.00000.au 502 | gtzan/genres/jazz/jazz.00001.au 503 | gtzan/genres/jazz/jazz.00002.au 504 | gtzan/genres/jazz/jazz.00003.au 505 | gtzan/genres/jazz/jazz.00004.au 506 | gtzan/genres/jazz/jazz.00005.au 507 | gtzan/genres/jazz/jazz.00006.au 508 | gtzan/genres/jazz/jazz.00007.au 509 | gtzan/genres/jazz/jazz.00008.au 510 | gtzan/genres/jazz/jazz.00009.au 511 | gtzan/genres/jazz/jazz.00010.au 512 | gtzan/genres/jazz/jazz.00011.au 513 | gtzan/genres/jazz/jazz.00012.au 514 | gtzan/genres/jazz/jazz.00013.au 515 | gtzan/genres/jazz/jazz.00014.au 516 | gtzan/genres/jazz/jazz.00015.au 517 | gtzan/genres/jazz/jazz.00016.au 518 | gtzan/genres/jazz/jazz.00017.au 519 | gtzan/genres/jazz/jazz.00018.au 520 | gtzan/genres/jazz/jazz.00019.au 521 | gtzan/genres/jazz/jazz.00020.au 522 | gtzan/genres/jazz/jazz.00021.au 523 | gtzan/genres/jazz/jazz.00022.au 524 | gtzan/genres/jazz/jazz.00023.au 525 | gtzan/genres/jazz/jazz.00024.au 526 | gtzan/genres/jazz/jazz.00025.au 527 | gtzan/genres/jazz/jazz.00026.au 528 | gtzan/genres/jazz/jazz.00027.au 529 | gtzan/genres/jazz/jazz.00028.au 530 | gtzan/genres/jazz/jazz.00029.au 531 | gtzan/genres/jazz/jazz.00030.au 532 | gtzan/genres/jazz/jazz.00031.au 533 | gtzan/genres/jazz/jazz.00032.au 534 | gtzan/genres/jazz/jazz.00033.au 535 | gtzan/genres/jazz/jazz.00034.au 536 | gtzan/genres/jazz/jazz.00035.au 537 | gtzan/genres/jazz/jazz.00036.au 538 | gtzan/genres/jazz/jazz.00037.au 539 | gtzan/genres/jazz/jazz.00038.au 540 | gtzan/genres/jazz/jazz.00039.au 541 | gtzan/genres/jazz/jazz.00040.au 542 | gtzan/genres/jazz/jazz.00041.au 543 | gtzan/genres/jazz/jazz.00042.au 544 | gtzan/genres/jazz/jazz.00043.au 545 | gtzan/genres/jazz/jazz.00044.au 546 | gtzan/genres/jazz/jazz.00045.au 547 | gtzan/genres/jazz/jazz.00046.au 548 | gtzan/genres/jazz/jazz.00047.au 549 | gtzan/genres/jazz/jazz.00048.au 550 | gtzan/genres/jazz/jazz.00049.au 551 | gtzan/genres/jazz/jazz.00050.au 552 | gtzan/genres/jazz/jazz.00051.au 553 | gtzan/genres/jazz/jazz.00052.au 554 | gtzan/genres/jazz/jazz.00053.au 555 | gtzan/genres/jazz/jazz.00054.au 556 | gtzan/genres/jazz/jazz.00055.au 557 | gtzan/genres/jazz/jazz.00056.au 558 | gtzan/genres/jazz/jazz.00057.au 559 | gtzan/genres/jazz/jazz.00058.au 560 | gtzan/genres/jazz/jazz.00059.au 561 | gtzan/genres/jazz/jazz.00060.au 562 | gtzan/genres/jazz/jazz.00061.au 563 | gtzan/genres/jazz/jazz.00062.au 564 | gtzan/genres/jazz/jazz.00063.au 565 | gtzan/genres/jazz/jazz.00064.au 566 | gtzan/genres/jazz/jazz.00065.au 567 | gtzan/genres/jazz/jazz.00066.au 568 | gtzan/genres/jazz/jazz.00067.au 569 | gtzan/genres/jazz/jazz.00068.au 570 | gtzan/genres/jazz/jazz.00069.au 571 | gtzan/genres/jazz/jazz.00070.au 572 | gtzan/genres/jazz/jazz.00071.au 573 | gtzan/genres/jazz/jazz.00072.au 574 | gtzan/genres/jazz/jazz.00073.au 575 | gtzan/genres/jazz/jazz.00074.au 576 | gtzan/genres/jazz/jazz.00075.au 577 | gtzan/genres/jazz/jazz.00076.au 578 | gtzan/genres/jazz/jazz.00077.au 579 | gtzan/genres/jazz/jazz.00078.au 580 | gtzan/genres/jazz/jazz.00079.au 581 | gtzan/genres/jazz/jazz.00080.au 582 | gtzan/genres/jazz/jazz.00081.au 583 | gtzan/genres/jazz/jazz.00082.au 584 | gtzan/genres/jazz/jazz.00083.au 585 | gtzan/genres/jazz/jazz.00084.au 586 | gtzan/genres/jazz/jazz.00085.au 587 | gtzan/genres/jazz/jazz.00086.au 588 | gtzan/genres/jazz/jazz.00087.au 589 | gtzan/genres/jazz/jazz.00088.au 590 | gtzan/genres/jazz/jazz.00089.au 591 | gtzan/genres/jazz/jazz.00090.au 592 | gtzan/genres/jazz/jazz.00091.au 593 | gtzan/genres/jazz/jazz.00092.au 594 | gtzan/genres/jazz/jazz.00093.au 595 | gtzan/genres/jazz/jazz.00094.au 596 | gtzan/genres/jazz/jazz.00095.au 597 | gtzan/genres/jazz/jazz.00096.au 598 | gtzan/genres/jazz/jazz.00097.au 599 | gtzan/genres/jazz/jazz.00098.au 600 | gtzan/genres/jazz/jazz.00099.au 601 | gtzan/genres/metal/metal.00000.au 602 | gtzan/genres/metal/metal.00001.au 603 | gtzan/genres/metal/metal.00002.au 604 | gtzan/genres/metal/metal.00003.au 605 | gtzan/genres/metal/metal.00004.au 606 | gtzan/genres/metal/metal.00005.au 607 | gtzan/genres/metal/metal.00006.au 608 | gtzan/genres/metal/metal.00007.au 609 | gtzan/genres/metal/metal.00008.au 610 | gtzan/genres/metal/metal.00009.au 611 | gtzan/genres/metal/metal.00010.au 612 | gtzan/genres/metal/metal.00011.au 613 | gtzan/genres/metal/metal.00012.au 614 | gtzan/genres/metal/metal.00013.au 615 | gtzan/genres/metal/metal.00014.au 616 | gtzan/genres/metal/metal.00015.au 617 | gtzan/genres/metal/metal.00016.au 618 | gtzan/genres/metal/metal.00017.au 619 | gtzan/genres/metal/metal.00018.au 620 | gtzan/genres/metal/metal.00019.au 621 | gtzan/genres/metal/metal.00020.au 622 | gtzan/genres/metal/metal.00021.au 623 | gtzan/genres/metal/metal.00022.au 624 | gtzan/genres/metal/metal.00023.au 625 | gtzan/genres/metal/metal.00024.au 626 | gtzan/genres/metal/metal.00025.au 627 | gtzan/genres/metal/metal.00026.au 628 | gtzan/genres/metal/metal.00027.au 629 | gtzan/genres/metal/metal.00028.au 630 | gtzan/genres/metal/metal.00029.au 631 | gtzan/genres/metal/metal.00030.au 632 | gtzan/genres/metal/metal.00031.au 633 | gtzan/genres/metal/metal.00032.au 634 | gtzan/genres/metal/metal.00033.au 635 | gtzan/genres/metal/metal.00034.au 636 | gtzan/genres/metal/metal.00035.au 637 | gtzan/genres/metal/metal.00036.au 638 | gtzan/genres/metal/metal.00037.au 639 | gtzan/genres/metal/metal.00038.au 640 | gtzan/genres/metal/metal.00039.au 641 | gtzan/genres/metal/metal.00040.au 642 | gtzan/genres/metal/metal.00041.au 643 | gtzan/genres/metal/metal.00042.au 644 | gtzan/genres/metal/metal.00043.au 645 | gtzan/genres/metal/metal.00044.au 646 | gtzan/genres/metal/metal.00045.au 647 | gtzan/genres/metal/metal.00046.au 648 | gtzan/genres/metal/metal.00047.au 649 | gtzan/genres/metal/metal.00048.au 650 | gtzan/genres/metal/metal.00049.au 651 | gtzan/genres/metal/metal.00050.au 652 | gtzan/genres/metal/metal.00051.au 653 | gtzan/genres/metal/metal.00052.au 654 | gtzan/genres/metal/metal.00053.au 655 | gtzan/genres/metal/metal.00054.au 656 | gtzan/genres/metal/metal.00055.au 657 | gtzan/genres/metal/metal.00056.au 658 | gtzan/genres/metal/metal.00057.au 659 | gtzan/genres/metal/metal.00058.au 660 | gtzan/genres/metal/metal.00059.au 661 | gtzan/genres/metal/metal.00060.au 662 | gtzan/genres/metal/metal.00061.au 663 | gtzan/genres/metal/metal.00062.au 664 | gtzan/genres/metal/metal.00063.au 665 | gtzan/genres/metal/metal.00064.au 666 | gtzan/genres/metal/metal.00065.au 667 | gtzan/genres/metal/metal.00066.au 668 | gtzan/genres/metal/metal.00067.au 669 | gtzan/genres/metal/metal.00068.au 670 | gtzan/genres/metal/metal.00069.au 671 | gtzan/genres/metal/metal.00070.au 672 | gtzan/genres/metal/metal.00071.au 673 | gtzan/genres/metal/metal.00072.au 674 | gtzan/genres/metal/metal.00073.au 675 | gtzan/genres/metal/metal.00074.au 676 | gtzan/genres/metal/metal.00075.au 677 | gtzan/genres/metal/metal.00076.au 678 | gtzan/genres/metal/metal.00077.au 679 | gtzan/genres/metal/metal.00078.au 680 | gtzan/genres/metal/metal.00079.au 681 | gtzan/genres/metal/metal.00080.au 682 | gtzan/genres/metal/metal.00081.au 683 | gtzan/genres/metal/metal.00082.au 684 | gtzan/genres/metal/metal.00083.au 685 | gtzan/genres/metal/metal.00084.au 686 | gtzan/genres/metal/metal.00085.au 687 | gtzan/genres/metal/metal.00086.au 688 | gtzan/genres/metal/metal.00087.au 689 | gtzan/genres/metal/metal.00088.au 690 | gtzan/genres/metal/metal.00089.au 691 | gtzan/genres/metal/metal.00090.au 692 | gtzan/genres/metal/metal.00091.au 693 | gtzan/genres/metal/metal.00092.au 694 | gtzan/genres/metal/metal.00093.au 695 | gtzan/genres/metal/metal.00094.au 696 | gtzan/genres/metal/metal.00095.au 697 | gtzan/genres/metal/metal.00096.au 698 | gtzan/genres/metal/metal.00097.au 699 | gtzan/genres/metal/metal.00098.au 700 | gtzan/genres/metal/metal.00099.au 701 | gtzan/genres/pop/pop.00000.au 702 | gtzan/genres/pop/pop.00001.au 703 | gtzan/genres/pop/pop.00002.au 704 | gtzan/genres/pop/pop.00003.au 705 | gtzan/genres/pop/pop.00004.au 706 | gtzan/genres/pop/pop.00005.au 707 | gtzan/genres/pop/pop.00006.au 708 | gtzan/genres/pop/pop.00007.au 709 | gtzan/genres/pop/pop.00008.au 710 | gtzan/genres/pop/pop.00009.au 711 | gtzan/genres/pop/pop.00010.au 712 | gtzan/genres/pop/pop.00011.au 713 | gtzan/genres/pop/pop.00012.au 714 | gtzan/genres/pop/pop.00013.au 715 | gtzan/genres/pop/pop.00014.au 716 | gtzan/genres/pop/pop.00015.au 717 | gtzan/genres/pop/pop.00016.au 718 | gtzan/genres/pop/pop.00017.au 719 | gtzan/genres/pop/pop.00018.au 720 | gtzan/genres/pop/pop.00019.au 721 | gtzan/genres/pop/pop.00020.au 722 | gtzan/genres/pop/pop.00021.au 723 | gtzan/genres/pop/pop.00022.au 724 | gtzan/genres/pop/pop.00023.au 725 | gtzan/genres/pop/pop.00024.au 726 | gtzan/genres/pop/pop.00025.au 727 | gtzan/genres/pop/pop.00026.au 728 | gtzan/genres/pop/pop.00027.au 729 | gtzan/genres/pop/pop.00028.au 730 | gtzan/genres/pop/pop.00029.au 731 | gtzan/genres/pop/pop.00030.au 732 | gtzan/genres/pop/pop.00031.au 733 | gtzan/genres/pop/pop.00032.au 734 | gtzan/genres/pop/pop.00033.au 735 | gtzan/genres/pop/pop.00034.au 736 | gtzan/genres/pop/pop.00035.au 737 | gtzan/genres/pop/pop.00036.au 738 | gtzan/genres/pop/pop.00037.au 739 | gtzan/genres/pop/pop.00038.au 740 | gtzan/genres/pop/pop.00039.au 741 | gtzan/genres/pop/pop.00040.au 742 | gtzan/genres/pop/pop.00041.au 743 | gtzan/genres/pop/pop.00042.au 744 | gtzan/genres/pop/pop.00043.au 745 | gtzan/genres/pop/pop.00044.au 746 | gtzan/genres/pop/pop.00045.au 747 | gtzan/genres/pop/pop.00046.au 748 | gtzan/genres/pop/pop.00047.au 749 | gtzan/genres/pop/pop.00048.au 750 | gtzan/genres/pop/pop.00049.au 751 | gtzan/genres/pop/pop.00050.au 752 | gtzan/genres/pop/pop.00051.au 753 | gtzan/genres/pop/pop.00052.au 754 | gtzan/genres/pop/pop.00053.au 755 | gtzan/genres/pop/pop.00054.au 756 | gtzan/genres/pop/pop.00055.au 757 | gtzan/genres/pop/pop.00056.au 758 | gtzan/genres/pop/pop.00057.au 759 | gtzan/genres/pop/pop.00058.au 760 | gtzan/genres/pop/pop.00059.au 761 | gtzan/genres/pop/pop.00060.au 762 | gtzan/genres/pop/pop.00061.au 763 | gtzan/genres/pop/pop.00062.au 764 | gtzan/genres/pop/pop.00063.au 765 | gtzan/genres/pop/pop.00064.au 766 | gtzan/genres/pop/pop.00065.au 767 | gtzan/genres/pop/pop.00066.au 768 | gtzan/genres/pop/pop.00067.au 769 | gtzan/genres/pop/pop.00068.au 770 | gtzan/genres/pop/pop.00069.au 771 | gtzan/genres/pop/pop.00070.au 772 | gtzan/genres/pop/pop.00071.au 773 | gtzan/genres/pop/pop.00072.au 774 | gtzan/genres/pop/pop.00073.au 775 | gtzan/genres/pop/pop.00074.au 776 | gtzan/genres/pop/pop.00075.au 777 | gtzan/genres/pop/pop.00076.au 778 | gtzan/genres/pop/pop.00077.au 779 | gtzan/genres/pop/pop.00078.au 780 | gtzan/genres/pop/pop.00079.au 781 | gtzan/genres/pop/pop.00080.au 782 | gtzan/genres/pop/pop.00081.au 783 | gtzan/genres/pop/pop.00082.au 784 | gtzan/genres/pop/pop.00083.au 785 | gtzan/genres/pop/pop.00084.au 786 | gtzan/genres/pop/pop.00085.au 787 | gtzan/genres/pop/pop.00086.au 788 | gtzan/genres/pop/pop.00087.au 789 | gtzan/genres/pop/pop.00088.au 790 | gtzan/genres/pop/pop.00089.au 791 | gtzan/genres/pop/pop.00090.au 792 | gtzan/genres/pop/pop.00091.au 793 | gtzan/genres/pop/pop.00092.au 794 | gtzan/genres/pop/pop.00093.au 795 | gtzan/genres/pop/pop.00094.au 796 | gtzan/genres/pop/pop.00095.au 797 | gtzan/genres/pop/pop.00096.au 798 | gtzan/genres/pop/pop.00097.au 799 | gtzan/genres/pop/pop.00098.au 800 | gtzan/genres/pop/pop.00099.au 801 | gtzan/genres/reggae/reggae.00000.au 802 | gtzan/genres/reggae/reggae.00001.au 803 | gtzan/genres/reggae/reggae.00002.au 804 | gtzan/genres/reggae/reggae.00003.au 805 | gtzan/genres/reggae/reggae.00004.au 806 | gtzan/genres/reggae/reggae.00005.au 807 | gtzan/genres/reggae/reggae.00006.au 808 | gtzan/genres/reggae/reggae.00007.au 809 | gtzan/genres/reggae/reggae.00008.au 810 | gtzan/genres/reggae/reggae.00009.au 811 | gtzan/genres/reggae/reggae.00010.au 812 | gtzan/genres/reggae/reggae.00011.au 813 | gtzan/genres/reggae/reggae.00012.au 814 | gtzan/genres/reggae/reggae.00013.au 815 | gtzan/genres/reggae/reggae.00014.au 816 | gtzan/genres/reggae/reggae.00015.au 817 | gtzan/genres/reggae/reggae.00016.au 818 | gtzan/genres/reggae/reggae.00017.au 819 | gtzan/genres/reggae/reggae.00018.au 820 | gtzan/genres/reggae/reggae.00019.au 821 | gtzan/genres/reggae/reggae.00020.au 822 | gtzan/genres/reggae/reggae.00021.au 823 | gtzan/genres/reggae/reggae.00022.au 824 | gtzan/genres/reggae/reggae.00023.au 825 | gtzan/genres/reggae/reggae.00024.au 826 | gtzan/genres/reggae/reggae.00025.au 827 | gtzan/genres/reggae/reggae.00026.au 828 | gtzan/genres/reggae/reggae.00027.au 829 | gtzan/genres/reggae/reggae.00028.au 830 | gtzan/genres/reggae/reggae.00029.au 831 | gtzan/genres/reggae/reggae.00030.au 832 | gtzan/genres/reggae/reggae.00031.au 833 | gtzan/genres/reggae/reggae.00032.au 834 | gtzan/genres/reggae/reggae.00033.au 835 | gtzan/genres/reggae/reggae.00034.au 836 | gtzan/genres/reggae/reggae.00035.au 837 | gtzan/genres/reggae/reggae.00036.au 838 | gtzan/genres/reggae/reggae.00037.au 839 | gtzan/genres/reggae/reggae.00038.au 840 | gtzan/genres/reggae/reggae.00039.au 841 | gtzan/genres/reggae/reggae.00040.au 842 | gtzan/genres/reggae/reggae.00041.au 843 | gtzan/genres/reggae/reggae.00042.au 844 | gtzan/genres/reggae/reggae.00043.au 845 | gtzan/genres/reggae/reggae.00044.au 846 | gtzan/genres/reggae/reggae.00045.au 847 | gtzan/genres/reggae/reggae.00046.au 848 | gtzan/genres/reggae/reggae.00047.au 849 | gtzan/genres/reggae/reggae.00048.au 850 | gtzan/genres/reggae/reggae.00049.au 851 | gtzan/genres/reggae/reggae.00050.au 852 | gtzan/genres/reggae/reggae.00051.au 853 | gtzan/genres/reggae/reggae.00052.au 854 | gtzan/genres/reggae/reggae.00053.au 855 | gtzan/genres/reggae/reggae.00054.au 856 | gtzan/genres/reggae/reggae.00055.au 857 | gtzan/genres/reggae/reggae.00056.au 858 | gtzan/genres/reggae/reggae.00057.au 859 | gtzan/genres/reggae/reggae.00058.au 860 | gtzan/genres/reggae/reggae.00059.au 861 | gtzan/genres/reggae/reggae.00060.au 862 | gtzan/genres/reggae/reggae.00061.au 863 | gtzan/genres/reggae/reggae.00062.au 864 | gtzan/genres/reggae/reggae.00063.au 865 | gtzan/genres/reggae/reggae.00064.au 866 | gtzan/genres/reggae/reggae.00065.au 867 | gtzan/genres/reggae/reggae.00066.au 868 | gtzan/genres/reggae/reggae.00067.au 869 | gtzan/genres/reggae/reggae.00068.au 870 | gtzan/genres/reggae/reggae.00069.au 871 | gtzan/genres/reggae/reggae.00070.au 872 | gtzan/genres/reggae/reggae.00071.au 873 | gtzan/genres/reggae/reggae.00072.au 874 | gtzan/genres/reggae/reggae.00073.au 875 | gtzan/genres/reggae/reggae.00074.au 876 | gtzan/genres/reggae/reggae.00075.au 877 | gtzan/genres/reggae/reggae.00076.au 878 | gtzan/genres/reggae/reggae.00077.au 879 | gtzan/genres/reggae/reggae.00078.au 880 | gtzan/genres/reggae/reggae.00079.au 881 | gtzan/genres/reggae/reggae.00080.au 882 | gtzan/genres/reggae/reggae.00081.au 883 | gtzan/genres/reggae/reggae.00082.au 884 | gtzan/genres/reggae/reggae.00083.au 885 | gtzan/genres/reggae/reggae.00084.au 886 | gtzan/genres/reggae/reggae.00085.au 887 | gtzan/genres/reggae/reggae.00086.au 888 | gtzan/genres/reggae/reggae.00087.au 889 | gtzan/genres/reggae/reggae.00088.au 890 | gtzan/genres/reggae/reggae.00089.au 891 | gtzan/genres/reggae/reggae.00090.au 892 | gtzan/genres/reggae/reggae.00091.au 893 | gtzan/genres/reggae/reggae.00092.au 894 | gtzan/genres/reggae/reggae.00093.au 895 | gtzan/genres/reggae/reggae.00094.au 896 | gtzan/genres/reggae/reggae.00095.au 897 | gtzan/genres/reggae/reggae.00096.au 898 | gtzan/genres/reggae/reggae.00097.au 899 | gtzan/genres/reggae/reggae.00098.au 900 | gtzan/genres/reggae/reggae.00099.au 901 | gtzan/genres/rock/rock.00000.au 902 | gtzan/genres/rock/rock.00001.au 903 | gtzan/genres/rock/rock.00002.au 904 | gtzan/genres/rock/rock.00003.au 905 | gtzan/genres/rock/rock.00004.au 906 | gtzan/genres/rock/rock.00005.au 907 | gtzan/genres/rock/rock.00006.au 908 | gtzan/genres/rock/rock.00007.au 909 | gtzan/genres/rock/rock.00008.au 910 | gtzan/genres/rock/rock.00009.au 911 | gtzan/genres/rock/rock.00010.au 912 | gtzan/genres/rock/rock.00011.au 913 | gtzan/genres/rock/rock.00012.au 914 | gtzan/genres/rock/rock.00013.au 915 | gtzan/genres/rock/rock.00014.au 916 | gtzan/genres/rock/rock.00015.au 917 | gtzan/genres/rock/rock.00016.au 918 | gtzan/genres/rock/rock.00017.au 919 | gtzan/genres/rock/rock.00018.au 920 | gtzan/genres/rock/rock.00019.au 921 | gtzan/genres/rock/rock.00020.au 922 | gtzan/genres/rock/rock.00021.au 923 | gtzan/genres/rock/rock.00022.au 924 | gtzan/genres/rock/rock.00023.au 925 | gtzan/genres/rock/rock.00024.au 926 | gtzan/genres/rock/rock.00025.au 927 | gtzan/genres/rock/rock.00026.au 928 | gtzan/genres/rock/rock.00027.au 929 | gtzan/genres/rock/rock.00028.au 930 | gtzan/genres/rock/rock.00029.au 931 | gtzan/genres/rock/rock.00030.au 932 | gtzan/genres/rock/rock.00031.au 933 | gtzan/genres/rock/rock.00032.au 934 | gtzan/genres/rock/rock.00033.au 935 | gtzan/genres/rock/rock.00034.au 936 | gtzan/genres/rock/rock.00035.au 937 | gtzan/genres/rock/rock.00036.au 938 | gtzan/genres/rock/rock.00037.au 939 | gtzan/genres/rock/rock.00038.au 940 | gtzan/genres/rock/rock.00039.au 941 | gtzan/genres/rock/rock.00040.au 942 | gtzan/genres/rock/rock.00041.au 943 | gtzan/genres/rock/rock.00042.au 944 | gtzan/genres/rock/rock.00043.au 945 | gtzan/genres/rock/rock.00044.au 946 | gtzan/genres/rock/rock.00045.au 947 | gtzan/genres/rock/rock.00046.au 948 | gtzan/genres/rock/rock.00047.au 949 | gtzan/genres/rock/rock.00048.au 950 | gtzan/genres/rock/rock.00049.au 951 | gtzan/genres/rock/rock.00050.au 952 | gtzan/genres/rock/rock.00051.au 953 | gtzan/genres/rock/rock.00052.au 954 | gtzan/genres/rock/rock.00053.au 955 | gtzan/genres/rock/rock.00054.au 956 | gtzan/genres/rock/rock.00055.au 957 | gtzan/genres/rock/rock.00056.au 958 | gtzan/genres/rock/rock.00057.au 959 | gtzan/genres/rock/rock.00058.au 960 | gtzan/genres/rock/rock.00059.au 961 | gtzan/genres/rock/rock.00060.au 962 | gtzan/genres/rock/rock.00061.au 963 | gtzan/genres/rock/rock.00062.au 964 | gtzan/genres/rock/rock.00063.au 965 | gtzan/genres/rock/rock.00064.au 966 | gtzan/genres/rock/rock.00065.au 967 | gtzan/genres/rock/rock.00066.au 968 | gtzan/genres/rock/rock.00067.au 969 | gtzan/genres/rock/rock.00068.au 970 | gtzan/genres/rock/rock.00069.au 971 | gtzan/genres/rock/rock.00070.au 972 | gtzan/genres/rock/rock.00071.au 973 | gtzan/genres/rock/rock.00072.au 974 | gtzan/genres/rock/rock.00073.au 975 | gtzan/genres/rock/rock.00074.au 976 | gtzan/genres/rock/rock.00075.au 977 | gtzan/genres/rock/rock.00076.au 978 | gtzan/genres/rock/rock.00077.au 979 | gtzan/genres/rock/rock.00078.au 980 | gtzan/genres/rock/rock.00079.au 981 | gtzan/genres/rock/rock.00080.au 982 | gtzan/genres/rock/rock.00081.au 983 | gtzan/genres/rock/rock.00082.au 984 | gtzan/genres/rock/rock.00083.au 985 | gtzan/genres/rock/rock.00084.au 986 | gtzan/genres/rock/rock.00085.au 987 | gtzan/genres/rock/rock.00086.au 988 | gtzan/genres/rock/rock.00087.au 989 | gtzan/genres/rock/rock.00088.au 990 | gtzan/genres/rock/rock.00089.au 991 | gtzan/genres/rock/rock.00090.au 992 | gtzan/genres/rock/rock.00091.au 993 | gtzan/genres/rock/rock.00092.au 994 | gtzan/genres/rock/rock.00093.au 995 | gtzan/genres/rock/rock.00094.au 996 | gtzan/genres/rock/rock.00095.au 997 | gtzan/genres/rock/rock.00096.au 998 | gtzan/genres/rock/rock.00097.au 999 | gtzan/genres/rock/rock.00098.au 1000 | gtzan/genres/rock/rock.00099.au 1001 | -------------------------------------------------------------------------------- /demo/data/output/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore -------------------------------------------------------------------------------- /demo/models/.gitignore: -------------------------------------------------------------------------------- 1 | resnet50-* 2 | -------------------------------------------------------------------------------- /demo/models/cifar10-architecture.json: -------------------------------------------------------------------------------- 1 | {"class_name": "Sequential", "config": [{"class_name": "Conv2D", "config": {"name": "conv2d_1", "trainable": true, "batch_input_shape": [null, 96, 1366, 1], "dtype": "float32", "filters": 32, "kernel_size": [3, 3], "strides": [1, 1], "padding": "same", "data_format": "channels_last", "dilation_rate": [1, 1], "activation": "linear", "use_bias": true, "kernel_initializer": {"class_name": "VarianceScaling", "config": {"scale": 1.0, "mode": "fan_avg", "distribution": "uniform", "seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": null, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}}, {"class_name": "BatchNormalization", "config": {"name": "batch_normalization_1", "trainable": true, "axis": 3, "momentum": 0.99, "epsilon": 0.001, "center": true, "scale": true, "beta_initializer": {"class_name": "Zeros", "config": {}}, "gamma_initializer": {"class_name": "Ones", "config": {}}, "moving_mean_initializer": {"class_name": "Zeros", "config": {}}, "moving_variance_initializer": {"class_name": "Ones", "config": {}}, "beta_regularizer": null, "gamma_regularizer": null, "beta_constraint": null, "gamma_constraint": null}}, {"class_name": "Activation", "config": {"name": "activation_1", "trainable": true, "activation": "elu"}}, {"class_name": "MaxPooling2D", "config": {"name": "max_pooling2d_1", "trainable": true, "pool_size": [2, 4], "padding": "valid", "strides": [2, 4], "data_format": "channels_last"}}, {"class_name": "Conv2D", "config": {"name": "conv2d_2", "trainable": true, "filters": 32, "kernel_size": [3, 3], "strides": [1, 1], "padding": "same", "data_format": "channels_last", "dilation_rate": [1, 1], "activation": "linear", "use_bias": true, "kernel_initializer": {"class_name": "VarianceScaling", "config": {"scale": 1.0, "mode": "fan_avg", "distribution": "uniform", "seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": null, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}}, {"class_name": "BatchNormalization", "config": {"name": "batch_normalization_2", "trainable": true, "axis": 3, "momentum": 0.99, "epsilon": 0.001, "center": true, "scale": true, "beta_initializer": {"class_name": "Zeros", "config": {}}, "gamma_initializer": {"class_name": "Ones", "config": {}}, "moving_mean_initializer": {"class_name": "Zeros", "config": {}}, "moving_variance_initializer": {"class_name": "Ones", "config": {}}, "beta_regularizer": null, "gamma_regularizer": null, "beta_constraint": null, "gamma_constraint": null}}, {"class_name": "Activation", "config": {"name": "activation_2", "trainable": true, "activation": "elu"}}, {"class_name": "MaxPooling2D", "config": {"name": "max_pooling2d_2", "trainable": true, "pool_size": [2, 4], "padding": "valid", "strides": [2, 4], "data_format": "channels_last"}}, {"class_name": "Dropout", "config": {"name": "dropout_1", "trainable": true, "rate": 0.25, "noise_shape": null, "seed": null}}, {"class_name": "Conv2D", "config": {"name": "conv2d_3", "trainable": true, "batch_input_shape": [null, 96, 1366, 1], "dtype": "float32", "filters": 64, "kernel_size": [3, 3], "strides": [1, 1], "padding": "same", "data_format": "channels_last", "dilation_rate": [1, 1], "activation": "linear", "use_bias": true, "kernel_initializer": {"class_name": "VarianceScaling", "config": {"scale": 1.0, "mode": "fan_avg", "distribution": "uniform", "seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": null, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}}, {"class_name": "BatchNormalization", "config": {"name": "batch_normalization_3", "trainable": true, "axis": 3, "momentum": 0.99, "epsilon": 0.001, "center": true, "scale": true, "beta_initializer": {"class_name": "Zeros", "config": {}}, "gamma_initializer": {"class_name": "Ones", "config": {}}, "moving_mean_initializer": {"class_name": "Zeros", "config": {}}, "moving_variance_initializer": {"class_name": "Ones", "config": {}}, "beta_regularizer": null, "gamma_regularizer": null, "beta_constraint": null, "gamma_constraint": null}}, {"class_name": "Activation", "config": {"name": "activation_3", "trainable": true, "activation": "elu"}}, {"class_name": "MaxPooling2D", "config": {"name": "max_pooling2d_3", "trainable": true, "pool_size": [2, 4], "padding": "valid", "strides": [2, 4], "data_format": "channels_last"}}, {"class_name": "Conv2D", "config": {"name": "conv2d_4", "trainable": true, "filters": 128, "kernel_size": [3, 3], "strides": [1, 1], "padding": "same", "data_format": "channels_last", "dilation_rate": [1, 1], "activation": "linear", "use_bias": true, "kernel_initializer": {"class_name": "VarianceScaling", "config": {"scale": 1.0, "mode": "fan_avg", "distribution": "uniform", "seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": null, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}}, {"class_name": "BatchNormalization", "config": {"name": "batch_normalization_4", "trainable": true, "axis": 3, "momentum": 0.99, "epsilon": 0.001, "center": true, "scale": true, "beta_initializer": {"class_name": "Zeros", "config": {}}, "gamma_initializer": {"class_name": "Ones", "config": {}}, "moving_mean_initializer": {"class_name": "Zeros", "config": {}}, "moving_variance_initializer": {"class_name": "Ones", "config": {}}, "beta_regularizer": null, "gamma_regularizer": null, "beta_constraint": null, "gamma_constraint": null}}, {"class_name": "Activation", "config": {"name": "activation_4", "trainable": true, "activation": "elu"}}, {"class_name": "MaxPooling2D", "config": {"name": "max_pooling2d_4", "trainable": true, "pool_size": [3, 5], "padding": "valid", "strides": [3, 5], "data_format": "channels_last"}}, {"class_name": "Conv2D", "config": {"name": "conv2d_5", "trainable": true, "filters": 256, "kernel_size": [3, 3], "strides": [1, 1], "padding": "same", "data_format": "channels_last", "dilation_rate": [1, 1], "activation": "linear", "use_bias": true, "kernel_initializer": {"class_name": "VarianceScaling", "config": {"scale": 1.0, "mode": "fan_avg", "distribution": "uniform", "seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": null, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}}, {"class_name": "BatchNormalization", "config": {"name": "batch_normalization_5", "trainable": true, "axis": 3, "momentum": 0.99, "epsilon": 0.001, "center": true, "scale": true, "beta_initializer": {"class_name": "Zeros", "config": {}}, "gamma_initializer": {"class_name": "Ones", "config": {}}, "moving_mean_initializer": {"class_name": "Zeros", "config": {}}, "moving_variance_initializer": {"class_name": "Ones", "config": {}}, "beta_regularizer": null, "gamma_regularizer": null, "beta_constraint": null, "gamma_constraint": null}}, {"class_name": "Activation", "config": {"name": "activation_5", "trainable": true, "activation": "elu"}}, {"class_name": "MaxPooling2D", "config": {"name": "max_pooling2d_5", "trainable": true, "pool_size": [4, 4], "padding": "valid", "strides": [4, 4], "data_format": "channels_last"}}, {"class_name": "Dropout", "config": {"name": "dropout_2", "trainable": true, "rate": 0.25, "noise_shape": null, "seed": null}}, {"class_name": "Flatten", "config": {"name": "flatten_1", "trainable": true}}, {"class_name": "Dense", "config": {"name": "dense_1", "trainable": true, "units": 512, "activation": "linear", "use_bias": true, "kernel_initializer": {"class_name": "VarianceScaling", "config": {"scale": 1.0, "mode": "fan_avg", "distribution": "uniform", "seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": null, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}}, {"class_name": "Activation", "config": {"name": "activation_6", "trainable": true, "activation": "elu"}}, {"class_name": "Dropout", "config": {"name": "dropout_3", "trainable": true, "rate": 0.5, "noise_shape": null, "seed": null}}, {"class_name": "Dense", "config": {"name": "dense_2", "trainable": true, "units": 10, "activation": "linear", "use_bias": true, "kernel_initializer": {"class_name": "VarianceScaling", "config": {"scale": 1.0, "mode": "fan_avg", "distribution": "uniform", "seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": null, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}}, {"class_name": "Activation", "config": {"name": "activation_7", "trainable": true, "activation": "softmax"}}], "keras_version": "2.1.4", "backend": "tensorflow"} -------------------------------------------------------------------------------- /demo/models/cifar10-config.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chen0040/keras-audio/c34c30695169e0f274c0f3d175dba2b4c9dc301a/demo/models/cifar10-config.npy -------------------------------------------------------------------------------- /demo/models/cifar10-history.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chen0040/keras-audio/c34c30695169e0f274c0f3d175dba2b4c9dc301a/demo/models/cifar10-history.npy -------------------------------------------------------------------------------- /demo/models/cifar10-weights.h5: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chen0040/keras-audio/c34c30695169e0f274c0f3d175dba2b4c9dc301a/demo/models/cifar10-weights.h5 -------------------------------------------------------------------------------- /demo/models/resnet-v2-architecture.json: -------------------------------------------------------------------------------- 1 | {"class_name": "Model", "config": {"name": "model_1", "layers": [{"name": "input_1", "class_name": "InputLayer", "config": {"batch_input_shape": [null, 96, 1366, 1], "dtype": "float32", "sparse": false, "name": "input_1"}, "inbound_nodes": []}, {"name": "conv2d_1", "class_name": "Conv2D", "config": {"name": "conv2d_1", "trainable": true, "filters": 32, "kernel_size": [3, 3], "strides": [1, 1], "padding": "same", "data_format": "channels_last", "dilation_rate": [1, 1], "activation": "linear", "use_bias": true, "kernel_initializer": {"class_name": "VarianceScaling", "config": {"scale": 1.0, "mode": "fan_avg", "distribution": "uniform", "seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": null, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "inbound_nodes": [[["input_1", 0, 0, {}]]]}, {"name": "max_pooling2d_1", "class_name": "MaxPooling2D", "config": {"name": "max_pooling2d_1", "trainable": true, "pool_size": [2, 2], "padding": "same", "strides": [2, 2], "data_format": "channels_last"}, "inbound_nodes": [[["conv2d_1", 0, 0, {}]]]}, {"name": "batch_normalization_1", "class_name": "BatchNormalization", "config": {"name": "batch_normalization_1", "trainable": true, "axis": -1, "momentum": 0.99, "epsilon": 0.001, "center": true, "scale": true, "beta_initializer": {"class_name": "Zeros", "config": {}}, "gamma_initializer": {"class_name": "Ones", "config": {}}, "moving_mean_initializer": {"class_name": "Zeros", "config": {}}, "moving_variance_initializer": {"class_name": "Ones", "config": {}}, "beta_regularizer": null, "gamma_regularizer": null, "beta_constraint": null, "gamma_constraint": null}, "inbound_nodes": [[["max_pooling2d_1", 0, 0, {}]]]}, {"name": "activation_1", "class_name": "Activation", "config": {"name": "activation_1", "trainable": true, "activation": "relu"}, "inbound_nodes": [[["batch_normalization_1", 0, 0, {}]]]}, {"name": "conv2d_2", "class_name": "Conv2D", "config": {"name": "conv2d_2", "trainable": true, "filters": 32, "kernel_size": [3, 3], "strides": [1, 1], "padding": "same", "data_format": "channels_last", "dilation_rate": [1, 1], "activation": "linear", "use_bias": true, "kernel_initializer": {"class_name": "VarianceScaling", "config": {"scale": 1.0, "mode": "fan_avg", "distribution": "uniform", "seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": null, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "inbound_nodes": [[["activation_1", 0, 0, {}]]]}, {"name": "batch_normalization_2", "class_name": "BatchNormalization", "config": {"name": "batch_normalization_2", "trainable": true, "axis": -1, "momentum": 0.99, "epsilon": 0.001, "center": true, "scale": true, "beta_initializer": {"class_name": "Zeros", "config": {}}, "gamma_initializer": {"class_name": "Ones", "config": {}}, "moving_mean_initializer": {"class_name": "Zeros", "config": {}}, "moving_variance_initializer": {"class_name": "Ones", "config": {}}, "beta_regularizer": null, "gamma_regularizer": null, "beta_constraint": null, "gamma_constraint": null}, "inbound_nodes": [[["conv2d_2", 0, 0, {}]]]}, {"name": "activation_2", "class_name": "Activation", "config": {"name": "activation_2", "trainable": true, "activation": "relu"}, "inbound_nodes": [[["batch_normalization_2", 0, 0, {}]]]}, {"name": "conv2d_3", "class_name": "Conv2D", "config": {"name": "conv2d_3", "trainable": true, "filters": 32, "kernel_size": [3, 3], "strides": [1, 1], "padding": "same", "data_format": "channels_last", "dilation_rate": [1, 1], "activation": "linear", "use_bias": true, "kernel_initializer": {"class_name": "VarianceScaling", "config": {"scale": 1.0, "mode": "fan_avg", "distribution": "uniform", "seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": null, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "inbound_nodes": [[["activation_2", 0, 0, {}]]]}, {"name": "add_1", "class_name": "Add", "config": {"name": "add_1", "trainable": true}, "inbound_nodes": [[["conv2d_3", 0, 0, {}], ["max_pooling2d_1", 0, 0, {}]]]}, {"name": "batch_normalization_3", "class_name": "BatchNormalization", "config": {"name": "batch_normalization_3", "trainable": true, "axis": -1, "momentum": 0.99, "epsilon": 0.001, "center": true, "scale": true, "beta_initializer": {"class_name": "Zeros", "config": {}}, "gamma_initializer": {"class_name": "Ones", "config": {}}, "moving_mean_initializer": {"class_name": "Zeros", "config": {}}, "moving_variance_initializer": {"class_name": "Ones", "config": {}}, "beta_regularizer": null, "gamma_regularizer": null, "beta_constraint": null, "gamma_constraint": null}, "inbound_nodes": [[["add_1", 0, 0, {}]]]}, {"name": "activation_3", "class_name": "Activation", "config": {"name": "activation_3", "trainable": true, "activation": "relu"}, "inbound_nodes": [[["batch_normalization_3", 0, 0, {}]]]}, {"name": "conv2d_4", "class_name": "Conv2D", "config": {"name": "conv2d_4", "trainable": true, "filters": 32, "kernel_size": [3, 3], "strides": [1, 1], "padding": "same", "data_format": "channels_last", "dilation_rate": [1, 1], "activation": "linear", "use_bias": true, "kernel_initializer": {"class_name": "VarianceScaling", "config": {"scale": 1.0, "mode": "fan_avg", "distribution": "uniform", "seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": null, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "inbound_nodes": [[["activation_3", 0, 0, {}]]]}, {"name": "batch_normalization_4", "class_name": "BatchNormalization", "config": {"name": "batch_normalization_4", "trainable": true, "axis": -1, "momentum": 0.99, "epsilon": 0.001, "center": true, "scale": true, "beta_initializer": {"class_name": "Zeros", "config": {}}, "gamma_initializer": {"class_name": "Ones", "config": {}}, "moving_mean_initializer": {"class_name": "Zeros", "config": {}}, "moving_variance_initializer": {"class_name": "Ones", "config": {}}, "beta_regularizer": null, "gamma_regularizer": null, "beta_constraint": null, "gamma_constraint": null}, "inbound_nodes": [[["conv2d_4", 0, 0, {}]]]}, {"name": "activation_4", "class_name": "Activation", "config": {"name": "activation_4", "trainable": true, "activation": "relu"}, "inbound_nodes": [[["batch_normalization_4", 0, 0, {}]]]}, {"name": "conv2d_5", "class_name": "Conv2D", "config": {"name": "conv2d_5", "trainable": true, "filters": 32, "kernel_size": [3, 3], "strides": [1, 1], "padding": "same", "data_format": "channels_last", "dilation_rate": [1, 1], "activation": "linear", "use_bias": true, "kernel_initializer": {"class_name": "VarianceScaling", "config": {"scale": 1.0, "mode": "fan_avg", "distribution": "uniform", "seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": null, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "inbound_nodes": [[["activation_4", 0, 0, {}]]]}, {"name": "add_2", "class_name": "Add", "config": {"name": "add_2", "trainable": true}, "inbound_nodes": [[["conv2d_5", 0, 0, {}], ["add_1", 0, 0, {}]]]}, {"name": "batch_normalization_5", "class_name": "BatchNormalization", "config": {"name": "batch_normalization_5", "trainable": true, "axis": -1, "momentum": 0.99, "epsilon": 0.001, "center": true, "scale": true, "beta_initializer": {"class_name": "Zeros", "config": {}}, "gamma_initializer": {"class_name": "Ones", "config": {}}, "moving_mean_initializer": {"class_name": "Zeros", "config": {}}, "moving_variance_initializer": {"class_name": "Ones", "config": {}}, "beta_regularizer": null, "gamma_regularizer": null, "beta_constraint": null, "gamma_constraint": null}, "inbound_nodes": [[["add_2", 0, 0, {}]]]}, {"name": "activation_5", "class_name": "Activation", "config": {"name": "activation_5", "trainable": true, "activation": "relu"}, "inbound_nodes": [[["batch_normalization_5", 0, 0, {}]]]}, {"name": "conv2d_6", "class_name": "Conv2D", "config": {"name": "conv2d_6", "trainable": true, "filters": 32, "kernel_size": [3, 3], "strides": [1, 1], "padding": "same", "data_format": "channels_last", "dilation_rate": [1, 1], "activation": "linear", "use_bias": true, "kernel_initializer": {"class_name": "VarianceScaling", "config": {"scale": 1.0, "mode": "fan_avg", "distribution": "uniform", "seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": null, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "inbound_nodes": [[["activation_5", 0, 0, {}]]]}, {"name": "batch_normalization_6", "class_name": "BatchNormalization", "config": {"name": "batch_normalization_6", "trainable": true, "axis": -1, "momentum": 0.99, "epsilon": 0.001, "center": true, "scale": true, "beta_initializer": {"class_name": "Zeros", "config": {}}, "gamma_initializer": {"class_name": "Ones", "config": {}}, "moving_mean_initializer": {"class_name": "Zeros", "config": {}}, "moving_variance_initializer": {"class_name": "Ones", "config": {}}, "beta_regularizer": null, "gamma_regularizer": null, "beta_constraint": null, "gamma_constraint": null}, "inbound_nodes": [[["conv2d_6", 0, 0, {}]]]}, {"name": "activation_6", "class_name": "Activation", "config": {"name": "activation_6", "trainable": true, "activation": "relu"}, "inbound_nodes": [[["batch_normalization_6", 0, 0, {}]]]}, {"name": "conv2d_7", "class_name": "Conv2D", "config": {"name": "conv2d_7", "trainable": true, "filters": 32, "kernel_size": [3, 3], "strides": [1, 1], "padding": "same", "data_format": "channels_last", "dilation_rate": [1, 1], "activation": "linear", "use_bias": true, "kernel_initializer": {"class_name": "VarianceScaling", "config": {"scale": 1.0, "mode": "fan_avg", "distribution": "uniform", "seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": null, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "inbound_nodes": [[["activation_6", 0, 0, {}]]]}, {"name": "add_3", "class_name": "Add", "config": {"name": "add_3", "trainable": true}, "inbound_nodes": [[["conv2d_7", 0, 0, {}], ["add_2", 0, 0, {}]]]}, {"name": "conv2d_8", "class_name": "Conv2D", "config": {"name": "conv2d_8", "trainable": true, "filters": 64, "kernel_size": [3, 3], "strides": [2, 2], "padding": "same", "data_format": "channels_last", "dilation_rate": [1, 1], "activation": "elu", "use_bias": true, "kernel_initializer": {"class_name": "VarianceScaling", "config": {"scale": 1.0, "mode": "fan_avg", "distribution": "uniform", "seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": null, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "inbound_nodes": [[["add_3", 0, 0, {}]]]}, {"name": "batch_normalization_7", "class_name": "BatchNormalization", "config": {"name": "batch_normalization_7", "trainable": true, "axis": -1, "momentum": 0.99, "epsilon": 0.001, "center": true, "scale": true, "beta_initializer": {"class_name": "Zeros", "config": {}}, "gamma_initializer": {"class_name": "Ones", "config": {}}, "moving_mean_initializer": {"class_name": "Zeros", "config": {}}, "moving_variance_initializer": {"class_name": "Ones", "config": {}}, "beta_regularizer": null, "gamma_regularizer": null, "beta_constraint": null, "gamma_constraint": null}, "inbound_nodes": [[["conv2d_8", 0, 0, {}]]]}, {"name": "activation_7", "class_name": "Activation", "config": {"name": "activation_7", "trainable": true, "activation": "relu"}, "inbound_nodes": [[["batch_normalization_7", 0, 0, {}]]]}, {"name": "conv2d_9", "class_name": "Conv2D", "config": {"name": "conv2d_9", "trainable": true, "filters": 64, "kernel_size": [3, 3], "strides": [1, 1], "padding": "same", "data_format": "channels_last", "dilation_rate": [1, 1], "activation": "linear", "use_bias": true, "kernel_initializer": {"class_name": "VarianceScaling", "config": {"scale": 1.0, "mode": "fan_avg", "distribution": "uniform", "seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": null, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "inbound_nodes": [[["activation_7", 0, 0, {}]]]}, {"name": "batch_normalization_8", "class_name": "BatchNormalization", "config": {"name": "batch_normalization_8", "trainable": true, "axis": -1, "momentum": 0.99, "epsilon": 0.001, "center": true, "scale": true, "beta_initializer": {"class_name": "Zeros", "config": {}}, "gamma_initializer": {"class_name": "Ones", "config": {}}, "moving_mean_initializer": {"class_name": "Zeros", "config": {}}, "moving_variance_initializer": {"class_name": "Ones", "config": {}}, "beta_regularizer": null, "gamma_regularizer": null, "beta_constraint": null, "gamma_constraint": null}, "inbound_nodes": [[["conv2d_9", 0, 0, {}]]]}, {"name": "activation_8", "class_name": "Activation", "config": {"name": "activation_8", "trainable": true, "activation": "relu"}, "inbound_nodes": [[["batch_normalization_8", 0, 0, {}]]]}, {"name": "conv2d_10", "class_name": "Conv2D", "config": {"name": "conv2d_10", "trainable": true, "filters": 64, "kernel_size": [3, 3], "strides": [1, 1], "padding": "same", "data_format": "channels_last", "dilation_rate": [1, 1], "activation": "linear", "use_bias": true, "kernel_initializer": {"class_name": "VarianceScaling", "config": {"scale": 1.0, "mode": "fan_avg", "distribution": "uniform", "seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": null, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "inbound_nodes": [[["activation_8", 0, 0, {}]]]}, {"name": "add_4", "class_name": "Add", "config": {"name": "add_4", "trainable": true}, "inbound_nodes": [[["conv2d_10", 0, 0, {}], ["conv2d_8", 0, 0, {}]]]}, {"name": "batch_normalization_9", "class_name": "BatchNormalization", "config": {"name": "batch_normalization_9", "trainable": true, "axis": -1, "momentum": 0.99, "epsilon": 0.001, "center": true, "scale": true, "beta_initializer": {"class_name": "Zeros", "config": {}}, "gamma_initializer": {"class_name": "Ones", "config": {}}, "moving_mean_initializer": {"class_name": "Zeros", "config": {}}, "moving_variance_initializer": {"class_name": "Ones", "config": {}}, "beta_regularizer": null, "gamma_regularizer": null, "beta_constraint": null, "gamma_constraint": null}, "inbound_nodes": [[["add_4", 0, 0, {}]]]}, {"name": "activation_9", "class_name": "Activation", "config": {"name": "activation_9", "trainable": true, "activation": "relu"}, "inbound_nodes": [[["batch_normalization_9", 0, 0, {}]]]}, {"name": "conv2d_11", "class_name": "Conv2D", "config": {"name": "conv2d_11", "trainable": true, "filters": 64, "kernel_size": [3, 3], "strides": [1, 1], "padding": "same", "data_format": "channels_last", "dilation_rate": [1, 1], "activation": "linear", "use_bias": true, "kernel_initializer": {"class_name": "VarianceScaling", "config": {"scale": 1.0, "mode": "fan_avg", "distribution": "uniform", "seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": null, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "inbound_nodes": [[["activation_9", 0, 0, {}]]]}, {"name": "batch_normalization_10", "class_name": "BatchNormalization", "config": {"name": "batch_normalization_10", "trainable": true, "axis": -1, "momentum": 0.99, "epsilon": 0.001, "center": true, "scale": true, "beta_initializer": {"class_name": "Zeros", "config": {}}, "gamma_initializer": {"class_name": "Ones", "config": {}}, "moving_mean_initializer": {"class_name": "Zeros", "config": {}}, "moving_variance_initializer": {"class_name": "Ones", "config": {}}, "beta_regularizer": null, "gamma_regularizer": null, "beta_constraint": null, "gamma_constraint": null}, "inbound_nodes": [[["conv2d_11", 0, 0, {}]]]}, {"name": "activation_10", "class_name": "Activation", "config": {"name": "activation_10", "trainable": true, "activation": "relu"}, "inbound_nodes": [[["batch_normalization_10", 0, 0, {}]]]}, {"name": "conv2d_12", "class_name": "Conv2D", "config": {"name": "conv2d_12", "trainable": true, "filters": 64, "kernel_size": [3, 3], "strides": [1, 1], "padding": "same", "data_format": "channels_last", "dilation_rate": [1, 1], "activation": "linear", "use_bias": true, "kernel_initializer": {"class_name": "VarianceScaling", "config": {"scale": 1.0, "mode": "fan_avg", "distribution": "uniform", "seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": null, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "inbound_nodes": [[["activation_10", 0, 0, {}]]]}, {"name": "add_5", "class_name": "Add", "config": {"name": "add_5", "trainable": true}, "inbound_nodes": [[["conv2d_12", 0, 0, {}], ["add_4", 0, 0, {}]]]}, {"name": "batch_normalization_11", "class_name": "BatchNormalization", "config": {"name": "batch_normalization_11", "trainable": true, "axis": -1, "momentum": 0.99, "epsilon": 0.001, "center": true, "scale": true, "beta_initializer": {"class_name": "Zeros", "config": {}}, "gamma_initializer": {"class_name": "Ones", "config": {}}, "moving_mean_initializer": {"class_name": "Zeros", "config": {}}, "moving_variance_initializer": {"class_name": "Ones", "config": {}}, "beta_regularizer": null, "gamma_regularizer": null, "beta_constraint": null, "gamma_constraint": null}, "inbound_nodes": [[["add_5", 0, 0, {}]]]}, {"name": "activation_11", "class_name": "Activation", "config": {"name": "activation_11", "trainable": true, "activation": "relu"}, "inbound_nodes": [[["batch_normalization_11", 0, 0, {}]]]}, {"name": "conv2d_13", "class_name": "Conv2D", "config": {"name": "conv2d_13", "trainable": true, "filters": 64, "kernel_size": [3, 3], "strides": [1, 1], "padding": "same", "data_format": "channels_last", "dilation_rate": [1, 1], "activation": "linear", "use_bias": true, "kernel_initializer": {"class_name": "VarianceScaling", "config": {"scale": 1.0, "mode": "fan_avg", "distribution": "uniform", "seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": null, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "inbound_nodes": [[["activation_11", 0, 0, {}]]]}, {"name": "batch_normalization_12", "class_name": "BatchNormalization", "config": {"name": "batch_normalization_12", "trainable": true, "axis": -1, "momentum": 0.99, "epsilon": 0.001, "center": true, "scale": true, "beta_initializer": {"class_name": "Zeros", "config": {}}, "gamma_initializer": {"class_name": "Ones", "config": {}}, "moving_mean_initializer": {"class_name": "Zeros", "config": {}}, "moving_variance_initializer": {"class_name": "Ones", "config": {}}, "beta_regularizer": null, "gamma_regularizer": null, "beta_constraint": null, "gamma_constraint": null}, "inbound_nodes": [[["conv2d_13", 0, 0, {}]]]}, {"name": "activation_12", "class_name": "Activation", "config": {"name": "activation_12", "trainable": true, "activation": "relu"}, "inbound_nodes": [[["batch_normalization_12", 0, 0, {}]]]}, {"name": "conv2d_14", "class_name": "Conv2D", "config": {"name": "conv2d_14", "trainable": true, "filters": 64, "kernel_size": [3, 3], "strides": [1, 1], "padding": "same", "data_format": "channels_last", "dilation_rate": [1, 1], "activation": "linear", "use_bias": true, "kernel_initializer": {"class_name": "VarianceScaling", "config": {"scale": 1.0, "mode": "fan_avg", "distribution": "uniform", "seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": null, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "inbound_nodes": [[["activation_12", 0, 0, {}]]]}, {"name": "add_6", "class_name": "Add", "config": {"name": "add_6", "trainable": true}, "inbound_nodes": [[["conv2d_14", 0, 0, {}], ["add_5", 0, 0, {}]]]}, {"name": "conv2d_15", "class_name": "Conv2D", "config": {"name": "conv2d_15", "trainable": true, "filters": 128, "kernel_size": [3, 3], "strides": [2, 2], "padding": "same", "data_format": "channels_last", "dilation_rate": [1, 1], "activation": "elu", "use_bias": true, "kernel_initializer": {"class_name": "VarianceScaling", "config": {"scale": 1.0, "mode": "fan_avg", "distribution": "uniform", "seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": null, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "inbound_nodes": [[["add_6", 0, 0, {}]]]}, {"name": "batch_normalization_13", "class_name": "BatchNormalization", "config": {"name": "batch_normalization_13", "trainable": true, "axis": -1, "momentum": 0.99, "epsilon": 0.001, "center": true, "scale": true, "beta_initializer": {"class_name": "Zeros", "config": {}}, "gamma_initializer": {"class_name": "Ones", "config": {}}, "moving_mean_initializer": {"class_name": "Zeros", "config": {}}, "moving_variance_initializer": {"class_name": "Ones", "config": {}}, "beta_regularizer": null, "gamma_regularizer": null, "beta_constraint": null, "gamma_constraint": null}, "inbound_nodes": [[["conv2d_15", 0, 0, {}]]]}, {"name": "activation_13", "class_name": "Activation", "config": {"name": "activation_13", "trainable": true, "activation": "relu"}, "inbound_nodes": [[["batch_normalization_13", 0, 0, {}]]]}, {"name": "conv2d_16", "class_name": "Conv2D", "config": {"name": "conv2d_16", "trainable": true, "filters": 128, "kernel_size": [3, 3], "strides": [1, 1], "padding": "same", "data_format": "channels_last", "dilation_rate": [1, 1], "activation": "linear", "use_bias": true, "kernel_initializer": {"class_name": "VarianceScaling", "config": {"scale": 1.0, "mode": "fan_avg", "distribution": "uniform", "seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": null, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "inbound_nodes": [[["activation_13", 0, 0, {}]]]}, {"name": "batch_normalization_14", "class_name": "BatchNormalization", "config": {"name": "batch_normalization_14", "trainable": true, "axis": -1, "momentum": 0.99, "epsilon": 0.001, "center": true, "scale": true, "beta_initializer": {"class_name": "Zeros", "config": {}}, "gamma_initializer": {"class_name": "Ones", "config": {}}, "moving_mean_initializer": {"class_name": "Zeros", "config": {}}, "moving_variance_initializer": {"class_name": "Ones", "config": {}}, "beta_regularizer": null, "gamma_regularizer": null, "beta_constraint": null, "gamma_constraint": null}, "inbound_nodes": [[["conv2d_16", 0, 0, {}]]]}, {"name": "activation_14", "class_name": "Activation", "config": {"name": "activation_14", "trainable": true, "activation": "relu"}, "inbound_nodes": [[["batch_normalization_14", 0, 0, {}]]]}, {"name": "conv2d_17", "class_name": "Conv2D", "config": {"name": "conv2d_17", "trainable": true, "filters": 128, "kernel_size": [3, 3], "strides": [1, 1], "padding": "same", "data_format": "channels_last", "dilation_rate": [1, 1], "activation": "linear", "use_bias": true, "kernel_initializer": {"class_name": "VarianceScaling", "config": {"scale": 1.0, "mode": "fan_avg", "distribution": "uniform", "seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": null, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "inbound_nodes": [[["activation_14", 0, 0, {}]]]}, {"name": "add_7", "class_name": "Add", "config": {"name": "add_7", "trainable": true}, "inbound_nodes": [[["conv2d_17", 0, 0, {}], ["conv2d_15", 0, 0, {}]]]}, {"name": "batch_normalization_15", "class_name": "BatchNormalization", "config": {"name": "batch_normalization_15", "trainable": true, "axis": -1, "momentum": 0.99, "epsilon": 0.001, "center": true, "scale": true, "beta_initializer": {"class_name": "Zeros", "config": {}}, "gamma_initializer": {"class_name": "Ones", "config": {}}, "moving_mean_initializer": {"class_name": "Zeros", "config": {}}, "moving_variance_initializer": {"class_name": "Ones", "config": {}}, "beta_regularizer": null, "gamma_regularizer": null, "beta_constraint": null, "gamma_constraint": null}, "inbound_nodes": [[["add_7", 0, 0, {}]]]}, {"name": "activation_15", "class_name": "Activation", "config": {"name": "activation_15", "trainable": true, "activation": "relu"}, "inbound_nodes": [[["batch_normalization_15", 0, 0, {}]]]}, {"name": "conv2d_18", "class_name": "Conv2D", "config": {"name": "conv2d_18", "trainable": true, "filters": 128, "kernel_size": [3, 3], "strides": [1, 1], "padding": "same", "data_format": "channels_last", "dilation_rate": [1, 1], "activation": "linear", "use_bias": true, "kernel_initializer": {"class_name": "VarianceScaling", "config": {"scale": 1.0, "mode": "fan_avg", "distribution": "uniform", "seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": null, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "inbound_nodes": [[["activation_15", 0, 0, {}]]]}, {"name": "batch_normalization_16", "class_name": "BatchNormalization", "config": {"name": "batch_normalization_16", "trainable": true, "axis": -1, "momentum": 0.99, "epsilon": 0.001, "center": true, "scale": true, "beta_initializer": {"class_name": "Zeros", "config": {}}, "gamma_initializer": {"class_name": "Ones", "config": {}}, "moving_mean_initializer": {"class_name": "Zeros", "config": {}}, "moving_variance_initializer": {"class_name": "Ones", "config": {}}, "beta_regularizer": null, "gamma_regularizer": null, "beta_constraint": null, "gamma_constraint": null}, "inbound_nodes": [[["conv2d_18", 0, 0, {}]]]}, {"name": "activation_16", "class_name": "Activation", "config": {"name": "activation_16", "trainable": true, "activation": "relu"}, "inbound_nodes": [[["batch_normalization_16", 0, 0, {}]]]}, {"name": "conv2d_19", "class_name": "Conv2D", "config": {"name": "conv2d_19", "trainable": true, "filters": 128, "kernel_size": [3, 3], "strides": [1, 1], "padding": "same", "data_format": "channels_last", "dilation_rate": [1, 1], "activation": "linear", "use_bias": true, "kernel_initializer": {"class_name": "VarianceScaling", "config": {"scale": 1.0, "mode": "fan_avg", "distribution": "uniform", "seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": null, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "inbound_nodes": [[["activation_16", 0, 0, {}]]]}, {"name": "add_8", "class_name": "Add", "config": {"name": "add_8", "trainable": true}, "inbound_nodes": [[["conv2d_19", 0, 0, {}], ["add_7", 0, 0, {}]]]}, {"name": "batch_normalization_17", "class_name": "BatchNormalization", "config": {"name": "batch_normalization_17", "trainable": true, "axis": -1, "momentum": 0.99, "epsilon": 0.001, "center": true, "scale": true, "beta_initializer": {"class_name": "Zeros", "config": {}}, "gamma_initializer": {"class_name": "Ones", "config": {}}, "moving_mean_initializer": {"class_name": "Zeros", "config": {}}, "moving_variance_initializer": {"class_name": "Ones", "config": {}}, "beta_regularizer": null, "gamma_regularizer": null, "beta_constraint": null, "gamma_constraint": null}, "inbound_nodes": [[["add_8", 0, 0, {}]]]}, {"name": "activation_17", "class_name": "Activation", "config": {"name": "activation_17", "trainable": true, "activation": "relu"}, "inbound_nodes": [[["batch_normalization_17", 0, 0, {}]]]}, {"name": "conv2d_20", "class_name": "Conv2D", "config": {"name": "conv2d_20", "trainable": true, "filters": 128, "kernel_size": [3, 3], "strides": [1, 1], "padding": "same", "data_format": "channels_last", "dilation_rate": [1, 1], "activation": "linear", "use_bias": true, "kernel_initializer": {"class_name": "VarianceScaling", "config": {"scale": 1.0, "mode": "fan_avg", "distribution": "uniform", "seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": null, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "inbound_nodes": [[["activation_17", 0, 0, {}]]]}, {"name": "batch_normalization_18", "class_name": "BatchNormalization", "config": {"name": "batch_normalization_18", "trainable": true, "axis": -1, "momentum": 0.99, "epsilon": 0.001, "center": true, "scale": true, "beta_initializer": {"class_name": "Zeros", "config": {}}, "gamma_initializer": {"class_name": "Ones", "config": {}}, "moving_mean_initializer": {"class_name": "Zeros", "config": {}}, "moving_variance_initializer": {"class_name": "Ones", "config": {}}, "beta_regularizer": null, "gamma_regularizer": null, "beta_constraint": null, "gamma_constraint": null}, "inbound_nodes": [[["conv2d_20", 0, 0, {}]]]}, {"name": "activation_18", "class_name": "Activation", "config": {"name": "activation_18", "trainable": true, "activation": "relu"}, "inbound_nodes": [[["batch_normalization_18", 0, 0, {}]]]}, {"name": "conv2d_21", "class_name": "Conv2D", "config": {"name": "conv2d_21", "trainable": true, "filters": 128, "kernel_size": [3, 3], "strides": [1, 1], "padding": "same", "data_format": "channels_last", "dilation_rate": [1, 1], "activation": "linear", "use_bias": true, "kernel_initializer": {"class_name": "VarianceScaling", "config": {"scale": 1.0, "mode": "fan_avg", "distribution": "uniform", "seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": null, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "inbound_nodes": [[["activation_18", 0, 0, {}]]]}, {"name": "add_9", "class_name": "Add", "config": {"name": "add_9", "trainable": true}, "inbound_nodes": [[["conv2d_21", 0, 0, {}], ["add_8", 0, 0, {}]]]}, {"name": "global_average_pooling2d_1", "class_name": "GlobalAveragePooling2D", "config": {"name": "global_average_pooling2d_1", "trainable": true, "data_format": "channels_last"}, "inbound_nodes": [[["add_9", 0, 0, {}]]]}, {"name": "dense_1", "class_name": "Dense", "config": {"name": "dense_1", "trainable": true, "units": 10, "activation": "softmax", "use_bias": true, "kernel_initializer": {"class_name": "VarianceScaling", "config": {"scale": 1.0, "mode": "fan_avg", "distribution": "uniform", "seed": null}}, "bias_initializer": {"class_name": "Zeros", "config": {}}, "kernel_regularizer": null, "bias_regularizer": null, "activity_regularizer": null, "kernel_constraint": null, "bias_constraint": null}, "inbound_nodes": [[["global_average_pooling2d_1", 0, 0, {}]]]}], "input_layers": [["input_1", 0, 0]], "output_layers": [["dense_1", 0, 0]]}, "keras_version": "2.1.4", "backend": "tensorflow"} -------------------------------------------------------------------------------- /demo/models/resnet-v2-config.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chen0040/keras-audio/c34c30695169e0f274c0f3d175dba2b4c9dc301a/demo/models/resnet-v2-config.npy -------------------------------------------------------------------------------- /demo/models/resnet-v2-history.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chen0040/keras-audio/c34c30695169e0f274c0f3d175dba2b4c9dc301a/demo/models/resnet-v2-history.npy -------------------------------------------------------------------------------- /demo/models/resnet-v2-weights.h5: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chen0040/keras-audio/c34c30695169e0f274c0f3d175dba2b4c9dc301a/demo/models/resnet-v2-weights.h5 -------------------------------------------------------------------------------- /demo/models/tensorflow_models/cifar10/cifar10.pb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chen0040/keras-audio/c34c30695169e0f274c0f3d175dba2b4c9dc301a/demo/models/tensorflow_models/cifar10/cifar10.pb -------------------------------------------------------------------------------- /demo/models/training-history-comparison.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chen0040/keras-audio/c34c30695169e0f274c0f3d175dba2b4c9dc301a/demo/models/training-history-comparison.png -------------------------------------------------------------------------------- /demo/resnet50_predict.py: -------------------------------------------------------------------------------- 1 | from random import shuffle 2 | 3 | from keras_audio.library.resnet50 import ResNet50AudioClassifier 4 | from keras_audio.library.utility.gtzan_loader import download_gtzan_genres_if_not_found, gtzan_labels 5 | 6 | 7 | def load_audio_path_label_pairs(max_allowed_pairs=None): 8 | download_gtzan_genres_if_not_found('./very_large_data/gtzan') 9 | audio_paths = [] 10 | with open('./data/lists/test_songs_gtzan_list.txt', 'rt') as file: 11 | for line in file: 12 | audio_path = './very_large_data/' + line.strip() 13 | audio_paths.append(audio_path) 14 | pairs = [] 15 | with open('./data/lists/test_gt_gtzan_list.txt', 'rt') as file: 16 | for line in file: 17 | label = int(line) 18 | if max_allowed_pairs is None or len(pairs) < max_allowed_pairs: 19 | pairs.append((audio_paths[len(pairs)], label)) 20 | else: 21 | break 22 | return pairs 23 | 24 | 25 | def main(): 26 | audio_path_label_pairs = load_audio_path_label_pairs() 27 | shuffle(audio_path_label_pairs) 28 | print('loaded: ', len(audio_path_label_pairs)) 29 | 30 | classifier = ResNet50AudioClassifier() 31 | classifier.load_model(model_dir_path='./models') 32 | 33 | for i in range(0, 20): 34 | audio_path, actual_label_id = audio_path_label_pairs[i] 35 | predicted_label_id = classifier.predict_class(audio_path) 36 | print(audio_path) 37 | predicted_label = gtzan_labels[predicted_label_id] 38 | actual_label = gtzan_labels[actual_label_id] 39 | 40 | print('predicted: ', predicted_label, 'actual: ', actual_label) 41 | 42 | 43 | if __name__ == '__main__': 44 | main() 45 | -------------------------------------------------------------------------------- /demo/resnet50_train.py: -------------------------------------------------------------------------------- 1 | from keras_audio.library.resnet50 import ResNet50AudioClassifier 2 | from keras_audio.library.utility.gtzan_loader import download_gtzan_genres_if_not_found 3 | 4 | 5 | def load_audio_path_label_pairs(max_allowed_pairs=None): 6 | download_gtzan_genres_if_not_found('./very_large_data/gtzan') 7 | audio_paths = [] 8 | with open('./data/lists/test_songs_gtzan_list.txt', 'rt') as file: 9 | for line in file: 10 | audio_path = './very_large_data/' + line.strip() 11 | audio_paths.append(audio_path) 12 | pairs = [] 13 | with open('./data/lists/test_gt_gtzan_list.txt', 'rt') as file: 14 | for line in file: 15 | label = int(line) 16 | if max_allowed_pairs is None or len(pairs) < max_allowed_pairs: 17 | pairs.append((audio_paths[len(pairs)], label)) 18 | else: 19 | break 20 | return pairs 21 | 22 | 23 | def main(): 24 | audio_path_label_pairs = load_audio_path_label_pairs() 25 | print('loaded: ', len(audio_path_label_pairs)) 26 | 27 | classifier = ResNet50AudioClassifier() 28 | batch_size = 2 29 | epochs = 10 30 | history = classifier.fit(audio_path_label_pairs, model_dir_path='./models', batch_size=batch_size, epochs=epochs) 31 | 32 | 33 | if __name__ == '__main__': 34 | main() 35 | -------------------------------------------------------------------------------- /demo/resnet_v2_predict.py: -------------------------------------------------------------------------------- 1 | from random import shuffle 2 | 3 | from keras_audio.library.resnet_v2 import ResNetV2AudioClassifier 4 | from keras_audio.library.utility.gtzan_loader import download_gtzan_genres_if_not_found, gtzan_labels 5 | 6 | 7 | def load_audio_path_label_pairs(max_allowed_pairs=None): 8 | download_gtzan_genres_if_not_found('./very_large_data/gtzan') 9 | audio_paths = [] 10 | with open('./data/lists/test_songs_gtzan_list.txt', 'rt') as file: 11 | for line in file: 12 | audio_path = './very_large_data/' + line.strip() 13 | audio_paths.append(audio_path) 14 | pairs = [] 15 | with open('./data/lists/test_gt_gtzan_list.txt', 'rt') as file: 16 | for line in file: 17 | label = int(line) 18 | if max_allowed_pairs is None or len(pairs) < max_allowed_pairs: 19 | pairs.append((audio_paths[len(pairs)], label)) 20 | else: 21 | break 22 | return pairs 23 | 24 | 25 | def main(): 26 | audio_path_label_pairs = load_audio_path_label_pairs() 27 | shuffle(audio_path_label_pairs) 28 | print('loaded: ', len(audio_path_label_pairs)) 29 | 30 | classifier = ResNetV2AudioClassifier() 31 | classifier.load_model(model_dir_path='./models') 32 | 33 | for i in range(0, 20): 34 | audio_path, actual_label_id = audio_path_label_pairs[i] 35 | predicted_label_id = classifier.predict_class(audio_path) 36 | print(audio_path) 37 | predicted_label = gtzan_labels[predicted_label_id] 38 | actual_label = gtzan_labels[actual_label_id] 39 | 40 | print('predicted: ', predicted_label, 'actual: ', actual_label) 41 | 42 | 43 | if __name__ == '__main__': 44 | main() 45 | -------------------------------------------------------------------------------- /demo/resnet_v2_train.py: -------------------------------------------------------------------------------- 1 | from keras_audio.library.resnet_v2 import ResNetV2AudioClassifier 2 | from keras_audio.library.utility.gtzan_loader import download_gtzan_genres_if_not_found 3 | 4 | 5 | def load_audio_path_label_pairs(max_allowed_pairs=None): 6 | download_gtzan_genres_if_not_found('./very_large_data/gtzan') 7 | audio_paths = [] 8 | with open('./data/lists/test_songs_gtzan_list.txt', 'rt') as file: 9 | for line in file: 10 | audio_path = './very_large_data/' + line.strip() 11 | audio_paths.append(audio_path) 12 | pairs = [] 13 | with open('./data/lists/test_gt_gtzan_list.txt', 'rt') as file: 14 | for line in file: 15 | label = int(line) 16 | if max_allowed_pairs is None or len(pairs) < max_allowed_pairs: 17 | pairs.append((audio_paths[len(pairs)], label)) 18 | else: 19 | break 20 | return pairs 21 | 22 | 23 | def main(): 24 | audio_path_label_pairs = load_audio_path_label_pairs() 25 | print('loaded: ', len(audio_path_label_pairs)) 26 | 27 | classifier = ResNetV2AudioClassifier() 28 | batch_size = 8 29 | epochs = 100 30 | history = classifier.fit(audio_path_label_pairs, model_dir_path='./models', batch_size=batch_size, epochs=epochs) 31 | 32 | 33 | if __name__ == '__main__': 34 | main() 35 | -------------------------------------------------------------------------------- /demo/utility/gtzan_loader.py: -------------------------------------------------------------------------------- 1 | from keras_audio.library.utility.audio_utils import compute_melgram 2 | from keras_audio.library.utility.gtzan_loader import download_gtzan_genres_if_not_found 3 | import numpy as np 4 | 5 | def load_audio_path_label_pairs(max_allowed_pairs=None): 6 | download_gtzan_genres_if_not_found('../very_large_data/gtzan') 7 | audio_paths = [] 8 | with open('../data/lists/test_songs_gtzan_list.txt', 'rt') as file: 9 | for line in file: 10 | audio_path = '../very_large_data/' + line.strip() 11 | audio_paths.append(audio_path) 12 | pairs = [] 13 | with open('../data/lists/test_gt_gtzan_list.txt', 'rt') as file: 14 | for line in file: 15 | label = int(line) 16 | if max_allowed_pairs is None or len(pairs) < max_allowed_pairs: 17 | pairs.append((audio_paths[len(pairs)], label)) 18 | else: 19 | break 20 | return pairs 21 | 22 | 23 | def main(): 24 | pairs = load_audio_path_label_pairs() 25 | for index, (audio_path, _) in enumerate(pairs): 26 | print('{} / {} ...'.format(index+1, len(pairs))) 27 | mg = compute_melgram(audio_path) 28 | print('max: ', np.max(mg)) 29 | print('min: ', np.min(mg)) 30 | 31 | 32 | 33 | if __name__ == '__main__': 34 | main() 35 | -------------------------------------------------------------------------------- /demo/utility/melgram.py: -------------------------------------------------------------------------------- 1 | import os 2 | import matplotlib 3 | 4 | from keras_audio.library.utility.audio_utils import compute_melgram 5 | 6 | matplotlib.use('Agg') # No pictures displayed 7 | import pylab 8 | from matplotlib import pyplot as plt 9 | import librosa 10 | import librosa.display 11 | import numpy as np 12 | 13 | 14 | def melgram_v1(audio_file_path, to_file): 15 | sig, fs = librosa.load(audio_file_path) 16 | 17 | pylab.axis('off') # no axis 18 | pylab.axes([0., 0., 1., 1.], frameon=False, xticks=[], yticks=[]) # Remove the white edge 19 | S = librosa.feature.melspectrogram(y=sig, sr=fs) 20 | librosa.display.specshow(librosa.power_to_db(S, ref=np.max)) 21 | pylab.savefig(to_file, bbox_inches=None, pad_inches=0) 22 | pylab.close() 23 | 24 | 25 | def melgram_v2(audio_file_path): 26 | # Load sound file 27 | y, sr = librosa.load(audio_file_path) 28 | 29 | # Let's make and display a mel-scaled power (energy-squared) spectrogram 30 | S = librosa.feature.melspectrogram(y, sr=sr, n_mels=128) 31 | 32 | # Convert to log scale (dB). We'll use the peak power as reference. 33 | log_S = librosa.core.amplitude_to_db(S, ref=np.max) 34 | 35 | # Make a new figure 36 | plt.figure(figsize=(12, 4)) 37 | 38 | # Display the spectrogram on a mel scale 39 | # sample rate and hop length parameters are used to render the time axis 40 | librosa.display.specshow(log_S, sr=sr, x_axis='time', y_axis='mel') 41 | 42 | # Put a descriptive title on the plot 43 | plt.title('mel power spectrogram') 44 | 45 | # draw a color bar 46 | plt.colorbar(format='%+02.0f dB') 47 | 48 | # Make the figure layout compact 49 | plt.tight_layout() 50 | plt.show() 51 | 52 | 53 | def main(): 54 | audio_file_path = '../data/audio_samples/example.mp3' 55 | # melgram_v1(audio_file_path, '../data/output/example_mp3.png') 56 | # melgram_v2(audio_file_path) 57 | arr = compute_melgram(audio_file_path) 58 | print('melgram: ', arr.shape) 59 | 60 | 61 | if __name__ == '__main__': 62 | main() 63 | -------------------------------------------------------------------------------- /demo/very_large_data/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !gtzan 3 | !.gitignore -------------------------------------------------------------------------------- /demo/very_large_data/gtzan/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore -------------------------------------------------------------------------------- /keras_audio/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chen0040/keras-audio/c34c30695169e0f274c0f3d175dba2b4c9dc301a/keras_audio/__init__.py -------------------------------------------------------------------------------- /keras_audio/library/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chen0040/keras-audio/c34c30695169e0f274c0f3d175dba2b4c9dc301a/keras_audio/library/__init__.py -------------------------------------------------------------------------------- /keras_audio/library/cifar10.py: -------------------------------------------------------------------------------- 1 | from keras.callbacks import ModelCheckpoint 2 | from lru import LRU 3 | 4 | import keras.backend as K 5 | import tensorflow as tf 6 | from keras.callbacks import ModelCheckpoint 7 | from keras.layers import Dense, Activation, BatchNormalization, Flatten, Conv2D, \ 8 | MaxPooling2D, Dropout 9 | from keras.models import Sequential 10 | from keras.utils import np_utils 11 | from sklearn.model_selection import train_test_split 12 | 13 | from keras_audio.library.resnets_utils import * 14 | from keras_audio.library.utility.audio_utils import compute_melgram 15 | 16 | 17 | def cifar10(input_shape, nb_classes): 18 | channel_axis = 3 19 | freq_axis = 1 20 | time_axis = 2 21 | 22 | model = Sequential() 23 | model.add(Conv2D(filters=32, input_shape=input_shape, padding='same', kernel_size=(3, 3))) 24 | model.add(BatchNormalization(axis=channel_axis)) 25 | model.add(Activation('elu')) 26 | model.add(MaxPooling2D(pool_size=(2, 4))) 27 | 28 | model.add(Conv2D(filters=32, padding='same', kernel_size=(3, 3))) 29 | model.add(BatchNormalization(axis=channel_axis)) 30 | model.add(Activation('elu')) 31 | model.add(MaxPooling2D(pool_size=(2, 4))) 32 | 33 | model.add(Dropout(rate=0.25)) 34 | 35 | model.add(Conv2D(filters=64, kernel_size=(3, 3), padding='same', input_shape=input_shape)) 36 | model.add(BatchNormalization(axis=channel_axis)) 37 | model.add(Activation('elu')) 38 | model.add(MaxPooling2D(pool_size=(2, 4))) 39 | 40 | model.add(Conv2D(filters=128, padding='same', kernel_size=(3, 3))) 41 | model.add(BatchNormalization(axis=channel_axis)) 42 | model.add(Activation('elu')) 43 | model.add(MaxPooling2D(pool_size=(3, 5))) 44 | 45 | model.add(Conv2D(filters=256, padding='same', kernel_size=(3, 3))) 46 | model.add(BatchNormalization(axis=channel_axis)) 47 | model.add(Activation('elu')) 48 | model.add(MaxPooling2D(pool_size=(4, 4))) 49 | 50 | model.add(Dropout(rate=0.25)) 51 | 52 | model.add(Flatten()) 53 | model.add(Dense(units=512)) 54 | model.add(Activation('elu')) 55 | model.add(Dropout(rate=0.5)) 56 | model.add(Dense(units=nb_classes)) 57 | model.add(Activation('softmax')) 58 | 59 | model.compile(optimizer='rmsprop', loss='categorical_crossentropy', metrics=['accuracy']) 60 | 61 | return model 62 | 63 | 64 | class Cifar10AudioClassifier(object): 65 | model_name = 'cifar10' 66 | 67 | def __init__(self): 68 | self.cache = LRU(400) 69 | self.input_shape = None 70 | self.nb_classes = None 71 | self.model = None 72 | self.config = None 73 | 74 | def create_model(self): 75 | self.model = cifar10(input_shape=self.input_shape, nb_classes=self.nb_classes) 76 | self.model.compile(optimizer='adam', loss='categorical_crossentropy', metrics=['accuracy']) 77 | 78 | print(self.model.summary()) 79 | 80 | @staticmethod 81 | def get_config_file_path(model_dir_path): 82 | return os.path.join(model_dir_path, Cifar10AudioClassifier.model_name + '-config.npy') 83 | 84 | @staticmethod 85 | def get_architecture_file_path(model_dir_path): 86 | return os.path.join(model_dir_path, Cifar10AudioClassifier.model_name + '-architecture.json') 87 | 88 | @staticmethod 89 | def get_weight_file_path(model_dir_path): 90 | return os.path.join(model_dir_path, Cifar10AudioClassifier.model_name + '-weights.h5') 91 | 92 | def load_model(self, model_dir_path): 93 | config_file_path = Cifar10AudioClassifier.get_config_file_path(model_dir_path) 94 | weight_file_path = Cifar10AudioClassifier.get_weight_file_path(model_dir_path) 95 | self.config = np.load(config_file_path).item() 96 | self.input_shape = self.config['input_shape'] 97 | self.nb_classes = self.config['nb_classes'] 98 | self.create_model() 99 | self.model.load_weights(weight_file_path) 100 | 101 | def compute_melgram(self, audio_path): 102 | if audio_path in self.cache: 103 | return self.cache[audio_path] 104 | else: 105 | mg = compute_melgram(audio_path) 106 | # mg = (mg + 100) / 200 # scale the values 107 | self.cache[audio_path] = mg 108 | return mg 109 | 110 | def generate_batch(self, audio_paths, labels, batch_size): 111 | num_batches = len(audio_paths) // batch_size 112 | while True: 113 | for batchIdx in range(0, num_batches): 114 | start = batchIdx * batch_size 115 | end = (batchIdx + 1) * batch_size 116 | 117 | X = np.zeros(shape=(batch_size, self.input_shape[0], self.input_shape[1], self.input_shape[2]), dtype=np.float32) 118 | for i in range(start, end): 119 | audio_path = audio_paths[i] 120 | mg = compute_melgram(audio_path) 121 | X[i - start, :, :, :] = mg 122 | yield X, labels[start:end] 123 | 124 | def fit(self, audio_path_label_pairs, model_dir_path, batch_size=None, epochs=None, test_size=None, 125 | random_state=None, input_shape=None, nb_classes=None): 126 | if batch_size is None: 127 | batch_size = 64 128 | if epochs is None: 129 | epochs = 20 130 | if test_size is None: 131 | test_size = 0.2 132 | if random_state is None: 133 | random_state = 42 134 | if input_shape is None: 135 | input_shape = (96, 1366, 1) 136 | if nb_classes is None: 137 | nb_classes = 10 138 | 139 | config_file_path = Cifar10AudioClassifier.get_config_file_path(model_dir_path) 140 | weight_file_path = Cifar10AudioClassifier.get_weight_file_path(model_dir_path) 141 | architecture_file_path = Cifar10AudioClassifier.get_architecture_file_path(model_dir_path) 142 | 143 | self.input_shape = input_shape 144 | self.nb_classes = nb_classes 145 | 146 | self.config = dict() 147 | self.config['input_shape'] = input_shape 148 | self.config['nb_classes'] = nb_classes 149 | np.save(config_file_path, self.config) 150 | 151 | self.create_model() 152 | 153 | with open(architecture_file_path, 'wt') as file: 154 | file.write(self.model.to_json()) 155 | 156 | checkpoint = ModelCheckpoint(weight_file_path) 157 | 158 | X = [] 159 | Y = [] 160 | 161 | for audio_path, label in audio_path_label_pairs: 162 | X.append(audio_path) 163 | Y.append(label) 164 | 165 | X = np.array(X) 166 | Y = np.array(Y) 167 | 168 | Y = np_utils.to_categorical(Y, self.nb_classes) 169 | 170 | Xtrain, Xtest, Ytrain, Ytest = train_test_split(X, Y, test_size=test_size, random_state=random_state) 171 | 172 | train_gen = self.generate_batch(Xtrain, Ytrain, batch_size) 173 | test_gen = self.generate_batch(Xtest, Ytest, batch_size) 174 | 175 | train_num_batches = len(Xtrain) // batch_size 176 | test_num_batches = len(Xtest) // batch_size 177 | 178 | history = self.model.fit_generator(generator=train_gen, steps_per_epoch=train_num_batches, 179 | epochs=epochs, 180 | verbose=1, validation_data=test_gen, validation_steps=test_num_batches, 181 | callbacks=[checkpoint]) 182 | self.model.save_weights(weight_file_path) 183 | 184 | np.save(os.path.join(model_dir_path, Cifar10AudioClassifier.model_name + '-history.npy'), history.history) 185 | return history 186 | 187 | def predict(self, audio_path): 188 | mg = compute_melgram(audio_path) 189 | mg = np.expand_dims(mg, axis=0) 190 | return self.model.predict(mg)[0] 191 | 192 | def predict_class(self, audio_path): 193 | predicted = self.predict(audio_path) 194 | return np.argmax(predicted) 195 | 196 | def export_tensorflow_model(self, output_fld, output_model_file=None, 197 | output_graphdef_file=None, 198 | num_output=None, 199 | quantize=False, 200 | save_output_graphdef_file=False, 201 | output_node_prefix=None): 202 | 203 | K.set_learning_phase(0) 204 | 205 | if output_model_file is None: 206 | output_model_file = Cifar10AudioClassifier.model_name + '.pb' 207 | 208 | if output_graphdef_file is None: 209 | output_graphdef_file = 'model.ascii' 210 | if num_output is None: 211 | num_output = 1 212 | if output_node_prefix is None: 213 | output_node_prefix = 'output_node' 214 | 215 | pred = [None] * num_output 216 | pred_node_names = [None] * num_output 217 | for i in range(num_output): 218 | pred_node_names[i] = output_node_prefix + str(i) 219 | pred[i] = tf.identity(self.model.outputs[i], name=pred_node_names[i]) 220 | print('output nodes names are: ', pred_node_names) 221 | 222 | sess = K.get_session() 223 | 224 | if save_output_graphdef_file: 225 | tf.train.write_graph(sess.graph.as_graph_def(), output_fld, output_graphdef_file, as_text=True) 226 | print('saved the graph definition in ascii format at: ', output_graphdef_file) 227 | 228 | from tensorflow.python.framework import graph_util 229 | from tensorflow.python.framework import graph_io 230 | from tensorflow.tools.graph_transforms import TransformGraph 231 | if quantize: 232 | transforms = ["quantize_weights", "quantize_nodes"] 233 | transformed_graph_def = TransformGraph(sess.graph.as_graph_def(), [], pred_node_names, transforms) 234 | constant_graph = graph_util.convert_variables_to_constants(sess, transformed_graph_def, pred_node_names) 235 | else: 236 | constant_graph = graph_util.convert_variables_to_constants(sess, sess.graph.as_graph_def(), pred_node_names) 237 | graph_io.write_graph(constant_graph, output_fld, output_model_file, as_text=False) 238 | print('saved the freezed graph (ready for inference) at: ', output_model_file) -------------------------------------------------------------------------------- /keras_audio/library/resnet50.py: -------------------------------------------------------------------------------- 1 | from lru import LRU 2 | 3 | import keras.backend as K 4 | from keras.callbacks import ModelCheckpoint 5 | from keras.initializers import glorot_uniform 6 | from keras.layers import Input, Add, Dense, Activation, ZeroPadding2D, BatchNormalization, Flatten, Conv2D, \ 7 | AveragePooling2D, MaxPooling2D 8 | from keras.models import Model 9 | from keras.utils import np_utils 10 | from sklearn.model_selection import train_test_split 11 | 12 | from keras_audio.library.resnets_utils import * 13 | from keras_audio.library.resnets_utils import convert_to_one_hot, load_dataset 14 | from keras_audio.library.utility.audio_utils import compute_melgram 15 | 16 | 17 | def identity_block(X, f, filters, stage, block): 18 | """ 19 | Implementation of the identity block as defined in Figure 3 20 | 21 | Arguments: 22 | X -- input tensor of shape (m, n_H_prev, n_W_prev, n_C_prev) 23 | f -- integer, specifying the shape of the middle CONV's window for the main path 24 | filters -- python list of integers, defining the number of filters in the CONV layers of the main path 25 | stage -- integer, used to name the layers, depending on their position in the network 26 | block -- string/character, used to name the layers, depending on their position in the network 27 | 28 | Returns: 29 | X -- output of the identity block, tensor of shape (n_H, n_W, n_C) 30 | """ 31 | 32 | # defining name basis 33 | conv_name_base = 'res' + str(stage) + block + '_branch' 34 | bn_name_base = 'bn' + str(stage) + block + '_branch' 35 | 36 | # Retrieve Filters 37 | F1, F2, F3 = filters 38 | 39 | # Save the input value. You'll need this later to add back to the main path. 40 | X_shortcut = X 41 | 42 | # First component of main path 43 | X = Conv2D(filters=F1, kernel_size=(1, 1), strides=(1, 1), padding='valid', name=conv_name_base + '2a', 44 | kernel_initializer=glorot_uniform(seed=0))(X) 45 | X = BatchNormalization(axis=3, name=bn_name_base + '2a')(X) 46 | X = Activation('elu')(X) 47 | 48 | # Second component of main path (≈3 lines) 49 | X = Conv2D(filters=F2, kernel_size=(f, f), strides=(1, 1), padding='same', name=conv_name_base + '2b', 50 | kernel_initializer=glorot_uniform(seed=0))(X) 51 | X = BatchNormalization(axis=3, name=bn_name_base + '2b')(X) 52 | X = Activation('elu')(X) 53 | 54 | # Third component of main path (≈2 lines) 55 | X = Conv2D(filters=F3, kernel_size=(1, 1), strides=(1, 1), padding='valid', name=conv_name_base + '2c', 56 | kernel_initializer=glorot_uniform(seed=0))(X) 57 | X = BatchNormalization(axis=3, name=bn_name_base + '2c')(X) 58 | 59 | # Final step: Add shortcut value to main path, and pass it through a RELU activation (≈2 lines) 60 | X = Add()([X, X_shortcut]) 61 | X = Activation('elu')(X) 62 | 63 | return X 64 | 65 | 66 | def identity_block_test(): 67 | tf.reset_default_graph() 68 | 69 | with tf.Session() as test: 70 | np.random.seed(1) 71 | A_prev = tf.placeholder("float", [3, 4, 4, 6]) 72 | X = np.random.randn(3, 4, 4, 6) 73 | A = identity_block(A_prev, f=2, filters=[2, 4, 6], stage=1, block='a') 74 | test.run(tf.global_variables_initializer()) 75 | out = test.run([A], feed_dict={A_prev: X, K.learning_phase(): 0}) 76 | print("out = " + str(out[0][1][1][0])) 77 | 78 | 79 | def convolutional_block(X, f, filters, stage, block, s=2): 80 | """ 81 | Implementation of the convolutional block as defined in Figure 4 82 | 83 | Arguments: 84 | X -- input tensor of shape (m, n_H_prev, n_W_prev, n_C_prev) 85 | f -- integer, specifying the shape of the middle CONV's window for the main path 86 | filters -- python list of integers, defining the number of filters in the CONV layers of the main path 87 | stage -- integer, used to name the layers, depending on their position in the network 88 | block -- string/character, used to name the layers, depending on their position in the network 89 | s -- Integer, specifying the stride to be used 90 | 91 | Returns: 92 | X -- output of the convolutional block, tensor of shape (n_H, n_W, n_C) 93 | """ 94 | 95 | # defining name basis 96 | conv_name_base = 'res' + str(stage) + block + '_branch' 97 | bn_name_base = 'bn' + str(stage) + block + '_branch' 98 | 99 | # Retrieve Filters 100 | F1, F2, F3 = filters 101 | 102 | # Save the input value 103 | X_shortcut = X 104 | 105 | # First component of main path 106 | X = Conv2D(F1, (1, 1), padding='valid', strides=(s, s), name=conv_name_base + '2a', 107 | kernel_initializer=glorot_uniform(seed=0))(X) 108 | X = BatchNormalization(axis=3, name=bn_name_base + '2a')(X) 109 | X = Activation('elu')(X) 110 | 111 | # Second component of main path (≈3 lines) 112 | X = Conv2D(F2, (f, f), padding='same', strides=(1, 1), name=conv_name_base + '2b', 113 | kernel_initializer=glorot_uniform(seed=0))(X) 114 | X = BatchNormalization(axis=3, name=bn_name_base + '2b')(X) 115 | X = Activation('elu')(X) 116 | 117 | # Third component of main path (≈2 lines) 118 | X = Conv2D(F3, (1, 1), padding='valid', strides=(1, 1), name=conv_name_base + '2c', 119 | kernel_initializer=glorot_uniform(seed=0))(X) 120 | X = BatchNormalization(axis=3, name=bn_name_base + '2c')(X) 121 | 122 | ##### SHORTCUT PATH #### (≈2 lines) 123 | X_shortcut = Conv2D(F3, (1, 1), padding='valid', strides=(s, s), name=conv_name_base + '1', 124 | kernel_initializer=glorot_uniform(seed=0))(X_shortcut) 125 | X_shortcut = BatchNormalization(axis=3, name=bn_name_base + '1')(X_shortcut) 126 | 127 | # Final step: Add shortcut value to main path, and pass it through a RELU activation (≈2 lines) 128 | X = Add()([X, X_shortcut]) 129 | X = Activation('elu')(X) 130 | 131 | return X 132 | 133 | 134 | def convolutional_block_test(): 135 | tf.reset_default_graph() 136 | 137 | with tf.Session() as test: 138 | np.random.seed(1) 139 | A_prev = tf.placeholder("float", [3, 4, 4, 6]) 140 | X = np.random.randn(3, 4, 4, 6) 141 | A = convolutional_block(A_prev, f=2, filters=[2, 4, 6], stage=1, block='a') 142 | test.run(tf.global_variables_initializer()) 143 | out = test.run([A], feed_dict={A_prev: X, K.learning_phase(): 0}) 144 | print("out = " + str(out[0][1][1][0])) 145 | 146 | 147 | def resnet_50(input_shape=(64, 64, 3), classes=6): 148 | """ 149 | Implementation of the popular ResNet50 the following architecture: 150 | CONV2D -> BATCHNORM -> RELU -> MAXPOOL -> CONVBLOCK -> IDBLOCK*2 -> CONVBLOCK -> IDBLOCK*3 151 | -> CONVBLOCK -> IDBLOCK*5 -> CONVBLOCK -> IDBLOCK*2 -> AVGPOOL -> TOPLAYER 152 | 153 | Arguments: 154 | input_shape -- shape of the images of the dataset 155 | classes -- integer, number of classes 156 | 157 | Returns: 158 | model -- a Model() instance in Keras 159 | """ 160 | 161 | # Define the input as a tensor with shape input_shape 162 | X_input = Input(input_shape) 163 | 164 | # Zero-Padding 165 | X = ZeroPadding2D((3, 3))(X_input) 166 | 167 | # Stage 1 168 | X = Conv2D(64, (7, 7), strides=(2, 2), name='conv1', kernel_initializer=glorot_uniform(seed=0))(X) 169 | X = BatchNormalization(axis=3, name='bn_conv1')(X) 170 | X = Activation('elu')(X) 171 | X = MaxPooling2D((3, 3), strides=(2, 2))(X) 172 | 173 | # Stage 2 174 | X = convolutional_block(X, f=3, filters=[64, 64, 256], stage=2, block='a', s=1) 175 | X = identity_block(X, 3, [64, 64, 256], stage=2, block='b') 176 | X = identity_block(X, 3, [64, 64, 256], stage=2, block='c') 177 | 178 | ### START CODE HERE ### 179 | 180 | # Stage 3 (≈4 lines) 181 | X = convolutional_block(X, f=3, filters=[128, 128, 512], stage=3, block='a', s=2) 182 | X = identity_block(X, 3, [128, 128, 512], stage=3, block='b') 183 | X = identity_block(X, 3, [128, 128, 512], stage=3, block='c') 184 | X = identity_block(X, 3, [128, 128, 512], stage=3, block='d') 185 | 186 | # Stage 4 (≈6 lines) 187 | X = convolutional_block(X, f=3, filters=[256, 256, 1024], stage=4, block='a', s=2) 188 | X = identity_block(X, 3, [256, 256, 1024], stage=4, block='b') 189 | X = identity_block(X, 3, [256, 256, 1024], stage=4, block='c') 190 | X = identity_block(X, 3, [256, 256, 1024], stage=4, block='d') 191 | X = identity_block(X, 3, [256, 256, 1024], stage=4, block='e') 192 | X = identity_block(X, 3, [256, 256, 1024], stage=4, block='f') 193 | 194 | # Stage 5 (≈3 lines) 195 | X = convolutional_block(X, f=3, filters=[512, 512, 2048], stage=5, block='a', s=2) 196 | X = identity_block(X, 3, [512, 512, 2048], stage=5, block='b') 197 | X = identity_block(X, 3, [512, 512, 2048], stage=5, block='c') 198 | 199 | # AVGPOOL (≈1 line). Use "X = AveragePooling2D(...)(X)" 200 | X = AveragePooling2D(pool_size=(2, 2), name='avg_pool')(X) 201 | 202 | # X = Dropout(rate=0.25)(X) 203 | 204 | ### END CODE HERE ### 205 | 206 | # output layer 207 | X = Flatten()(X) 208 | 209 | # X = Dense(units=512)(X) 210 | # X = Activation('elu')(X) 211 | 212 | X = Dense(classes, activation='softmax', name='fc' + str(classes), kernel_initializer=glorot_uniform(seed=0))(X) 213 | 214 | # Create model 215 | model = Model(inputs=X_input, outputs=X, name='ResNet50') 216 | 217 | return model 218 | 219 | 220 | def resnet_50_test(): 221 | model = resnet_50(input_shape=(64, 64, 3), classes=6) 222 | model.compile(optimizer='adam', loss='categorical_crossentropy', metrics=['accuracy']) 223 | 224 | dataset_dir_path = '../training/resnet_datasets' 225 | 226 | X_train_orig, Y_train_orig, X_test_orig, Y_test_orig, classes = load_dataset(dataset_dir_path) 227 | 228 | # Normalize image vectors 229 | X_train = X_train_orig / 255. 230 | X_test = X_test_orig / 255. 231 | 232 | # Convert training and test labels to one hot matrices 233 | Y_train = convert_to_one_hot(Y_train_orig, 6).T 234 | Y_test = convert_to_one_hot(Y_test_orig, 6).T 235 | 236 | print("number of training examples = " + str(X_train.shape[0])) 237 | print("number of test examples = " + str(X_test.shape[0])) 238 | print("X_train shape: " + str(X_train.shape)) 239 | print("Y_train shape: " + str(Y_train.shape)) 240 | print("X_test shape: " + str(X_test.shape)) 241 | print("Y_test shape: " + str(Y_test.shape)) 242 | 243 | model.fit(X_train, Y_train, epochs=2, batch_size=32) 244 | 245 | preds = model.evaluate(X_test, Y_test) 246 | print("Loss = " + str(preds[0])) 247 | print("Test Accuracy = " + str(preds[1])) 248 | 249 | 250 | class ResNet50AudioClassifier(object): 251 | model_name = 'resnet50' 252 | 253 | def __init__(self): 254 | self.cache = LRU(400) 255 | self.input_shape = None 256 | self.nb_classes = None 257 | self.model = None 258 | self.config = None 259 | 260 | def create_model(self): 261 | self.model = resnet_50(input_shape=self.input_shape, classes=self.nb_classes) 262 | self.model.compile(optimizer='adam', loss='categorical_crossentropy', metrics=['accuracy']) 263 | 264 | print(self.model.summary()) 265 | 266 | @staticmethod 267 | def get_config_file_path(model_dir_path): 268 | return os.path.join(model_dir_path, ResNet50AudioClassifier.model_name + '-config.npy') 269 | 270 | @staticmethod 271 | def get_architecture_file_path(model_dir_path): 272 | return os.path.join(model_dir_path, ResNet50AudioClassifier.model_name + '-architecture.json') 273 | 274 | @staticmethod 275 | def get_weight_file_path(model_dir_path): 276 | return os.path.join(model_dir_path, ResNet50AudioClassifier.model_name + '-weights.h5') 277 | 278 | def load_model(self, model_dir_path): 279 | config_file_path = ResNet50AudioClassifier.get_config_file_path(model_dir_path) 280 | weight_file_path = ResNet50AudioClassifier.get_weight_file_path(model_dir_path) 281 | self.config = np.load(config_file_path).item() 282 | self.input_shape = self.config['input_shape'] 283 | self.nb_classes = self.config['nb_classes'] 284 | self.create_model() 285 | self.model.load_weights(weight_file_path) 286 | 287 | def compute_melgram(self, audio_path): 288 | if audio_path in self.cache: 289 | return self.cache[audio_path] 290 | else: 291 | mg = compute_melgram(audio_path) 292 | # mg = (mg + 100) / 200 # scale the values 293 | self.cache[audio_path] = mg 294 | return mg 295 | 296 | def generate_batch(self, audio_paths, labels, batch_size): 297 | num_batches = len(audio_paths) // batch_size 298 | while True: 299 | for batchIdx in range(0, num_batches): 300 | start = batchIdx * batch_size 301 | end = (batchIdx + 1) * batch_size 302 | 303 | X = np.zeros(shape=(batch_size, self.input_shape[0], self.input_shape[1], self.input_shape[2]), dtype=np.float32) 304 | for i in range(start, end): 305 | audio_path = audio_paths[i] 306 | mg = compute_melgram(audio_path) 307 | X[i - start, :, :, :] = mg 308 | yield X, labels[start:end] 309 | 310 | def fit(self, audio_path_label_pairs, model_dir_path, batch_size=None, epochs=None, test_size=None, 311 | random_state=None, input_shape=None, nb_classes=None): 312 | if batch_size is None: 313 | batch_size = 64 314 | if epochs is None: 315 | epochs = 20 316 | if test_size is None: 317 | test_size = 0.2 318 | if random_state is None: 319 | random_state = 42 320 | if input_shape is None: 321 | input_shape = (96, 1366, 1) 322 | if nb_classes is None: 323 | nb_classes = 10 324 | 325 | config_file_path = ResNet50AudioClassifier.get_config_file_path(model_dir_path) 326 | weight_file_path = ResNet50AudioClassifier.get_weight_file_path(model_dir_path) 327 | architecture_file_path = ResNet50AudioClassifier.get_architecture_file_path(model_dir_path) 328 | 329 | self.input_shape = input_shape 330 | self.nb_classes = nb_classes 331 | 332 | self.config = dict() 333 | self.config['input_shape'] = input_shape 334 | self.config['nb_classes'] = nb_classes 335 | np.save(config_file_path, self.config) 336 | 337 | self.create_model() 338 | 339 | with open(architecture_file_path, 'wt') as file: 340 | file.write(self.model.to_json()) 341 | 342 | checkpoint = ModelCheckpoint(weight_file_path) 343 | 344 | X = [] 345 | Y = [] 346 | 347 | for audio_path, label in audio_path_label_pairs: 348 | X.append(audio_path) 349 | Y.append(label) 350 | 351 | X = np.array(X) 352 | Y = np.array(Y) 353 | 354 | Y = np_utils.to_categorical(Y, self.nb_classes) 355 | 356 | Xtrain, Xtest, Ytrain, Ytest = train_test_split(X, Y, test_size=test_size, random_state=random_state) 357 | 358 | train_gen = self.generate_batch(Xtrain, Ytrain, batch_size) 359 | test_gen = self.generate_batch(Xtest, Ytest, batch_size) 360 | 361 | train_num_batches = len(Xtrain) // batch_size 362 | test_num_batches = len(Xtest) // batch_size 363 | 364 | history = self.model.fit_generator(generator=train_gen, steps_per_epoch=train_num_batches, 365 | epochs=epochs, 366 | verbose=1, validation_data=test_gen, validation_steps=test_num_batches, 367 | callbacks=[checkpoint]) 368 | self.model.save_weights(weight_file_path) 369 | 370 | np.save(os.path.join(model_dir_path, ResNet50AudioClassifier.model_name + '-history.npy'), history.history) 371 | return history 372 | 373 | def predict(self, audio_path): 374 | mg = compute_melgram(audio_path) 375 | mg = np.expand_dims(mg, axis=0) 376 | return self.model.predict(mg)[0] 377 | 378 | def predict_class(self, audio_path): 379 | predicted = self.predict(audio_path) 380 | return np.argmax(predicted) 381 | 382 | 383 | def main(): 384 | identity_block_test() 385 | convolutional_block_test() 386 | resnet_50_test() 387 | 388 | 389 | if __name__ == '__main__': 390 | main() 391 | -------------------------------------------------------------------------------- /keras_audio/library/resnet_v2.py: -------------------------------------------------------------------------------- 1 | from keras import Model 2 | from keras.callbacks import ModelCheckpoint 3 | from keras.layers import BatchNormalization, Input, Activation, Conv2D, MaxPooling2D, Add, GlobalAveragePooling2D, Dense 4 | import os 5 | import numpy as np 6 | from lru import LRU 7 | 8 | from keras.utils import np_utils 9 | from sklearn.model_selection import train_test_split 10 | 11 | from keras_audio.library.utility.audio_utils import compute_melgram 12 | 13 | 14 | def block(filters, inp): 15 | inp = inp 16 | layer_1 = BatchNormalization()(inp) 17 | act_1 = Activation('relu')(layer_1) 18 | conv_1 = Conv2D(filters, (3, 3), padding='same')(act_1) 19 | layer_2 = BatchNormalization()(conv_1) 20 | act_2 = Activation('relu')(layer_2) 21 | conv_2 = Conv2D(filters, (3, 3), padding='same')(act_2) 22 | return (conv_2) 23 | 24 | 25 | def resnet(input_shape, classes): 26 | filters = [32, 64, 128] 27 | 28 | input_img = Input(input_shape) 29 | 30 | x = Conv2D(filters[0], (3, 3), padding='same')(input_img) 31 | y = MaxPooling2D(padding='same')(x) 32 | x = Add()([block(filters[0], y), y]) 33 | y = Add()([block(filters[0], x), x]) 34 | x = Add()([block(filters[0], y), y]) 35 | x = Conv2D(filters[1], (3, 3), strides=(2, 2), padding='same', 36 | activation='elu')(x) 37 | y = Add()([block(filters[1], x), x]) 38 | x = Add()([block(filters[1], y), y]) 39 | y = Add()([block(filters[1], x), x]) 40 | y = Conv2D(filters[2], (3, 3), strides=(2, 2), padding='same', 41 | activation='elu')(y) 42 | x = Add()([block(filters[2], y), y]) 43 | y = Add()([block(filters[2], x), x]) 44 | x = Add()([block(filters[2], y), y]) 45 | 46 | x2 = GlobalAveragePooling2D()(x) 47 | output = Dense(classes, activation='softmax')(x2) 48 | 49 | model = Model(input_img, output) 50 | 51 | return model 52 | 53 | 54 | class ResNetV2AudioClassifier(object): 55 | model_name = 'resnet-v2' 56 | 57 | def __init__(self): 58 | self.cache = LRU(400) 59 | self.input_shape = None 60 | self.nb_classes = None 61 | self.model = None 62 | self.config = None 63 | 64 | def create_model(self): 65 | self.model = resnet(input_shape=self.input_shape, classes=self.nb_classes) 66 | self.model.compile(optimizer='adam', loss='categorical_crossentropy', metrics=['accuracy']) 67 | 68 | print(self.model.summary()) 69 | 70 | @staticmethod 71 | def get_config_file_path(model_dir_path): 72 | return os.path.join(model_dir_path, ResNetV2AudioClassifier.model_name + '-config.npy') 73 | 74 | @staticmethod 75 | def get_architecture_file_path(model_dir_path): 76 | return os.path.join(model_dir_path, ResNetV2AudioClassifier.model_name + '-architecture.json') 77 | 78 | @staticmethod 79 | def get_weight_file_path(model_dir_path): 80 | return os.path.join(model_dir_path, ResNetV2AudioClassifier.model_name + '-weights.h5') 81 | 82 | def load_model(self, model_dir_path): 83 | config_file_path = ResNetV2AudioClassifier.get_config_file_path(model_dir_path) 84 | weight_file_path = ResNetV2AudioClassifier.get_weight_file_path(model_dir_path) 85 | self.config = np.load(config_file_path).item() 86 | self.input_shape = self.config['input_shape'] 87 | self.nb_classes = self.config['nb_classes'] 88 | self.create_model() 89 | self.model.load_weights(weight_file_path) 90 | 91 | def compute_melgram(self, audio_path): 92 | if audio_path in self.cache: 93 | return self.cache[audio_path] 94 | else: 95 | mg = compute_melgram(audio_path) 96 | # mg = (mg + 100) / 200 # scale the values 97 | self.cache[audio_path] = mg 98 | return mg 99 | 100 | def generate_batch(self, audio_paths, labels, batch_size): 101 | num_batches = len(audio_paths) // batch_size 102 | while True: 103 | for batchIdx in range(0, num_batches): 104 | start = batchIdx * batch_size 105 | end = (batchIdx + 1) * batch_size 106 | 107 | X = np.zeros(shape=(batch_size, self.input_shape[0], self.input_shape[1], self.input_shape[2]), 108 | dtype=np.float32) 109 | for i in range(start, end): 110 | audio_path = audio_paths[i] 111 | mg = compute_melgram(audio_path) 112 | X[i - start, :, :, :] = mg 113 | yield X, labels[start:end] 114 | 115 | def fit(self, audio_path_label_pairs, model_dir_path, batch_size=None, epochs=None, test_size=None, 116 | random_state=None, input_shape=None, nb_classes=None): 117 | if batch_size is None: 118 | batch_size = 64 119 | if epochs is None: 120 | epochs = 20 121 | if test_size is None: 122 | test_size = 0.2 123 | if random_state is None: 124 | random_state = 42 125 | if input_shape is None: 126 | input_shape = (96, 1366, 1) 127 | if nb_classes is None: 128 | nb_classes = 10 129 | 130 | config_file_path = self.get_config_file_path(model_dir_path) 131 | weight_file_path = self.get_weight_file_path(model_dir_path) 132 | architecture_file_path = self.get_architecture_file_path(model_dir_path) 133 | 134 | self.input_shape = input_shape 135 | self.nb_classes = nb_classes 136 | 137 | self.config = dict() 138 | self.config['input_shape'] = input_shape 139 | self.config['nb_classes'] = nb_classes 140 | np.save(config_file_path, self.config) 141 | 142 | self.create_model() 143 | 144 | with open(architecture_file_path, 'wt') as file: 145 | file.write(self.model.to_json()) 146 | 147 | checkpoint = ModelCheckpoint(weight_file_path) 148 | 149 | X = [] 150 | Y = [] 151 | 152 | for audio_path, label in audio_path_label_pairs: 153 | X.append(audio_path) 154 | Y.append(label) 155 | 156 | X = np.array(X) 157 | Y = np.array(Y) 158 | 159 | Y = np_utils.to_categorical(Y, self.nb_classes) 160 | 161 | Xtrain, Xtest, Ytrain, Ytest = train_test_split(X, Y, test_size=test_size, random_state=random_state) 162 | 163 | train_gen = self.generate_batch(Xtrain, Ytrain, batch_size) 164 | test_gen = self.generate_batch(Xtest, Ytest, batch_size) 165 | 166 | train_num_batches = len(Xtrain) // batch_size 167 | test_num_batches = len(Xtest) // batch_size 168 | 169 | history = self.model.fit_generator(generator=train_gen, steps_per_epoch=train_num_batches, 170 | epochs=epochs, 171 | verbose=1, validation_data=test_gen, validation_steps=test_num_batches, 172 | callbacks=[checkpoint]) 173 | self.model.save_weights(weight_file_path) 174 | 175 | np.save(os.path.join(model_dir_path, ResNetV2AudioClassifier.model_name + '-history.npy'), history.history) 176 | return history 177 | 178 | def predict(self, audio_path): 179 | mg = compute_melgram(audio_path) 180 | mg = np.expand_dims(mg, axis=0) 181 | return self.model.predict(mg)[0] 182 | 183 | def predict_class(self, audio_path): 184 | predicted = self.predict(audio_path) 185 | return np.argmax(predicted) 186 | -------------------------------------------------------------------------------- /keras_audio/library/resnets_utils.py: -------------------------------------------------------------------------------- 1 | import os 2 | import numpy as np 3 | import tensorflow as tf 4 | import h5py 5 | import math 6 | 7 | def load_dataset(dir_path): 8 | train_dataset = h5py.File(dir_path + '/train_signs.h5', "r") 9 | train_set_x_orig = np.array(train_dataset["train_set_x"][:]) # your train set features 10 | train_set_y_orig = np.array(train_dataset["train_set_y"][:]) # your train set labels 11 | 12 | test_dataset = h5py.File(dir_path + '/test_signs.h5', "r") 13 | test_set_x_orig = np.array(test_dataset["test_set_x"][:]) # your test set features 14 | test_set_y_orig = np.array(test_dataset["test_set_y"][:]) # your test set labels 15 | 16 | classes = np.array(test_dataset["list_classes"][:]) # the list of classes 17 | 18 | train_set_y_orig = train_set_y_orig.reshape((1, train_set_y_orig.shape[0])) 19 | test_set_y_orig = test_set_y_orig.reshape((1, test_set_y_orig.shape[0])) 20 | 21 | return train_set_x_orig, train_set_y_orig, test_set_x_orig, test_set_y_orig, classes 22 | 23 | 24 | def random_mini_batches(X, Y, mini_batch_size = 64, seed = 0): 25 | """ 26 | Creates a list of random minibatches from (X, Y) 27 | 28 | Arguments: 29 | X -- input data, of shape (input size, number of examples) (m, Hi, Wi, Ci) 30 | Y -- true "label" vector (containing 0 if cat, 1 if non-cat), of shape (1, number of examples) (m, n_y) 31 | mini_batch_size - size of the mini-batches, integer 32 | seed -- this is only for the purpose of grading, so that you're "random minibatches are the same as ours. 33 | 34 | Returns: 35 | mini_batches -- list of synchronous (mini_batch_X, mini_batch_Y) 36 | """ 37 | 38 | m = X.shape[0] # number of training examples 39 | mini_batches = [] 40 | np.random.seed(seed) 41 | 42 | # Step 1: Shuffle (X, Y) 43 | permutation = list(np.random.permutation(m)) 44 | shuffled_X = X[permutation,:,:,:] 45 | shuffled_Y = Y[permutation,:] 46 | 47 | # Step 2: Partition (shuffled_X, shuffled_Y). Minus the end case. 48 | num_complete_minibatches = math.floor(m/mini_batch_size) # number of mini batches of size mini_batch_size in your partitionning 49 | for k in range(0, num_complete_minibatches): 50 | mini_batch_X = shuffled_X[k * mini_batch_size : k * mini_batch_size + mini_batch_size,:,:,:] 51 | mini_batch_Y = shuffled_Y[k * mini_batch_size : k * mini_batch_size + mini_batch_size,:] 52 | mini_batch = (mini_batch_X, mini_batch_Y) 53 | mini_batches.append(mini_batch) 54 | 55 | # Handling the end case (last mini-batch < mini_batch_size) 56 | if m % mini_batch_size != 0: 57 | mini_batch_X = shuffled_X[num_complete_minibatches * mini_batch_size : m,:,:,:] 58 | mini_batch_Y = shuffled_Y[num_complete_minibatches * mini_batch_size : m,:] 59 | mini_batch = (mini_batch_X, mini_batch_Y) 60 | mini_batches.append(mini_batch) 61 | 62 | return mini_batches 63 | 64 | 65 | def convert_to_one_hot(Y, C): 66 | Y = np.eye(C)[Y.reshape(-1)].T 67 | return Y 68 | 69 | 70 | def forward_propagation_for_predict(X, parameters): 71 | """ 72 | Implements the forward propagation for the model: LINEAR -> RELU -> LINEAR -> RELU -> LINEAR -> SOFTMAX 73 | 74 | Arguments: 75 | X -- input dataset placeholder, of shape (input size, number of examples) 76 | parameters -- python dictionary containing your parameters "W1", "b1", "W2", "b2", "W3", "b3" 77 | the shapes are given in initialize_parameters 78 | 79 | Returns: 80 | Z3 -- the output of the last LINEAR unit 81 | """ 82 | 83 | # Retrieve the parameters from the dictionary "parameters" 84 | W1 = parameters['W1'] 85 | b1 = parameters['b1'] 86 | W2 = parameters['W2'] 87 | b2 = parameters['b2'] 88 | W3 = parameters['W3'] 89 | b3 = parameters['b3'] 90 | # Numpy Equivalents: 91 | Z1 = tf.add(tf.matmul(W1, X), b1) # Z1 = np.dot(W1, X) + b1 92 | A1 = tf.nn.relu(Z1) # A1 = relu(Z1) 93 | Z2 = tf.add(tf.matmul(W2, A1), b2) # Z2 = np.dot(W2, a1) + b2 94 | A2 = tf.nn.relu(Z2) # A2 = relu(Z2) 95 | Z3 = tf.add(tf.matmul(W3, A2), b3) # Z3 = np.dot(W3,Z2) + b3 96 | 97 | return Z3 98 | 99 | def predict(X, parameters): 100 | 101 | W1 = tf.convert_to_tensor(parameters["W1"]) 102 | b1 = tf.convert_to_tensor(parameters["b1"]) 103 | W2 = tf.convert_to_tensor(parameters["W2"]) 104 | b2 = tf.convert_to_tensor(parameters["b2"]) 105 | W3 = tf.convert_to_tensor(parameters["W3"]) 106 | b3 = tf.convert_to_tensor(parameters["b3"]) 107 | 108 | params = {"W1": W1, 109 | "b1": b1, 110 | "W2": W2, 111 | "b2": b2, 112 | "W3": W3, 113 | "b3": b3} 114 | 115 | x = tf.placeholder("float", [12288, 1]) 116 | 117 | z3 = forward_propagation_for_predict(x, params) 118 | p = tf.argmax(z3) 119 | 120 | sess = tf.Session() 121 | prediction = sess.run(p, feed_dict = {x: X}) 122 | 123 | return prediction -------------------------------------------------------------------------------- /keras_audio/library/utility/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chen0040/keras-audio/c34c30695169e0f274c0f3d175dba2b4c9dc301a/keras_audio/library/utility/__init__.py -------------------------------------------------------------------------------- /keras_audio/library/utility/audio_utils.py: -------------------------------------------------------------------------------- 1 | import librosa 2 | import numpy as np 3 | from math import floor 4 | import os 5 | 6 | 7 | def compute_melgram(audio_path): 8 | """ Compute a mel-spectrogram and returns it in a shape of (96,1366, 1), where 9 | 96 == #mel-bins and 1366 == #time frame 10 | """ 11 | 12 | mg_path = audio_path + '-mg.npy' 13 | 14 | if os.path.exists(mg_path): 15 | return np.load(mg_path) 16 | 17 | print('computing mel-spetrogram for audio: ', audio_path) 18 | 19 | # mel-spectrogram parameters 20 | sampling_rate = 12000 21 | n_fft = 512 22 | n_mels = 96 23 | hop_length = 256 24 | duration_in_seconds = 29.12 # to make it 1366 frame (1366 = 12000 * 29.12 / 256) 25 | 26 | src, sr = librosa.load(audio_path, sr=sampling_rate) # whole signal 27 | n_sample = src.shape[0] 28 | n_sample_fit = int(duration_in_seconds * sampling_rate) 29 | 30 | if n_sample < n_sample_fit: # if too short 31 | src = np.hstack((src, np.zeros((int(duration_in_seconds * sampling_rate) - n_sample,)))) 32 | elif n_sample > n_sample_fit: # if too long 33 | src = src[(n_sample - n_sample_fit) // 2:(n_sample + n_sample_fit) // 2] 34 | logam = librosa.core.amplitude_to_db 35 | melgram = librosa.feature.melspectrogram 36 | ret = logam(melgram(y=src, sr=sampling_rate, hop_length=hop_length, 37 | n_fft=n_fft, n_mels=n_mels) ** 2, 38 | ref=1.0) 39 | ret = np.expand_dims(ret, axis=2) 40 | 41 | np.save(mg_path, ret) 42 | 43 | return ret 44 | 45 | 46 | def compute_melgram_multiframe(audio_path, all_song=True): 47 | ''' Compute a mel-spectrogram in multiple frames of the song and returns it in a shape of (N,1,96,1366), where 48 | 96 == #mel-bins, 1366 == #time frame, and N=#frames 49 | ''' 50 | 51 | # mel-spectrogram parameters 52 | SR = 12000 53 | N_FFT = 512 54 | N_MELS = 96 55 | HOP_LEN = 256 56 | DURA = 29.12 # to make it 1366 frame.. 57 | if all_song: 58 | DURA_TRASH = 0 59 | else: 60 | DURA_TRASH = 20 61 | 62 | src, sr = librosa.load(audio_path, sr=SR) # whole signal 63 | n_sample = src.shape[0] 64 | n_sample_fit = int(DURA * SR) 65 | n_sample_trash = int(DURA_TRASH * SR) 66 | 67 | # remove the trash at the beginning and at the end 68 | src = src[n_sample_trash:(n_sample - n_sample_trash)] 69 | n_sample = n_sample - 2 * n_sample_trash 70 | 71 | ret = np.zeros((0, 1, 96, 1366), dtype=np.float32) 72 | 73 | if n_sample < n_sample_fit: # if too short 74 | src = np.hstack((src, np.zeros((int(DURA * SR) - n_sample,)))) 75 | logam = librosa.core.amplitude_to_db 76 | melgram = librosa.feature.melspectrogram 77 | ret = logam(melgram(y=src, sr=SR, hop_length=HOP_LEN, 78 | n_fft=N_FFT, n_mels=N_MELS) ** 2, 79 | ref=1.0) 80 | ret = ret[np.newaxis, np.newaxis, :] 81 | 82 | elif n_sample > n_sample_fit: # if too long 83 | N = int(floor(n_sample // n_sample_fit)) 84 | 85 | src_total = src 86 | 87 | for i in range(0, N): 88 | src = src_total[(i * n_sample_fit):(i + 1) * (n_sample_fit)] 89 | 90 | logam = librosa.core.amplitude_to_db 91 | melgram = librosa.feature.melspectrogram 92 | retI = logam(melgram(y=src, sr=SR, hop_length=HOP_LEN, 93 | n_fft=N_FFT, n_mels=N_MELS) ** 2, 94 | ref=1.0) 95 | retI = retI[np.newaxis, np.newaxis, :] 96 | ret = np.concatenate((ret, retI), axis=0) 97 | 98 | return ret 99 | -------------------------------------------------------------------------------- /keras_audio/library/utility/download_utils.py: -------------------------------------------------------------------------------- 1 | import sys 2 | 3 | 4 | def reporthook(block_num, block_size, total_size): 5 | read_so_far = block_num * block_size 6 | if total_size > 0: 7 | percent = read_so_far * 1e2 / total_size 8 | s = "\r%5.1f%% %*d / %d" % ( 9 | percent, len(str(total_size)), read_so_far, total_size) 10 | sys.stderr.write(s) 11 | if read_so_far >= total_size: # near the end 12 | sys.stderr.write("\n") 13 | else: # total size is unknown 14 | sys.stderr.write("read %d\n" % (read_so_far,)) 15 | -------------------------------------------------------------------------------- /keras_audio/library/utility/gtzan_loader.py: -------------------------------------------------------------------------------- 1 | import urllib.request 2 | import os 3 | import tarfile 4 | 5 | from keras_audio.library.utility.download_utils import reporthook 6 | 7 | gtzan_labels = {0: 'blues', 1: 'classical', 2: 'country', 3: 'disco', 4: 'hiphop', 5: 'jazz', 6: 'metal', 8 | 7: 'pop', 8: 'reggae', 9: 'rock'} 9 | 10 | 11 | def download_gtzan_music_speech(data_dir_path): 12 | zip_file_path = data_dir_path + '/music_speech.tar.gz' 13 | 14 | if not os.path.exists(zip_file_path): 15 | url_link = 'http://opihi.cs.uvic.ca/sound/music_speech.tar.gz' 16 | print('gz model file does not exist, downloading from internet') 17 | urllib.request.urlretrieve(url=url_link, filename=zip_file_path, 18 | reporthook=reporthook) 19 | 20 | tar = tarfile.open(zip_file_path, "r:gz") 21 | tar.extractall(data_dir_path) 22 | tar.close() 23 | 24 | 25 | def download_gtzan_genres_if_not_found(data_dir_path): 26 | flag_file = os.path.join(data_dir_path, 'genres_done.txt') 27 | if os.path.exists(flag_file): 28 | return 29 | 30 | zip_file_path = data_dir_path + '/genres.tar.gz' 31 | 32 | if not os.path.exists(zip_file_path): 33 | url_link = 'http://opihi.cs.uvic.ca/sound/genres.tar.gz' 34 | print('gz model file does not exist, downloading from internet') 35 | urllib.request.urlretrieve(url=url_link, filename=zip_file_path, 36 | reporthook=reporthook) 37 | 38 | tar = tarfile.open(zip_file_path, "r:gz") 39 | tar.extractall(data_dir_path) 40 | tar.close() 41 | 42 | with open(flag_file, 'wt') as file: 43 | file.write('done') 44 | 45 | 46 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | keras 2 | numpy 3 | librosa == 0.6 4 | h5py 5 | scikit-learn 6 | tensorflow 7 | matplotlib 8 | pandas 9 | lru-dict -------------------------------------------------------------------------------- /setup.cfg: -------------------------------------------------------------------------------- 1 | [aliases] 2 | test=pytest -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 1 | from setuptools import setup 2 | 3 | setup( 4 | name='keras_audio', 5 | packages=['keras_audio'], 6 | include_package_data=True, 7 | install_requires=[ 8 | 'flask', 9 | 'keras', 10 | 'sklearn', 11 | 'nltk', 12 | 'numpy', 13 | 'h5py' 14 | ], 15 | setup_requires=[ 16 | 'pytest-runner', 17 | ], 18 | tests_require=[ 19 | 'pytest', 20 | ], 21 | ) --------------------------------------------------------------------------------