mirror of
https://github.com/blakeblackshear/frigate.git
synced 2024-11-21 19:07:46 +01:00
ignore detections that don't overlap with motion
This commit is contained in:
parent
9550ac7422
commit
e299e73a68
@ -424,8 +424,12 @@ def process_frames(camera_name: str, frame_queue: mp.Queue, frame_shape, model_s
|
|||||||
if refining:
|
if refining:
|
||||||
refine_count += 1
|
refine_count += 1
|
||||||
|
|
||||||
|
# Limit to the detections overlapping with motion areas
|
||||||
|
# to avoid picking up stationary background objects
|
||||||
|
detections_with_motion = [d for d in detections if intersects_any(d[2], motion_boxes)]
|
||||||
|
|
||||||
# now that we have refined our detections, we need to track objects
|
# now that we have refined our detections, we need to track objects
|
||||||
object_tracker.match_and_update(frame_time, detections)
|
object_tracker.match_and_update(frame_time, detections_with_motion)
|
||||||
|
|
||||||
# add to the queue if not full
|
# add to the queue if not full
|
||||||
if(detected_objects_queue.full()):
|
if(detected_objects_queue.full()):
|
||||||
|
Loading…
Reference in New Issue
Block a user