- Connect to database and get video info
- Call process_face() for face module
- Add UUID length fix (16 -> 32)
- Add progress and trace statistics output
- Support force reprocess flag
Note: CLI may need further debugging to fully work
- Add track_faces() call to Swift Face processor path
- Previously only in Python processor path
- Now all paths execute face tracking
- Test successful: 212/212 faces have trace_id
- 9 traces detected in test video (020.mp4)
- Add track_faces() call after FaceNet embedding generation
- Apply to both Swift and Python processor paths
- Add logging for tracking status
- Face tracking now runs automatically during face processing
- face.json will include trace_id automatically
- Add face_tracker.rs with core tracking algorithms
- Add trace_id field to Face struct
- Add metadata field to FaceResult struct
- Implement IoU, distance, and embedding similarity calculations
- Implement match_faces and track_faces functions
- Support scene cut detection
- Add unit tests for core functions
- Increased max_tokens from 200/400 to 800 for all languages
- Gemma 4 uses thinking mode, needs more tokens for reasoning before output
- Fixes Scene VLM API request failures
- Create store_face_embeddings_to_qdrant.py script
- Add automatic Qdrant storage call after FaceNet completes
- Store 512D embeddings with metadata (frame, confidence, bbox)
- Enables downstream face tracing and clustering
This ensures embeddings are automatically stored in Qdrant without manual intervention.
- 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.
- Modified asrx.rs to prioritize Swift binary (asrx_swift)
- Swift ASRX already compiled (1.5MB)
- Retained Python fallback for backward compatibility
- Removed dependency on asrx_processor.py for main flow
Phase 3 of processor architecture refactoring
All core processors now using Swift/CLI:
- Face: Swift ✅
- OCR: Swift ✅
- ASR: Whisper CLI ✅
- ASRX: Swift ✅
- CUT: FFmpeg ✅
- Scene VLM: Rust ✅
- Modified ocr.rs to prioritize Swift binary over Python wrapper
- Swift OCR already compiled and tested
- Retained Python fallback for backward compatibility
- Created migration plan document for full Python → Rust transition
Phase 1 of processor architecture refactoring (user chose option C)
Related: once_cell::Lazy poisoning issue blocking Python processors
- src/bin/cleanup_orphan_vectors.rs: one-time tool to scan per-file Qdrant
collections (rule1/_faces/_scenes/_vlm/_seeds/face_embeddings/speaker),
dry-run support, delete points whose file_uuid is no longer registered.
Used to remove 53,122 orphan vectors across all production collections.
- docs: scene VLM search design suggestions for Studio team (8868 proxy)
- Remove MOMENTRY_USE_RUST_PROCESSORS from .env
- Face Cluster now tries Rust binary first, falls back to Python
- Appearance and Pose keep using Python (not needed currently)
- Simpler configuration: no global switch needed
** Problem:
- get_face_filter_defaults() used blocking_read() in sync context
- Caused panic: 'Cannot block the current thread from within a runtime'
- VLM generation repeatedly failed with panic
** Root Cause:
- admin_config.rs:473: ADMIN_CONFIG.config.blocking_read()
- Called from FileProfile::defaults() which runs in async context
- Tokio runtime doesn't allow blocking operations
** Fix:
- Replace blocking_read() with try_read()
- Fall back to hardcoded defaults if config is locked
- Non-blocking, safe for async context
** Impact:
- VLM summaries now generate successfully
- No more panics in VLM processing
- Job 779 VLM generation now working
** Problem:
- Worker set FACE_MIN_CONFIDENCE=0.5 via std::env::set_var()
- But Python subprocess received FACE_MIN_CONFIDENCE=0.4 (from config)
- get_face_settings() prioritized admin config over environment variables
** Root Cause:
- Line 17-21: Config checked first, env var as fallback
- Worker's runtime override was ignored
** Fix:
- Reversed priority: Environment variable > Admin config
- Now reads FACE_MIN_CONFIDENCE from env first
- Falls back to config only if env var not set
** Impact:
- Worker can override face thresholds at runtime
- UI 'Deep Scan' will use correct thresholds (0.5, 1)
- Allows per-job threshold customization
** Note:
- Binary built at 05:11
- All jobs currently completed
- Requires new job to test (no active jobs available)
** 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
- 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).
Problem: Re-scan (/api/v1/file/:file_uuid/process) only deleted processor_results from DB,
but not output files. Worker checks if output file exists and skips re-processing,
resulting in stale/incorrect results persisting.
Solution:
- Add 'force' parameter to ProcessRequest struct (default: false)
- When force=true, delete all output files before re-processing
- Worker will then re-run processors from scratch
Changes:
- src/api/processing.rs:
- Added 'force: bool' to ProcessRequest
- Added delete_output_files_for_uuid() helper function
- Modified trigger_processing() to delete output files when force=true
API usage:
POST /api/v1/file/:file_uuid/process
{
"processors": ["face","ocr",...],
"force": true
}
Note: Build currently fails due to unrelated uncommitted admin_config changes.
Those should be fixed separately.
- Delete YOLO processor implementation (src/core/processor/yolo.rs)
- Remove YOLO from processing pipeline and worker
- Clean up YOLO-related code across multiple modules
- Add migration 033_remove_yolo.sql
YOLO functionality removed as part of architecture simplification
- postgres_db.rs: CAST source_weight to ::float8 (NUMERIC→FLOAT8)
- rerank.rs: char-based truncation for UTF-8 safety
- Both fixes prevent tokio worker panics that killed search requests
Bug root causes:
- keyword/BM25: sqlx decode f64 from NUMERIC panicked at postgres_db.rs:3758
- llm-smart: &text[..100] byte slice panicked at rerank.rs:52 on Chinese text
Verified: both /api/v1/search/keyword and /api/v1/search/llm-smart now return 200