Skip to content

Commit

Permalink
refactor try block
Browse files Browse the repository at this point in the history
  • Loading branch information
haddyadnan committed Oct 19, 2023
1 parent cca3422 commit 1bcc065
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions deepface/detectors/FastMtcnnWrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ def build_model():
# Optional dependency
try:
from facenet_pytorch import MTCNN as fast_mtcnn
except ModuleNotFoundError:
print("This is an optional detector, ensure the library is installed. \
Please install using 'pip install facenet-pytorch' ")
except ModuleNotFoundError as e:
raise ImportError("This is an optional detector, ensure the library is installed. \
Please install using 'pip install facenet-pytorch' ") from e


face_detector = fast_mtcnn(image_size=160,
Expand Down

0 comments on commit 1bcc065

Please sign in to comment.