GrooveLens is a study project for the course audio data science at University of Applied Sciences Düsseldorf and detects the genre of a drum beat recording. The model is trained on the Groove MIDI Dataset and combines predictions of a convolutional neural network, based on the front-end of musicnn, and a random forest classifier.
-
Clone the repository:
git clone https://github.com/Knerten0815/GrooveLens cd GrooveLens
-
Install with conda using the provided
conda_env_cpu.yml
file.conda env create -f conda_env_cpu.yml
Windows users can run the model on their GPU for better performance when using the
conda_env_gpu_windows.yml
file instead. -
Download the model files from here and extract the contents to the root folder.
-
(optional) If you want to train the model yourself, download the Groove MIDI Dataset and extract the files to a
Datasets
folder in the root directory. -
(optional) If you only want to evaluate the model and skip the preprocessing, you can download the CSV file wih the extracted audio features and the generated spectograms from here. Extract the contents to the root folder.
Your folder structure should look something like this:
GrooveLens/
├── code/
│ ├── ...
├── data/
│ ├── models/
│ │ ├── ...
├── Datasets/
│ ├── groove/
│ │ ├── ...
│ ├── spectrums_grayscale/
│ │ ├── ...
├── evaluation/
│ ├── ...
├── Notebooks/
| ├── data_balanced_processed_new.csv
│ ├── ...
├── Utility/
│ ├── ...
├── ...
-
Activate the conda environment:
conda activate groovelens
-
Run the model on a drum recording using the following command:
python ./main.py --file path/to/your/file.wav
You can also use the arguments
--start
and--end
to specify wich part of the audio file you want to classify. Use the--sampling_rate
argument if your files sampling rate is not 44100 Hz.