this code uses LBP and KNN to do face recognition.
- Local patch
- P = 8, R = 1
- mapped patterns
- according to the
0-1
/1-0
hop counts to map the initial 256 patterns to 58 uniform and 1 non-uniform patterns.
- according to the
- classification
- use
KNN
(try differentk
) method to do classification. - use
Histogram intersection
to evaluate thedistance
of two LBP descriptors.
- use
- make sure the input images' path is right.
- in this dir, image path is
CroppedYale/
+path in recognition_*.txt
.
- in this dir, image path is
train.m
extracts train images' LBP descriptors.- save them in a file.
- run
run.m
- the acc will be given.
- this code takes quite a long time to do face recognition.
in test set:
k | acc |
---|---|
50 | 0.9641 |
15 | 0.9716 |
5 | 0.9679 |
1 | 0.9868 |
choose k = 1
.