1

Before I ask my question, here's a brief summary of my project:

  1. I'm using OPENCV's built-in function to detect a face in a cam-feed.
  2. After that I'm processing the image which contains the face, i.e. converting it to grayscale, resizing it to 40X40 pixels and equalizing its' histogram.
  3. The pixel values of the image are then read, normalized (i.e. divided by 256 since FANN works with values between 0 and 1, or -1 and 1, depending on the used function) and saved into an array of 1600 elements. This is the data which neural network works with. Depending on the data, ANN decides either if the face is mine, unknown, or not a face at all (false positive).
  4. Neural network then returns an array of 3 elements, and the program decides which group the face belongs to by finding the maximum.

The thing is, apart from the pretty good detection of false positives, my code gives rather inaccurate results.

Some details on my ANN. I'm using the doublefann.h. The network contains 1600 input neurons (obviously), 3 output neurons (even more so), while the single hidden layer contains 1600 neurons, although I did try out other values in the 800-2400 range. I am using 20 samples of my face, 30 samples of unknown faces and 30 samples of random backgrounds for training. I tried both the RPROP (default in FANN, seems to overfit most of the time) and QUICKPROP (gives nice, smoothly decreasing error while training, but the results are inaccurate) training algorithms, as well as the SIGMOID_SYMMETRIC (training is done very fast, but often ends in abrupt fall of MSE to a near-zero value, and the resulting network is over-fit) activation function. I used both MSE and bit fail value as the criteria for stopping. Sadly, any given combination of those resulted in a rather poor face recognition.

So my questions would be, given the nature of my project and data which it handles, what would be the optimal:

  1. Number of hidden neurons
  2. Activation function
  3. Training algorithm
  4. Number of training samples per group (I was said that 20-30 should suffice)
  5. Stopping criteria

Of course, any advice is welcome, it does not need to answer all or any of those five questions. I know that my problem is a pretty complex one, but I spent a good chunk of time running in circles and got tired of reading literature on the subject, and some first-hand knowledge would be highly appreciated.

MrLinjak
  • 65
  • 7

0 Answers0