ageitgey / ageitgey/face_recognition

Unable to import face_recognition

Open
#856 9 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
56.8k
Forks
13.7k
PR merge metrics
No merged PRs in 30d

Description

  • face_recognition version:1.2.3
  • Python version:3.6.4
  • Operating System:Windows 10 64bit
Description

I am trying to import face_recognition after i "successfully" installed it.

What I Did

C:\Users\ירין>pip install face_recognition
Requirement already satisfied: face_recognition in c:\users\ירין\appdata\local\programs\python\python36\lib\site-packages (1.2.3)
Requirement already satisfied: face-recognition-models>=0.3.0 in c:\users\ירין\appdata\local\programs\python\python36\lib\site-packages (from face_recognition) (0.3.0)
Requirement already satisfied: Pillow in c:\users\ירין\appdata\local\programs\python\python36\lib\site-packages (from face_recognition) (5.3.0)
Requirement already satisfied: Click>=6.0 in c:\users\ירין\appdata\local\programs\python\python36\lib\site-packages (from face_recognition) (7.0)
Requirement already satisfied: numpy in c:\users\ירין\appdata\local\programs\python\python36\lib\site-packages (from face_recognition) (1.15.4)
Requirement already satisfied: dlib>=19.7 in c:\users\ירין\appdata\local\programs\python\python36\lib\site-packages (from face_recognition) (19.7.0)
You are using pip version 18.1, however version 19.1.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

C:\Users\ירין>pip install cmake
Requirement already satisfied: cmake in c:\users\ירין\appdata\local\programs\python\python36\lib\site-packages (3.14.4)
You are using pip version 18.1, however version 19.1.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

C:\Users\ירין>pip install dlib
Requirement already satisfied: dlib in c:\users\ירין\appdata\local\programs\python\python36\lib\site-packages (19.7.0)
You are using pip version 18.1, however version 19.1.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command

Then when i am trying to import it..

import face_recognition
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\ירין\AppData\Local\Programs\Python\Python36\lib\site-packages\face_recognition_init_.py", line 7, in
from .api import load_image_file, face_locations, batch_face_locations, face_landmarks, face_encodings, compare_faces, face_distance
File "C:\Users\ירין\AppData\Local\Programs\Python\Python36\lib\site-packages\face_recognition\api.py", line 17, in
pose_predictor_68_point = dlib.shape_predictor(predictor_68_point_model)
RuntimeError: Unable to open C:\Users\ירין\AppData\Local\Programs\Python\Python36\lib\site-packages\face_recognition_models\models\shape_predictor_68_face_landmarks.dat

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with face_recognition/init.py and api.py, then inspect the installed face_recognition_models/models directory named in the traceback. Reproduce the import on the reported Python 3.6 and Windows setup and verify whether shape_predictor_68_face_landmarks.dat is present and readable. Done means the import completes without the missing-model RuntimeError.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, python
Domain
machine-learning
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.