mirror of
https://github.com/serengil/deepface.git
synced 2025-06-06 19:45:21 +00:00
Merge pull request #1285 from ProgramadorArtificial/bugfix/fix_importError_menssage
Fix importError menssage
This commit is contained in:
commit
f7db792ed4
@ -27,8 +27,8 @@ class DlibClient(Detector):
|
|||||||
import dlib
|
import dlib
|
||||||
except ModuleNotFoundError as e:
|
except ModuleNotFoundError as e:
|
||||||
raise ImportError(
|
raise ImportError(
|
||||||
"Dlib is an optional detector, ensure the library is installed."
|
"Dlib is an optional detector, ensure the library is installed. "
|
||||||
"Please install using 'pip install dlib' "
|
"Please install using 'pip install dlib'"
|
||||||
) from e
|
) from e
|
||||||
|
|
||||||
# check required file exists in the home/.deepface/weights folder
|
# check required file exists in the home/.deepface/weights folder
|
||||||
|
@ -65,8 +65,8 @@ class FastMtCnnClient(Detector):
|
|||||||
import torch
|
import torch
|
||||||
except ModuleNotFoundError as e:
|
except ModuleNotFoundError as e:
|
||||||
raise ImportError(
|
raise ImportError(
|
||||||
"FastMtcnn is an optional detector, ensure the library is installed."
|
"FastMtcnn is an optional detector, ensure the library is installed. "
|
||||||
"Please install using 'pip install facenet-pytorch' "
|
"Please install using 'pip install facenet-pytorch'"
|
||||||
) from e
|
) from e
|
||||||
|
|
||||||
device = torch.device('cuda:0' if torch.cuda.is_available() else 'cpu')
|
device = torch.device('cuda:0' if torch.cuda.is_available() else 'cpu')
|
||||||
|
@ -20,8 +20,8 @@ class MediaPipeClient(Detector):
|
|||||||
import mediapipe as mp
|
import mediapipe as mp
|
||||||
except ModuleNotFoundError as e:
|
except ModuleNotFoundError as e:
|
||||||
raise ImportError(
|
raise ImportError(
|
||||||
"MediaPipe is an optional detector, ensure the library is installed."
|
"MediaPipe is an optional detector, ensure the library is installed. "
|
||||||
"Please install using 'pip install mediapipe' "
|
"Please install using 'pip install mediapipe'"
|
||||||
) from e
|
) from e
|
||||||
|
|
||||||
mp_face_detection = mp.solutions.face_detection
|
mp_face_detection = mp.solutions.face_detection
|
||||||
|
@ -31,8 +31,8 @@ class YoloClient(Detector):
|
|||||||
from ultralytics import YOLO
|
from ultralytics import YOLO
|
||||||
except ModuleNotFoundError as e:
|
except ModuleNotFoundError as e:
|
||||||
raise ImportError(
|
raise ImportError(
|
||||||
"Yolo is an optional detector, ensure the library is installed. \
|
"Yolo is an optional detector, ensure the library is installed. "
|
||||||
Please install using 'pip install ultralytics' "
|
"Please install using 'pip install ultralytics'"
|
||||||
) from e
|
) from e
|
||||||
|
|
||||||
weight_path = f"{folder_utils.get_deepface_home()}{PATH}"
|
weight_path = f"{folder_utils.get_deepface_home()}{PATH}"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user