Skip to content
Snippets Groups Projects
Commit 59f90d21 authored by Amir MOHAMMADI's avatar Amir MOHAMMADI
Browse files

Remove bob.ip.dlib annotator

parent 15c3497e
No related branches found
No related tags found
1 merge request!54Remove bob.ip.dlib annotator
Pipeline #29309 passed
......@@ -57,7 +57,6 @@ def min_face_size_validator(annotations, min_face_size=(32, 32)):
from .Base import Base
from .bobipfacedetect import BobIpFacedetect
from .bobipflandmark import BobIpFlandmark
from .bobipdlib import BobIpDlib
from .bobipmtcnn import BobIpMTCNN
......@@ -84,7 +83,6 @@ __appropriate__(
Base,
BobIpFacedetect,
BobIpFlandmark,
BobIpDlib,
BobIpMTCNN,
)
......
from . import Base, bounding_box_to_annotations
import bob.ip.facedetect
class BobIpDlib(Base):
"""Annotator using bob.ip.dlib"""
def __init__(self, **kwargs):
super(BobIpDlib, self).__init__(**kwargs)
from bob.ip.dlib import DlibLandmarkExtraction
self.detector = DlibLandmarkExtraction(bob_landmark_format=True)
def annotate(self, image, **kwargs):
"""Annotates an image using bob.ip.dlib
Parameters
----------
image : numpy.array
An RGB image in Bob format.
**kwargs
Ignored.
Returns
-------
dict
Annotations contain: (topleft, bottomright, leye, reye, nose,
mouthleft, mouthright).
"""
landmarks = self.detector(image)
if not landmarks:
return None
bounding_box = bob.ip.facedetect.bounding_box_from_annotation(
source='eyes', **landmarks)
landmarks.update(bounding_box_to_annotations(bounding_box))
return landmarks
from bob.bio.face.annotator import BobIpDlib
annotator = BobIpDlib()
......@@ -35,7 +35,6 @@ Face Image Annotators
bob.bio.face.annotator.Base
bob.bio.face.annotator.BobIpFacedetect
bob.bio.face.annotator.BobIpFlandmark
bob.bio.face.annotator.BobIpDlib
bob.bio.face.annotator.BobIpMTCNN
......
......@@ -117,7 +117,7 @@ setup(
'gbu = bob.bio.face.config.database.gbu:database',
'ijba = bob.bio.face.config.database.ijba:database',
'ijbb = bob.bio.face.config.database.ijbb:database',
'ijbc-11 = bob.bio.face.config.database.ijbc:ijbc_11',
'ijbc-covariates = bob.bio.face.config.database.ijbc:ijbc_covariates',
......@@ -142,7 +142,6 @@ setup(
'facedetect = bob.bio.face.config.annotator.facedetect:annotator',
'facedetect-eye-estimate = bob.bio.face.config.annotator.facedetect_eye_estimate:annotator',
'flandmark = bob.bio.face.config.annotator.flandmark:annotator',
'dlib = bob.bio.face.config.annotator.dlib:annotator',
'mtcnn = bob.bio.face.config.annotator.mtcnn:annotator',
],
......
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