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
This commit is contained in:
Accusys
2026-09-28 11:39:43 +08:00
parent f7796e5f43
commit 020fd37b34
2 changed files with 209 additions and 2 deletions
+2 -2
View File
@@ -449,7 +449,7 @@
"tool": "rust",
"model": null,
"priority": 0,
"enabled": false,
"enabled": true,
"command": {
"executable": "tools/cli/rust/target/release/rust_cut",
"args": [
@@ -473,7 +473,7 @@
"tool": "python",
"model": null,
"priority": 1,
"enabled": true,
"enabled": false,
"command": {
"executable": "/opt/homebrew/bin/python3.11",
"script": "scripts/cut_detector.py",
@@ -0,0 +1,207 @@
---
title: Rust Processor Implementation Status
version: 1.0
date: 2026-09-28
author: OpenCode
status: partial
---
## 摘要
已實現 2 個 Rust CLI processor,還有 3 個待實現。
---
## 已完成
### ✅ rust_store_traced_faces
**功能**: Face tracking 和 trace ID 分配
**狀態**: ✅ 完成並測試
**性能**: 20x 更快 (Rust vs Python)
**測試結果**:
- Traces: 9 (與 Python 一致)
- 最大 trace: 140 次出現
---
### ✅ rust_cut
**功能**: 場景檢測
**狀態**: ✅ 完成並測試
**算法**: ffmpeg select filter
**測試結果**:
- Duration: 8.8s
- Frames: 527
- Scenes: 1
---
## 跳過
### ⚠️ rust_pose
**原因**: Swift 版本已足夠好
**優勢**:
- 使用 ANE 加速
- 性能優秀
- 已廣泛測試
**建議**: 繼續使用 Swift 版本
---
## 待實現
### 🔄 rust_whisper (ASR)
**優先級**: 中
**複雜度**: 高
**需要**:
- whisper.cpp 集成
- 模型加載
- 音頻處理
**估計時間**: 2-3 天
**替代方案**: 繼續使用 Python Whisper
---
### ⏳ rust_tkg (TKG)
**優先級**: 低
**複雜度**: 高
**需要**:
- 圖譜構建邏輯
- 數據庫集成
- 複雜算法
**估計時間**: 1-2 周
**建議**: 暫時使用 Python 版本
---
### ⏳ rust_scene_vlm (VLM)
**優先級**: 低
**複雜度**: 高
**需要**:
- LLM API 集成
- 視覺處理
- 批量推理
**估計時間**: 3-5 天
**建議**: 暫時使用 Python 版本
---
## 性能對比
| Processor | Python | Rust | 提升 |
|-----------|--------|------|------|
| FACE_TRACE | ~2s | ~0.1s | **20x** |
| CUT | ~3s | ~1s | **3x** |
| POSE | ~5s | - | Swift 更好 |
| ASR | ~30s | - | 待實現 |
---
## 配置更新
**修復後的配置**:
```json
{
"face_trace": {
"implementations": [
{
"tool": "rust",
"priority": 0,
"enabled": true
}
]
},
"cut": {
"implementations": [
{
"tool": "rust",
"priority": 0,
"enabled": true // ← 現在可以啟用
}
]
}
}
```
---
## 文件清單
### 已實現
- `tools/cli/rust/src/bin/rust_store_traced_faces.rs`
- `tools/cli/rust/src/bin/rust_cut.rs`
### 待實現
- `tools/cli/rust/src/bin/rust_whisper.rs`
- `tools/cli/rust/src/bin/rust_tkg.rs`
- `tools/cli/rust/src/bin/rust_scene_vlm.rs`
---
## 提交記錄
| Commit | 內容 |
|--------|------|
| `f7796e5` | rust_cut 實現 |
| `e38705e` | rust_store_traced_faces 實現 |
---
## 總結
### ✅ 已完成 (2/5)
1. ✅ rust_store_traced_faces
2. ✅ rust_cut
3. ⚠️ rust_pose (跳過,Swift 更好)
### ⏳ 待實現 (2/5)
1. ⏳ rust_whisper (複雜,需要 whisper.cpp)
2. ⏳ rust_tkg (複雜,需要圖譜邏輯)
3. ⏳ rust_scene_vlm (複雜,需要 LLM 集成)
### 📊 統計
- **完成率**: 40% (2/5)
- **跳過**: 1 個 (Swift 更好)
- **性能提升**: 最高 20x
---
**建議**:
1. 啟用 rust_cut 配置
2. 繼續使用 Python ASR/TKG/VLM
3. 未來根據需求實現其他 Rust processor
---
**狀態**: 🟡 **部分完成,2/5 Rust processor 已實現**