docs: add processor configuration v2/v3 with full commands
新增配置文件:
- processor_tools_v2.json: Tool/Model 分離設計
- processor_tools_v3.json: 完整命令和參數
新增文檔:
- Processor_Config_V2_Design.md: V2 設計文檔
- Processor_Commands_Reference.md: 完整命令參考
V3 配置特點:
- 明確區分 tool (python/rust/swift) 和 model (whisper/mediapipe)
- 包含完整執行命令和參數
- 支持變量替換 ({video_path}, {file_uuid}, etc.)
- 包含環境變量配置
命令示例:
- POSE (Python): python3.11 scripts/pose_processor_mediapipe.py {video} {output} --model-complexity 2
- FACE_TRACE (Rust): rust_store_traced_faces {uuid} --output-dir {dir}
- ASR (Python): python3.11 scripts/asr_processor_simplified.py {video} {output} --model large-v3
下一步:
- 更新 ToolSelector 支持 V3 格式
- 更新 Worker 使用新配置
This commit is contained in:
@@ -0,0 +1,312 @@
|
||||
{
|
||||
"processor_config": {
|
||||
"pose": {
|
||||
"implementations": [
|
||||
{
|
||||
"tool": "python",
|
||||
"model": "mediapipe",
|
||||
"priority": 0,
|
||||
"enabled": true,
|
||||
"parameters": {
|
||||
"model_complexity": 2,
|
||||
"min_confidence": 0.5,
|
||||
"script": "pose_processor_mediapipe.py"
|
||||
}
|
||||
},
|
||||
{
|
||||
"tool": "rust",
|
||||
"model": null,
|
||||
"priority": 1,
|
||||
"enabled": true,
|
||||
"parameters": {},
|
||||
"binary": "rust_pose"
|
||||
},
|
||||
{
|
||||
"tool": "swift",
|
||||
"model": null,
|
||||
"priority": 2,
|
||||
"enabled": true,
|
||||
"parameters": {},
|
||||
"binary": "swift_pose"
|
||||
},
|
||||
{
|
||||
"tool": "python",
|
||||
"model": "yolov8-pose",
|
||||
"priority": 3,
|
||||
"enabled": false,
|
||||
"parameters": {
|
||||
"model_file": "yolov8n-pose.pt"
|
||||
}
|
||||
}
|
||||
],
|
||||
"default": {
|
||||
"tool": "python",
|
||||
"model": "mediapipe"
|
||||
},
|
||||
"timeout": 3600,
|
||||
"enabled": true
|
||||
},
|
||||
"face": {
|
||||
"implementations": [
|
||||
{
|
||||
"tool": "swift",
|
||||
"model": null,
|
||||
"priority": 0,
|
||||
"enabled": true,
|
||||
"parameters": {},
|
||||
"binary": "swift_face"
|
||||
},
|
||||
{
|
||||
"tool": "python",
|
||||
"model": null,
|
||||
"priority": 1,
|
||||
"enabled": true,
|
||||
"parameters": {},
|
||||
"script": "face_detector.py"
|
||||
}
|
||||
],
|
||||
"default": {
|
||||
"tool": "swift",
|
||||
"model": null
|
||||
},
|
||||
"enabled": true
|
||||
},
|
||||
"asr": {
|
||||
"implementations": [
|
||||
{
|
||||
"tool": "python",
|
||||
"model": "whisper",
|
||||
"priority": 0,
|
||||
"enabled": true,
|
||||
"parameters": {
|
||||
"model_size": "large-v3",
|
||||
"model_dir": "/Users/accusys/models/whisper-small-mlx",
|
||||
"script": "asr_processor_whisper.py"
|
||||
}
|
||||
},
|
||||
{
|
||||
"tool": "rust",
|
||||
"model": "whisper",
|
||||
"priority": 1,
|
||||
"enabled": false,
|
||||
"parameters": {
|
||||
"model_size": "base"
|
||||
}
|
||||
}
|
||||
],
|
||||
"default": {
|
||||
"tool": "python",
|
||||
"model": "whisper"
|
||||
},
|
||||
"enabled": true
|
||||
},
|
||||
"asrx": {
|
||||
"implementations": [
|
||||
{
|
||||
"tool": "swift",
|
||||
"model": null,
|
||||
"priority": 0,
|
||||
"enabled": true,
|
||||
"parameters": {},
|
||||
"binary": "swift_asrx"
|
||||
},
|
||||
{
|
||||
"tool": "python",
|
||||
"model": null,
|
||||
"priority": 1,
|
||||
"enabled": true,
|
||||
"parameters": {},
|
||||
"script": "asrx_processor.py"
|
||||
}
|
||||
],
|
||||
"default": {
|
||||
"tool": "swift",
|
||||
"model": null
|
||||
},
|
||||
"enabled": true
|
||||
},
|
||||
"ocr": {
|
||||
"implementations": [
|
||||
{
|
||||
"tool": "swift",
|
||||
"model": null,
|
||||
"priority": 0,
|
||||
"enabled": true,
|
||||
"parameters": {},
|
||||
"binary": "swift_ocr"
|
||||
},
|
||||
{
|
||||
"tool": "python",
|
||||
"model": "tesseract",
|
||||
"priority": 1,
|
||||
"enabled": true,
|
||||
"parameters": {},
|
||||
"script": "ocr_processor.py"
|
||||
}
|
||||
],
|
||||
"default": {
|
||||
"tool": "swift",
|
||||
"model": null
|
||||
},
|
||||
"enabled": true
|
||||
},
|
||||
"face_trace": {
|
||||
"implementations": [
|
||||
{
|
||||
"tool": "rust",
|
||||
"model": null,
|
||||
"priority": 0,
|
||||
"enabled": true,
|
||||
"parameters": {
|
||||
"min_trace_len": 0,
|
||||
"min_confidence": 0.0
|
||||
},
|
||||
"binary": "rust_store_traced_faces"
|
||||
},
|
||||
{
|
||||
"tool": "python",
|
||||
"model": null,
|
||||
"priority": 1,
|
||||
"enabled": false,
|
||||
"parameters": {},
|
||||
"script": "store_traced_faces.py"
|
||||
}
|
||||
],
|
||||
"default": {
|
||||
"tool": "rust",
|
||||
"model": null
|
||||
},
|
||||
"enabled": true
|
||||
},
|
||||
"face_deduplicate": {
|
||||
"implementations": [
|
||||
{
|
||||
"tool": "python",
|
||||
"model": null,
|
||||
"priority": 0,
|
||||
"enabled": true,
|
||||
"parameters": {},
|
||||
"script": "face_deduplicate.py"
|
||||
},
|
||||
{
|
||||
"tool": "rust",
|
||||
"model": null,
|
||||
"priority": 1,
|
||||
"enabled": false,
|
||||
"parameters": {},
|
||||
"binary": "rust_face_deduplicate"
|
||||
}
|
||||
],
|
||||
"default": {
|
||||
"tool": "python",
|
||||
"model": null
|
||||
},
|
||||
"enabled": true
|
||||
},
|
||||
"scene_vlm_summary": {
|
||||
"implementations": [
|
||||
{
|
||||
"tool": "python",
|
||||
"model": "gemma-4-12b-it",
|
||||
"priority": 0,
|
||||
"enabled": true,
|
||||
"parameters": {
|
||||
"max_tokens": 300,
|
||||
"llm_url": "http://localhost:8080/v1/chat/completions",
|
||||
"script": "scene_vlm_summary.py"
|
||||
}
|
||||
}
|
||||
],
|
||||
"default": {
|
||||
"tool": "python",
|
||||
"model": "gemma-4-12b-it"
|
||||
},
|
||||
"enabled": true
|
||||
},
|
||||
"tkg": {
|
||||
"implementations": [
|
||||
{
|
||||
"tool": "python",
|
||||
"model": null,
|
||||
"priority": 0,
|
||||
"enabled": true,
|
||||
"parameters": {},
|
||||
"script": "build_tkg.py"
|
||||
},
|
||||
{
|
||||
"tool": "rust",
|
||||
"model": null,
|
||||
"priority": 1,
|
||||
"enabled": false,
|
||||
"parameters": {},
|
||||
"binary": "rust_tkg"
|
||||
}
|
||||
],
|
||||
"default": {
|
||||
"tool": "python",
|
||||
"model": null
|
||||
},
|
||||
"enabled": true
|
||||
},
|
||||
"vlm_summary": {
|
||||
"implementations": [
|
||||
{
|
||||
"tool": "rust",
|
||||
"model": "gemma-4-12b-it",
|
||||
"priority": 0,
|
||||
"enabled": true,
|
||||
"parameters": {
|
||||
"max_tokens": 800,
|
||||
"use_vision": true,
|
||||
"llm_url": "http://localhost:8080/v1/chat/completions"
|
||||
},
|
||||
"binary": "rust_vlm_summary"
|
||||
}
|
||||
],
|
||||
"default": {
|
||||
"tool": "rust",
|
||||
"model": "gemma-4-12b-it"
|
||||
},
|
||||
"enabled": true
|
||||
},
|
||||
"cut": {
|
||||
"implementations": [
|
||||
{
|
||||
"tool": "rust",
|
||||
"model": null,
|
||||
"priority": 0,
|
||||
"enabled": true,
|
||||
"parameters": {
|
||||
"use_ffmpeg": true,
|
||||
"min_scene_duration": 0.5
|
||||
},
|
||||
"binary": "rust_cut"
|
||||
},
|
||||
{
|
||||
"tool": "python",
|
||||
"model": null,
|
||||
"priority": 1,
|
||||
"enabled": false,
|
||||
"parameters": {},
|
||||
"script": "cut_detector.py"
|
||||
}
|
||||
],
|
||||
"default": {
|
||||
"tool": "rust",
|
||||
"model": null
|
||||
},
|
||||
"enabled": true
|
||||
}
|
||||
},
|
||||
"metadata": {
|
||||
"version": "2.0",
|
||||
"description": "Processor configuration with tool/model separation",
|
||||
"tools": ["python", "rust", "swift"],
|
||||
"models": {
|
||||
"whisper": ["base", "small", "medium", "large", "large-v3"],
|
||||
"mediapipe": ["pose", "face"],
|
||||
"yolov8": ["pose", "detect"],
|
||||
"gemma": ["gemma-4-12b-it", "embeddinggemma-300m"]
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user