bev-project/archive_scripts/check_downsampled_progress.sh

80 lines
2.1 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
# 检查下采样视频生成进度
cd /workspace/bevfusion
python3 -c "
import os
import time
frames = len(os.listdir('visualizations/temp_frames')) if os.path.exists('visualizations/temp_frames') else 0
total = 1003 # 下采样后的总帧数
percent = (frames / total * 100) if total > 0 else 0
print('=' * 60)
print('🎥 下采样视频生成进度 (每隔6帧采样1帧)')
print('=' * 60)
print()
print(f'📊 采样信息:')
print(f' 原始样本数: 6,019')
print(f' 帧间隔: 6')
print(f' 处理帧数: {total:,}')
print()
print(f'📈 当前进度:')
print(f' 已生成: {frames:,} / {total:,} 帧')
print(f' 完成度: {percent:.1f}%')
print()
# 进度条
bar_len = 50
filled = int(bar_len * frames / total) if total > 0 else 0
bar = '█' * filled + '░' * (bar_len - filled)
print(f' [{bar}] {percent:.1f}%')
print()
# 时间估算
remaining = total - frames
rate = 0.8 # 约每秒0.8帧
time_left = remaining / rate / 60 if rate > 0 and remaining > 0 else 0
if frames > 0:
print(f'⏱️ 时间预估:')
print(f' 剩余帧数: {remaining:,}')
print(f' 预计剩余: {time_left:.0f} 分钟')
print()
# 检查进程状态
import subprocess
try:
result = subprocess.run(['ps', 'aux'], capture_output=True, text=True)
if 'visualize_results_with_video' in result.stdout:
print('✅ 状态: 生成中...')
else:
print('⏹️ 状态: 已完成或未运行')
# 检查视频文件
if os.path.exists('visualizations/bevfusion_results.mp4'):
size = os.path.getsize('visualizations/bevfusion_results.mp4') / 1024 / 1024
print(f' 视频已生成: {size:.1f} MB')
except:
pass
print()
print('💡 下采样优势:')
print(' ✅ 处理速度提升 6倍')
print(' ✅ 生成时间: ~17分钟原~120分钟')
print(' ✅ 视频时长: 1.7分钟原10分钟')
print(' ✅ 文件大小: ~100MB原~500MB')
print(' ✅ 覆盖完整测试集')
print()
print('=' * 60)
print('提示: 再次运行查看最新进度')
print(' bash check_downsampled_progress.sh')
print('=' * 60)
"