优化代码风格

This commit is contained in:
ZZX9599
2025-09-08 17:34:23 +08:00
parent 9b3d20511a
commit 8ceb92c572
20 changed files with 223 additions and 192 deletions

View File

@ -1,6 +1,5 @@
import os
import cv2
from ultralytics import YOLO
# 全局变量
@ -24,7 +23,7 @@ def load_model():
def detect(frame, conf_threshold=0.2):
"""YOLO目标检测返回(是否识别到, 结果字符串)"""
"""YOLO目标检测返回(是否识别到, 结果字符串)"""
global _yolo_model
if not _yolo_model or frame is None: