bev-project/archive_scripts/EVAL_PHASE3_SIMPLE.sh

47 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
# 简化版评估脚本 - 使用单GPU快速评估
# 使用GPU 7最小资源占用
set -e
export PATH=/opt/conda/bin:$PATH
export LD_LIBRARY_PATH=/opt/conda/lib/python3.8/site-packages/torch/lib:/opt/conda/lib:/usr/local/cuda/lib64:$LD_LIBRARY_PATH
export PYTHONPATH=/workspace/bevfusion:$PYTHONPATH
cd /workspace/bevfusion
echo "========================================================================"
echo "Phase 3 Epoch 23 快速评估 (单GPU)"
echo "========================================================================"
echo "Checkpoint: epoch_23.pth"
echo "使用GPU: 7 (不影响训练)"
echo "========================================================================"
echo ""
# 创建评估输出目录
EVAL_DIR="eval_results/phase3_epoch23_quick_$(date +%Y%m%d_%H%M%S)"
mkdir -p "$EVAL_DIR"
CONFIG="configs/nuscenes/det/transfusion/secfpn/camera+lidar/swint_v0p075/multitask_enhanced_phase1_HIGHRES.yaml"
CHECKPOINT="runs/enhanced_from_epoch19/epoch_23.pth"
echo "开始评估..."
echo ""
# 使用GPU 4-7进行分布式评估4卡避免与训练GPU 0-3冲突
CUDA_VISIBLE_DEVICES=4,5,6,7 \
LD_LIBRARY_PATH=/opt/conda/lib/python3.8/site-packages/torch/lib:/opt/conda/lib:/usr/local/cuda/lib64:$LD_LIBRARY_PATH \
PATH=/opt/conda/bin:$PATH \
/opt/conda/bin/torchpack dist-run -np 4 /opt/conda/bin/python tools/test.py \
"$CONFIG" \
"$CHECKPOINT" \
--eval bbox \
--out "$EVAL_DIR/results.pkl" \
2>&1 | tee "$EVAL_DIR/eval.log"
echo ""
echo "========================================================================"
echo "评估完成!结果保存在: $EVAL_DIR"
echo "========================================================================"