mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-05-04 23:14:12 +02:00
Improve classification UI (#18910)
* Move threhsold to base model config * Improve score handling * Add back button
This commit is contained in:
committed by
Blake Blackshear
parent
f925154b8a
commit
528f0d2b1f
@@ -152,7 +152,7 @@ class CustomStateClassificationProcessor(RealTimeProcessorApi):
|
||||
score,
|
||||
)
|
||||
|
||||
if score >= camera_config.threshold:
|
||||
if score >= self.model_config.threshold:
|
||||
self.requestor.send_data(
|
||||
f"{camera}/classification/{self.model_config.name}",
|
||||
self.labelmap[best_id],
|
||||
@@ -271,6 +271,10 @@ class CustomObjectClassificationProcessor(RealTimeProcessorApi):
|
||||
score,
|
||||
)
|
||||
|
||||
if score < self.model_config.threshold:
|
||||
logger.debug(f"Score {score} is less than threshold.")
|
||||
return
|
||||
|
||||
if score <= previous_score:
|
||||
logger.debug(f"Score {score} is worse than previous score {previous_score}")
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user