diff --git a/frigate/data_processing/real_time/teachable_machine.py b/frigate/data_processing/real_time/teachable_machine.py index bf5b2d30f..31bb60c6d 100644 --- a/frigate/data_processing/real_time/teachable_machine.py +++ b/frigate/data_processing/real_time/teachable_machine.py @@ -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( diff --git a/frigate/embeddings/maintainer.py b/frigate/embeddings/maintainer.py index 8a745117a..c8b1a079f 100644 --- a/frigate/embeddings/maintainer.py +++ b/frigate/embeddings/maintainer.py @@ -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)