Pleaes install the GSL Scientific Library before using this program.
Mac:
http://connor-johnson.com/2014/10/12/using-the-gnu-scientific-library-on-a-mac/
Ubuntu:
https://askubuntu.com/questions/490465/install-gnu-scientific-library-gsl-on-ubuntu-14-04-via-terminal
Plase follow the following steps for training your own model.
- Edit train/Makefile so that it contains the right GSL library path as installed on your machine.
- Put training images of size 20x20 pixels in the training_set/ folder. The images can be in either .jpg or ".png" format. Name the images in sequence with increasing numbers. For example, name the first training image as 0.jpg and second one as 1.jpg.
- Run mkdir models and mkdir data under the project directory.
- Run train/prepTrainingSet.sh
- Run mkdir build inside train/ folder.
- Run make inside train/ folder.
- cd into train/build/ and run the built binary train.
- The trained models can be found as txt files under models/ folder.
Please follow the following steps for using the program to recognize a face image.
- Put an image in either .jpg or .png format inside the input/ folder. The width and height of the image should both be at least 20px.
- Run prepInput.sh under the project directory.
- Run mkdir build under the project directory.
- Run make under the project directory.
- cd into build/ and run the built binary main.
- The program will output the index of the trained images, ordered by numbers in their names, that is closest to the input image.