'openface' has no attribute 'AlignDlib'

1.1k views Asked by At

I am following (https://medium.com/@ageitgey/machine-learning-is-fun-part-4-modern-face-recognition-with-deep-learning-c3cffc121d78) to make a face recognition. I am on step 2 i.e. finding landmarks and affine transformation. Error message is

    align = openface.AlignDlib(args.dlibFacePredictor)
AttributeError: module 'openface' has no attribute 'AlignDlib'

Also, share how to find embedding from the face using openface in python3.6 Is this issue because of python3.x?

1

There are 1 answers

0
Orion Montoya C. On

I had the same problem and fixed as follows:

I was trying to import openface and use openface.AlignDlib in my script python/step-2b_projecting-faces.py, but the class AlignDlib was not in the route of the import, the file that has the class I need is python/openface/openface/align_dlib.pyalign_dlib.py. So I fixed with changed the import route like this: import openface.openface.align_dlib as openface And works Good. I hope this works. Note: My python is: Python 3.6.8.