52 version causes trouble for stream

This commit is contained in:
Sefik Ilkin Serengil 2021-05-28 09:32:06 +03:00
parent ca0072170d
commit 804fbaa511
2 changed files with 5 additions and 1 deletions

View File

@ -12,6 +12,7 @@ os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
from deepface import DeepFace from deepface import DeepFace
from deepface.extendedmodels import Age from deepface.extendedmodels import Age
from deepface.commons import functions, realtime, distance as dst from deepface.commons import functions, realtime, distance as dst
from deepface.detectors import OpenCvWrapper
def analysis(db_path, model_name, distance_metric, enable_face_analysis = True def analysis(db_path, model_name, distance_metric, enable_face_analysis = True
, source = 0, time_threshold = 5, frame_threshold = 5): , source = 0, time_threshold = 5, frame_threshold = 5):
@ -104,7 +105,7 @@ def analysis(db_path, model_name, distance_metric, enable_face_analysis = True
#----------------------- #-----------------------
opencv_path = functions.get_opencv_path() opencv_path = OpenCvWrapper.get_opencv_path()
face_detector_path = opencv_path+"haarcascade_frontalface_default.xml" face_detector_path = opencv_path+"haarcascade_frontalface_default.xml"
face_cascade = cv2.CascadeClassifier(face_detector_path) face_cascade = cv2.CascadeClassifier(face_detector_path)

3
tests/stream.py Normal file
View File

@ -0,0 +1,3 @@
from deepface import DeepFace
DeepFace.stream("dataset")