121610f8d9
- Changed pipeline_flows.json: scene → scene_vlm - Added get_enabled_processors() method to PipelineFlows - Updated create_monitor_job to use dynamic processors - Updated process_register_command to use dynamic processors - Removed hardcoded processor arrays - Added tests for get_enabled_processors()
356 lines
12 KiB
JSON
356 lines
12 KiB
JSON
{
|
|
"version": "2.0.0",
|
|
"updated_at": "2026-10-16T17:00:00Z",
|
|
"updated_by": "core_team",
|
|
"enabled": true,
|
|
"max_concurrent_stages": 3,
|
|
"default_timeout_secs": 3600,
|
|
"phases": [
|
|
{
|
|
"id": 1,
|
|
"name": "基础分析",
|
|
"name_en": "Foundation",
|
|
"description": "场景切分与分析",
|
|
"progress_weight": 0.15,
|
|
"color": "#4CAF50",
|
|
"icon": "foundation",
|
|
"parallel_strategy": "sequential",
|
|
"processors": ["cut"]
|
|
},
|
|
{
|
|
"id": 2,
|
|
"name": "核心处理",
|
|
"name_en": "Core Processing",
|
|
"description": "语音识别、人脸检测、文字识别",
|
|
"progress_weight": 0.60,
|
|
"color": "#2196F3",
|
|
"icon": "processing",
|
|
"parallel_strategy": "limited_parallel",
|
|
"max_concurrent": 3,
|
|
"processors": ["asr_asrx", "face", "ocr"]
|
|
},
|
|
{
|
|
"id": 3,
|
|
"name": "深度分析",
|
|
"name_en": "Deep Analysis",
|
|
"description": "说话人识别、场景描述、人脸聚类",
|
|
"progress_weight": 0.20,
|
|
"color": "#9C27B0",
|
|
"icon": "analysis",
|
|
"parallel_strategy": "limited_parallel",
|
|
"max_concurrent": 3,
|
|
"processors": ["scene_vlm", "face_trace", "face_cluster"]
|
|
},
|
|
{
|
|
"id": 4,
|
|
"name": "知识构建",
|
|
"name_en": "Knowledge Building",
|
|
"description": "时序知识图谱构建",
|
|
"progress_weight": 0.05,
|
|
"color": "#FF9800",
|
|
"icon": "knowledge",
|
|
"parallel_strategy": "sequential",
|
|
"processors": ["tkg"]
|
|
}
|
|
],
|
|
"flows": {
|
|
"register": {
|
|
"name": "Video Registration Pipeline",
|
|
"description": "Complete video processing pipeline for new video files",
|
|
"version": "2.0.0",
|
|
"enabled": true,
|
|
"stages": [
|
|
{
|
|
"name": "cut",
|
|
"processor_type": "cut",
|
|
"phase": 1,
|
|
"phase_name": "基础分析",
|
|
"phase_name_en": "Foundation",
|
|
"progress_weight": 1.0,
|
|
"display_name": "场景切分",
|
|
"display_name_en": "Scene Cut Detection",
|
|
"description": "Scene cut detection using ffmpeg or Python scenedetect",
|
|
"required": true,
|
|
"enabled": true,
|
|
"timeout_secs": 3600,
|
|
"parallel": false,
|
|
"estimated_time_secs": 5,
|
|
"resource_type": "cpu",
|
|
"dependencies": [],
|
|
"tool": {
|
|
"name": "rust_cut",
|
|
"priority": 0,
|
|
"description": "High-performance Rust-based scene detection",
|
|
"parameters": {
|
|
"min_scene_duration": 0.5,
|
|
"threshold": 0.3
|
|
},
|
|
"usage_notes": "Uses ffmpeg for native detection. Falls back to Python scenedetect if unavailable."
|
|
},
|
|
"condition": {
|
|
"skip_if_exists": "*.cut.json"
|
|
},
|
|
"on_failure": "continue"
|
|
},
|
|
{
|
|
"name": "asr_asrx",
|
|
"processor_type": "asr_asrx",
|
|
"phase": 2,
|
|
"phase_name": "核心处理",
|
|
"phase_name_en": "Core Processing",
|
|
"progress_weight": 0.35,
|
|
"display_name": "語音識別與說話人分離",
|
|
"display_name_en": "ASR + Speaker Diarization",
|
|
"description": "Automatic Speech Recognition with Speaker Diarization using Rust + MLX Whisper",
|
|
"required": false,
|
|
"enabled": true,
|
|
"timeout_secs": 3600,
|
|
"parallel": true,
|
|
"estimated_time_secs": 25,
|
|
"resource_type": "gpu",
|
|
"dependencies": [],
|
|
"tool": {
|
|
"name": "rust_asr_asrx",
|
|
"priority": 0,
|
|
"description": "High-performance Rust ASR + Diarization with MLX Whisper",
|
|
"parameters": {
|
|
"model": "/Users/accusys/models/whisper-small-mlx",
|
|
"diarize": true
|
|
},
|
|
"usage_notes": "Combines ASR and Diarization in one processor. Uses verified whisper-small-mlx model."
|
|
},
|
|
"condition": {
|
|
"skip_if_exists": "*.asr_asrx.json"
|
|
},
|
|
"on_failure": "continue"
|
|
},
|
|
{
|
|
"name": "face",
|
|
"processor_type": "face",
|
|
"phase": 2,
|
|
"phase_name": "核心处理",
|
|
"phase_name_en": "Core Processing",
|
|
"progress_weight": 0.35,
|
|
"display_name": "人脸检测",
|
|
"display_name_en": "Face Detection",
|
|
"description": "Face detection and tracking",
|
|
"required": false,
|
|
"enabled": true,
|
|
"timeout_secs": 7200,
|
|
"parallel": true,
|
|
"estimated_time_secs": 15,
|
|
"resource_type": "ane",
|
|
"dependencies": [],
|
|
"tool": {
|
|
"name": "swift_face",
|
|
"priority": 0,
|
|
"description": "Apple Vision framework face detection (ANE accelerated)",
|
|
"parameters": {
|
|
"min_confidence": 0.5,
|
|
"min_size": 1
|
|
},
|
|
"usage_notes": "Uses Apple Neural Engine for acceleration. Falls back to Python InsightFace if unavailable."
|
|
},
|
|
"condition": {
|
|
"skip_if_exists": "*.face.json"
|
|
},
|
|
"on_failure": "continue"
|
|
},
|
|
{
|
|
"name": "ocr",
|
|
"processor_type": "ocr",
|
|
"phase": 2,
|
|
"phase_name": "核心处理",
|
|
"phase_name_en": "Core Processing",
|
|
"progress_weight": 0.30,
|
|
"display_name": "文字识别",
|
|
"display_name_en": "OCR",
|
|
"description": "OCR text extraction using Apple Vision Framework",
|
|
"required": false,
|
|
"enabled": true,
|
|
"timeout_secs": 7200,
|
|
"parallel": true,
|
|
"estimated_time_secs": 10,
|
|
"resource_type": "ane",
|
|
"dependencies": [],
|
|
"tool": {
|
|
"name": "swift_ocr",
|
|
"priority": 0,
|
|
"description": "Apple Vision VNRecognizeTextRequest (ANE accelerated)",
|
|
"parameters": {
|
|
"recognition_level": "accurate",
|
|
"uses_language_correction": true
|
|
},
|
|
"usage_notes": "Uses Apple Neural Engine for acceleration. Supports multiple languages with real-time recognition. 2.5x faster than Python (2s vs 5s)."
|
|
},
|
|
"condition": {
|
|
"skip_if_exists": "*.ocr.json"
|
|
},
|
|
"on_failure": "continue"
|
|
},
|
|
{
|
|
"name": "scene_vlm",
|
|
"processor_type": "scene_vlm",
|
|
"phase": 3,
|
|
"phase_name": "深度分析",
|
|
"phase_name_en": "Deep Analysis",
|
|
"progress_weight": 0.35,
|
|
"display_name": "场景描述",
|
|
"display_name_en": "Scene Description",
|
|
"description": "Scene VLM analysis for scene descriptions",
|
|
"required": false,
|
|
"enabled": true,
|
|
"timeout_secs": 7200,
|
|
"parallel": true,
|
|
"estimated_time_secs": 10,
|
|
"resource_type": "gpu",
|
|
"dependencies": ["cut"],
|
|
"tool": {
|
|
"name": "gemma_vlm",
|
|
"priority": 0,
|
|
"description": "Gemma 4 12B with mmproj for vision-language analysis",
|
|
"parameters": {
|
|
"max_tokens": 900,
|
|
"temperature": 0.1
|
|
},
|
|
"usage_notes": "Generates scene descriptions in multiple languages. Requires mmproj loaded."
|
|
},
|
|
"condition": {
|
|
"depends_on": "cut",
|
|
"skip_if_exists": "*.scenes.json"
|
|
},
|
|
"on_failure": "continue"
|
|
},
|
|
{
|
|
"name": "face_trace",
|
|
"processor_type": "face_trace",
|
|
"phase": 3,
|
|
"phase_name": "深度分析",
|
|
"phase_name_en": "Deep Analysis",
|
|
"progress_weight": 0.20,
|
|
"display_name": "人脸追踪",
|
|
"display_name_en": "Face Tracing",
|
|
"description": "Face tracking to generate face traces using IoU + Embedding Similarity",
|
|
"required": false,
|
|
"enabled": true,
|
|
"timeout_secs": 3600,
|
|
"parallel": true,
|
|
"estimated_time_secs": 5,
|
|
"resource_type": "cpu",
|
|
"dependencies": ["face"],
|
|
"tool": {
|
|
"name": "rust_face_trace",
|
|
"priority": 0,
|
|
"description": "Rust-based face tracking with IoU + Embedding similarity matching",
|
|
"parameters": {
|
|
"similarity_threshold": 0.85,
|
|
"iou_threshold": 0.3
|
|
},
|
|
"usage_notes": "Uses Qdrant _faces collection for embeddings. Matches faces based on IoU (bbox overlap) and embedding similarity. Traces are continuous face sequences; same person may have multiple traces due to cuts or temporary exits."
|
|
},
|
|
"condition": {
|
|
"depends_on": "face",
|
|
"skip_if_exists": "*.face_traced.json"
|
|
},
|
|
"on_failure": "continue"
|
|
},
|
|
{
|
|
"name": "face_cluster",
|
|
"processor_type": "face_cluster",
|
|
"phase": 3,
|
|
"phase_name": "深度分析",
|
|
"phase_name_en": "Deep Analysis",
|
|
"progress_weight": 0.25,
|
|
"display_name": "人脸聚类",
|
|
"display_name_en": "Face Clustering",
|
|
"description": "Face clustering and grouping with improved threshold",
|
|
"required": false,
|
|
"enabled": true,
|
|
"timeout_secs": 3600,
|
|
"parallel": true,
|
|
"estimated_time_secs": 5,
|
|
"resource_type": "cpu",
|
|
"dependencies": ["face_trace"],
|
|
"tool": {
|
|
"name": "rust_face_cluster",
|
|
"priority": 0,
|
|
"description": "Rust-based face clustering with Stage 2 merge support",
|
|
"parameters": {
|
|
"threshold": 0.15,
|
|
"stage2": false,
|
|
"method": "leader",
|
|
"min_face_count": 20,
|
|
"max_bbox_area": 150000
|
|
},
|
|
"usage_notes": "Uses Qdrant _faces collection for embeddings. Threshold=0.15 to correctly separate male/female faces. Stage 2 merge disabled to prevent over-merging. Auto-filters low-quality clusters: face_count<20 or bbox_area>150000 (hand/object detections)."
|
|
},
|
|
"condition": {
|
|
"depends_on": "face_trace",
|
|
"skip_if_exists": "*.face_cluster.json"
|
|
},
|
|
"on_failure": "continue"
|
|
},
|
|
{
|
|
"name": "tkg",
|
|
"processor_type": "tkg",
|
|
"phase": 4,
|
|
"phase_name": "知识构建",
|
|
"phase_name_en": "Knowledge Building",
|
|
"progress_weight": 1.0,
|
|
"display_name": "知识图谱",
|
|
"display_name_en": "Knowledge Graph",
|
|
"description": "Temporal knowledge graph construction",
|
|
"required": false,
|
|
"enabled": true,
|
|
"timeout_secs": 3600,
|
|
"parallel": false,
|
|
"estimated_time_secs": 5,
|
|
"resource_type": "cpu",
|
|
"dependencies": ["asr_asrx", "face_cluster"],
|
|
"condition": {
|
|
"depends_on": ["asr_asrx", "face_cluster"],
|
|
"skip_if_exists": "*.tkg.json"
|
|
},
|
|
"on_failure": "continue"
|
|
}
|
|
]
|
|
},
|
|
"reprocess": {
|
|
"name": "Reprocessing Pipeline",
|
|
"description": "Selective reprocessing of specific processors",
|
|
"version": "2.0.0",
|
|
"enabled": true,
|
|
"stages": []
|
|
},
|
|
"phase1_pack": {
|
|
"name": "Phase 1 Packaging Pipeline",
|
|
"description": "Package Phase 1 results for delivery",
|
|
"version": "2.0.0",
|
|
"enabled": true,
|
|
"stages": [
|
|
{
|
|
"name": "pack",
|
|
"processor_type": "pack",
|
|
"phase": 4,
|
|
"phase_name": "知识构建",
|
|
"phase_name_en": "Knowledge Building",
|
|
"progress_weight": 1.0,
|
|
"display_name": "打包",
|
|
"display_name_en": "Pack",
|
|
"description": "Create release package with all Phase 1 outputs",
|
|
"required": true,
|
|
"enabled": true,
|
|
"timeout_secs": 600,
|
|
"parallel": false,
|
|
"estimated_time_secs": 10,
|
|
"resource_type": "cpu",
|
|
"dependencies": [],
|
|
"parameters": {
|
|
"phase": 1,
|
|
"include_metadata": true
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
} |