1297rohit / facereco Goto Github PK
View Code? Open in Web Editor NEWFace Recognition Library
License: MIT License
Face Recognition Library
License: MIT License
Hi @1297rohit, @kanchanSharma17
I was going through your article for face recognition in towardsdatascience.
I got the following error
line :-
faceAligned =fa.align(img, gray, dlib.rectangle(x1,y1,x2,y2))
Error :-
Traceback (most recent call last):
File "face-recognition.py", line 55, in
faceAligned =fa.align(img, gray, dlib.rectangle(x1,y1,x2,y2))
File "/home/user/.local/lib/python3.6/site-packages/imutils/face_utils/facealigner.py", line 68, in align
M = cv2.getRotationMatrix2D(eyesCenter, angle, scale)
TypeError: Can't parse 'center'. Sequence item with index 0 has a wrong type
Can you tell me, how I can resolve this?
Thanks
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
Mac OS
$ python -V
Python 3.9.16
#!/usr/bin/python
# -*- coding: UTF-8 -*-
"""
pip install FaceReco
"""
import os
import FaceReco.FaceReco as fr
szCurPath = os.getcwd()
fr_object1 = fr.FaceReco()
fr_object1.train_model(szCurPath + "/testImg")
Traceback (most recent call last):
File "/Volumes/Home/ai/face/saveTz1.py", line 13, in <module>
fr_object1.train_model(szCurPath + "/testImg")
File "/Users/51pwn/anaconda3/envs/ColossalAI/lib/python3.9/site-packages/FaceReco/FaceReco.py", line 84, in train_model
faceAligned = self.faceDetection(os.path.join(trainpath,im))
File "/Users/51pwn/anaconda3/envs/ColossalAI/lib/python3.9/site-packages/FaceReco/FaceReco.py", line 55, in faceDetection
faceAligned = self.fa.align(img, gray,dlib.rectangle(x1,y1,x2,y2))
File "/Users/51pwn/anaconda3/envs/ColossalAI/lib/python3.9/site-packages/imutils/face_utils/facealigner.py", line 68, in align
M = cv2.getRotationMatrix2D(eyesCenter, angle, scale)
TypeError: Can't parse 'center'. Sequence item with index 0 has a wrong type
I am getting this error when I try to call face detection function.
AttributeError: 'FaceReco' object has no attribute 'net'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.