Processes of Object-Oriented Development
Burndown
Backlog
Sprint 2 Backlog
UI Video Demo
Sprint 3 Backlog
Presentation Outline
Presentation Slideshow
Sprint 2 UI Video
Design Documents
Vision Statement
Demo Video
This project requires Python 3+ and makes use of several frameworks, e.g. Flask, Angular, Keras, etc. It assumes you are using a Unix-based system. You'll also probably need to have ffmpeg installed and accessible on your system. To setup your environment, please make a new virtualenv using python -m venv venv
and then activate it by using source venv/bin/activate
. Then, run pip install -r requirements.txt
. Note that you may need to have numpy installed first, as one of the packages' dependencies requires it; you can do that by running pip install numpy
first.
To run the web app, please open two shells and run the following commands.
First shell:
cd static
ng serve
Second shell:
export FLASK_APP=server.py
flask run
- A-Frame - visualisation engine
- Angular - app frontend
- Flask - app backend
- Keras - framework for defining our neural networks
- Pandas - data wrangling
- LibROSA - used to generate spectrograms for use in the detection network
- Tensorflow - underlying engine for Keras
- YouTube-dl - used to process YouTube links for download
We used the Free Music Archive to train the genre detection neural network; the fma_small
dataset was chosen as it contains a total of 8000 30-second tracks balanced across eight (8) genres, including newly popular ones such as electronic(a).
In order to use the model to predict genres, it must first be trained. Before it can be trained, the dataset must be compiled into a pickle for easy passage to the network. Download your preferred flavor of the FMA dataset and extract it to the desired location. After extraction, change the AUDIO_DIR
variable in pickler.py
to the root of extracted dataset. Inspect all of the folders for any files that are 1-2 KB large; this is a sign of broken or corrupted files and will cause the script to stop before it dumps the dataset to a pickle. Adjust all the necessary bits and pieces regarding GENRES
, genre_to_index
, and tracks_dict
. Finally, run python pickler.py
to create a pickle that will be found at data.pkl
.
After the pickle has been prepared, run python trainer.py
. The network will automatically split the pickle into training and validation sets, and will train for a user-defined amount of epochs. Upon completion, the model and its weights will be saved to models.yaml
and weights.h5
respectively.