Merge pull request #1285 from ProgramadorArtificial/bugfix/fix_importError_menssage

Fix importError menssage
This commit is contained in:
Sefik Ilkin Serengil 2024-07-19 09:03:32 +01:00 committed by GitHub
commit f7db792ed4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 8 additions and 8 deletions

View File

@ -27,8 +27,8 @@ class DlibClient(Detector):
import dlib
except ModuleNotFoundError as e:
raise ImportError(
"Dlib is an optional detector, ensure the library is installed."
"Please install using 'pip install dlib' "
"Dlib is an optional detector, ensure the library is installed. "
"Please install using 'pip install dlib'"
) from e
# check required file exists in the home/.deepface/weights folder

View File

@ -65,8 +65,8 @@ class FastMtCnnClient(Detector):
import torch
except ModuleNotFoundError as e:
raise ImportError(
"FastMtcnn is an optional detector, ensure the library is installed."
"Please install using 'pip install facenet-pytorch' "
"FastMtcnn is an optional detector, ensure the library is installed. "
"Please install using 'pip install facenet-pytorch'"
) from e
device = torch.device('cuda:0' if torch.cuda.is_available() else 'cpu')

View File

@ -20,8 +20,8 @@ class MediaPipeClient(Detector):
import mediapipe as mp
except ModuleNotFoundError as e:
raise ImportError(
"MediaPipe is an optional detector, ensure the library is installed."
"Please install using 'pip install mediapipe' "
"MediaPipe is an optional detector, ensure the library is installed. "
"Please install using 'pip install mediapipe'"
) from e
mp_face_detection = mp.solutions.face_detection

View File

@ -31,8 +31,8 @@ class YoloClient(Detector):
from ultralytics import YOLO
except ModuleNotFoundError as e:
raise ImportError(
"Yolo is an optional detector, ensure the library is installed. \
Please install using 'pip install ultralytics' "
"Yolo is an optional detector, ensure the library is installed. "
"Please install using 'pip install ultralytics'"
) from e
weight_path = f"{folder_utils.get_deepface_home()}{PATH}"