kahst / acousticeventdetection Goto Github PK
View Code? Open in Web Editor NEWSource code complementing our paper for acoustic event classification using convolutional neural networks.
License: MIT License
Source code complementing our paper for acoustic event classification using convolutional neural networks.
License: MIT License
Good afternoon.
Can you specify the different dependencies that you used for this code? The CUDA version, CuDNN, python libraries, theano, etc?
I'm having a lot of problems using your code.
Thanks.
Theano - v1.0.1
Lasagne - v0.2.dev1
Command:
python AED_test.py --filenames 'dataset/schreien_scream.wav' --modelname 'AED_Example_Run_model.pkl' --overlap 4 --results 5 --confidence 0.01
HANDLING IMPORTS...
Using cuDNN version 7103 on context None
Mapped name None to device cuda: GeForce GT 650M (0000:01:00.0)
...DONE!
IMPORTING MODEL... DONE!
Traceback (most recent call last):
File "AED_test.py", line 159, in <module>
TEST_NET = getPredictionFuntion(NET)
File "AED_test.py", line 71, in getPredictionFuntion
net_output = l.get_output(net, deterministic=True)
File "/home/enniya/miniconda2/lib/python2.7/site-packages/lasagne/layers/helper.py", line 197, in get_output
all_outputs[layer] = layer.get_output_for(layer_inputs, **kwargs)
File "/home/enniya/miniconda2/lib/python2.7/site-packages/lasagne/layers/conv.py", line 352, in get_output_for
conved = self.convolve(input, **kwargs)
File "/home/enniya/miniconda2/lib/python2.7/site-packages/lasagne/layers/conv.py", line 643, in convolve
if self.num_groups > 1: # pragma: no cover
AttributeError: 'Conv2DLayer' object has no attribute 'num_groups'
Hello, @kahst
Thank you for your package though I am still not able to use it.
I followed you installation instruction and downloaded pre-trained model:"sh model/fetch_model.sh". When I executed script:"python AED_test.py --filenames 'dataset/schreien_scream.wav' --modelname 'AED_Example_Run_model.pkl' --overlap 4 --results 5 --confidence 0.01", the following error occurred:
scu@scu-desktop:~/AcousticEventDetection$ python AED_test.py --filenames 'dataset/schreien_scream.wav' --modelname 'AED_Example_Run_model.pkl'
HANDLING IMPORTS...
Using gpu device 0: GeForce GTX 960 (CNMeM is disabled, CuDNN 7004)
/usr/local/lib/python2.7/dist-packages/theano/sandbox/cuda/init.py:600: UserWarning: Your CuDNN version is more recent then Theano. If you see problems, try updating Theano or downgrading CuDNN to version 4.
warnings.warn(warn)
...DONE!
IMPORTING MODEL...
Traceback (most recent call last):
File "AED_test.py", line 156, in
NET, CLASSES, IM_SIZE, IM_DIM = loadModel(TRAINED_MODEL)
File "AED_test.py", line 57, in loadModel
data = pickle.load(f)
File "/usr/lib/python2.7/pickle.py", line 1378, in load
return Unpickler(file).load()
File "/usr/lib/python2.7/pickle.py", line 858, in load
dispatchkey
File "/usr/lib/python2.7/pickle.py", line 1090, in load_global
klass = self.find_class(module, name)
File "/usr/lib/python2.7/pickle.py", line 1124, in find_class
import(module)
ImportError: No module named gpuarray.type
I have installed Python 2.7,python-opencv,numpy,scipy,scikit-learn,python_speech_features,pydub,matplotlib,cuda8.0,cuDNN7,Thenao 0.8,Lasagne on Ubuntu 14.04.
As a beginner,I'm sorry to trouble you.Can you help me?Thanks!
Hello kahst,
Thanks for sharing the model!
I got some trouble while using your model.
I followed your instruction and download the public data set "UrbanSound8K", when I use AED_spec.py to extract the spectrograms of wav files, python shell reports:
NUMBER OF EVENTS: 10
dataset/UrbanSound8K/audio/fold1/event0_air_conditioner/134717-0-0-0.wav
SAMPLE RATE: 44100
0 ERROR
Traceback (most recent call last):
File "E:\python\python364\project\AcousticEventDetection-master\AED_spec_new.py", line 137, in
for spec in getMultiSpec(wav):
File "E:\python\python364\project\AcousticEventDetection-master\AED_spec_new.py", line 111, in getMultiSpec
magspec = getSpecFromSignal(sig, rate, seconds)
File "E:\python\python364\project\AcousticEventDetection-master\AED_spec_new.py", line 58, in getSpecFromSignal
frames = psf.sigproc.framesig(sig, winlenrate, winsteprate, winfunc)
File "E:\python\python364\lib\site-packages\python_speech_features\sigproc.py", line 33, in framesig
padsignal = numpy.concatenate((sig,zeros))
ValueError: all the input arrays must have same number of dimensions
dataset/UrbanSound8K/audio/fold1/event0_air_conditioner/134717-0-0-1.wav
SAMPLE RATE: 44100
0 ERROR
Traceback (most recent call last):
File "E:\python\python364\project\AcousticEventDetection-master\AED_spec_new.py", line 137, in
for spec in getMultiSpec(wav):
File "E:\python\python364\project\AcousticEventDetection-master\AED_spec_new.py", line 111, in getMultiSpec
magspec = getSpecFromSignal(sig, rate, seconds)
File "E:\python\python364\project\AcousticEventDetection-master\AED_spec_new.py", line 58, in getSpecFromSignal
frames = psf.sigproc.framesig(sig, winlenrate, winsteprate, winfunc)
File "E:\python\python364\lib\site-packages\python_speech_features\sigproc.py", line 33, in framesig
padsignal = numpy.concatenate((sig,zeros))
ValueError: all the input arrays must have same number of dimensions
...
I can only extract a few files.
So do you know where is wrong? Could you help me with this problem? I'm really sorry to bother you. Thanks!
Best regards!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.