mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-05-01 02:57:41 +03:00
Cleanup
This commit is contained in:
parent
93fd0fa775
commit
88924d4466
@ -150,14 +150,11 @@ class CustomStateClassificationProcessor(RealTimeProcessorApi):
|
|||||||
score,
|
score,
|
||||||
)
|
)
|
||||||
|
|
||||||
if score >= camera_config.threshold :
|
if score >= camera_config.threshold:
|
||||||
sub_label = self.labelmap[best_id]
|
self.requestor.send_data(
|
||||||
|
f"{camera}/classification/{self.model_config.name}",
|
||||||
if sub_label.lower() != "none":
|
self.labelmap[best_id],
|
||||||
self.requestor.send_data(
|
)
|
||||||
f"{camera}/classification/{self.model_config.name}",
|
|
||||||
self.labelmap[best_id],
|
|
||||||
)
|
|
||||||
|
|
||||||
def handle_request(self, topic, request_data):
|
def handle_request(self, topic, request_data):
|
||||||
if topic == EmbeddingsRequestEnum.reload_classification_model.value:
|
if topic == EmbeddingsRequestEnum.reload_classification_model.value:
|
||||||
@ -275,12 +272,15 @@ class CustomObjectClassificationProcessor(RealTimeProcessorApi):
|
|||||||
logger.debug(f"Score {score} is worse than previous score {previous_score}")
|
logger.debug(f"Score {score} is worse than previous score {previous_score}")
|
||||||
return
|
return
|
||||||
|
|
||||||
self.sub_label_publisher.publish(
|
sub_label = self.labelmap[best_id]
|
||||||
EventMetadataTypeEnum.sub_label,
|
|
||||||
(obj_data["id"], self.labelmap[best_id], score),
|
|
||||||
)
|
|
||||||
self.detected_objects[obj_data["id"]] = score
|
self.detected_objects[obj_data["id"]] = score
|
||||||
|
|
||||||
|
if sub_label != "none":
|
||||||
|
self.sub_label_publisher.publish(
|
||||||
|
EventMetadataTypeEnum.sub_label,
|
||||||
|
(obj_data["id"], sub_label, score),
|
||||||
|
)
|
||||||
|
|
||||||
def handle_request(self, topic, request_data):
|
def handle_request(self, topic, request_data):
|
||||||
if topic == EmbeddingsRequestEnum.reload_classification_model.value:
|
if topic == EmbeddingsRequestEnum.reload_classification_model.value:
|
||||||
if request_data.get("model_name") == self.model_config.name:
|
if request_data.get("model_name") == self.model_config.name:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user