Explorar el Código

Update mineru/utils/magic_model_utils.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Xiaomeng Zhao hace 4 meses
padre
commit
9e5cb12967
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2 1
      mineru/utils/magic_model_utils.py

+ 2 - 1
mineru/utils/magic_model_utils.py

@@ -120,7 +120,8 @@ def tie_up_category_by_distance_v3(
     seen_idx = set()
     seen_sub_idx = set()
 
-    while N > len(seen_sub_idx):
+    seen_sub_idx_len = len(seen_sub_idx)
+    while N > seen_sub_idx_len:
         candidates = []
         for idx, kind, x0, y0 in all_boxes_with_idx:
             if idx in seen_idx: