mirror of
https://github.com/serengil/deepface.git
synced 2025-06-07 12:05:22 +00:00
fix linter issues
This commit is contained in:
parent
da41050308
commit
1372180567
@ -85,12 +85,24 @@ def represent():
|
|||||||
img_path=img,
|
img_path=img,
|
||||||
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"),
|
||||||
enforce_detection=input_args.get("enforce_detection", True) if type(input_args.get("enforce_detection", True)) is bool else input_args.get("enforce_detection") == "true",
|
enforce_detection=
|
||||||
align=input_args.get("align", True) if type(input_args.get("align", True)) is bool else input_args.get("align") == "true",
|
bool(input_args.get("enforce_detection", True))
|
||||||
|
if isinstance((input_args.get("enforce_detection", True)), bool)
|
||||||
|
else input_args.get("enforce_detection") == "true",
|
||||||
|
align=
|
||||||
|
bool(input_args.get("align", True))
|
||||||
|
if isinstance((input_args.get("align", True)), bool)
|
||||||
|
else input_args.get("align") == "true",
|
||||||
expand_percentage=int(input_args.get("expand_percentage", 0)),
|
expand_percentage=int(input_args.get("expand_percentage", 0)),
|
||||||
normalization=input_args.get("normalization", "base"),
|
normalization=input_args.get("normalization", "base"),
|
||||||
anti_spoofing=input_args.get("anti_spoofing", False) if type(input_args.get("anti_spoofing", False)) is bool else input_args.get("anti_spoofing") == "true",
|
anti_spoofing=
|
||||||
max_faces=None if input_args.get("max_faces", None) is None else int(input_args.get("max_faces")),
|
bool(input_args.get("anti_spoofing", False))
|
||||||
|
if isinstance((input_args.get("anti_spoofing", False)), bool)
|
||||||
|
else input_args.get("anti_spoofing") == "true",
|
||||||
|
max_faces=
|
||||||
|
None
|
||||||
|
if input_args.get("max_faces", None) is None
|
||||||
|
else int(input_args.get("max_faces", 0)),
|
||||||
)
|
)
|
||||||
|
|
||||||
logger.debug(obj)
|
logger.debug(obj)
|
||||||
@ -120,13 +132,28 @@ 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"),
|
||||||
enforce_detection=input_args.get("enforce_detection", True) if type(input_args.get("enforce_detection", True)) is bool else input_args.get("enforce_detection") == "true",
|
enforce_detection=
|
||||||
align=input_args.get("align", True) if type(input_args.get("align", True)) is bool else input_args.get("align") == "true",
|
bool(input_args.get("enforce_detection", True))
|
||||||
|
if isinstance((input_args.get("enforce_detection", True)), bool)
|
||||||
|
else input_args.get("enforce_detection") == "true",
|
||||||
|
align=
|
||||||
|
bool(input_args.get("align", True))
|
||||||
|
if isinstance((input_args.get("align", True)), bool)
|
||||||
|
else input_args.get("align") == "true",
|
||||||
expand_percentage=int(input_args.get("expand_percentage", 0)),
|
expand_percentage=int(input_args.get("expand_percentage", 0)),
|
||||||
normalization=input_args.get("normalization", "base"),
|
normalization=input_args.get("normalization", "base"),
|
||||||
silent=input_args.get("silent", False) if type(input_args.get("silent", False)) is bool else input_args.get("silent") == "true",
|
silent=
|
||||||
threshold=None if input_args.get("threshold", None) is None else float(input_args.get("threshold")),
|
bool(input_args.get("silent", False))
|
||||||
anti_spoofing=input_args.get("anti_spoofing", False) if type(input_args.get("anti_spoofing", False)) is bool else input_args.get("anti_spoofing") == "true",
|
if isinstance((input_args.get("silent", False)), bool)
|
||||||
|
else input_args.get("silent") == "true",
|
||||||
|
threshold=
|
||||||
|
None
|
||||||
|
if input_args.get("threshold", None) is None
|
||||||
|
else float(input_args.get("threshold", 0)),
|
||||||
|
anti_spoofing=
|
||||||
|
bool(input_args.get("anti_spoofing", False))
|
||||||
|
if isinstance((input_args.get("anti_spoofing", False)), bool)
|
||||||
|
else input_args.get("anti_spoofing") == "true",
|
||||||
)
|
)
|
||||||
|
|
||||||
logger.debug(verification)
|
logger.debug(verification)
|
||||||
@ -164,11 +191,23 @@ def analyze():
|
|||||||
img_path=img,
|
img_path=img,
|
||||||
actions=actions,
|
actions=actions,
|
||||||
detector_backend=input_args.get("detector_backend", "opencv"),
|
detector_backend=input_args.get("detector_backend", "opencv"),
|
||||||
enforce_detection=input_args.get("enforce_detection", True) if type(input_args.get("enforce_detection", True)) is bool else input_args.get("enforce_detection") == "true",
|
enforce_detection=
|
||||||
align=input_args.get("align", True) if type(input_args.get("align", True)) is bool else input_args.get("align") == "true",
|
bool(input_args.get("enforce_detection", True))
|
||||||
|
if isinstance((input_args.get("enforce_detection", True)), bool)
|
||||||
|
else input_args.get("enforce_detection") == "true",
|
||||||
|
align=
|
||||||
|
bool(input_args.get("align", True))
|
||||||
|
if isinstance((input_args.get("align", True)), bool)
|
||||||
|
else input_args.get("align") == "true",
|
||||||
expand_percentage=int(input_args.get("expand_percentage", 0)),
|
expand_percentage=int(input_args.get("expand_percentage", 0)),
|
||||||
silent=input_args.get("silent", False) if type(input_args.get("silent", False)) is bool else input_args.get("silent") == "true",
|
silent=
|
||||||
anti_spoofing=input_args.get("anti_spoofing", False) if type(input_args.get("anti_spoofing", False)) is bool else input_args.get("anti_spoofing") == "true",
|
bool(input_args.get("silent", False))
|
||||||
|
if isinstance((input_args.get("silent", False)), bool)
|
||||||
|
else input_args.get("silent") == "true",
|
||||||
|
anti_spoofing=
|
||||||
|
bool(input_args.get("anti_spoofing", False))
|
||||||
|
if isinstance((input_args.get("anti_spoofing", False)), bool)
|
||||||
|
else input_args.get("anti_spoofing") == "true",
|
||||||
)
|
)
|
||||||
|
|
||||||
logger.debug(demographies)
|
logger.debug(demographies)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user