diff --git a/faceai/emotion.py b/faceai/emotion.py index bf9eef9..6f6d15d 100644 --- a/faceai/emotion.py +++ b/faceai/emotion.py @@ -9,7 +9,7 @@ startTime = datetime.datetime.now() emotion_classifier = load_model( - 'E:\\Github\\faceai\\faceai\\classifier\\emotion_models\\simple_CNN.530-0.65.hdf5') + 'classifier/emotion_models/simple_CNN.530-0.65.hdf5') endTime = datetime.datetime.now() print(endTime - startTime) @@ -23,9 +23,9 @@ 6: '平静' } -img = cv2.imread("E:\\Github\\faceai\\faceai\\img\\emotion\\emotion.png") +img = cv2.imread("img/emotion/emotion.png") face_classifier = cv2.CascadeClassifier( - "F:\\Python3.6.5\\Lib\\site-packages\\opencv-master\\data\\haarcascades\\haarcascade_frontalface_default.xml" + "C:\Python36\Lib\site-packages\opencv-master\data\haarcascades\haarcascade_frontalface_default.xml" ) gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) faces = face_classifier.detectMultiScale(