Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Face recognition model #19

Open
VISHAL1003MAX opened this issue Jan 11, 2024 · 4 comments
Open

Face recognition model #19

VISHAL1003MAX opened this issue Jan 11, 2024 · 4 comments

Comments

@VISHAL1003MAX
Copy link

  • face_recognition version:
  • Python version:
  • Operating System:

Description

I am unable to install face_recognition_model.
If anybody knows please help me .
IMG20240102161114
Uploading IMG20240102161322.jpg…

@Steelshanks
Copy link

In Pycharm click on File => Settings => Expand Project: YourProject, click on Python Interpreter. This should show all packages that are installed for this project (such as cv2, numpy, face-recognition, face_recognition_models, etc.). If you don't see them, click on the + symbol in the upper left corner of the Python Packages tool window and add all the packages you need for your project. If the packages are all there and you are still getting the error, try installing the package "setuptools" in addition to the other packages. This is what worked for me.

@LookslikeLenni
Copy link

LookslikeLenni commented May 14, 2024

I cant anymore, reinstalled and restarted everthing like 10 times now.

PS C:\Users\lenna\OneDrive\Dokumente\Obsidian\Uni\06_Sem\SWP\Vue+Backend\datenschutz-adieu-gesichtserkennung> python test_script.py
**Please install face_recognition_models with this command before using face_recognition:

pip install git+https://github.com/ageitgey/face_recognition_models**
PS C:\Users\lenna\OneDrive\Dokumente\Obsidian\Uni\06_Sem\SWP\Vue+Backend\datenschutz-adieu-gesichtserkennung> pip install git+https://github.com/ageitgey/face_recognition_models
Defaulting to user installation because normal site-packages is not writeable
Collecting git+https://github.com/ageitgey/face_recognition_models
Cloning https://github.com/ageitgey/face_recognition_models to c:\users\lenna\appdata\local\temp\pip-req-build-9enqmvh_
Running command git clone --filter=blob:none --quiet https://github.com/ageitgey/face_recognition_models 'C:\Users\lenna\AppData\Local\Temp\pip-req-build-9enqmvh_'
Resolved https://github.com/ageitgey/face_recognition_models to commit e67de71
Installing build dependencies ... done
Getting requirements to build wheel ... done
Installing backend dependencies ... done
Preparing metadata (pyproject.toml) ... done
PS C:\Users\lenna\OneDrive\Dokumente\Obsidian\Uni\06_Sem\SWP\Vue+Backend\datenschutz-adieu-gesichtserkennung> pip install face_recognition
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: face_recognition in c:\users\lenna\appdata\local\packages\pythonsoftwarefoundation.python.3.12_qbz5n2kfra8p0\localcache\local-packages\python312\site-packages (1.3.0)
Requirement already satisfied: face-recognition-models>=0.3.0 in c:\users\lenna\appdata\local\packages\pythonsoftwarefoundation.python.3.12_qbz5n2kfra8p0\localcache\local-packages\python312\site-packages (from face_recognition) (0.3.0)
Requirement already satisfied: Click>=6.0 in c:\users\lenna\appdata\local\packages\pythonsoftwarefoundation.python.3.12_qbz5n2kfra8p0\localcache\local-packages\python312\site-packages (from face_recognition) (8.1.7)
Requirement already satisfied: dlib>=19.7 in c:\users\lenna\appdata\local\packages\pythonsoftwarefoundation.python.3.12_qbz5n2kfra8p0\localcache\local-packages\python312\site-packages (from face_recognition) (19.24.4)
Requirement already satisfied: numpy in c:\users\lenna\appdata\local\packages\pythonsoftwarefoundation.python.3.12_qbz5n2kfra8p0\localcache\local-packages\python312\site-packages (from face_recognition) (1.26.4)
Requirement already satisfied: Pillow in c:\users\lenna\appdata\local\packages\pythonsoftwarefoundation.python.3.12_qbz5n2kfra8p0\localcache\local-packages\python312\site-packages (from face_recognition) (10.3.0)
Requirement already satisfied: colorama in c:\users\lenna\appdata\local\packages\pythonsoftwarefoundation.python.3.12_qbz5n2kfra8p0\localcache\local-packages\python312\site-packages (from Click>=6.0->face_recognition) (0.4.6)
PS C:\Users\lenna\OneDrive\Dokumente\Obsidian\Uni\06_Sem\SWP\Vue+Backend\datenschutz-adieu-gesichtserkennung> python test_script.py
**Please install face_recognition_models with this command before using face_recognition:

pip install git+https://github.com/ageitgey/face_recognition_models**

Edit 15/05/2024:
I got it now, make sure have installed cmake via pip, or check if the env var is set right...

@SanketKudale
Copy link

SanketKudale commented Jun 5, 2024

which environment variable
I am having same issue

(venv) ubuntu@ip-172-31-19-12:/var/digidocs$ sudo venv/bin/pip3 install git+https://github.com/ageitgey/face_recognition_models
Collecting git+https://github.com/ageitgey/face_recognition_models
  Cloning https://github.com/ageitgey/face_recognition_models to /tmp/pip-req-build-1iv0i0kb
  Running command git clone --filter=blob:none --quiet https://github.com/ageitgey/face_recognition_models /tmp/pip-req-build-1iv0i0kb
  Resolved https://github.com/ageitgey/face_recognition_models to commit e67de717267507d1e9246de95692eb8be736ab61
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
  Preparing metadata (pyproject.toml) ... done
(venv) ubuntu@ip-172-31-19-12:/var/digidocs$ sudo venv/bin/python3 main.py
Please install `face_recognition_models` with this command before using `face_recognition`:

pip install git+https://github.com/ageitgey/face_recognition_models
(venv) ubuntu@ip-172-31-19-12:/var/digidocs$ 

@flaviofilipe
Copy link

I had the same issue.
First, I tried to install the face_recognition_models, but it was already installed.
Then I fixed accessing the face_recognition lib which imports the models:
.venv\Lib\site-packages\face_recognition\api.py

I printed the Exception to see the real error:

try:
    import face_recognition_models
except Exception as e:
    print(e)
    print("Please install `face_recognition_models` with this command before using `face_recognition`:\n")
    print("pip install git+https://github.com/ageitgey/face_recognition_models")
    quit()

Here is the error message:

No module named 'pkg_resources'
Please install `face_recognition_models` with this command before using `face_recognition`:

pip install git+https://github.com/ageitgey/face_recognition_models

In the end, I just updated the setuptools and it worked for me:
pip install --upgrade setuptools

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants