1297rohit / FaceReco

Face Recognition Library
MIT License
17 stars 14 forks source link

Can't parse 'center'. Sequence item with index 0 has a wrong type #2

Open hoanhvvinsofts opened 2 years ago

hoanhvvinsofts commented 2 years ago

File "draft.py", line 8, in fr_object1.train_model(folder) File "C:\Users\Hoan\anaconda3\envs\timekeeping\lib\site-packages\FaceReco\FaceReco.py", line 84, in train_model faceAligned = self.faceDetection(os.path.join(trainpath,im)) File "C:\Users\Hoan\anaconda3\envs\timekeeping\lib\site-packages\FaceReco\FaceReco.py", line 55, in faceDetection faceAligned = self.fa.align(img, gray, dlib.rectangle(x1,y1,x2,y2)) File "C:\Users\Hoan\anaconda3\envs\timekeeping\lib\site-packages\imutils\face_utils\facealigner.py", line 67, in align M = cv2.getRotationMatrix2D(eyesCenter, angle, scale) TypeError: Can't parse 'center'. Sequence item with index 0 has a wrong type

Can you fix this please

andresso commented 2 years ago

I'm having the same issue. When I tried to debug using the source files, I got:

Input In [5], in FaceReco.init(self) 13 self.serial_number = FaceReco.number_of_object_count 14 posepre=pose_predictor_model_location() ---> 15 self.pose_predictor = dlib.shape_predictor(posepre) 16 detect = face_recognition_model_location() 17 self.face_encoder=dlib.face_recognition_model_v1(detect)

RuntimeError: Error deserializing object of type int

Seems like there is something wrong with *.dat files now.