mirror of
https://github.com/serengil/deepface.git
synced 2025-06-07 03:55:21 +00:00
feat: add missing api options
This commit is contained in:
parent
63ee3c4e05
commit
984c829139
@ -87,6 +87,8 @@ def represent():
|
|||||||
detector_backend=input_args.get("detector_backend", "opencv"),
|
detector_backend=input_args.get("detector_backend", "opencv"),
|
||||||
enforce_detection=input_args.get("enforce_detection", True),
|
enforce_detection=input_args.get("enforce_detection", True),
|
||||||
align=input_args.get("align", True),
|
align=input_args.get("align", True),
|
||||||
|
expand_percentage=input_args.get("expand_percentage", 0),
|
||||||
|
normalization=input_args.get("normalization", "base"),
|
||||||
anti_spoofing=input_args.get("anti_spoofing", False),
|
anti_spoofing=input_args.get("anti_spoofing", False),
|
||||||
max_faces=input_args.get("max_faces"),
|
max_faces=input_args.get("max_faces"),
|
||||||
)
|
)
|
||||||
@ -118,8 +120,12 @@ def verify():
|
|||||||
model_name=input_args.get("model_name", "VGG-Face"),
|
model_name=input_args.get("model_name", "VGG-Face"),
|
||||||
detector_backend=input_args.get("detector_backend", "opencv"),
|
detector_backend=input_args.get("detector_backend", "opencv"),
|
||||||
distance_metric=input_args.get("distance_metric", "cosine"),
|
distance_metric=input_args.get("distance_metric", "cosine"),
|
||||||
align=input_args.get("align", True),
|
|
||||||
enforce_detection=input_args.get("enforce_detection", True),
|
enforce_detection=input_args.get("enforce_detection", True),
|
||||||
|
align=input_args.get("align", True),
|
||||||
|
expand_percentage=input_args.get("expand_percentage", 0),
|
||||||
|
normalization=input_args.get("normalization", "base"),
|
||||||
|
silent=input_args.get("silent", False),
|
||||||
|
threshold=input_args.get("threshold", None),
|
||||||
anti_spoofing=input_args.get("anti_spoofing", False),
|
anti_spoofing=input_args.get("anti_spoofing", False),
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -160,6 +166,8 @@ def analyze():
|
|||||||
detector_backend=input_args.get("detector_backend", "opencv"),
|
detector_backend=input_args.get("detector_backend", "opencv"),
|
||||||
enforce_detection=input_args.get("enforce_detection", True),
|
enforce_detection=input_args.get("enforce_detection", True),
|
||||||
align=input_args.get("align", True),
|
align=input_args.get("align", True),
|
||||||
|
expand_percentage=input_args.get("expand_percentage", 0),
|
||||||
|
silent=input_args.get("silent", False),
|
||||||
anti_spoofing=input_args.get("anti_spoofing", False),
|
anti_spoofing=input_args.get("anti_spoofing", False),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -21,6 +21,8 @@ def represent(
|
|||||||
detector_backend: str,
|
detector_backend: str,
|
||||||
enforce_detection: bool,
|
enforce_detection: bool,
|
||||||
align: bool,
|
align: bool,
|
||||||
|
expand_percentage: int,
|
||||||
|
normalization: str,
|
||||||
anti_spoofing: bool,
|
anti_spoofing: bool,
|
||||||
max_faces: Optional[int] = None,
|
max_faces: Optional[int] = None,
|
||||||
):
|
):
|
||||||
@ -32,6 +34,8 @@ def represent(
|
|||||||
detector_backend=detector_backend,
|
detector_backend=detector_backend,
|
||||||
enforce_detection=enforce_detection,
|
enforce_detection=enforce_detection,
|
||||||
align=align,
|
align=align,
|
||||||
|
expand_percentage=expand_percentage,
|
||||||
|
normalization=normalization,
|
||||||
anti_spoofing=anti_spoofing,
|
anti_spoofing=anti_spoofing,
|
||||||
max_faces=max_faces,
|
max_faces=max_faces,
|
||||||
)
|
)
|
||||||
@ -52,6 +56,10 @@ def verify(
|
|||||||
distance_metric: str,
|
distance_metric: str,
|
||||||
enforce_detection: bool,
|
enforce_detection: bool,
|
||||||
align: bool,
|
align: bool,
|
||||||
|
expand_percentage: int,
|
||||||
|
normalization: str,
|
||||||
|
silent: bool,
|
||||||
|
threshold: Optional[float],
|
||||||
anti_spoofing: bool,
|
anti_spoofing: bool,
|
||||||
):
|
):
|
||||||
try:
|
try:
|
||||||
@ -61,8 +69,12 @@ def verify(
|
|||||||
model_name=model_name,
|
model_name=model_name,
|
||||||
detector_backend=detector_backend,
|
detector_backend=detector_backend,
|
||||||
distance_metric=distance_metric,
|
distance_metric=distance_metric,
|
||||||
align=align,
|
|
||||||
enforce_detection=enforce_detection,
|
enforce_detection=enforce_detection,
|
||||||
|
align=align,
|
||||||
|
expand_percentage=expand_percentage,
|
||||||
|
normalization=normalization,
|
||||||
|
silent=silent,
|
||||||
|
threshold=threshold,
|
||||||
anti_spoofing=anti_spoofing,
|
anti_spoofing=anti_spoofing,
|
||||||
)
|
)
|
||||||
return obj
|
return obj
|
||||||
@ -79,6 +91,8 @@ def analyze(
|
|||||||
detector_backend: str,
|
detector_backend: str,
|
||||||
enforce_detection: bool,
|
enforce_detection: bool,
|
||||||
align: bool,
|
align: bool,
|
||||||
|
expand_percentage: int,
|
||||||
|
silent: bool,
|
||||||
anti_spoofing: bool,
|
anti_spoofing: bool,
|
||||||
):
|
):
|
||||||
try:
|
try:
|
||||||
@ -89,7 +103,8 @@ def analyze(
|
|||||||
detector_backend=detector_backend,
|
detector_backend=detector_backend,
|
||||||
enforce_detection=enforce_detection,
|
enforce_detection=enforce_detection,
|
||||||
align=align,
|
align=align,
|
||||||
silent=True,
|
expand_percentage=expand_percentage,
|
||||||
|
silent=silent,
|
||||||
anti_spoofing=anti_spoofing,
|
anti_spoofing=anti_spoofing,
|
||||||
)
|
)
|
||||||
result["results"] = demographies
|
result["results"] = demographies
|
||||||
|
Loading…
x
Reference in New Issue
Block a user