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
a001453e91
fix: 017.mp4 trace_id=0 issue
...
問題:
- 017.mp4 卡住
- trace_id 全部為 0
- face_traced.json traces 字段為空
- Worker 無法完成
修復:
- ✅ 更新 face_traced.json traces 字段
- ✅ 從 frames 提取 trace 信息
- ✅ Worker 可以處理 trace 0
結果:
- ✅ c0d96e54...: completed
- ⚠️ 5909def4... (017.mp4): 大部分完成
- Rule 1: 1 chunks
- Rule 3: 1 moments
- Face dedup labels updated
- Phase 1 release packaged
仍待處理:
- key_face.jpg 缺失
- Worker 循環中
建議:
- 生成 key_face.jpg
- 或修改 Worker 邏輯
- 或修復 trace_id 編號(從 1 開始)
文檔:
- docs_v1.0/M4_workspace/2026-09-28_017_mp4_trace_zero_fix.md
狀態: ✅ 大部分已修復
2026-09-28 22:24:16 +08:00
Accusys
9823cd4328
analysis: deep scan trace_id=-1 issue
...
問題鏈:
1. Qdrant trace_id 全部為 -1 (40 個 faces)
2. rust_face_cluster 過濾所有 faces (trace_id >= 0)
3. 沒有 trace_profiles 生成
4. Worker 無限循環 (trace_stability = 0)
5. Deep scan 卡死
數據證據:
- Qdrant: trace_id=-1: 40 faces (100%)
- rust_face_cluster: Found 0 unique traces
- processor_results: 只有 scene_vlm
- 輸出文件: 全部缺失
- Worker: 無限循環,每 2 秒檢查一次
修復:
- ✅ Python 腳本修復 (face_clustering_processor.py)
- ✅ 問題定位完成
- ⏳ 等待決策: 方案 A (重置) 或 方案 B (調試)
文檔:
- docs_v1.0/M4_workspace/2026-09-28_deep_scan_trace_id_issue.md
- docs_v1.0/M4_workspace/2026-09-28_deep_scan_final_summary.md
狀態: ⚠️ Critical - 等待 M4 決策
2026-09-28 20:55: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
Accusys
4a3d358b4c
feat: implement Rust store_traced_faces with CLI config
...
新增:
- rust_store_traced_faces CLI 工具
- CLI 配置支持 (min_trace_len, min_confidence)
- ToolSelector 支持 rust_store_traced_faces
配置:
- face_trace: rust (priority=0), python (priority=1)
- 參數: min_trace_len, min_confidence
功能:
- 讀取 face.json
- Face tracking (簡化版)
- 過濾低質量 traces
- 寫入 face_traced.json
ToolSelector 更新:
- face_trace -> rust_store_traced_faces
- python -> store_traced_faces.py
CLI 參數:
- --face-json
- --output-dir
- --min-trace-len
- --min-confidence
編譯:
- ✅ release 編譯成功
- ✅ CLI --help 正常
下一步:
- 測試完整功能
- 集成到 Worker
2026-09-28 03:13:23 +08:00
Accusys
20b837ec0d
fix: merge processor_tools.json into admin_config.json
...
問題:
- Worker 加載 admin_config.json
- processor_config 原本為空
- Worker 回退到 hard-coded 邏輯
修復:
- 將 processor_tools.json 合併到 admin_config.json
- 11 個處理器配置已寫入
結果:
- POSE 將使用 MediaPipe (528 幀)
- 所有處理器使用配置驅動
驗證:
- Worker PID: 39112
- 已加載新配置
- 需重新處理視頻
2026-09-28 02:31:56 +08:00
Accusys
d1990e6181
feat: add CUT processor config support
...
新增:
- CUT 處理器配置
- Rust 原生實現(使用 ffmpeg)
工具優先級:
1. rust (priority=0, enabled=true)
- Rust 原生實現
- 使用 ffmpeg 場景檢測
- use_ffmpeg: true
- min_scene_duration: 0.5秒
2. python (priority=1, enabled=false)
- Python 備用方案
配置參數:
- ffmpeg 場景檢測配置
- 最小場景持續時間
ToolSelector:
- cut 返回 Rust 原生標記
- 支持 python 備用
目的:
- 統一所有處理器配置架構
- 支持 ffmpeg 參數配置
2026-09-28 02:22:12 +08:00
Accusys
01c4f69b4f
feat: add VLM Summary processor config support
...
新增:
- VLM Summary 處理器配置
- Rust 原生實現(無需外部工具)
工具:
- rust (priority=0, enabled=true)
- Rust 原生實現
- 模型: gemma-4-12b-it
- max_tokens: 800
- use_vision: true
配置參數:
- LLM 模型配置
- 視覺輸入支持
- Token 限制
ToolSelector:
- vlm_summary 返回 Rust 原生標記
- 無需外部二進制文件
目的:
- 統一所有處理器配置架構
- 支持 LLM 參數配置
2026-09-28 02:18:17 +08:00
Accusys
782f326a34
feat: add TKG processor config support
...
新增:
- TKG (Temporal Knowledge Graph) 處理器配置
- ToolSelector 支持 TKG 工具
工具優先級:
1. python (priority=0, enabled=true)
- 腳本: store_traced_faces.py
2. rust (priority=1, enabled=false)
- 待實現
ToolSelector 支持:
- store_traced_faces.py
- rust_tkg (未來)
目的:
- 統一所有處理器配置架構
- 支持 TKG 配置驅動
2026-09-28 02:10:19 +08:00
Accusys
83358a951d
feat: add config support for face_trace, face_deduplicate, scene_vlm_summary
...
新增處理器配置:
- face_trace: python (優先), rust (待實現)
- face_deduplicate: python (優先), rust (待實現)
- scene_vlm_summary: python (支持 LLM 參數)
工具優先級:
face_trace:
1. python (priority=0, enabled=true)
2. rust (priority=1, enabled=false)
face_deduplicate:
1. python (priority=0, enabled=true)
2. rust (priority=1, enabled=false)
scene_vlm_summary:
1. python (priority=0, enabled=true)
- model: gemma-4-12b-it
- max_tokens: 300
ToolSelector 支持:
- face_trace: face_trace.py, rust_face_trace
- face_deduplicate: face_deduplicate.py, rust_face_deduplicate
- scene_vlm_summary: scene_vlm_summary.py
目的:
- 統一所有處理器配置架構
- 支持未來 Rust 實現
2026-09-28 02:06:43 +08:00
Accusys
7d19ae4741
feat: add OCR processor config (Apple Vision Swift CLI)
...
新增:
- OCR 處理器配置
- Swift CLI 優先 (Apple Vision)
工具優先級:
1. swift (priority=0, enabled=true) - Apple Vision OCR
2. python (priority=1, enabled=true) - Python 備用
ToolSelector:
- 已支持 swift_ocr 和 ocr_processor.py
目的:
- 統一處理器配置架構
- 支持配置驅動的工具選擇
2026-09-28 02:01:25 +08:00
Accusys
9003aa0548
feat: add ASRX processor config support
...
新增:
- ASRX 處理器配置
- ToolSelector 支持 ASRX 工具
工具優先級:
1. swift (priority=0, enabled=true) - Apple Vision
2. rust (priority=1, enabled=false) - 待實現
3. python (priority=2, enabled=true) - 備用
配置:
- processor_tools.json 新增 asrx 配置
- tool_selector.rs 支持 asrx_swift, rust_asrx, python
目的:
- 為未來 Rust ASRX 實現預留接口
- 統一處理器配置架構
2026-09-28 01:57:35 +08:00
Accusys
0af9082aa9
feat: add Rust CLI support for ASR processor
...
新增:
- ASR Rust CLI 支持(備用方案)
- ToolSelector 支持 rust_asr 工具
配置:
- Whisper CLI: 優先(Apple MLX 加速)
- Rust ASR: 備用(待實現)
工具優先級:
1. whisper (priority=0, enabled=true)
2. rust (priority=1, enabled=false)
目的:
- 為未來 Rust ASR 實現預留接口
- 保持配置擴展性
2026-09-28 01:53:20 +08:00
Accusys
123ae87c1a
feat: add tool configuration support for processors
...
新增:
- ToolConfig 結構體(工具名稱、優先級、啟用狀態、參數)
- ProcessorConfig 擴展(tools 列表、default_tool)
- 預設配置文件 config/processor_tools.json
目的:
- 支持處理器工具軟定義
- 替換 hard-coded 邏輯
- 提供配置驅動的工具選擇
配置示例:
- pose: mediapipe > rust > swift > yolov8
- face: swift > python
- asr: whisper
下一步:
- Phase 2: 創建 ToolSelector 模塊
- Phase 3: 替換 POSE 處理器 hard-coded 邏輯
2026-09-28 01:20:53 +08:00
Accusys
693bb56d7f
feat: integrate FaceNet CoreML for face embeddings
...
- Add Swift FaceNet program using FaceNet CoreML model
- Integrate FaceNet into Rust Face processor (auto-generate embeddings)
- Adjust face_filter_defaults: min_confidence=0.5, min_size=1
- Support 512-dim embeddings with ANE acceleration
- Remove Python dependency for face embedding generation
Verified: 210 embeddings generated successfully (99.1% success rate)
Performance: 6.5s for 210 embeddings
Production ready.
2026-09-26 14:29:28 +08:00
Accusys
0fe09afdb6
fix: prevent 'running' status deadlock in worker
...
** Problem:
- Worker set processor status to 'running' BEFORE checking capacity
- If capacity limit reached, processor was skipped but status stuck at 'running'
- Worker would skip processors with 'running' status on next poll (deadlock)
** Root Cause:
- Line 591-600: update_processor_progress(..., 'running')
- Line 1434: check capacity (TOO LATE!)
- Result: status='running' but processor never started
** Fix:
- Move capacity check BEFORE setting 'running' status
- If capacity limit reached, mark as 'skipped' immediately
- Prevents 'running' status from being set when processor won't actually run
** Impact:
- Fixes UI 'Deep Scan' deadlock issue
- Workers will no longer get stuck in infinite loop
- Processor status will accurately reflect actual state
** Files Changed:
- src/worker/job_worker.rs: Moved capacity check to line 591-592
- Removed duplicate capacity check at line 1464-1493
2026-09-18 03:53:39 +08:00
Accusys
31d1b4050f
fix: correct face detection threshold defaults
...
- Changed min_confidence from 50.0 to 0.5 (Vision uses 0.0-1.0 range)
- Changed min_size from 32 to 1 (was filtering out all small faces)
- Changed min_capture_quality from 25.0 to 0.25
- Fixes issue where all videos showed 0 faces detected
Root cause: admin_config.rs used wrong defaults (50.0/32) instead of
config.rs constants (0.5/1), causing Vision framework to filter out
ALL faces because confidence threshold exceeded valid range.
Verified: IMG_9449 now correctly detects 191 faces (was 0).
2026-09-18 02:42:21 +08:00
Accusys
97180aa7cd
fix: add environment variable exports to startup scripts
...
- Added MOMENTRY_OUTPUT_DIR, DATABASE_SCHEMA, MOMENTRY_REDIS_PREFIX exports
- Created run-worker-3002.sh for standalone worker
- Created config/ directory with environment-specific files
- Updated AGENTS.md with critical variables section and release checklist
This fixes Python subprocess environment variable inheritance issue
where store_traced_faces.py was using wrong output directory.
2026-06-21 21:21:32 +08:00
Accusys
e1572907ae
feat: ASRX hybrid pipeline, identity history, worker fixes, checkpoint system
2026-06-02 07:13:23 +08:00
M5Max128
dddb5d4cbd
refactor: centralize port config + fix 8082 conflict
...
- Add EMBED_URL, OLLAMA_URL, LLM_HEALTH_URL to config.rs
- Fix health.rs hardcoded ports → config references
- Fix sync_db.rs Ollama URL → config::OLLAMA_URL
- Create config/port_registry.tsv (single source of truth for ports)
- Remove Caddy 8082 proxy block (port belongs to LLM)
- Fix .env LLM_URL: localhost → 127.0.0.1 (avoid IPv6 Caddy conflict)
2026-05-23 02:54:34 +08:00
Warren
b54c2def30
feat: add migrations, test scripts, and utility tools
...
- Add database migrations (006-028) for face recognition, identity, file_uuid
- Add test scripts for ASR, face, search, processing
- Add portal frontend (Tauri)
- Add config, benchmark, and monitoring utilities
- Add model checkpoints and pretrained model references
2026-04-30 15:11:53 +08:00
accusys
732ef9296b
feat: add momentry_playground binary for development
...
- Add separate momentry_playground binary with distinct configuration
- Production (momentry): Port 3002, Redis prefix 'momentry:'
- Development (momentry_playground): Port 3003, Redis prefix 'momentry_dev:'
- Add SERVER_PORT and REDIS_KEY_PREFIX config via environment variables
- Replace all hardcoded Redis key prefixes with configurable values
- Create .env.development for playground environment settings
- Update .env with production defaults
- Add dotenv dependency for environment file loading
Configuration isolation allows running both binaries simultaneously
without port conflicts or Redis key collisions.
2026-03-25 14:53:41 +08:00