|
|
@@ -620,6 +620,12 @@ class BaseLayoutDetector(BaseAdapter):
|
|
|
bbox1, bbox2 = results[i].get('bbox', []), results[j].get('bbox', [])
|
|
|
if len(bbox1) < 4 or len(bbox2) < 4:
|
|
|
continue
|
|
|
+
|
|
|
+ cat_i = results[i].get('category', '')
|
|
|
+ cat_j = results[j].get('category', '')
|
|
|
+ # 印章常压在表格/文字之上,与大面积区域重叠属正常,保留双方
|
|
|
+ if cat_i == 'seal' or cat_j == 'seal':
|
|
|
+ continue
|
|
|
|
|
|
# 计算重叠指标
|
|
|
iou = coordinate_utils.calculate_iou(bbox1, bbox2)
|