mirror of
https://github.com/serengil/deepface.git
synced 2025-06-07 12:05:22 +00:00
Update DeepFace.py
functional may come from keras or tf.keras. hard to manage in typing. used any for build_model.
This commit is contained in:
parent
8a5f2875fc
commit
e4a43fd86b
@ -7,7 +7,6 @@ import pickle
|
|||||||
import logging
|
import logging
|
||||||
from typing import Any, Dict, List, Tuple, Union
|
from typing import Any, Dict, List, Tuple, Union
|
||||||
from keras.engine.functional import Functional
|
from keras.engine.functional import Functional
|
||||||
from deepface.basemodels import DlibResNet, SFace
|
|
||||||
|
|
||||||
# 3rd party dependencies
|
# 3rd party dependencies
|
||||||
import numpy as np
|
import numpy as np
|
||||||
@ -48,7 +47,7 @@ if tf_version == 2:
|
|||||||
# -----------------------------------
|
# -----------------------------------
|
||||||
|
|
||||||
|
|
||||||
def build_model(model_name: str) -> Union[Functional, DlibResNet.DlibResNet, SFace.SFaceModel]:
|
def build_model(model_name: str) -> Any:
|
||||||
"""
|
"""
|
||||||
This function builds a deepface model
|
This function builds a deepface model
|
||||||
Parameters:
|
Parameters:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user