Always close connection to shm frame after detection

This commit is contained in:
Nicolas Mowen 2024-09-16 07:43:59 -06:00
parent e4ea35e626
commit 0a4e82c282

View File

@ -125,6 +125,7 @@ def run_detector(
start.value = datetime.datetime.now().timestamp() start.value = datetime.datetime.now().timestamp()
detections = object_detector.detect_raw(input_frame) detections = object_detector.detect_raw(input_frame)
duration = datetime.datetime.now().timestamp() - start.value duration = datetime.datetime.now().timestamp() - start.value
frame_manager.close(connection_id)
outputs[connection_id]["np"][:] = detections[:] outputs[connection_id]["np"][:] = detections[:]
out_events[connection_id].set() out_events[connection_id].set()
start.value = 0.0 start.value = 0.0