47 lines
1.7 KiB
Bash
Executable File
47 lines
1.7 KiB
Bash
Executable File
#!/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 "========================================================================"
|
||
|