Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed few issues in the readme #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 13 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
##About
## About
This repository contains research code for experimenting with deep neural networks (DNNs) for music genre recognition (MGR). For the moment the repository contains many test scripts and should be considered unstable (i.e., the code is subject to change given our experimental needs). Nonetheless, the instructions below should help you reproduce our experiments and identify which files are most important for the basic functionality.

##Requirements
## Requirements
- Python (Tested with version 2.7. Note Python 3 contains many changes that might introduce bugs in this code)
- NumPy
- SciPy
Expand All @@ -13,16 +13,16 @@ This repository contains research code for experimenting with deep neural networ

You can find some setup tips in the hpc_scripts folder of this repository

##V2.0 Instructions
## V2.0 Instructions
This version is more flexible than the previous version and has been designed to work with generic datasets (not only the Tzanetakis dataset), with arbitrary categorical labels, and excerpt lengths.

###Dataset organization:
### Dataset organization:
Audio files must be uncompressed in either WAV or AU format and many different types of directory structures are permissible. However, there must be a way of specifying the categorical label for each file in the dataset. This can be done either by embedding the label in the filename, or the name of the parent folder (the folder name will always take precedence in the case of a conflict).

In order to handle large datasets that may not fit into RAM this code requires that the dataset first be saved as a hdf5 file, which can be partially loaded into RAM on demand during training and testing. The script prepare_dataset.py will search for the dataset files, and prepare the hdf5 file. Furthermore, the prepare_dataset.py script can generate train/validation/test configuration files that specify a partition to be used in an experiment (e.g., 10-fold cross-validation). The partition configuration contains important meta-data, such as the train/valid/test files (and their index in the hdf5 file), as well as the mean and standard deviation of the training set (which can be used to standardize the data for training, validation, and testing).

The following instructions demonstrate an example of how to use the code:
####1. Prepare the dataset and partition configuration file(s):
#### 1. Prepare the dataset and partition configuration file(s):

```
python prepare_dataset.py \
Expand Down Expand Up @@ -56,22 +56,26 @@ python prepare_dataset.py \

The lists should be newline separated, and contain the relative path to each file (from the root folder of the dataset). For example if the directory structure is as follows:

```
/root/blues/file.wav
/root/jazz/file.wav

.
.
.
```


then the training list text file should look like this:

```
blues/file.wav
jazz/file.wav

```

run: `python prepare_dataset.py --help` to see a full list of options

####2. Train a DNN:
#### 2. Train a DNN:

```
python train_mlp_script.py \
Expand All @@ -83,7 +87,7 @@ python train_mlp_script.py \

Some yaml configuration files are provided in the folder yaml_scripts (but you can write your own for different experiments).

####3. Test a previously trained and saved DNN:
#### 3. Test a previously trained and saved DNN:

```
python test_mlp_script.py \
Expand All @@ -103,5 +107,5 @@ python test_mlp_script.py \
`--save_file` lets the user save the test results to a file


##V1.0 Instructions
## V1.0 Instructions
This version has now been removed, but can be checked out as a branch using the v1.0 tag.