Ai Dreams Forum

Member's Experiments & Projects => General Project Discussion => Topic started by: Haemp on June 23, 2012, 04:46:47 am

Title: Help with Neural Network problem
Post by: Haemp on June 23, 2012, 04:46:47 am
Hi guys,

I'm building an application for Android devices that requires it to recognize, by accelerometer data, the difference between walking noise and double tapping it. I'm trying to solve this problem using Neural Networks.

At the start it went pretty well, teaching it to recognize the taps from noise such as standing up/ sitting down and walking around at a slower pace. But when it came to normal walking it never seemed to learn even though I fed it with a large proportion of noise data.

My question: Are there any serious flaws in my approach? Is the problem based on lack of data?

The network
I've choosen a 25 input 1 output multi-layer perceptron, which I am training with backpropagation. The input is the changes in acceleration every 20ms and output ranges from -1 (for no-tap) to 1 (for tap). I've tried pretty much every constallation of hidden inputs there are, but had most luck with 3 - 10.

I'm using Neuroph's easyNeurons for the training and exporting to Java.

The data
My total training data is about 50 pieces double taps and about 3k noise. But I've also tried to train it with proportional amounts of noise to double taps.

The data looks like this (ranges from +10 to -10):

Sitting double taps: http://i.stack.imgur.com/a7PDT.png (http://i.stack.imgur.com/a7PDT.png)

Fast walking: http://i.stack.imgur.com/ljRwp.png (http://i.stack.imgur.com/ljRwp.png)

So to reiterate my questions: Are there any serious flaws in my approach here? Do I need more data for it to recognize the difference between walking and double tapping? Any other tips?
Title: Re: Help with Neural Network problem
Post by: Bragi on June 23, 2012, 07:40:33 am
Which data exactly are you feeding the neural net: the raw audio samples, or do you first convert them with a FFT or something similar?
Have you ever taken a look at beat recognition algorithms? It sounds like a similar operation.
Title: Re: Help with Neural Network problem
Post by: Haemp on June 23, 2012, 11:24:43 am
Thanks for the recommendation but its not sound, its accelerometer data, but I guess it looks like sound. I googled around for a Beat recognition library for Java, but couldn't find any - do you know of any?
Title: Re: Help with Neural Network problem
Post by: Bragi on June 23, 2012, 01:14:30 pm
A quick google on accelerometer gave me this:  http://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=6&ved=0CIUBEBYwBQ&url=http%3A%2F%2Fjoggers-music-app.googlecode.com%2Fsvn-history%2Fr79%2Ftrunk%2Facceleromter_related_research_papers%2F10.1.1.92.1333.pdf&ei=LK_lT-KcBMPN8QOs4NCwCg&usg=AFQjCNHUB5MQi8pGlC2YnkZuyrBFQeXTkQ (http://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=6&ved=0CIUBEBYwBQ&url=http%3A%2F%2Fjoggers-music-app.googlecode.com%2Fsvn-history%2Fr79%2Ftrunk%2Facceleromter_related_research_papers%2F10.1.1.92.1333.pdf&ei=LK_lT-KcBMPN8QOs4NCwCg&usg=AFQjCNHUB5MQi8pGlC2YnkZuyrBFQeXTkQ)
Title: Re: Help with Neural Network problem
Post by: Freddy on June 25, 2012, 12:28:52 pm
That link seems to go nowhere Bragi  ???
Title: Re: Help with Neural Network problem
Post by: Bragi on June 25, 2012, 01:23:48 pm
doesn't it open a pdf file for you? (it does for me)
Title: Re: Help with Neural Network problem
Post by: Data on June 25, 2012, 01:27:19 pm
Yes it opens a PDF for me too, using IE9.
Title: Re: Help with Neural Network problem
Post by: Freddy on June 25, 2012, 01:28:42 pm
No, must be a Chrome thing I guess then..
Title: Re: Help with Neural Network problem
Post by: Bragi on June 25, 2012, 01:41:38 pm
I'm using firefox.  I got the link from a google search. Strange. Maybe a security thing?
Title: Re: Help with Neural Network problem
Post by: Freddy on June 25, 2012, 02:09:34 pm
Maybe, don't know to be honest.
Title: Re: Help with Neural Network problem
Post by: Art on June 25, 2012, 04:46:32 pm
Works for me in all save Chrome as well, Freddy. ???
Title: Re: Help with Neural Network problem
Post by: Data on June 25, 2012, 04:56:43 pm
What can I say, the number of things Chrome can’t do seems to be growing weekly.  ;D
Title: Re: Help with Neural Network problem
Post by: Freddy on June 25, 2012, 05:44:04 pm
Haha, still a long way before it catches up with IE though  >:D