Skip to content

Commit

Permalink
dlib, mtcnn and lgbm optional
Browse files Browse the repository at this point in the history
  • Loading branch information
Şefik Serangil committed Sep 17, 2020
1 parent f3de735 commit 33fe352
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion deepface/basemodels/DlibResNet.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import dlib
import dlib #19.20.0
import os
import zipfile
import bz2
Expand Down
4 changes: 2 additions & 2 deletions deepface/commons/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
import keras
import bz2
from deepface.commons import distance
from mtcnn import MTCNN

def loadBase64Img(uri):
encoded_data = uri.split(',')[1]
Expand Down Expand Up @@ -276,7 +275,7 @@ def detect_face(img, detector_backend = 'opencv', grayscale = False, enforce_det
raise ValueError("Face could not be detected. Please confirm that the picture is a face photo or consider to set enforce_detection param to False.")

elif detector_backend == 'mtcnn':
from mtcnn import MTCNN #0.1.0
mtcnn_detector = MTCNN()

detections = mtcnn_detector.detect_faces(img)
Expand Down Expand Up @@ -432,6 +431,7 @@ def align_face(img, detector_backend = 'opencv'):

elif detector_backend == 'mtcnn':

from mtcnn import MTCNN #0.1.0
mtcnn_detector = MTCNN()
detections = mtcnn_detector.detect_faces(img)

Expand Down
5 changes: 1 addition & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,4 @@ Pillow>=5.2.0
opencv-python>=3.4.4
tensorflow>=1.9.0
keras>=2.2.0
Flask>=1.1.2
lightgbm>=2.3.1
dlib>=19.20.0
mtcnn>=0.1.0
Flask>=1.1.2

0 comments on commit 33fe352

Please sign in to comment.