Giter Site home page Giter Site logo

bad2's Introduction

This repository contains 3D-CNN+RNN implementation for the second edition of bird audio detection challenge 2.

Detail of the environment is in req.txt (generated using 'pip freeze')

Quick readme:

This version uses Matlab for feature extraction. For this work, we used log Mel-spectrogram as features. Alternatively, you may used other python libraries, i.e., librosa for feature extraction if you have no access to Matlab. For example,

import librosa
y,nsr = librosa.load(filename, sr=44100)
C = librosa.feature.melspectrogram(y, sr=nsr, None, n_fft=1024, hop_length=512, power=2.0)
C = librosa.core.amplitude_to_db(C)

The csv files are slightly modified (i.e., removing the header) to simplify the training/testing process.

Running feature extraction:

./extracting_features.sh

Tensorflow for training 3D-CNN+RNN models. Training with different initialization:

python cnn_3d_rnn.py 777

results would be in eval_final_777.csv You may run with different seed that give random weights initialization,

python cnn_3d_rnn.py 888
python cnn_3d_rnn.py 999

Average all results.

Readme:

Setting the Python environment

  1. Download and installing conda. download url: https://repo.continuum.io/miniconda/
bash Miniconda2-latest-Linux-x86_64.sh
  1. Create virtual environment for python using conda.
./miniconda2/bin/conda create -n bad2
source activate bad2
pip install tensorflow-gpu==1.4.1

Feature extraction process

This version of feature extraction process use Matlab scripts to compute spectrogram.

./extracting_features.sh

Information regarding model training

Tensorflow is used to implement the deep architectures. Require tensorflow (>=1.4.0) with GPU support.

python cnn_3d_rnn.py 777

Model ensemble can be performed by running several instances of model training (i.e., using different seed values), and average the predictions.

Citation

If you used (and/or inspired by) this code please kindly cite the following paper:

@InProceedings{himawan2018,
  Title                    = {3D convolution recurrent neural networks for bird sound detection},
  Author                   = {Himawan, Ivan and Towsey, Michael and Roe, Pau},
  Booktitle                = {Workshop on on Detection and Classification of Acoustic Scenes and Events},
  Year                     = {2018},
}

License

To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.

Copyright [2018] [Ivan Himawan, Queensland University of Technology]

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Contribution

We appreciate your kind feedback. Please try our code, and help us with code inspections to improve our work.

bad2's People

Contributors

himaivan avatar

Stargazers

 avatar  avatar  avatar harryfyodor avatar 了无歌 avatar Quinlan avatar  avatar

Watchers

James Cloos avatar  avatar

Forkers

saimahmed gao-rui

bad2's Issues

audioread function is solved

Hi,
I am running this on Mac. I am getting an error which is as follows

(base) Admins-iMac:BAD2 admin$ sh ./extracting_features.sh
mkdir: data: File exists
./BirdVox_label.csv
./ff1010bird_metadata.csv
./warblrb10k_public_metadata.csv
./poland.list.csv
./chern.list.csv
./wabrlrb10k.list.csv

                        < M A T L A B (R) >
              Copyright 1984-2017 The MathWorks, Inc.
               R2017b (9.3.0.713579) 64-bit (maci64)
                         September 14, 2017

For online documentation, see http://www.mathworks.com/support
For product information, visit www.mathworks.com.

ans =

 0

ans =

'BirdVox-DCASE-20k/wav/00053d90-e4b9-4045-a2f1-f39efc90cfa9.wav'

Error using audioread (line 74)
The filename specified was not found in the MATLAB path.

Error in featextract (line 16)
[x,fs] = audioread(filenames{i});


Also, I have put the training and test data onto to the Data folder which is created once I clone this onto my computer. Is this required ?

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.