Skip to content

Commit

Permalink
Merge pull request #1285 from ProgramadorArtificial/bugfix/fix_import…
Browse files Browse the repository at this point in the history
…Error_menssage

Fix importError menssage
  • Loading branch information
serengil authored Jul 19, 2024
2 parents 352a8bb + dacdca4 commit f7db792
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions deepface/detectors/Dlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ def build_model(self) -> dict:
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
Expand Down
4 changes: 2 additions & 2 deletions deepface/detectors/FastMtCnn.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ def build_model(self) -> Any:
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')
Expand Down
4 changes: 2 additions & 2 deletions deepface/detectors/MediaPipe.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ def build_model(self) -> Any:
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
Expand Down
4 changes: 2 additions & 2 deletions deepface/detectors/Yolo.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ def build_model(self) -> Any:
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}"
Expand Down

0 comments on commit f7db792

Please sign in to comment.