Code Monkey home page Code Monkey logo

audicle's Introduction

cop4331

Processes of Object-Oriented Development

Artifact Links

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

Installation/Requirements

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.

Run the App

To run the web app, please open two shells and run the following commands.

First shell:

  1. cd static
  2. ng serve

Second shell:

  1. export FLASK_APP=server.py
  2. flask run

Major Components

  • 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

Other Stuff

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).

Preparing the Backend

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.