only publish end events for true positives

This commit is contained in:
Blake Blackshear 2020-11-25 17:24:07 -06:00
parent 34d9b2983e
commit 810c23d8ee

View File

@ -419,6 +419,7 @@ class TrackedObjectProcessor(threading.Thread):
thumbnail_file_name = f"{camera}-{obj.obj_data['id']}.jpg" thumbnail_file_name = f"{camera}-{obj.obj_data['id']}.jpg"
with open(os.path.join(self.config.save_clips.clips_dir, thumbnail_file_name), 'wb') as f: with open(os.path.join(self.config.save_clips.clips_dir, thumbnail_file_name), 'wb') as f:
f.write(obj.get_jpg_bytes()) f.write(obj.get_jpg_bytes())
if not obj.false_positive:
self.event_queue.put(('end', camera, obj.to_dict(include_thumbnail=True))) self.event_queue.put(('end', camera, obj.to_dict(include_thumbnail=True)))
def snapshot(camera, obj: TrackedObject, current_frame_time): def snapshot(camera, obj: TrackedObject, current_frame_time):