Initial commit: Video detection platform with YOLO models

Features:
- Fire detection (YOLOv10)
- Helmet detection (YOLOv8)
- Crowd detection (YOLOv8)
- Smoking detection (YOLOv8)
- Loitering detection (YOLOv8)

Tech Stack:
- Frontend: Vue 3 + Vite + Element Plus
- Backend: FastAPI + WebSocket
- Monorepo: pnpm workspace + Turbo
- Docker support included
This commit is contained in:
wwh
2026-05-18 10:54:10 +08:00
commit 8fb58c75fe
42 changed files with 6663 additions and 0 deletions
+58
View File
@@ -0,0 +1,58 @@
// 检测相关类型
export interface Detection {
class: string;
label: string;
confidence: number;
bbox: [number, number, number, number];
}
export interface DetectionStats {
total_detections: number;
avg_confidence: number;
processing_time: number;
model_used: string;
fps?: number;
}
export interface ModelInfo {
id: string;
name: string;
description: string;
classes: string[];
labels: Record<string, string>;
size: string;
type: string;
}
export interface DetectionResult {
success: boolean;
message: string;
data: {
detections: Detection[];
image_url?: string;
stats: DetectionStats;
};
}
export interface DetectionConfig {
model_id: string;
confidence: number;
iou: number;
}
// WebSocket 消息类型
export interface WebSocketMessage {
type: 'original_frame' | 'annotated_frame' | 'detection' | 'error' | 'camera_started' | 'camera_stopped' | 'config_updated';
frame?: string;
detections?: Detection[];
stats?: DetectionStats;
message?: string;
}
export interface CameraConfig {
model_id: string;
confidence: number;
iou: number;
camera_source?: number | string;
}