mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-05-01 19:17:41 +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)
|
self.labelmap = load_labels(self.model_config.labelmap_path, prefill=0)
|
||||||
|
|
||||||
def process_frame(self, obj_data, frame):
|
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
|
return
|
||||||
|
|
||||||
x, y, x2, y2 = calculate_region(
|
x, y, x2, y2 = calculate_region(
|
||||||
|
|||||||
@ -503,9 +503,7 @@ class EmbeddingMaintainer(threading.Thread):
|
|||||||
if isinstance(processor, LicensePlateRealTimeProcessor):
|
if isinstance(processor, LicensePlateRealTimeProcessor):
|
||||||
processor.process_frame(camera, yuv_frame, True)
|
processor.process_frame(camera, yuv_frame, True)
|
||||||
|
|
||||||
if isinstance(processor, TeachableMachineObjectProcessor) or isinstance(
|
if isinstance(processor, TeachableMachineStateProcessor):
|
||||||
processor, TeachableMachineStateProcessor
|
|
||||||
):
|
|
||||||
processor.process_frame({"camera": camera}, yuv_frame)
|
processor.process_frame({"camera": camera}, yuv_frame)
|
||||||
|
|
||||||
self.frame_manager.close(frame_name)
|
self.frame_manager.close(frame_name)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user