Skip to content
Snippets Groups Projects
Commit 56512871 authored by André Anjos's avatar André Anjos :speech_balloon:
Browse files

Unlock in critical regions; Implements testing

parent b9f4cf37
No related branches found
No related tags found
No related merge requests found
...@@ -96,8 +96,11 @@ class Localizer { ...@@ -96,8 +96,11 @@ class Localizer {
det["bbox"] = make_tuple(r->x, r->y, r->width, r->height); det["bbox"] = make_tuple(r->x, r->y, r->width, r->height);
int bbox[4] = {r->x, r->y, r->x + r->width, r->y + r->height}; int bbox[4] = {r->x, r->y, r->x + r->width, r->y + r->height};
flandmark_detect(ipl_image.get(), bbox, m_flandmark.get(), {
m_landmarks.get()); bob::python::no_gil unlock;
flandmark_detect(ipl_image.get(), bbox, m_flandmark.get(),
m_landmarks.get());
}
list lmlist; ///< landmark list list lmlist; ///< landmark list
......
...@@ -39,4 +39,6 @@ class FlandmarkTest(unittest.TestCase): ...@@ -39,4 +39,6 @@ class FlandmarkTest(unittest.TestCase):
"flandmark/flandmark_model.dat") "flandmark/flandmark_model.dat")
for i, f in enumerate(bob.io.VideoReader(INPUT_VIDEO)): for i, f in enumerate(bob.io.VideoReader(INPUT_VIDEO)):
self.assertTrue(op(bob.ip.rgb_to_gray(f))) v = bob.ip.rgb_to_gray(f)
print v
self.assertTrue(op(v))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment