pref: 加粗标记字体并新建requirements.txt

This commit is contained in:
2025-10-27 16:11:28 +08:00
parent e13815e4d7
commit 30e6b0ef87
2 changed files with 6 additions and 2 deletions

View File

@@ -127,8 +127,8 @@ def draw_detections_on_image(image: np.ndarray, detections: list) -> np.ndarray:
# 添加标签
label_text = f"{label} ({obj_id})"
cv2.putText(marked_image, label_text, (x_min, y_min - 10),
cv2.FONT_HERSHEY_SIMPLEX, 0.5, color, 1)
cv2.putText(marked_image, label_text, (x_min, y_min + 10),
cv2.FONT_HERSHEY_SIMPLEX, 0.5, color, 2)
return marked_image