Face recognition

This change adds support to retrieve 128D face descriptor for a given
landmark. Since now we have full pipeline, README.md has "general usage"
section and integration test is added. Also, return from
FaceLandmarkDetection is changed, so it can be given to FaceRecognition
without changes. All obtained values are crosschecked to match with values
from python versions (however, if num_jitters is > 1 in FaceRecognition,
values don't match between PHP and Python, I suspect it is related to usage
of dlib::rand, but still investigating)..
This commit is contained in:
Branko Kokanovic
2018-08-28 00:37:46 +02:00
parent 1a402fc63c
commit 1e830a3285
11 changed files with 468 additions and 32 deletions

View File

@@ -0,0 +1,15 @@
--TEST--
Testing FaceRecognition constructor without arguments
--SKIPIF--
<?php if (!extension_loaded("pdlib")) print "skip"; ?>
--FILE--
<?php
try {
new FaceRecognition();
} catch (Exception $e) {
var_dump($e->getMessage());
}
?>
--EXPECT--
Warning: FaceRecognition::__construct() expects exactly 1 parameter, 0 given in /home/branko/pdlib/tests/face_recognition_ctor_error.php on line 3
string(43) "Unable to parse face_recognition_model_path"