瀏覽代碼

fix layout_prasing (#2997)

* fix layout_parse

* fix layout api_test

* fix layout_prasing match
shuai.liu 9 月之前
父節點
當前提交
355398b691
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      paddlex/inference/pipelines/layout_parsing/utils.py

+ 3 - 0
paddlex/inference/pipelines/layout_parsing/utils.py

@@ -192,6 +192,9 @@ def _calculate_overlap_area_div_minbox_area_ratio(
     Returns:
         float: The ratio of the overlap area to the area of the smaller bounding box.
     """
+    bbox1 = list(map(int, bbox1))
+    bbox2 = list(map(int, bbox2))
+
     x_left = max(bbox1[0], bbox2[0])
     y_top = max(bbox1[1], bbox2[1])
     x_right = min(bbox1[2], bbox2[2])