diff --git a/cam_web.py b/cam_web.py index da6f2d8..5e8623c 100644 --- a/cam_web.py +++ b/cam_web.py @@ -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 diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..734892a --- /dev/null +++ b/requirements.txt @@ -0,0 +1,4 @@ +flask +flask-socketio +opencv-python +pynng \ No newline at end of file