31d1b4050f
- 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).
61 lines
1.7 KiB
Bash
Executable File
61 lines
1.7 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
echo "=============================================="
|
|
echo " Admin Config 完整測試"
|
|
echo "=============================================="
|
|
|
|
echo ""
|
|
echo "【1. 測試配置檔案】"
|
|
if [ -f "/Users/accusys/momentry_core/config/admin_config.json" ]; then
|
|
echo "✅ 配置檔案存在"
|
|
echo "大小: $(wc -c < /Users/accusys/momentry_core/config/admin_config.json) bytes"
|
|
else
|
|
echo "❌ 配置檔案不存在"
|
|
exit 1
|
|
fi
|
|
|
|
echo ""
|
|
echo "【2. 測試 Python 配置讀取】"
|
|
/opt/homebrew/bin/python3.11 /Users/accusys/momentry_core/scripts/admin_config_loader.py 2>&1
|
|
|
|
echo ""
|
|
echo "【3. 測試 Rust 編譯】"
|
|
cd /Users/accusys/momentry_core
|
|
if cargo check --lib 2>&1 | grep -q "error"; then
|
|
echo "❌ Rust 編譯失敗"
|
|
else
|
|
echo "✅ Rust 編譯成功"
|
|
fi
|
|
|
|
echo ""
|
|
echo "【4. 測試配置內容】"
|
|
echo "--- VLM Prompts 數量 ---"
|
|
cat /Users/accusys/momentry_core/config/admin_config.json | python3 -c "
|
|
import json,sys
|
|
d=json.load(sys.stdin)
|
|
print(f\" VLM Prompts: {len(d.get('vlm_prompts', {}))} 個\")
|
|
print(f\" LLM Config: {len(d.get('llm_config', {}))} 個\")
|
|
print(f\" Processor Config: {len(d.get('processor_config', {}))} 個\")
|
|
"
|
|
|
|
echo ""
|
|
echo "【5. 測試 Python 腳本配置讀取】"
|
|
/opt/homebrew/bin/python3.11 -c "
|
|
import sys
|
|
sys.path.insert(0, '/Users/accusys/momentry_core/scripts')
|
|
from admin_config_loader import get_prompt_text
|
|
|
|
prompts = ['trace_desc', 'trace_clothing', 'scene_desc']
|
|
for p in prompts:
|
|
result = get_prompt_text(p)
|
|
if result:
|
|
print(f' ✅ {p}: OK')
|
|
else:
|
|
print(f' ❌ {p}: FAIL')
|
|
"
|
|
|
|
echo ""
|
|
echo "=============================================="
|
|
echo " 測試完成"
|
|
echo "=============================================="
|