Tinger 2 anni fa
parent
commit
e1bd440287
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      utils/util.py

+ 1 - 1
utils/util.py

@@ -89,7 +89,7 @@ def draw_img(shape: "tuple", data: "list[dict]", drop: "float" = 0.5):
         if one["rate"] < drop:
             continue
         color = (randint(0, 255), randint(0, 255), randint(0, 255))
-        text = draw_box_txt_fine((shape[1], shape[0]), one["pos"], one["word"])
+        text = draw_box_txt_fine((shape[1], shape[0]), one["pos"], one["word"], font_path="static/simfang.ttf")
         pts = np.array(one["pos"], np.int32).reshape((-1, 1, 2))
         cv2.polylines(text, [pts], True, color, 1)  # noqa
         img = cv2.bitwise_and(img, text)  # noqa