mirror of
https://github.com/blakeblackshear/frigate.git
synced 2024-11-21 19:07:46 +01:00
fix box merging
This commit is contained in:
parent
b345571a63
commit
c1f522ff54
@ -236,7 +236,7 @@ def track_camera(name, config, global_objects_config, frame_queue, frame_shape,
|
|||||||
for obj in tracked_objects:
|
for obj in tracked_objects:
|
||||||
x_min, y_min, x_max, y_max = obj['box']
|
x_min, y_min, x_max, y_max = obj['box']
|
||||||
for m_index, motion_box in enumerate(motion_boxes):
|
for m_index, motion_box in enumerate(motion_boxes):
|
||||||
if area(intersection(obj['box'], motion_box))/area(motion_box) > .5:
|
if intersection_over_union(motion_box, obj['box']) > .2:
|
||||||
used_motion_boxes.append(m_index)
|
used_motion_boxes.append(m_index)
|
||||||
x_min = min(obj['box'][0], motion_box[0])
|
x_min = min(obj['box'][0], motion_box[0])
|
||||||
y_min = min(obj['box'][1], motion_box[1])
|
y_min = min(obj['box'][1], motion_box[1])
|
||||||
|
Loading…
Reference in New Issue
Block a user