bev-project/archive_scripts/check_video_generation.sh

70 lines
1.6 KiB
Bash
Executable File

#!/bin/bash
# 检查视频生成进度
cd /workspace/bevfusion
echo "======================================"
echo " 🎥 视频生成进度监控"
echo "======================================"
echo ""
# 检查进程
if ps aux | grep -q "[v]isualize_bev_correct"; then
echo "✅ 状态: 生成中..."
echo ""
# 统计帧数
FRAMES=$(ls visualizations/temp_frames 2>/dev/null | wc -l)
TOTAL=1004 # 6019 / 6 ≈ 1004
echo "📊 进度:"
echo " 已生成: $FRAMES / $TOTAL"
if [ $FRAMES -gt 0 ]; then
PERCENT=$((FRAMES * 100 / TOTAL))
echo " 完成度: ${PERCENT}%"
# 简单进度条
printf " 进度: ["
for i in {1..50}; do
if [ $((i * TOTAL / 50)) -lt $FRAMES ]; then
printf "="
else
printf " "
fi
done
printf "] ${PERCENT}%%\n"
fi
echo ""
echo "📁 临时文件:"
du -sh visualizations/temp_frames 2>/dev/null | awk '{print " 大小: " $1}'
echo ""
echo "⏱️ 预计: 还需 10-15 分钟"
else
echo "⏹️ 状态: 未运行或已完成"
echo ""
# 检查视频
if [ -f "visualizations/bevfusion_results.mp4" ]; then
echo "✅ 视频已生成!"
ls -lh visualizations/bevfusion_results.mp4 | awk '{print " 文件: " $9 " (" $5 ")"}'
else
echo "❌ 视频文件未找到"
echo ""
echo "查看日志:"
echo " tail -50 video_generation_correct.log"
fi
fi
echo ""
echo "======================================"