"vscode:/vscode.git/clone" did not exist on "312b09e23d332a95f8f5b1310e7bf38e53d16da2"
Commit df15393c authored by myhloli's avatar myhloli
Browse files

refactor: optimize overlap detection logic in block_pre_proc.py for efficiency

parent cd78980c
......@@ -213,9 +213,10 @@ def remove_overlaps_min_blocks(all_bboxes):
# 重叠block,小的不能直接删除,需要和大的那个合并成一个更大的。
# 删除重叠blocks中较小的那些
need_remove = []
for block1 in all_bboxes:
for block2 in all_bboxes:
if block1 != block2:
for i in range(len(all_bboxes)):
for j in range(i + 1, len(all_bboxes)):
block1 = all_bboxes[i]
block2 = all_bboxes[j]
block1_bbox = block1[:4]
block2_bbox = block2[:4]
overlap_box = get_minbox_if_overlap_by_ratio(
......
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