无法打开 shape_predictor_68_face_landmarks.dat

问题描述 投票:0回答:0

当我运行命令 >python manage.py runserver 时,我得到一个错误,我不知道如何解决它,谷歌和关于这个主题的类似问题没有帮助。我试图替换face_recognition文件夹中的文件,但它也没有帮助我。

Exception in thread django-main-thread:
Traceback (most recent call last):
  File "C:\Users\Пользователь\AppData\Local\Programs\Python\Python36\lib\threading.py", line 916, in _bootstrap_inner
    self.run()
  File "C:\Users\Пользователь\AppData\Local\Programs\Python\Python36\lib\threading.py", line 864, in run
    self._target(*self._args, **self._kwargs)
  File "C:\Users\Пользователь\AppData\Local\Programs\Python\Python36\lib\site-packages\django\utils\autoreload.py", line 53, in wrapper
    fn(*args, **kwargs)
  File "C:\Users\Пользователь\AppData\Local\Programs\Python\Python36\lib\site-packages\django\core\management\commands\runserver.py", line 117, in inner_run
    self.check(display_num_errors=True)
  File "C:\Users\Пользователь\AppData\Local\Programs\Python\Python36\lib\site-packages\django\core\management\base.py", line 395, in check
    include_deployment_checks=include_deployment_checks,
  File "C:\Users\Пользователь\AppData\Local\Programs\Python\Python36\lib\site-packages\django\core\management\base.py", line 382, in _run_checks
    return checks.run_checks(**kwargs)
  File "C:\Users\Пользователь\AppData\Local\Programs\Python\Python36\lib\site-packages\django\core\checks\registry.py", line 72, in run_checks
    new_errors = check(app_configs=app_configs)
  File "C:\Users\Пользователь\AppData\Local\Programs\Python\Python36\lib\site-packages\django\core\checks\urls.py", line 13, in check_url_config
    return check_resolver(resolver)
  File "C:\Users\Пользователь\AppData\Local\Programs\Python\Python36\lib\site-packages\django\core\checks\urls.py", line 23, in check_resolver
    return check_method()
  File "C:\Users\Пользователь\AppData\Local\Programs\Python\Python36\lib\site-packages\django\urls\resolvers.py", line 407, in check
    for pattern in self.url_patterns:
  File "C:\Users\Пользователь\AppData\Local\Programs\Python\Python36\lib\site-packages\django\utils\functional.py", line 48, in __get__
    res = instance.__dict__[self.name] = self.func(instance)
  File "C:\Users\Пользователь\AppData\Local\Programs\Python\Python36\lib\site-packages\django\urls\resolvers.py", line 588, in url_patterns
    patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
  File "C:\Users\Пользователь\AppData\Local\Programs\Python\Python36\lib\site-packages\django\utils\functional.py", line 48, in __get__
    res = instance.__dict__[self.name] = self.func(instance)
  File "C:\Users\Пользователь\AppData\Local\Programs\Python\Python36\lib\site-packages\django\urls\resolvers.py", line 581, in urlconf_module
    return import_module(self.urlconf_name)
  File "C:\Users\Пользователь\AppData\Local\Programs\Python\Python36\lib\importlib\__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 994, in _gcd_import
  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 "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "C:\Users\Пользователь\Deepfake_detection_using_deep_learning\Django Application\project_settings\urls.py", line 10, in <module>
    path('', include('ml_app.urls')),
  File "C:\Users\Пользователь\AppData\Local\Programs\Python\Python36\lib\site-packages\django\urls\conf.py", line 34, in include
    urlconf_module = import_module(urlconf_module)
  File "C:\Users\Пользователь\AppData\Local\Programs\Python\Python36\lib\importlib\__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 994, in _gcd_import
  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 "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "C:\Users\Пользователь\Deepfake_detection_using_deep_learning\Django Application\ml_app\urls.py", line 5, in <module>
    from . import views
  File "C:\Users\Пользователь\Deepfake_detection_using_deep_learning\Django Application\ml_app\views.py", line 11, in <module>
    import face_recognition
  File "C:\Users\Пользователь\AppData\Local\Programs\Python\Python36\lib\site-packages\face_recognition\__init__.py", line 7, in <module>
    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 20, in <module>
    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

我希望能解决我的问题

django opencv face-recognition python-venv
© www.soinside.com 2019 - 2024. All rights reserved.