浏览代码

feat: 增加边界框线宽以优化可视化效果

zhch158_admin 9 小时之前
父节点
当前提交
9c6ed0277d
共有 1 个文件被更改,包括 4 次插入4 次删除
  1. 4 4
      ocr_validator_layout.py

+ 4 - 4
ocr_validator_layout.py

@@ -666,7 +666,7 @@ class OCRLayoutManager:
     def _add_bboxes_to_plot_batch(self, fig: go.Figure, bboxes: List[List[int]], 
                                 image_height: int, 
                                 line_color: str = "blue", 
-                                line_width: int = 1, 
+                                line_width: int = 2, 
                                 fill_color: str = "rgba(0, 100, 200, 0.2)"):
         """
         批量添加边界框(性能优化版)
@@ -702,7 +702,7 @@ class OCRLayoutManager:
     def _add_bboxes_as_scatter(self, fig: go.Figure, bboxes: List[List[int]], 
                           image_height: int,
                           line_color: str = "blue", 
-                          line_width: int = 1,
+                          line_width: int = 2,
                           name: str = "boxes"):
         """
         使用 Scatter 绘制边界框(极致性能优化)
@@ -766,7 +766,7 @@ class OCRLayoutManager:
                 bboxes=all_boxes,
                 image_height=image.height,
                 line_color="rgba(0, 100, 200, 0.8)",
-                line_width=1,
+                line_width=2,
                 name="all_boxes"
             )
 
@@ -777,7 +777,7 @@ class OCRLayoutManager:
                 bboxes=selected_boxes,
                 image_height=image.height,
                 line_color="red",
-                line_width=1,
+                line_width=2,
                 fill_color="rgba(255, 0, 0, 0.3)"
             )