|
|
@@ -18,6 +18,7 @@ from pydantic import BaseModel
|
|
|
from ultralytics import YOLO
|
|
|
import os
|
|
|
import glob
|
|
|
+from typing import Optional
|
|
|
|
|
|
# 设置日志格式和级别
|
|
|
logging.basicConfig(level=logging.INFO, format='[%(asctime)s] %(levelname)s - %(message)s')
|
|
|
@@ -367,7 +368,7 @@ class StreamParams(BaseModel):
|
|
|
source: str = None
|
|
|
stream_url: str = None
|
|
|
conf: float = 0.25
|
|
|
- iou: float = 0.7
|
|
|
+ iou: Optional[float] = 0.7
|
|
|
imgsz: int = 640
|
|
|
device: str = ""
|
|
|
# 可根据需要补充更多参数
|