From 93fd0fa775c42448ce941231d25f924a96bac690 Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Thu, 26 Jun 2025 18:40:41 -0600 Subject: [PATCH] Don't set sub label for none object classification --- .../real_time/custom_classification.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/frigate/data_processing/real_time/custom_classification.py b/frigate/data_processing/real_time/custom_classification.py index fcf70e5eb..d0135d898 100644 --- a/frigate/data_processing/real_time/custom_classification.py +++ b/frigate/data_processing/real_time/custom_classification.py @@ -150,11 +150,14 @@ class CustomStateClassificationProcessor(RealTimeProcessorApi): score, ) - if score >= camera_config.threshold: - self.requestor.send_data( - f"{camera}/classification/{self.model_config.name}", - self.labelmap[best_id], - ) + if score >= camera_config.threshold : + sub_label = self.labelmap[best_id] + + if sub_label.lower() != "none": + self.requestor.send_data( + f"{camera}/classification/{self.model_config.name}", + self.labelmap[best_id], + ) def handle_request(self, topic, request_data): if topic == EmbeddingsRequestEnum.reload_classification_model.value: