优化代码风格
This commit is contained in:
@ -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:
|
||||
|
Reference in New Issue
Block a user