mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-05-03 20:17:42 +03:00
Correctly check for objects
This commit is contained in:
parent
e7427b47fb
commit
60212a9aa4
@ -127,7 +127,7 @@ class TeachableMachineObjectProcessor(RealTimeProcessorApi):
|
||||
self.labelmap = load_labels(self.model_config.labelmap_path, prefill=0)
|
||||
|
||||
def process_frame(self, obj_data, frame):
|
||||
if obj_data["label"] != "object":
|
||||
if obj_data["label"] not in self.model_config.object_config.objects:
|
||||
return
|
||||
|
||||
x, y, x2, y2 = calculate_region(
|
||||
|
||||
@ -503,9 +503,7 @@ class EmbeddingMaintainer(threading.Thread):
|
||||
if isinstance(processor, LicensePlateRealTimeProcessor):
|
||||
processor.process_frame(camera, yuv_frame, True)
|
||||
|
||||
if isinstance(processor, TeachableMachineObjectProcessor) or isinstance(
|
||||
processor, TeachableMachineStateProcessor
|
||||
):
|
||||
if isinstance(processor, TeachableMachineStateProcessor):
|
||||
processor.process_frame({"camera": camera}, yuv_frame)
|
||||
|
||||
self.frame_manager.close(frame_name)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user