face_recognition_models\models\shape_predictor_68_face_landmarks.dat
- 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
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
Thanks. Problem solved!
HI! hasanparasteh can you guide me please against this problem? How to deploy it.
Same I couldn't find any answers online
Thanks. Problem solved!
I did the same procedure and it didn't resolve.
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.
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.
Thanks. Problem solved!
I did the same procedure and it didn't resolve.
Did you know how to solve it?
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
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