Use existing bounding box for region when object is stationary

This commit is contained in:
Nick Mowen 2023-10-20 11:51:31 -06:00
parent facd557f8c
commit 775eac3e9b

View File

@ -607,7 +607,12 @@ def process_frames(
# get tracked object boxes that aren't stationary # get tracked object boxes that aren't stationary
tracked_object_boxes = [ tracked_object_boxes = [
(
# use existing object box for stationary objects
obj["estimate"] obj["estimate"]
if obj["motionless_count"] < detect_config.stationary.threshold
else obj["box"]
)
for obj in object_tracker.tracked_objects.values() for obj in object_tracker.tracked_objects.values()
if obj["id"] not in stationary_object_ids if obj["id"] not in stationary_object_ids
] ]