diff --git a/deepface/commons/realtime.py b/deepface/commons/realtime.py index 4279dd8..92da303 100644 --- a/deepface/commons/realtime.py +++ b/deepface/commons/realtime.py @@ -12,6 +12,7 @@ os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2' from deepface import DeepFace from deepface.extendedmodels import Age 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 , 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_cascade = cv2.CascadeClassifier(face_detector_path) diff --git a/tests/stream.py b/tests/stream.py new file mode 100644 index 0000000..2b15f1b --- /dev/null +++ b/tests/stream.py @@ -0,0 +1,3 @@ +from deepface import DeepFace + +DeepFace.stream("dataset")