Coder Social home page Coder Social logo

1297rohit / facereco Goto Github PK

View Code? Open in Web Editor NEW
17.0 17.0 14.0 93.52 MB

Face Recognition Library

License: MIT License

Python 100.00%
dlib face face-detection face-recognition facerecognition facerecognitionproject opencv pypi pypi-package python

facereco's People

Contributors

1297rohit avatar kanchansharma17 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

facereco's Issues

Error With FaceAligner

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

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

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

TypeError: Can't parse 'center'. Sequence item with index 0 has a wrong type

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")

error

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.