Skip to content

Commit

Permalink
gabor + pca + svm
Browse files Browse the repository at this point in the history
  • Loading branch information
pikamiao1 committed Aug 9, 2016
1 parent 02b6312 commit 72fefe5
Show file tree
Hide file tree
Showing 1,069 changed files with 27,741 additions and 17 deletions.
12 changes: 12 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,15 @@
*.exe
*.out
*.app

# MAC OS
.DS_Store

# CMake
CMakeCache.txt
CMakeFiles
CMakeScripts
Makefile
cmake_install.cmake
install_manifest.txt
CTestTestfile.cmake
104 changes: 104 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,106 @@
# face-master

project for COMP7502
Group 23, Aug 2016

LIN Zhen 3035238333
XU Linxiao 3035237896
ZHU Yilei 3035268948


//============
// dependency
//============

opencv 2.4.9
boost 1.60.0

MacOS:
brew install opencv boost

ubuntu:
apt-get install opencv boost


//=======
// build
//=======

cd face-master
cd src
rm CMakeCache.txt (if any)

cmake .
make


//======
// run
//======

// training program
//-------------------------------

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


// test program
//-------------------------------

usage: ./test /path/to/test/file/or/folder [cal]

# e.g.
./test testpic/1.jpg # output gender result only
./test testSet cal # output calssfication precision
# test folder for calulation must have 2 subdir: female and male


//===========
// file list
//===========

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


// source files under src/
//-------------------------

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


//========
// result
//========

Demo:
https://www.youtube.com/watch?v=aWE7YZFow1o&feature=youtu.be

Result:
precesion up to 79%

249 changes: 249 additions & 0 deletions SVM_PCA.xml

Large diffs are not rendered by default.

Loading

0 comments on commit 72fefe5

Please sign in to comment.