Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

locator.h File Reference

#include "locator_defines.h"
#include "frame.h"
#include "annie/annie.h"

Go to the source code of this file.

Compounds

class  face_locator_network
class  locator_filter

Defines

#define VERBOSE   false
#define INPUT_NODES   345
#define ITERATIONS   500
#define LEARNING_RATE   0.25
#define MOMENTUM   0.15
#define OK_ERROR   0.015
#define TRUE_OUTPUT   0.95
#define FALSE_OUTPUT   0.05
#define CUT_OFF   ((TRUE_OUTPUT + FALSE_OUTPUT)/2.0)
#define MAX_OK_ERROR   ((TRUE_OUTPUT - CUT_OFF) - .05)
#define MAX_COUNTER_PER_CYCLE   500
#define MAX_FACES_PER_CYCLE   100
#define FACE_DISTANCE   6
#define FACE_MIN   15

Functions

annie::TrainingSetmake_face_training_set (string FaceDir, string fileName)
bool training_set_guess (string FaceDir, string NonFaceDir, string fileName, int num_images)
bool add_non_training_set (string NonFaceDir, annie::TrainingSet &T)
void newTrain (annie::TrainingSet &ts, unsigned int hidden)
void trainNN (string NonFaceDir, annie::TrainingSet &all, annie::TrainingSet &ts, string fileName, int hidden)

Variables

unsigned int start_stop [INPUT_HEIGHT *2]


Define Documentation

#define CUT_OFF   ((TRUE_OUTPUT + FALSE_OUTPUT)/2.0)
 

this is the cutoff value that says where an input is no longer recognised to be a non face and starts to be a face. anything above this value is considered to be a face

#define FACE_DISTANCE   6
 

this is the amount of space that we will look in to combine various faces into a single face

#define FACE_MIN   15
 

this is the number of faces that must be found in that distance to constitute a face being found

#define FALSE_OUTPUT   0.05
 

this is the output that the network will be trained to produce when a non face is placed on the inputs

#define INPUT_NODES   345
 

the number of input nodes in the nural network this value does not equal INPUT_HEIGHT * INPUT_WIDTH because we only look at an oval in the center of the image, not at the entire image.

#define ITERATIONS   500
 

the number of training itterations that the network will go through before the error between the network and the desired results is computed if the error is still to high it will train it this many times again,

#define LEARNING_RATE   0.25
 

this is the learning rate that is passed to the neural network library

#define MAX_COUNTER_PER_CYCLE   500
 

this is the maximum number of false positives that will be added into the training set each time through a training cycle, this is so that after the first run, adding in only faces, that all possible images in the counter set wount be added, it makes it simpler to get a representitive set

#define MAX_FACES_PER_CYCLE   100
 

this is the maximum number of new faces add in each time through the training cycle. see MAX_COUNTER_PER_CYCLE to se why

#define MAX_OK_ERROR   ((TRUE_OUTPUT - CUT_OFF) - .05)
 

this is the maximum error that is ok for any test to be off. This is set so that no training set value will cross CUT_OFF and have the network return the incorrect classification

#define MOMENTUM   0.15
 

this is the momentum that is passed to the nural network program

#define OK_ERROR   0.015
 

this is the error rate that is ok to have. When the computed error rate is lower then this training for the current step will stop. note that you don't want it to be 0, because it takes for ever to achive this and the network will not be as good at recognising data that is not in the training set

#define TRUE_OUTPUT   0.95
 

this is the value that the network will be trained to output when a face is placed on the inputs

#define VERBOSE   false
 

if annie should or shouldnot print during training


Function Documentation

bool add_non_training_set string    NonFaceDir,
annie::TrainingSet   T
 

annie::TrainingSet* make_face_training_set string    FaceDir,
string    fileName
 

the first step in training the network is to compile all of the faces into a training set to train the network with

Parameters:
FaceDir  a directory containing image files of faces. the faces should be INPUT_WIDTH by INPUT_HEIGHT
fileName  the name of the file to save the training set data to
Returns:
true if no errors were encountered else false

void newTrain annie::TrainingSet   ts,
unsigned int    hidden
 

bool training_set_guess string    FaceDir,
string    NonFaceDir,
string    fileName,
int    num_images
 

the first step in training the network is to compile all of the images into a training set to train the network with, this is a tool that will guess at a subset of the complete set to start training with

Parameters:
FaceDir  a directory containing image files of faces. the faces should be INPUT_WIDTH by INPUT_HEIGHT
NonFaceDir  the directory containing images with no faces at all in them.
fileName  the name of the file to save the training set data to
num_images, the  maximum number of images to be added into the training set
Returns:
true if no errors were encountered else false

void trainNN string    NonFaceDir,
annie::TrainingSet   all,
annie::TrainingSet   ts,
string    fileName,
int    hidden
 

train the network in an interesting way


Variable Documentation

unsigned int start_stop[INPUT_HEIGHT*2]
 

this is an array that holds the start and stop values for each line in a face image. as a function looks fo pixles that are part of a face it will only take those that inclusively fall within the numbers that this array holds


Generated on Wed Apr 23 10:42:34 2003 for BioFilter by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002