瀏覽代碼

调整绘制line端点大小

RenLiqiang 10 月之前
父節點
當前提交
6b402644dd
共有 1 個文件被更改,包括 4 次插入4 次删除
  1. 4 4
      models/line_detect/postprocess.py

+ 4 - 4
models/line_detect/postprocess.py

@@ -106,8 +106,8 @@ def show_(imgs, pred, epoch, writer):
             plt.Rectangle((x0, y0), x1 - x0, y1 - y0, fill=False, edgecolor=col[idx], linewidth=1))
 
     for idx, (a, b) in enumerate(line):
-        ax.scatter(a[1], a[0], c='#871F78', s=2)
-        ax.scatter(b[1], b[0], c='#871F78', s=2)
+        ax.scatter(a[1], a[0], c='#871F78', s=10)
+        ax.scatter(b[1], b[0], c='#871F78', s=10)
         ax.plot([a[1], b[1]], [a[0], b[0]], c=col[idx], linewidth=1)
 
     # 将Matplotlib图像转换为Tensor
@@ -161,8 +161,8 @@ def show_predict(imgs, pred, t_start):
         if box_score > 0.7 and line_score > 0.9:
             ax.add_patch(
                 plt.Rectangle((x0, y0), x1 - x0, y1 - y0, fill=False, edgecolor=col[idx], linewidth=1))
-            ax.scatter(a[1], a[0], c='#871F78', s=2)
-            ax.scatter(b[1], b[0], c='#871F78', s=2)
+            ax.scatter(a[1], a[0], c='#871F78', s=10)
+            ax.scatter(b[1], b[0], c='#871F78', s=10)
             ax.plot([a[1], b[1]], [a[0], b[0]], c=col[idx], linewidth=1)
             idx = idx + 1
     t_end = time.time()