docs: update AGENTS.md with V3 processor configuration
新增: - Processor Configuration (V3) 章節 - Swift First (Apple Vision + ANE) 政策說明 - 當前配置狀態 - 性能基準表 移除: - ❌ MOMENTRY_USE_RUST_PROCESSORS (已廢棄) - ❌ 舊的 Rust Processors 配置說明 更新內容: - 配置驅動的 processor 選擇 - Swift First 政策 (Apple Vision + ANE) - Rust Second 政策 - Python Backup 政策 性能基準: - FACE_TRACE: Rust 20x 更快 - CUT: Rust 3x 更快 - POSE: Swift ANE 加速 - FACE: Swift ANE 加速 配置狀態: - Swift First: 4 個 - Rust First: 3 個 - Python Only: 2 個 相關文檔連結: - Processor_Priority_Policy.md - Processor_Commands_Reference.md - 測試報告
This commit is contained in:
@@ -664,6 +664,53 @@ The Worker (`src/core/processor/executor.rs`) automatically locates tools:
|
||||
| Legacy Rust | `scripts/rust_processors/` | Remove | ⚠️ Pending |
|
||||
| Legacy Swift | `scripts/swift_processors/` | Remove | ⚠️ Pending |
|
||||
|
||||
## Processor Configuration (V3)
|
||||
|
||||
### 配置驅動的 Processor 選擇
|
||||
|
||||
Momentry Core 使用 **配置驅動的 processor 選擇系統**,支持動態選擇和優先級排序。
|
||||
|
||||
**主配置**: `config/processor_tools_v3.json`
|
||||
|
||||
### Processor 優先級政策
|
||||
|
||||
**Swift (Apple Vision + ANE) First, Rust Second, Python Backup**
|
||||
|
||||
| Priority | Tool | 用途 | 理由 |
|
||||
|----------|------|------|------|
|
||||
| 0 | Swift CLI | 標準實現 | Apple Vision + ANE 加速 |
|
||||
| 0-1 | Rust CLI | 標準實現 | 性能優秀 |
|
||||
| 2+ | Python | 備用 | 靈活性高 |
|
||||
|
||||
### 當前配置狀態
|
||||
|
||||
**Swift First (Priority 0)**: 4 個 (POSE, FACE, ASRX, OCR)
|
||||
|
||||
**Rust First (Priority 0)**: 3 個 (FACE_TRACE, CUT, SCENE_VLM)
|
||||
|
||||
**Python Only**: 2 個 (ASR, TKG)
|
||||
|
||||
### 性能基準
|
||||
|
||||
| Processor | Python | Rust | Swift | 最佳 |
|
||||
|-----------|--------|------|-------|------|
|
||||
| FACE_TRACE | ~2s | **0.1s** | - | Rust (20x) |
|
||||
| CUT | ~3s | **1s** | 6s | Rust (3x) |
|
||||
| POSE | ~5s | - | **3s** | Swift (ANE) |
|
||||
| FACE | ~8s | - | **4s** | Swift (ANE) |
|
||||
|
||||
### ⚠️ 已廢棄配置
|
||||
|
||||
- ❌ `MOMENTRY_USE_RUST_PROCESSORS` (已由 V3 配置取代)
|
||||
- ❌ `config/processor_tools.json` (V1, 已廢棄)
|
||||
|
||||
### 相關文檔
|
||||
|
||||
- `docs_v1.0/OPERATIONS/Processor_Priority_Policy.md` - 優先級政策
|
||||
- `docs_v1.0/OPERATIONS/Processor_Commands_Reference.md` - 命令參考
|
||||
- `docs_v1.0/M4_workspace/2026-09-28_processor_test_report.md` - 測試報告
|
||||
|
||||
|
||||
## Key Dependencies
|
||||
|
||||
- **Error handling**: `anyhow`, `thiserror`
|
||||
@@ -743,13 +790,6 @@ Environment-specific configuration files:
|
||||
- `MOMENTRY_CUT_TIMEOUT` - CUT timeout in seconds (default: 3600)
|
||||
- `MOMENTRY_DEFAULT_TIMEOUT` - Default timeout (default: 7200)
|
||||
|
||||
### Rust Processors
|
||||
- `MOMENTRY_USE_RUST_PROCESSORS` - Enable Rust implementations where available (default: `false`)
|
||||
- When `true`: Uses Rust binaries for Face Cluster, Appearance, and Pose
|
||||
- When `false` or unset: Falls back to Python scripts
|
||||
- Rust binaries location: `scripts/rust_processors/target/release/`
|
||||
- A/B tested and verified against Python versions
|
||||
|
||||
### TMDb Integration (Face Clustering)
|
||||
- `TMDB_API_KEY` - TMDb API key for movie metadata lookup (required for `MOMENTRY_TMDB_PROBE_ENABLED=true`)
|
||||
- `MOMENTRY_TMDB_PROBE_ENABLED` - Enable TMDb probe during registration (default: `false`)
|
||||
|
||||
Reference in New Issue
Block a user