mirror of
https://github.com/serengil/deepface.git
synced 2025-06-06 11:35:21 +00:00
min detection confidence score retrieved from env vars
This commit is contained in:
parent
075d32ba38
commit
387ded5c66
@ -1,4 +1,5 @@
|
|||||||
# built-in dependencies
|
# built-in dependencies
|
||||||
|
import os
|
||||||
from typing import Any, List
|
from typing import Any, List
|
||||||
|
|
||||||
# 3rd party dependencies
|
# 3rd party dependencies
|
||||||
@ -58,7 +59,12 @@ class YoloClient(Detector):
|
|||||||
resp = []
|
resp = []
|
||||||
|
|
||||||
# Detect faces
|
# Detect faces
|
||||||
results = self.model.predict(img, verbose=False, show=False, conf=0.25)[0]
|
results = self.model.predict(
|
||||||
|
img,
|
||||||
|
verbose=False,
|
||||||
|
show=False,
|
||||||
|
conf=float(os.getenv("YOLO_MIN_DETECTION_CONFIDENCE", "0.25")),
|
||||||
|
)[0]
|
||||||
|
|
||||||
# For each face, extract the bounding box, the landmarks and confidence
|
# For each face, extract the bounding box, the landmarks and confidence
|
||||||
for result in results:
|
for result in results:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user