face_recognition icon indicating copy to clipboard operation
face_recognition copied to clipboard

face_recognition_models\models\shape_predictor_68_face_landmarks.dat

Open hasanparasteh opened this issue 8 years ago • 10 comments

  • Python version: 3.6.6
  • Operating System: Win 10

Description

I tried to make a exe file with pyinstaller and I get this message that it cant openshape_predictor_68_face_landmarks.dat. Is there any way to resolve this problem?

Traceback (most recent call last):
  File "face-cropper.py", line 5, in <module>
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
  File "C:\Program Files\Python36\lib\site-packages\pyinstaller-3.5.dev0+99c68eaee-py3.6.egg\PyInstaller\loader\pyimod03_importers.py", line 627, in exec_module
    exec(bytecode, module.__dict__)
  File "site-packages\face_recognition\__init__.py", line 7, in <module>
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
  File "C:\Program Files\Python36\lib\site-packages\pyinstaller-3.5.dev0+99c68eaee-py3.6.egg\PyInstaller\loader\pyimod03_importers.py", line 627, in exec_module
    exec(bytecode, module.__dict__)
  File "site-packages\face_recognition\api.py", line 17, in <module>
RuntimeError: Unable to open C:\Users\Hasan\Desktop\FaceCropper\dist\face-cropper\face_recognition_models\models\shape_predictor_68_face_landmarks.dat
[900] Failed to execute script face-cropper

hasanparasteh avatar Sep 23 '18 15:09 hasanparasteh

You must download and deploy model files. The model files are https://github.com/ageitgey/face_recognition_models.

Please refere to https://github.com/ageitgey/face_recognition/blob/master/face_recognition/api.py

takuya-takeuchi avatar Sep 24 '18 16:09 takuya-takeuchi

Thanks. Problem solved!

hasanparasteh avatar Sep 26 '18 19:09 hasanparasteh

HI! hasanparasteh can you guide me please against this problem? How to deploy it.

MMohtasham avatar Oct 29 '20 07:10 MMohtasham

Same I couldn't find any answers online

Chouia-Abderrahman avatar May 14 '21 14:05 Chouia-Abderrahman

Thanks. Problem solved!

I did the same procedure and it didn't resolve.

vinithius2 avatar Sep 09 '21 02:09 vinithius2

https://github.com/ageitgey/face_recognition_models/blob/master/face_recognition_models/init.py

Answer is here. you must deploy all model files to models directory.

takuya-takeuchi avatar Sep 09 '21 13:09 takuya-takeuchi

https://github.com/ageitgey/face_recognition_models/blob/master/face_recognition_models/init.py

Answer is here. you must deploy all model files to models directory.

Could you please explain what you mean by deploying all model files to models directory? I have this issue as well.

Sherif-Sakran avatar Jul 31 '22 02:07 Sherif-Sakran

Thanks. Problem solved!

I did the same procedure and it didn't resolve.

Did you know how to solve it?

Sherif-Sakran avatar Jul 31 '22 02:07 Sherif-Sakran

Ran into this same issue.

https://realpython.com/python-gui-tkinter https://realpython.com/pyinstaller-python https://pyinstaller.org/en/stable/usage.html#cmdoption-collect-all

Solution: pyinstaller GUI.py -F --collect-all face_recognition_models Run(mac): ./dist/GUI

chrisbarnes2000 avatar Oct 28 '22 20:10 chrisbarnes2000

You must download and deploy model files. The model files are https://github.com/ageitgey/face_recognition_models.

Lütfen bakınız https://github.com/ageitgey/face_recognition/blob/master/face_recognition/api.py

Thank U so much ,that was so useful <3

Diyaeddin-Habdo avatar Feb 09 '24 17:02 Diyaeddin-Habdo