소스 검색

fix layout_prasing (#2997)

* fix layout_parse

* fix layout api_test

* fix layout_prasing match
shuai.liu 10 달 전
부모
커밋
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])