From dacdca4eae6c78470bbcaa51b765804088cd5e9b Mon Sep 17 00:00:00 2001 From: Programador Artificial Date: Thu, 18 Jul 2024 19:41:26 -0300 Subject: [PATCH] Fix importError menssage --- deepface/detectors/Dlib.py | 4 ++-- deepface/detectors/FastMtCnn.py | 4 ++-- deepface/detectors/MediaPipe.py | 4 ++-- deepface/detectors/Yolo.py | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/deepface/detectors/Dlib.py b/deepface/detectors/Dlib.py index 0699efb..9be3c76 100644 --- a/deepface/detectors/Dlib.py +++ b/deepface/detectors/Dlib.py @@ -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 diff --git a/deepface/detectors/FastMtCnn.py b/deepface/detectors/FastMtCnn.py index ee8e69c..d803fe9 100644 --- a/deepface/detectors/FastMtCnn.py +++ b/deepface/detectors/FastMtCnn.py @@ -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') diff --git a/deepface/detectors/MediaPipe.py b/deepface/detectors/MediaPipe.py index c566483..3f98bd3 100644 --- a/deepface/detectors/MediaPipe.py +++ b/deepface/detectors/MediaPipe.py @@ -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 diff --git a/deepface/detectors/Yolo.py b/deepface/detectors/Yolo.py index 5ff1c80..cf9f9de 100644 --- a/deepface/detectors/Yolo.py +++ b/deepface/detectors/Yolo.py @@ -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}"