Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

layer for external models are no longer being used #1091

Merged
merged 1 commit into from
Mar 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 0 additions & 15 deletions deepface/basemodels/Dlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,9 @@ def __init__(self):
"Please install using 'pip install dlib' "
) from e

self.layers = [DlibMetaData()]

# ---------------------

home = folder_utils.get_deepface_home()
weight_file = home + "/.deepface/weights/dlib_face_recognition_resnet_model_v1.dat"

# ---------------------

# download pre-trained model if it does not exist
if os.path.isfile(weight_file) != True:
logger.info("dlib_face_recognition_resnet_model_v1.dat is going to be downloaded")
Expand All @@ -88,15 +82,6 @@ def __init__(self):
with open(newfilepath, "wb") as f:
f.write(data)

# ---------------------

self.model = dlib.face_recognition_model_v1(weight_file)

# ---------------------

# return None # classes must return None


class DlibMetaData:
def __init__(self):
self.input_shape = [[1, 150, 150, 3]]
7 changes: 0 additions & 7 deletions deepface/basemodels/SFace.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,3 @@ def __init__(self, model_path):
+ "This is an optional dependency."
+ "You can install it as pip install opencv-contrib-python."
) from err

self.layers = [_Layer()]


class _Layer:
input_shape = (None, 112, 112, 3)
output_shape = (None, 1, 128)