From 808c27edb26271ad6bc024c4b87acc6848dda231 Mon Sep 17 00:00:00 2001 From: asheswook Date: Mon, 29 May 2023 18:36:08 +0900 Subject: [PATCH] Feat: add method that change threshold --- VisageSnap/main.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/VisageSnap/main.py b/VisageSnap/main.py index c7cbeeb..963e6be 100644 --- a/VisageSnap/main.py +++ b/VisageSnap/main.py @@ -23,6 +23,15 @@ def __init__(self, globalState: GlobalState = None, directory: Directory = None) def set_directory(self, directory: Directory) -> None: self.__directory = directory + @property + def threshold(self) -> float: + return self.predictor.threshold + + @threshold.setter + def threshold(self, value: float) -> None: + assert isinstance(value, float), "threshold must be float." + self.predictor.threshold = value + def load_model(self) -> None: """ This function loads the model.