diff --git a/bob/pad/face/utils/face_detection_utils.py b/bob/pad/face/utils/face_detection_utils.py index 2214958d80a15c7730517b5a82b49d52ab4a0abe..1bfff767bf8453ad8f5202d430e7dd12e6514487 100644 --- a/bob/pad/face/utils/face_detection_utils.py +++ b/bob/pad/face/utils/face_detection_utils.py @@ -27,21 +27,23 @@ def detect_face_in_image(image): Dictionary must be as follows ``{'topleft': (row, col), 'bottomright': (row, col)}``. """ - bounding_box, _ = bob.ip.dlib.FaceDetector().detect_single_face(image) + data = bob.ip.dlib.FaceDetector().detect_single_face(image) annotations = {} - if bounding_box is not None: + if data is None: - annotations['topleft'] = bounding_box.topleft + annotations['topleft'] = (0, 0) - annotations['bottomright'] = bounding_box.bottomright + annotations['bottomright'] = (0, 0) else: - annotations['topleft'] = (0, 0) + bounding_box = data[0] - annotations['bottomright'] = (0, 0) + annotations['topleft'] = bounding_box.topleft + + annotations['bottomright'] = bounding_box.bottomright return annotations diff --git a/develop.cfg b/develop.cfg index f8617f19c93663008158d1b270e9c09b0cdd219a..ddc5fe3db1435ffa3c41f4c9b1d35bda929ac6ff 100644 --- a/develop.cfg +++ b/develop.cfg @@ -22,6 +22,7 @@ eggs = bob.pad.face bob.learn.activation bob.ip.flandmark bob.ip.facedetect + bob.ip.dlib bob.ip.qualitymeasure bob.learn.linear bob.db.base @@ -56,6 +57,7 @@ develop = src/bob.extension src/bob.learn.activation src/bob.ip.flandmark src/bob.ip.facedetect + src/bob.ip.dlib src/bob.ip.qualitymeasure src/bob.learn.linear src/bob.db.base @@ -92,6 +94,7 @@ bob.io.matlab = git git@gitlab.idiap.ch:bob/bob.io.matlab bob.learn.activation = git git@gitlab.idiap.ch:bob/bob.learn.activation bob.ip.flandmark = git git@gitlab.idiap.ch:bob/bob.ip.flandmark bob.ip.facedetect = git git@gitlab.idiap.ch:bob/bob.ip.facedetect +bob.ip.dlib = git git@gitlab.idiap.ch:bob/bob.ip.dlib bob.ip.qualitymeasure = git git@gitlab.idiap.ch:bob/bob.ip.qualitymeasure bob.learn.linear = git git@gitlab.idiap.ch:bob/bob.learn.linear bob.db.base = git git@gitlab.idiap.ch:bob/bob.db.base