Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions face_recognition_models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@
__email__ = 'ageitgey@gmail.com'
__version__ = '0.1.0'

from pkg_resources import resource_filename
from importlib.resources import files

def pose_predictor_model_location():
return resource_filename(__name__, "models/shape_predictor_68_face_landmarks.dat")
return str(files(__name__).joinpath("models/shape_predictor_68_face_landmarks.dat"))

def pose_predictor_five_point_model_location():
return resource_filename(__name__, "models/shape_predictor_5_face_landmarks.dat")
return str(files(__name__).joinpath("models/shape_predictor_5_face_landmarks.dat"))

def face_recognition_model_location():
return resource_filename(__name__, "models/dlib_face_recognition_resnet_model_v1.dat")
return str(files(__name__).joinpath("models/dlib_face_recognition_resnet_model_v1.dat"))

def cnn_face_detector_model_location():
return resource_filename(__name__, "models/mmod_human_face_detector.dat")
return str(files(__name__).joinpath("models/mmod_human_face_detector.dat"))