Incrase max number of object classifications

This commit is contained in:
Nicolas Mowen 2025-11-05 05:11:06 -07:00
parent b533dd041d
commit f9b0cc920b

View File

@ -466,6 +466,7 @@ class CustomObjectClassificationProcessor(RealTimeProcessorApi):
now, now,
self.labelmap[best_id], self.labelmap[best_id],
score, score,
max_files=200,
) )
if score < self.model_config.threshold: if score < self.model_config.threshold:
@ -529,6 +530,7 @@ def write_classification_attempt(
timestamp: float, timestamp: float,
label: str, label: str,
score: float, score: float,
max_files: int = 100,
) -> None: ) -> None:
if "-" in label: if "-" in label:
label = label.replace("-", "_") label = label.replace("-", "_")
@ -544,5 +546,5 @@ def write_classification_attempt(
) )
# delete oldest face image if maximum is reached # delete oldest face image if maximum is reached
if len(files) > 100: if len(files) > max_files:
os.unlink(os.path.join(folder, files[-1])) os.unlink(os.path.join(folder, files[-1]))