Skip to content

GrooveLens detects the genre of a drum beat recording

Notifications You must be signed in to change notification settings

Knerten0815/GrooveLens

Repository files navigation

GrooveLens

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.

Table of Contents

Installation

  1. Clone the repository:

    git clone https://github.com/Knerten0815/GrooveLens
    cd GrooveLens
  2. 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.

  3. Download the model files from here and extract the contents to the root folder.

  4. (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.

  5. (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/
│   ├── ...
├── ...

Usage

  1. Activate the conda environment:

    conda activate groovelens
  2. 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.

Training

Releases

No releases published

Packages

No packages published

Languages