882e31ab96
Consolidated snapshot (previously WIP in working tree). - core/pipeline_config: new module loading config/pipeline_flows.json as the source of truth for stage execution mode (parallel/blocking) and dependencies - worker/job_worker: dispatch Scene VLM to a background task when the stage is declared parallel, unblocking the worker poll loop; resolve processor dependencies from pipeline_flows.json (fallback to built-in) - config/pipeline_flows.json: asrx depends on [cut, asr] - scripts/fix_stuck_jobs: fix UTC timezone comparison, raise default threshold to 6h, skip jobs with recent processor activity - rust_asrx: Rust speaker diarization CLI + processor wiring - processor metadata helper; fast_face_clustering script; file_progress pipeline API; scan API; VAD updates
340 lines
11 KiB
JSON
340 lines
11 KiB
JSON
{
|
|
"version": "2.0.0",
|
|
"updated_at": "2026-10-14T19: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", "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": ["asrx", "scene", "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",
|
|
"processor_type": "asr",
|
|
"phase": 2,
|
|
"phase_name": "核心处理",
|
|
"phase_name_en": "Core Processing",
|
|
"progress_weight": 0.35,
|
|
"display_name": "语音识别",
|
|
"display_name_en": "Speech Recognition",
|
|
"description": "Automatic Speech Recognition using Whisper",
|
|
"required": false,
|
|
"enabled": true,
|
|
"timeout_secs": 3600,
|
|
"parallel": true,
|
|
"estimated_time_secs": 20,
|
|
"resource_type": "gpu",
|
|
"dependencies": [],
|
|
"tool": {
|
|
"name": "whisper_mlx",
|
|
"priority": 0,
|
|
"description": "MLX-accelerated Whisper for Apple Silicon",
|
|
"parameters": {
|
|
"model": "small",
|
|
"language": "auto"
|
|
},
|
|
"usage_notes": "Optimized for Apple Silicon. Falls back to whisper.cpp if unavailable."
|
|
},
|
|
"condition": {
|
|
"skip_if_exists": "*.asr.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": "asrx",
|
|
"processor_type": "asrx",
|
|
"phase": 3,
|
|
"phase_name": "深度分析",
|
|
"phase_name_en": "Deep Analysis",
|
|
"progress_weight": 0.40,
|
|
"display_name": "说话人识别",
|
|
"display_name_en": "Speaker Diarization",
|
|
"description": "Speaker diarization using Swift (Apple Vision + ANE)",
|
|
"required": false,
|
|
"enabled": true,
|
|
"timeout_secs": 1800,
|
|
"parallel": true,
|
|
"estimated_time_secs": 15,
|
|
"resource_type": "ane",
|
|
"dependencies": ["cut", "asr"],
|
|
"tool": {
|
|
"name": "swift_asrx",
|
|
"priority": 0,
|
|
"description": "Apple Vision speaker diarization (ANE accelerated)",
|
|
"parameters": {},
|
|
"usage_notes": "Uses Apple Neural Engine for acceleration. Falls back to Python pyannote if unavailable."
|
|
},
|
|
"condition": {
|
|
"depends_on": ["cut", "asr"],
|
|
"skip_if_exists": "*.asrx.json"
|
|
},
|
|
"on_failure": "continue"
|
|
},
|
|
{
|
|
"name": "scene",
|
|
"processor_type": "scene",
|
|
"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_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",
|
|
"required": false,
|
|
"enabled": true,
|
|
"timeout_secs": 3600,
|
|
"parallel": true,
|
|
"estimated_time_secs": 5,
|
|
"resource_type": "cpu",
|
|
"dependencies": ["face"],
|
|
"condition": {
|
|
"depends_on": "face",
|
|
"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": ["asrx", "face_cluster"],
|
|
"condition": {
|
|
"depends_on": ["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
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
} |