Files
momentry_core/scripts/monitor_tkg_progress.sh
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

58 lines
1.7 KiB
Bash
Executable File
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/bin/bash
# TKG 进度监控脚本
# 用途:监控 Roman_Holiday 文件的 TKG 处理进度
FILE_UUID="bfba056f5021e2404b0870cc0b1fa851"
OUTPUT_DIR="/Users/accusys/momentry/output"
echo "=============================================="
echo " TKG 进度监控"
echo "=============================================="
echo ""
echo "文件: Roman_Holiday(1953).mp4"
echo "UUID: $FILE_UUID"
echo ""
# 统计 trace 目录
TRACE_COUNT=$(ls -d $OUTPUT_DIR/$FILE_UUID/trace_* 2>/dev/null | wc -l | tr -d ' ')
KEY_FRAME_COUNT=$(find $OUTPUT_DIR/$FILE_UUID/ -name "key_frame.jpg" 2>/dev/null | wc -l | tr -d ' ')
KEY_FACE_COUNT=$(find $OUTPUT_DIR/$FILE_UUID/ -name "key_face.jpg" 2>/dev/null | wc -l | tr -d ' ')
# 计算进度
PERCENT=$(echo "scale=2; $TRACE_COUNT * 100 / 7254" | bc)
echo "【当前进度】"
echo "Trace 目录: $TRACE_COUNT / 7254 ($PERCENT%)"
echo "Key frames: $KEY_FRAME_COUNT / 7254"
echo "Key faces: $KEY_FACE_COUNT / 7254"
echo ""
# 计算预计完成时间
if [ $TRACE_COUNT -gt 0 ]; then
REMAINING=$((7254 - TRACE_COUNT))
# 假设平均速度为 0.2 个/秒
SECONDS=$(echo "scale=0; $REMAINING / 0.2" | bc)
HOURS=$((SECONDS / 3600))
MINUTES=$(((SECONDS % 3600) / 60))
echo "【预计完成时间】"
echo "剩余数量: $REMAINING 个"
echo "预计时间: $HOURS 小时 $MINUTES 分钟"
echo ""
fi
# 检查 Worker 进程
echo "【Worker 状态】"
WORKER_PID=$(ps aux | grep "target/debug/momentry worker" | grep -v grep | awk '{print $2}')
if [ -n "$WORKER_PID" ]; then
echo "✅ Worker 正在运行 (PID: $WORKER_PID)"
ps aux | grep "target/debug/momentry worker" | grep -v grep | awk '{print "CPU: "$3"%, Memory: "$4"%"}'
else
echo "❌ Worker 未运行"
fi
echo ""
echo "✅ 监控完成"