mirror of
https://github.com/serengil/deepface.git
synced 2025-06-10 05:17:08 +00:00
Update DeepFace.py
model type check
This commit is contained in:
parent
19f7cf620d
commit
0c0dfb8090
@ -743,7 +743,8 @@ def represent(
|
||||
img = functions.normalize_input(img=img, normalization=normalization)
|
||||
|
||||
# represent
|
||||
if "keras" in str(type(model)):
|
||||
# if "keras" in str(type(model)):
|
||||
if isinstance(model, Model):
|
||||
# model.predict causes memory issue when it is called in a for loop
|
||||
# embedding = model.predict(img, verbose=0)[0].tolist()
|
||||
embedding = model(img, training=False).numpy()[0].tolist()
|
||||
|
Loading…
x
Reference in New Issue
Block a user