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).
49 lines
1.3 KiB
Bash
Executable File
49 lines
1.3 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
echo "=============================================="
|
|
echo " Admin Config 快速验证"
|
|
echo "=============================================="
|
|
|
|
echo ""
|
|
echo "【1. 验证配置文件】"
|
|
if [ -f "config/admin_config.json" ]; then
|
|
echo "✅ config/admin_config.json 存在"
|
|
echo "大小: $(wc -c < config/admin_config.json) bytes"
|
|
else
|
|
echo "❌ config/admin_config.json 不存在"
|
|
exit 1
|
|
fi
|
|
|
|
echo ""
|
|
echo "【2. 验证 Rust 代码】"
|
|
if cargo check --lib 2>&1 | grep -q "^error"; then
|
|
echo "❌ Rust 编译失败"
|
|
cargo check --lib 2>&1 | grep "^error" | head -5
|
|
else
|
|
echo "✅ Rust 编译成功"
|
|
fi
|
|
|
|
echo ""
|
|
echo "【3. 验证 Python 代码】"
|
|
/opt/homebrew/bin/python3.11 scripts/admin_config_loader.py 2>&1 | grep -q "✅"
|
|
if [ $? -eq 0 ]; then
|
|
echo "✅ Python 配置读取成功"
|
|
else
|
|
echo "❌ Python 配置读取失败"
|
|
fi
|
|
|
|
echo ""
|
|
echo "【4. 验证配置内容】"
|
|
cat 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 "=============================================="
|
|
echo " 验证完成"
|
|
echo "=============================================="
|