kalyc commented on a change in pull request #13325: [MXNET-1210 ] Gluon Audio - Example URL: https://github.com/apache/incubator-mxnet/pull/13325#discussion_r237254970
########## File path: example/gluon/urban_sounds/README.md ########## @@ -0,0 +1,76 @@ +# Urban Sounds classification in MXNet + +This example provides an end-to-end pipeline for a common datahack competition - Urban Sounds Classification Example. +Below is the link to the competition: +https://datahack.analyticsvidhya.com/contest/practice-problem-urban-sound-classification/ + +After logging in, the data set can be downloaded. +The details of the dataset and the link to download it are given below: + + +Urban Sounds Dataset: +## Description + The dataset contains 8732 wav files which are audio samples(<= 4s)) of street sounds like engine_idling, car_horn, children_playing, dog_barking and so on. + The task is to classify these audio samples into one of the 10 labels. + +To be able to run this example: + +1. `pip install -r ./requirements.txt` + + This step installs the required libraries to run the example. + The main dependency that is required is: Librosa. + The version used to test the example is: `0.6.2` + For more details, refer here: +*https://librosa.github.io/librosa/install.html* + +2. Download the dataset(train.zip, test.zip) required for this example from the location: +https://drive.google.com/drive/folders/0By0bAi7hOBAFUHVXd1JCN3MwTEU + +3. Extract both the zip archives into the **current directory** - after unzipping you would get 2 new folders namely,\ + **Train** and **Test** and two csv files - **train.csv**, **test.csv** + +4. Apache MXNet is installed on the machine. For instructions, go to the link: **https://mxnet.incubator.apache.org/install/** + + + +For information on the current design of how the AudioFolderDataset is implemented, refer below: +**https://cwiki.apache.org/confluence/display/MXNET/Gluon+-+Audio** + +## Usage + +For training: + +- arguments + - train : The folder/directory that contains the audio(wav) files locally. Default = "./Train" + - csv: The file name of the csv file that contains audio file name to label mapping. Default = "train.csv" + - epochs : Number of epochs to train the model. Default = 30 + - batch_size : The batch size for training. Default = 32 + + +###### default setting +``` +python train.py +``` +or + +###### manual setting +``` +python train.py --train ./Train --csv train.csv --batch_size 32 --epochs 30 +``` + +For prediction: + +- arguments Review comment: nit: Arguments ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
