Aug 2016
Project for COMP7502
Gender Classification
Group 23: LIN Zhen, XU Linxiao, ZHU Yilei
opencv 2.4.9
boost 1.60.0
MacOS:
brew install opencv boost
ubuntu:
apt-get install opencv boost
cd face-master
cd src
rm CMakeCache.txt (if any)
cmake .
make
usage: ./train /path/to/test/folder [det]
train folder must have 2 subdir: female and male
e.g.
./train trainSet ----------- # will look for folder: trainSet_output, if exists,then will not do face-detection again
./train trainSet det ------- # force re-do face-detection
usage: ./test /path/to/test/file/or/folder [cal]
test folder for calulation must have 2 subdir: female and male
e.g.
./test testpic/1.jpg ------ # output gender result only
./test testSet cal -------- # output calssfication precision
Result:
both female and male recognition precesion up to 79%
Demo:
https://www.youtube.com/watch?v=aWE7YZFow1o&feature=youtu.be
README.md ------------------------# current file
haarcascade_frontalface_alt.xml - # face detection from opencv 2.4.9
src/ ---------------------------- # all source file
trainSet/ ----------------------- # training set, including female and male pics
testPic/ ------------------------ # test picutres
testSet/ ------------------------ # test set for precision evaluation
ignore/ ------------------------- # reference file and scripts, can ignore
CMakeLists.txt ------------------ # cmake file
trMain.cpp ---------------------- # entry point for training
testMain.cpp -------------------- # entry point for test
myGabor.h ----------------------- # OUR own feature extraction algorithm
myGabor.cpp
pcaImpl.h ----------------------- # OUR own PCA algorithm
pcaImpl.cpp
utils.h ------------------------- # shared by trMain and testMain
utils.cpp