Commit Graph

8 Commits

Author SHA1 Message Date
Accusys 162ece34f7 revert: disable Pose processor (was cancelled decision)
Pose was previously decided to be removed (ProcessorType::all()
already excludes it: 'Disabled in production pipeline'). However,
create_monitor_job's default processors array still contained 'pose',
job_worker's auto-pipeline status init still listed pose/appearance,
and processor_tools_v3.json had pose implementations enabled.

This reverts the pose portions of 8c6a2de8 (pose.rs placeholder
expansion and config --output args change) and fully disables Pose:

- config/processor_tools_v3.json: pose swift/mediapipe enabled=false,
  restore original --output args for swift
- src/core/db/postgres_db.rs: create_monitor_job default processors
  no longer includes 'pose'
- src/worker/job_worker.rs: auto-pipeline status init no longer lists
  pose/appearance
- src/core/processor/pose.rs: revert placeholder expansion (unchanged
  from pre-8c6a2de8)

Face config-driven fix (positional args + placeholder expansion) is kept.
2026-10-02 15:04:48 +08:00
Accusys 8c6a2de820 fix: use positional args for swift face/pose config-driven execution
The swift_face/swift_pose CLIs take positional <input> <output> paths,
but processor_tools_v3.json passed an unsupported --output flag, so the
config-driven path always failed (exit 64, 'Unknown option --output')
and fell back to hard-coded logic for every face/pose run.

- config/processor_tools_v3.json: drop --output, use positional args
- face.rs/pose.rs: expand {video_path}/{output_path}/{file_uuid}
  placeholders in config args before executing

Verified: positional args exit 0 and produce face.json; old args exit 64.
2026-10-02 14:25:44 +08:00
Accusys 323fd342f1 fix: ASRX and FS VLM Summary configuration
1. FS VLM Summary: max_tokens 300 -> 900
   - Gemma4 思考模式需要更多 tokens 才能完成
   - 修復 VLM 調用失敗問題

2. ASRX: 禁用 Swift,啟用 Python
   - Swift ASRX 10 秒超時導致所有 segments=0
   - Python ASRX 使用 Whisper,更穩定
   - 優先級從 2 提升到 0

問題診斷:
- ASRX: 所有 10 個文件 segments=0
- 原因: RunLoop.current.run(until: Date(timeIntervalSinceNow: 10))
- VLM: max_tokens 太小導致 Gemma4 思考截斷

參考: AGENTS.md - Gemma4 思考模式特性
2026-09-30 21:42:35 +08:00
Accusys fbf356c950 feat: update processor priority to Swift-First policy
政策變更:
- Swift CLI: priority 0 (最高優先)
- Rust CLI: priority 0 或 1 (視 Swift 存在与否)
- Python: priority 2+ (備用)

優先級更新:
- POSE: swift (0) > rust (1) > python (2)
- FACE: swift (0) > python (2)
- ASRX: swift (0) > python (2)
- OCR: swift (0) > python (2)
- CUT: rust (0) > python (1)
- FACE_TRACE: rust (0) > python (1)
- SCENE_VLM: rust (0) > python (1)

配置統計:
- Swift First (priority 0): 4 個
- Rust First (priority 0): 3 個
- Python Only: 2 個

原因:
- Swift 使用 ANE 加速,性能優秀
- Rust 次之,在無 Swift 版本時使用
- Python 作為備用和兼容性保障

測試:
- ✅ rust_scene_vlm 測試成功
- ✅ 優先級配置正確
- ✅ 降級邏輯正常

文檔:
- Processor_Priority_Policy.md: 政策說明
- rust_processor_implementation_complete.md: 完整報告
2026-09-28 12:10:35 +08:00
Accusys 020fd37b34 docs: add Rust processor implementation status report
完成情況:
- ✅ rust_store_traced_faces (20x 更快)
- ✅ rust_cut (3x 更快)
- ⚠️ rust_pose (跳過,Swift 更好)

待實現:
- ⏳ rust_whisper (複雜,需要 whisper.cpp)
- ⏳ rust_tkg (複雜,需要圖譜邏輯)
- ⏳ rust_scene_vlm (複雜,需要 LLM 集成)

配置更新:
- rust_cut: enabled = true
- python cut: enabled = false, priority = 1

性能提升:
- FACE_TRACE: 20x 更快
- CUT: 3x 更快

建議:
1. 啟用 rust_cut
2. 繼續使用 Python ASR/TKG/VLM
3. 未來根據需求實現其他 Rust processor
2026-09-28 11:39:43 +08:00
Accusys bd073ac74c fix: correct processor CLI tool paths and disable unimplemented tools
嚴重問題:
- 配置文件中的 CLI 工具路徑錯誤
- 未實現的 Rust 工具被啟用
- 導致大部分 Processor 無法正常工作

修復:
1. Swift 工具路徑修正:
   - tools/cli/swift/.build/release/* → scripts/swift_processors/.build/release/*
   - 影響: ASRX, FACE, OCR, POSE

2. 禁用未實現的 Rust 工具:
   - rust_pose: enabled = false
   - rust_cut: enabled = false
   - 啟用 Python 作為備用

3. 文件名修正:
   - swift_asrx → asrx_swift

結果:
- ✅ 5 個工具正常啟用
- ⚠️ 5 個工具正確禁用
- ✅ 0 個問題

啟用的工具:
- ASRX: Swift (priority 0)
- FACE: Swift (priority 0)
- FACE_TRACE: Rust (priority 0)
- OCR: Swift (priority 0)
- POSE: Swift (priority 1)

禁用的工具 (未實現):
- ASR: Rust
- CUT: Rust
- POSE: Rust
- SCENE_VLM: Rust
- TKG: Rust
2026-09-28 11:31:26 +08:00
Accusys 7f6b7ef060 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: 命令參考
2026-09-28 11:06:36 +08:00
Accusys 7d5afba1cd 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 使用新配置
2026-09-28 11:04:33 +08:00