Commit Graph

26 Commits

Author SHA1 Message Date
Accusys c6cbb5d1fb feat: asrx recovery + pipeline fixes + face trace improvements
- ASR-ASRX unified processor (asr_asrx → asrx), output .asrx.json
- ffmpeg -vsync → -fps_mode (swift_ocr, swift_hand, swift_pose, frame_cache)
- ffprobe absolute path for probe
- PYTHONPATH + PATH added to executor subprocesses
- cut processor path fix (cut/cut_processor.py)
- scene_vlm fallback when blur_scores empty + ffmpeg absolute path
- rust_store_traced_faces generates key_face.jpg with --video-path
- face group representative trace picks highest best_confidence
- Studio: move FS doesn't remove from unassigned, always reload after move
- Studio: confirmMoveFaceToNewGroup simplified to just rename
- Studio: scene_vlm added to processors list
- Studio: scene_vlm shows (0) when ready but no scenes
- admin_config asr_config block added
2026-11-06 10:00:24 +08:00
Accusys 882e31ab96 feat: declarative pipeline config, non-blocking Scene VLM, rust_asrx
Consolidated snapshot (previously WIP in working tree).

- core/pipeline_config: new module loading config/pipeline_flows.json as the
  source of truth for stage execution mode (parallel/blocking) and dependencies
- worker/job_worker: dispatch Scene VLM to a background task when the stage is
  declared parallel, unblocking the worker poll loop; resolve processor
  dependencies from pipeline_flows.json (fallback to built-in)
- config/pipeline_flows.json: asrx depends on [cut, asr]
- scripts/fix_stuck_jobs: fix UTC timezone comparison, raise default threshold
  to 6h, skip jobs with recent processor activity
- rust_asrx: Rust speaker diarization CLI + processor wiring
- processor metadata helper; fast_face_clustering script; file_progress pipeline
  API; scan API; VAD updates
2026-10-15 13:01:12 +08:00
Accusys 63fbbe1225 release: v1.3.1 - Pipeline Queue Integration, OCR Fix, Worker Compatibility
Major Changes:
- Pipeline Queue integration completed (internal.file + pipeline.commands)
- Fixed old job_worker database compatibility with new command_queue table
- Compiled Swift OCR binary (was missing, causing empty OCR results)
- Added deep scan functionality through re-scan API

Fixes:
- Changed CommandJob.id from i32 to i64 for database compatibility
- Added UUID generation in create_command (message_id field)
- Fixed claim_pending_commands to query queue_name = 'internal.file'
- Fixed field mappings: command_id → message_id, job_type → command_type
- Added support for 'processing' status in CommandJobStatus

Queue System:
- internal.file queue: for register/unregister/re-scan commands (job_worker)
- pipeline.commands queue: for vectorize/store_asrx/etc commands (pipeline_worker)

Documentation:
- Added comprehensive queue system documentation
- Created M4 workspace status reports
- Updated AGENTS.md with queue system details
2026-10-12 10:00:51 +08:00
Accusys a3c3ed8dc1 refactor: eliminate all CARGO_MANIFEST_DIR compile-time dependencies (A-4)
- Add src/core/path_utils.rs with runtime path resolution helpers
- Replace all env!("CARGO_MANIFEST_DIR") with runtime resolution
- Priority: env var -> current_exe sibling -> dev fallback

Changes:
- executor.rs: scripts_dir(), cli_dir() (4 locations)
- face.rs: swift_processor_path()
- tool_selector.rs: swift_binary_path()
- thumbnail/mod.rs: script_path()

Issue: CARGO_MANIFEST_DIR expands to build machine path at compile time,
       breaking on binary-only release hosts.

Solution: Resolve paths at runtime in this order:
1. Explicit environment variable (MOMENTRY_SCRIPTS_DIR, MOMENTRY_CLI_DIR)
2. Sibling of current_exe (same directory as running binary)
3. Relative path fallback (dev machine)

Verified: cargo check --lib passes
2026-10-04 13:44:40 +08:00
Accusys e0d04e242f feat: face clustering pipeline improvements and Rust/Swift face processing
- Add Rust face processor module (detection, embedding, tracking, qdrant)
- Add Facenet CoreML/ONNX conversion scripts and tests
- Refactor swift_face into Sources/swift_face with ArgumentParser support
- Update store_traced_faces to handle face.json correctly
- Fix ASRX parsing and TKG bbox reading from Qdrant
- Improve admin_config and trace_agent APIs
- Add M4 workspace docs for face clustering, dedup, and Facenet validation
- Fix worker heartbeat TTL (poll_interval x 3, min 60s) for offline detection
2026-10-02 12:24:55 +08:00
Accusys 4b694a1c2d remove: Portal project (Core Team 不再維護前端)
- 移除 portal/ 目錄 (Vue 3 + Tauri 前端)
- 更新 AGENTS.md 移除 Portal 相關說明
- 更新代碼註釋移除 Portal 引用
- 前端開發統一由 Studio Team 負責

參考: docs_v1.0/OPERATIONS/GUI_ARCHITECTURE_REVIEW.md
2026-09-30 18:59:40 +08:00
Accusys 6bac60bcf8 feat: add rust_register CLI tool
新增功能:
- 獨立的 register CLI 工具
- 不依賴 API 和 Worker
- 直接註冊視頻文件到數據庫

特性:
- ✅ 元數據提取 (ffprobe)
- ✅ Birth UUID 計算
- ✅ Force 模式 (覆蓋已存在)
- ✅ 詳細輸出模式
- ✅ 錯誤處理

使用方法:
```bash
# 註冊文件
rust_register /path/to/video.mp4

# 強制重新註冊
rust_register /path/to/video.mp4 --force

# 詳細輸出
rust_register /path/to/video.mp4 --verbose
```

功能:
1. 文件驗證
2. UUID 計算 (birth UUID)
3. 元數據提取 (duration, resolution, fps)
4. 數據庫插入
5. Force 模式 (自動 unregister)

元數據:
- Duration: 8.80s
- Resolution: 1920x1080
- FPS: 59.94
- Total frames: 527

優勢:
- 同步執行(無需等待 Worker)
- 獨立運行(無需 API Server)
- 詳細輸出(便於調試)

文檔:
- docs_v1.0/OPERATIONS/Rust_Register_CLI_Tool.md

測試:
- ✅ 編譯成功
- ✅ 基本註冊測試通過
- ✅ Force 模式測試通過
- ✅ Verbose 模式測試通過

Binary:
- target/debug/rust_register
2026-09-28 19:27:43 +08:00
Accusys 06397e5957 feat: add rust_unregister CLI tool
新增功能:
- 獨立的 unregister CLI 工具
- 不依賴 API 和 Worker
- 直接刪除數據庫、文件、Qdrant、Redis

特性:
- ✅ 完整刪除功能
- ✅ Dry-run 模式
- ✅ 詳細輸出模式
- ✅ 錯誤處理

使用方法:
```bash
# 模擬刪除
rust_unregister --uuid <uuid> --dry-run

# 實際刪除
rust_unregister --uuid <uuid> --verbose
```

刪除內容:
1. 數據庫記錄 (19 個表)
2. 輸出文件
3. Qdrant 向量 (7 個 collections + workspace)
4. Redis keys

優勢:
- 同步執行(無需等待 Worker)
- 獨立運行(無需 API Server)
- 詳細輸出(便於調試)

文檔:
- docs_v1.0/OPERATIONS/Rust_Unregister_CLI_Tool.md

測試:
- ✅ 編譯成功
- ✅ Dry-run 測試通過
- ✅ Help 信息正確

Binary:
- target/debug/rust_unregister (27MB)
2026-09-28 18:51:55 +08:00
Accusys 9206074c12 docs: clarify Swift advantage - Apple Vision + ANE
澄清 Swift 的核心優勢:

Swift 可以使用:
1. Apple Vision Framework
   - 原生視覺處理框架
   - 專門為 Apple 硬件優化
   - 完整的視覺 API

2. ANE (Apple Neural Engine)
   - 專用神經網絡處理器
   - 硬件加速
   - 低功耗、高性能

Apple Vision 功能:
- VNDetectFaceLandmarksRequest: 人臉檢測 (76 個關鍵點)
- VNDetectHumanBodyPoseRequest: 姿態估計 (19 個關鍵點)
- VNRecognizeTextRequest: 文字識別

性能優勢:
- POSE: Swift (ANE) ~3s vs Python ~5s (1.7x)
- FACE: Swift (ANE) ~4s vs Python ~8s (2x)
- OCR: Swift (ANE) ~2s vs Python ~5s (2.5x)

政策:
- Swift (Apple Vision + ANE): priority 0
- Rust: priority 1 (無 Swift 版本時為 0)
- Python: priority 2+ (備用)
2026-09-28 12:11:32 +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 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 357e585399 fix: Face processor now saves status and total_faces to face.json 2026-09-26 23:06:11 +08:00
Accusys 87aa7e0c40 feat: add source prefix to search results
- Add [OCR], [ASRX], [ASRX+OCR] prefix to text_content
- Add content field to SemanticSearchResult struct
- Update SQL queries to include content field
- Helps users distinguish the source of search results
2026-07-19 14:06:06 +08:00
Accusys 6ede2a443c release: Phase 2.6-2.7 to production (3002) - edges migration and identity resolution
Release: 2026-06-21 05:15
Binary: Jun 21 05:14 (34MB)
PID: 95567

Features:
- Phase 2.6: All edges from Qdrant (co_occurrence, face_face, speaker_face)
- Phase 2.7: Identity resolution for gaze_trace/lip_trace nodes
- Rule2: Extended for face_trace/gaze_trace/lip_trace node types

Architecture:
- Complete TKG-only identity resolution
- PostgreSQL fallback for empty Qdrant
- Estimated 3.6x edges performance improvement

Backup: momentry_backup_20260621_phase25

Commits:
- e214106d: Phase 2.7 identity resolution
- Phase 2.6 commits: edges migration to Qdrant

Status: ✅ Release successful
2026-06-21 05:17:34 +08:00
Accusys 721c343486 release: Phase 2.5 to production (3002) - gaze_trace and lip_trace Qdrant migration
Release: 2026-06-21 02:35
Binary: Jun 21 02:33
PID: 16386

Features:
- Phase 2.5.1: gaze_trace_nodes from Qdrant
- Phase 2.5.2: lip_trace_nodes from Qdrant + face.json
- Qdrant collection: momentry_face_embeddings (dim=512)

Verification:
- gaze_trace_nodes: 21 ✓
- lip_trace_nodes: 21 ✓
- Rule2 chunks: 75 ✓
- Performance: TKG rebuild 1.85s ✓

Backup: momentry_backup_20260619
2026-06-21 03:12:38 +08:00
Accusys e1572907ae feat: ASRX hybrid pipeline, identity history, worker fixes, checkpoint system 2026-06-02 07:13:23 +08:00
Accusys 6967b99142 Merge remote-tracking branch 'origin/main' 2026-05-22 17:38:34 +08:00
Accusys 4cd5d63e64 feat: RustDesk 1.4.6 verified and installed 2026-05-22 17:37:35 +08:00
M5Max128 3ccdf403b6 feat: add Ollama to verified sources (Gitea repo + manifest + build from source) 2026-05-22 17:20:14 +08:00
Accusys c09268f3d3 docs: add go(golang) and ollama verification reports 2026-05-22 16:58:08 +08:00
Accusys 088aefdac7 fix: pipeline timeline log, chunk lookup, face processor no fallback, Qdrant UUID script, delete safety rules 2026-05-18 00:36:14 +08:00
Accusys eec2eea880 docs: file_uuid generation rules for M4 2026-05-17 02:26:09 +08:00
Warren e75c4d6f07 cleanup: remove dead code and duplicate docs
- Remove session-ses_2f27.md (161KB raw session log)
- Remove 49 ROOT_* duplicate files across REFERENCE/
- Remove 14 duplicate files between REFERENCE/ root and history/
- Remove asr_legacy.rs (dead code, replaced by asr.rs)
- Remove src/core/worker/ (duplicate JobWorker)
- Remove src/core/layers/ (empty directory)
- Remove 4 .bak files in src/
- Remove 7 dead private methods in worker/processor.rs
- Remove backup directory from git tracking
2026-05-04 01:31:21 +08:00
Warren 4d75b2e251 docs: update docs_v1.0/ documentation
- Fix markdown lint issues (MD030, MD047, MD051, MD028, MD005)
- Update AI agents, architecture, implementation docs
- Add new identity, face recognition, and API documentation
- Remove deprecated face/person API guides
2026-04-30 15:10:41 +08:00
Warren 1f84e5469f feat: backup architecture docs, source code, and scripts 2026-04-25 17:15:45 +08:00