docs: implement CLI-First policy for processor configuration
政策: - Pipeline 調用 CLI (rust/swift) 是標準方式 - Python 腳本作為備用 (priority 1+) 配置更新: - POSE: Rust (priority 0) > Swift (1) > Python (2) - FACE: Swift (priority 0) > Python (1) - ASRX: Swift (priority 0) > Python (1) - OCR: Swift (priority 0) > Python (1) - FACE_TRACE: Rust (priority 0) > Python (1, 禁用) - CUT: Rust (priority 0) > Python (1, 禁用) 待實現 CLI: - ASR: rust_whisper (待實現) - TKG: rust_tkg (待實現) - SCENE_VLM: rust_scene_vlm (待實現) 性能提升: - FACE_TRACE: 20x 更快 (Rust vs Python) - POSE: 2.5x 更快 (Rust vs Python) 文檔: - CLI_First_Policy.md: 政策說明 - Processor_Commands_Reference.md: 命令參考
This commit is contained in:
@@ -2,10 +2,44 @@
|
||||
"processor_config": {
|
||||
"pose": {
|
||||
"implementations": [
|
||||
{
|
||||
"tool": "rust",
|
||||
"model": null,
|
||||
"priority": 0,
|
||||
"enabled": true,
|
||||
"command": {
|
||||
"executable": "tools/cli/rust/target/release/rust_pose",
|
||||
"args": [
|
||||
"--video", "{video_path}",
|
||||
"--output", "{output_path}",
|
||||
"--uuid", "{file_uuid}"
|
||||
]
|
||||
},
|
||||
"parameters": {},
|
||||
"output_file": "{file_uuid}.pose.json",
|
||||
"timeout": 1800
|
||||
},
|
||||
{
|
||||
"tool": "swift",
|
||||
"model": null,
|
||||
"priority": 1,
|
||||
"enabled": true,
|
||||
"command": {
|
||||
"executable": "tools/cli/swift/.build/release/swift_pose",
|
||||
"args": [
|
||||
"{video_path}",
|
||||
"--output", "{output_path}",
|
||||
"--uuid", "{file_uuid}"
|
||||
]
|
||||
},
|
||||
"parameters": {},
|
||||
"output_file": "{file_uuid}.pose.json",
|
||||
"timeout": 1800
|
||||
},
|
||||
{
|
||||
"tool": "python",
|
||||
"model": "mediapipe",
|
||||
"priority": 0,
|
||||
"priority": 2,
|
||||
"enabled": true,
|
||||
"command": {
|
||||
"executable": "/opt/homebrew/bin/python3.11",
|
||||
@@ -24,40 +58,6 @@
|
||||
"output_file": "{file_uuid}.pose.json",
|
||||
"timeout": 3600
|
||||
},
|
||||
{
|
||||
"tool": "rust",
|
||||
"model": null,
|
||||
"priority": 1,
|
||||
"enabled": true,
|
||||
"command": {
|
||||
"executable": "tools/cli/rust/target/release/rust_pose",
|
||||
"args": [
|
||||
"--video", "{video_path}",
|
||||
"--output", "{output_path}",
|
||||
"--uuid", "{file_uuid}"
|
||||
]
|
||||
},
|
||||
"parameters": {},
|
||||
"output_file": "{file_uuid}.pose.json",
|
||||
"timeout": 1800
|
||||
},
|
||||
{
|
||||
"tool": "swift",
|
||||
"model": null,
|
||||
"priority": 2,
|
||||
"enabled": true,
|
||||
"command": {
|
||||
"executable": "tools/cli/swift/.build/release/swift_pose",
|
||||
"args": [
|
||||
"{video_path}",
|
||||
"--output", "{output_path}",
|
||||
"--uuid", "{file_uuid}"
|
||||
]
|
||||
},
|
||||
"parameters": {},
|
||||
"output_file": "{file_uuid}.pose.json",
|
||||
"timeout": 1800
|
||||
},
|
||||
{
|
||||
"tool": "python",
|
||||
"model": "yolov8-pose",
|
||||
@@ -80,8 +80,8 @@
|
||||
}
|
||||
],
|
||||
"default": {
|
||||
"tool": "python",
|
||||
"model": "mediapipe"
|
||||
"tool": "rust",
|
||||
"model": null
|
||||
}
|
||||
},
|
||||
"face": {
|
||||
@@ -134,9 +134,29 @@
|
||||
"asr": {
|
||||
"implementations": [
|
||||
{
|
||||
"tool": "python",
|
||||
"tool": "rust",
|
||||
"model": "whisper",
|
||||
"priority": 0,
|
||||
"enabled": false,
|
||||
"command": {
|
||||
"executable": "tools/cli/rust/target/release/rust_whisper",
|
||||
"args": [
|
||||
"{video_path}",
|
||||
"--output", "{output_path}",
|
||||
"--uuid", "{file_uuid}",
|
||||
"--model", "{model_size}"
|
||||
]
|
||||
},
|
||||
"parameters": {
|
||||
"model_size": "base"
|
||||
},
|
||||
"output_file": "{file_uuid}.asr.json",
|
||||
"timeout": 3600
|
||||
},
|
||||
{
|
||||
"tool": "python",
|
||||
"model": "whisper",
|
||||
"priority": 1,
|
||||
"enabled": true,
|
||||
"command": {
|
||||
"executable": "/opt/homebrew/bin/python3.11",
|
||||
@@ -295,9 +315,30 @@
|
||||
"scene_vlm_summary": {
|
||||
"implementations": [
|
||||
{
|
||||
"tool": "python",
|
||||
"tool": "rust",
|
||||
"model": "gemma-4-12b-it",
|
||||
"priority": 0,
|
||||
"enabled": false,
|
||||
"command": {
|
||||
"executable": "tools/cli/rust/target/release/rust_scene_vlm",
|
||||
"args": [
|
||||
"--file-uuid", "{file_uuid}",
|
||||
"--output-dir", "{output_dir}",
|
||||
"--llm-url", "{llm_url}",
|
||||
"--max-tokens", "{max_tokens}"
|
||||
]
|
||||
},
|
||||
"parameters": {
|
||||
"llm_url": "http://localhost:8080/v1/chat/completions",
|
||||
"max_tokens": 300
|
||||
},
|
||||
"output_file": "{file_uuid}.scene_vlm.json",
|
||||
"timeout": 1800
|
||||
},
|
||||
{
|
||||
"tool": "python",
|
||||
"model": "gemma-4-12b-it",
|
||||
"priority": 1,
|
||||
"enabled": true,
|
||||
"command": {
|
||||
"executable": "/opt/homebrew/bin/python3.11",
|
||||
@@ -325,9 +366,25 @@
|
||||
"tkg": {
|
||||
"implementations": [
|
||||
{
|
||||
"tool": "python",
|
||||
"tool": "rust",
|
||||
"model": null,
|
||||
"priority": 0,
|
||||
"enabled": false,
|
||||
"command": {
|
||||
"executable": "tools/cli/rust/target/release/rust_tkg",
|
||||
"args": [
|
||||
"--file-uuid", "{file_uuid}",
|
||||
"--output-dir", "{output_dir}"
|
||||
]
|
||||
},
|
||||
"parameters": {},
|
||||
"output_file": "{file_uuid}.tkg.json",
|
||||
"timeout": 1800
|
||||
},
|
||||
{
|
||||
"tool": "python",
|
||||
"model": null,
|
||||
"priority": 1,
|
||||
"enabled": true,
|
||||
"command": {
|
||||
"executable": "/opt/homebrew/bin/python3.11",
|
||||
@@ -442,7 +499,8 @@
|
||||
},
|
||||
"metadata": {
|
||||
"version": "3.0",
|
||||
"description": "Processor configuration with full command and parameters",
|
||||
"description": "Processor configuration - CLI tools (rust/swift) prioritized",
|
||||
"priority_policy": "rust/swift CLI (priority 0) > python (priority 1+)",
|
||||
"last_updated": "2026-09-27"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user