Commit 514a5718 authored by liukaiwen's avatar liukaiwen

Merge branch 'master' into dev-in-line-bbox

parents 94a7ba3d 1d59509d
......@@ -210,9 +210,10 @@ def get_minbox_if_overlap_by_ratio(bbox1, bbox2, ratio):
area1 = (x1_max - x1_min) * (y1_max - y1_min)
area2 = (x2_max - x2_min) * (y2_max - y2_min)
overlap_ratio = calculate_overlap_area_2_minbox_area_ratio(bbox1, bbox2)
if overlap_ratio > ratio and area1 < area2:
if overlap_ratio > ratio:
if area1 <= area2:
return bbox1
elif overlap_ratio > ratio and area2 < area1:
else:
return bbox2
else:
return None
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment