Page 1 of 1

### Neural Network, Multiple Output for Hand Gesture Recog

Posted: Sat Apr 23, 2011 10:14 am
Hello,

I want to use AForge Library for my neural network programming, but I got stuck since I'm new to programming so I need a guidance here.
My project is, hand gesture recognition, but instead of using vision, i put on some sensor in hand.

First, let me explain how my projects going to do.

I have a dataset which I already have. like this (26 rows / 6 columns)
10192 20351 30473 40499 50449 60234
10192 20207 30206 40203 50205 60226
10192 20252 30312 40376 50334 60252

I already parse it into array and delete the unique number, so it turns out like this:

array[0][0] 192 array[0][1] 351 . . array[0][5] 234
array[1][0] 192 array[1][0].....
.
.
so on

my neural design is, 6 input based on columns and 5 output(i'll explain the output)

the output what i want is like this for example:
output 1: 0 /1
output 2: 0/1
output 3:0/1
output 4:0/1
output 5:0/1

so it can be zero (0) or one (1). depends on the input. and the result is depends on combination of output. for example:
if the combination is 1 0 0 0 0 0 the result is A

The program should be to read row by row.
so the 6 first input will go through the neural, then go the 2nd row as the 6 input, and so on.

my question is:
1. can i use the Aforge for this?
2. I already read several sample but, I dont know where to define the output that I want?
3. can aforge use for input that using 2 dimension of aray like array[][] because I dont see it?

thanks for the help.

### Re: Neural Network, Multiple Output for Hand Gesture Recog

Posted: Sat Apr 23, 2011 1:22 pm
Hello,

rads wrote:1. can i use the Aforge for this?

AForge.NET framework allows you to create a multi-layer feed forward network and train it using error back propagation algorithm. If the task you are trying to solve suits the neural network architecture you chose, data are preprocessed correctly and make some sense, then neural network may give you some results.

rads wrote:2. I already read several sample but, I dont know where to define the output that I want?

You need to read more. Both BackPropagationLearning.Run() and BackPropagationLearning.RunEpoch() accept the desired output - the output which a network should learn to provide for the specified input.

rads wrote:3. can aforge use for input that using 2 dimension of aray like array[][] because I dont see it?

rads wrote:using 2 dimension of aray like array[][]

To be correct, it is jagged array, not 2D.

In general I would suggest reading some neural network tutorials to get more understanding of them. AForge.NET framework provides just a library for creating/training feed forward networks, but it is not something miracle which will solve any task you feed to it. As any other ANN library, the framework also requires understand of ANN concepts.

### Re: Neural Network, Multiple Output for Hand Gesture Recog

Posted: Wed Apr 27, 2011 2:23 pm
Dear andrew,

I do now almost already understand your framework, can I ask you something? a newbie question but I don't know where else to ask. just to make sure my code.

Here is my code for training: the input is jagged array,

example : input[25][5] = 255 and soon

1.my question, is it my code enough for training?connection between input and output value?
2.if I want to print the last weight of every neuron where can I find it or use?
3.if I want to print error in every neuron in output how can I do that? if i'm not wrong, the return value for RunEpoch is for Average Least Mean Sguare right?
Code: Select all
`void Train()        {            //init input and output            double[][] input = value;            double[][] output = new double[][]{new double[]{0,0,0,0,1}, new double[]{0,0,0,1,0}, new double[]{0,0,0,1,1},                new double[]{0,0,1,0,0}, new double[]{0,0,1,0,1}, new double[]{0,0,1,1,0}, new double[]{0,0,1,1,1},                 new double[]{0,1,0,0,0}, new double[]{0,1,0,0,1}, new double[]{0,1,0,1,0}, new double[]{0,1,0,1,1},                 new double[]{0,1,1,0,0}, new double[]{0,1,1,0,1}, new double[]{0,1,1,1,0}, new double[]{0,1,1,1,1},                 new double[]{1,0,0,0,0}, new double[]{1,0,0,0,1}, new double[]{1,0,0,1,0}, new double[]{1,0,0,1,1},                new double[]{1,0,1,0,0}, new double[]{1,0,1,0,1}, new double[]{1,0,1,1,0}, new double[]{1,0,1,1,1},                new double[]{1,1,0,0,0}, new double[]{1,1,0,0,1}, new double[]{1,1,0,1,0}};            int sample = input.GetLength(0);            //Create Network            ActivationNetwork network = new ActivationNetwork(new SigmoidFunction(sigmoidAlpha),6,hiddenCount, 5);            //Create Backpropagation            BackPropagationLearning backPropagate = new BackPropagationLearning(network);            backPropagate.LearningRate= learningRate;            backPropagate.Momentum = momentum;            //start iteration at            int iteration = 1;            while (!needToStop)            {                double error = backPropagate.RunEpoch(input, output);                SetText(currentIterationBox, iteration.ToString());                SetText(errorAverageBox, error.ToString());                                iteration++;                if ((iterations != 0) && (iteration > iterations))                break;            }        }`

### Re: Neural Network, Multiple Output for Hand Gesture Recog

Posted: Sun May 14, 2017 9:00 am
hello sir, Andrew Kirillov;
my topic is gesture recognition using neural networks.
My question is I captured background and object images from stereo camera and then find their difference image then converting into grayscale, apply thresholding, so finally i have a thresholded image containing only hand demonstrating a gesture so what will be my next step in recognizing hand gesture using neural networks.
hope you understand my question...