Skip to content

Commit

Permalink
Add error msg for failed import
Browse files Browse the repository at this point in the history
  • Loading branch information
haddyadnan committed Oct 19, 2023
1 parent c53366b commit cca3422
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion deepface/detectors/FastMtcnnWrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@

def build_model():
# Optional dependency
from facenet_pytorch import MTCNN as fast_mtcnn
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' ")


face_detector = fast_mtcnn(image_size=160,
Expand Down

0 comments on commit cca3422

Please sign in to comment.