From 1ba802d0ae8c06f69b0bcd490ff6502e6aa29092 Mon Sep 17 00:00:00 2001 From: js04181 Date: Mon, 14 Dec 2020 00:34:02 +0900 Subject: [PATCH] modify args complete_path by using os.getcwd() --- FaceRecognizer.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/FaceRecognizer.py b/FaceRecognizer.py index 4f048e0d..cc7830e8 100644 --- a/FaceRecognizer.py +++ b/FaceRecognizer.py @@ -11,6 +11,7 @@ import cv2 import uuid import rotateImage +import os def rect_to_bb(rect): # we will take the bounding box predicted by dlib library @@ -56,9 +57,9 @@ def shape_to_np(shape, dtype="int"): # if you want to use predefined path than define the path in a variable args = { - "shape_predictor": "complete_path/shape_predictor_68_face_landmarks.dat", - "image": "complete_path/input_image.jpg", - "encodings": "complete_path/encodings.pickle", + "shape_predictor": os.getcwd() + "/shape_predictor_68_face_landmarks.dat", + "image": os.getcwd() + "/examples/1.jpg", + "encodings": os.getcwd() + "/encodings/encodings.pickle", "detection_method": "cnn" }