From c48e472a00ea3e03afdc446b8c394511d4e791ae Mon Sep 17 00:00:00 2001 From: tyousou <34936469+tyousou@users.noreply.github.com> Date: Tue, 16 Apr 2019 20:34:35 +0800 Subject: [PATCH] Add DLIBExtractor.extract Fix AttributeError: 'DLIBExtractor' object has no attribute 'extract' --- facelib/DLIBExtractor.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/facelib/DLIBExtractor.py b/facelib/DLIBExtractor.py index a91164d..bfb97c5 100644 --- a/facelib/DLIBExtractor.py +++ b/facelib/DLIBExtractor.py @@ -20,6 +20,9 @@ class DLIBExtractor(object): def __exit__(self, exc_type=None, exc_value=None, traceback=None): del self.dlib_cnn_face_detector return False #pass exception between __enter__ and __exit__ to outter level + + def extract(self, input_image, is_bgr=True): + return self.extract_from_bgr(input_image) def extract_from_bgr (self, input_image): input_image = input_image[:,:,::-1].copy()