feat:新增基于YOLOv8的打架斗殴模型,支持上传视频识别以及摄像头识别

This commit is contained in:
2026-06-10 14:24:59 +08:00
parent ed5079a9dd
commit 77bd437fdb
4 changed files with 315 additions and 4 deletions

View File

@@ -374,7 +374,12 @@ class DetectionService:
'person': (0, 255, 0),
'helmet': (255, 255, 0),
'no_helmet': (255, 0, 255),
'cigarette': (0, 165, 255)
'cigarette': (0, 165, 255),
# 兼容旧模型类别
'violence': (0, 0, 255),
'fight': (0, 0, 255),
'normal': (0, 200, 0),
'non_violence': (0, 200, 0)
}
for det in detections: