module 'face_recognition' has no attribute 'load_image_file'

See original GitHub issue
  • face_recognition version: latest
  • Python version: 3
  • Operating System: raspberry pi

Description

Installed dlib using: https://gist.github.com/ageitgey/629d75c1baac34dfa5ca2a1928a7aeaf and pip3 install face_recognition. Cloned the samples repo.

What I Did

pi@raspberrypi:~ $ source ~/.profile
pi@raspberrypi:~ $ workon cv
(cv) pi@raspberrypi:~ $ python facerec.py
Traceback (most recent call last):
  File "facerec.py", line 17, in <module>
    obama_image = face_recognition.load_image_file("obama.jpg")
AttributeError: module 'face_recognition' has no attribute 'load_image_file'
(cv) pi@raspberrypi:~ $

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:37 (8 by maintainers)

github_iconTop GitHub Comments

37reactions
ageitgeycommented, Jan 26, 2018

Do you have another file in that folder called face_recognition.py maybe?

16reactions
ageitgeycommented, Jul 16, 2018

Don’t name your own script face_recogntion.py because then you are just importing your own script in itself instead of importing the library 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

partially initialized module 'face_recognition' has no attribute ...
And now I am trying to "extract features from Face" using code given in above link. While running script, I am getting below...
Read more >
Face Recognition Documentation - Read the Docs
you do face recognition on a folder of images from the command line! 1.1 Features ... Attribute Error: 'Module' object has no attribute....
Read more >
hi, i cant load my images correctly i think… i get this error
File “camera_recognition.py”, line 8, in Eirik_image ... AttributeError: module 'face_recognition' has no attribute 'load_image_file'
Read more >
Face Recognition 1.4.0 documentation
Solution: The face_recognition_models file is too big for your available pip cache memory. Instead,. try pip2 --no-cache-dir install face_recognition to avoid ...
Read more >
How to fix module cv2 face has no attribute ... - YouTube
face recognition attendance system project | raspberry pi 4 opencv attendance project | raspberry pi · python AttributeError: 'dict_keys' object ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found