From 288c6a8fffc678a773e2a2cccafa1630fc555d2f Mon Sep 17 00:00:00 2001 From: Tiago Freitas Pereira <tiagofrepereira@gmail.com> Date: Mon, 14 Jun 2021 09:07:47 +0200 Subject: [PATCH] Allowing to set prob_thresh --- bob/bio/face/annotator/bobiptinyface.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/bob/bio/face/annotator/bobiptinyface.py b/bob/bio/face/annotator/bobiptinyface.py index 16e4a502..fb6fbfe2 100644 --- a/bob/bio/face/annotator/bobiptinyface.py +++ b/bob/bio/face/annotator/bobiptinyface.py @@ -5,9 +5,15 @@ from . import Base class BobIpTinyface(Base): """Annotator using tinyface in bob.ip.facedetect""" - def __init__(self, **kwargs): + def __init__(self, prob_thresh=0.5, **kwargs): super(BobIpTinyface, self).__init__(**kwargs) - self.detector = bob.ip.facedetect.tinyface.TinyFacesDetector(prob_thresh=0.5) + self.detector = bob.ip.facedetect.tinyface.TinyFacesDetector( + prob_thresh=prob_thresh + ) + + @property + def prob_thresh(self): + return self.detector.prob_thresh def annotate(self, image, **kwargs): """Annotates an image using tinyface -- GitLab