eigen vector and neural net... [closed]

asked 2018-04-26 04:33:59 -0600

Shivanshu gravatar image

scene:I am develpoing a program regarding image classification(more on recognition).Here i extracted face and estimate its HOG vectors...which are reduced to 3-d eigen space and projected into eigenspace..projection gave me 3-sized coloum and (many)rowed matrix..this was fed to neural network.these projected vectors were of same person i.e all hog feature were belonged to same person.after training neural net..when i test for positive as well as negative data sets...it fails to recognise..it outputs same expected output for both as it was trained for...

question

1.am i going right....

2.i have to try negative training sets or approach for binary classification..

3.If not right,then how

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by sturkmen
close date 2020-09-28 10:52:36.876953

Comments

1
  1. obviously not ;)
  2. yes, you need neg images for binary classification. (for multi-class, the "other" samples will do that job)
  3. "3-sized coloum" your network is simply too small to discriminate well. also, your hog-space has ~2k features, reducing that to 3 means throwing away too much information
berak gravatar imageberak ( 2018-04-26 08:07:42 -0600 )edit

actually i requested PCA to give me 3 dimension::so shall i ask for more dimension(~10,100..); also what wrong i am doing?the whole approach or feeding wrong training sets or with projected vectors..??

Shivanshu gravatar imageShivanshu ( 2018-04-26 09:25:24 -0600 )edit

well your network IS too small. and imho, you should concatenate the hog patches to a single feature, not use them as (labelled) row-vectors on their own, because you use the patch location information this way.

and if you do a PCA, it should contain the whole dataset, not a single image. maybe have a look at the EigenFaces code, again ?

berak gravatar imageberak ( 2018-04-26 09:42:47 -0600 )edit

https://bpaste.net/show/123484f08a92 I really want to cry!!! i tried a lot...all ideas!! all hell>oh..

Shivanshu gravatar imageShivanshu ( 2018-04-26 09:47:00 -0600 )edit

what is you ann actually trying to classify ? what is the purpose of it ? why do you train with the same, single image, over and over ?

berak gravatar imageberak ( 2018-04-27 02:43:15 -0600 )edit

The whole idea/concept of neural networks in my opinion is that you DO NOT reduce your feature space using PCA/LDA because the network is able to learn the necessary features on itself if you make it complex enough. So why would you even reduce the dimension in the first place?

StevenPuttemans gravatar imageStevenPuttemans ( 2018-04-27 06:26:18 -0600 )edit

@StevenPuttmans then what do you mean....i must feed 2k 3k dimension all tougther to net...no it does not make any sense at all

Shivanshu gravatar imageShivanshu ( 2018-04-27 10:52:32 -0600 )edit

@berak i am trying to teach neuron to learn about face of two different person using HOG feature...I am targeting for binary classification...since feature space is too large i try reducing them using PCA and then fed to net...

Shivanshu gravatar imageShivanshu ( 2018-04-27 10:56:17 -0600 )edit

@berak what do you say...shall i first collect all data sets for all image then reduce and train?

Shivanshu gravatar imageShivanshu ( 2018-04-27 11:02:47 -0600 )edit
1
  • no, 2k hog features are not too large at all (ofc, you need larger hidden layers as well, then)
  • if you want to discriminate between multiple persons faces, you need one output node per person
  • you also cannot train your net with a single image
  • your code looks entirely broken (sorry for being brutal) burn it, and start all over. as simple as possible. forget about hof pca and all, use 32x32 scaled grayscale images, 10 per person, and train an ann on that (maybe use a prefab db, like att or yale). once you have that going, improve. you also need a working baseline, to compare results.
berak gravatar imageberak ( 2018-04-27 11:03:51 -0600 )edit