项目初始化

This commit is contained in:
2025-06-26 16:48:49 +08:00
commit eb17d1f7f5
19 changed files with 301 additions and 0 deletions

17
algo/yolov11.py Normal file
View File

@ -0,0 +1,17 @@
from ultralytics import YOLO
class YoloModel:
def __init__(self, pt_url=None):
if pt_url:
self.model = YOLO(pt_url)
else:
self.model = YOLO('yolo11n.pt')
def predict(self, source):
"""
对rtsp视频流进行预测
"""
results = self.model.predict(source=source, conf=0.6, device='cpu')
return results