68 lines
1.6 KiB
Bash
Executable File
68 lines
1.6 KiB
Bash
Executable File
#!/bin/bash
|
||
# 启动Phase 3: Deep Supervision
|
||
# 前提:Phase 2 (epoch_26.pth) 已完成
|
||
|
||
set -e
|
||
|
||
export PATH=/opt/conda/bin:$PATH
|
||
cd /workspace/bevfusion
|
||
|
||
echo "=========================================="
|
||
echo "Phase 3: 添加Deep Supervision"
|
||
echo "=========================================="
|
||
echo ""
|
||
echo "增强内容:"
|
||
echo " ✅ ASPP (Phase 1)"
|
||
echo " ✅ Dice Loss (Phase 2)"
|
||
echo " ✅ Deep Supervision - 深度监督"
|
||
echo " ✅ 更深的Decoder (4层)"
|
||
echo " ❌ 高权重 (Phase 4)"
|
||
echo ""
|
||
echo "训练设置:"
|
||
echo " 基础模型: epoch_26.pth"
|
||
echo " 目标: epoch_29.pth"
|
||
echo " 学习率: 5e-5"
|
||
echo " 预期提升: mIoU +5-8% (累计)"
|
||
echo ""
|
||
echo "=========================================="
|
||
echo ""
|
||
|
||
EPOCH_26_PATH=$(find runs/ -name "epoch_26.pth" -type f | sort -r | head -1)
|
||
|
||
if [ -z "$EPOCH_26_PATH" ]; then
|
||
echo "错误: 找不到epoch_26.pth"
|
||
echo "请先完成Phase 2训练"
|
||
exit 1
|
||
fi
|
||
|
||
echo "找到Phase 2模型: $EPOCH_26_PATH"
|
||
echo ""
|
||
echo "开始Phase 3训练..."
|
||
echo ""
|
||
|
||
LOG_FILE="training_phase3_$(date +%Y%m%d_%H%M%S).log"
|
||
|
||
torchpack dist-run -np 8 python tools/train.py \
|
||
configs/nuscenes/det/transfusion/secfpn/camera+lidar/swint_v0p075/multitask_enhanced_phase3.yaml \
|
||
--model.encoders.camera.backbone.init_cfg.checkpoint pretrained/swint-nuimages-pretrained.pth \
|
||
--load_from "$EPOCH_26_PATH" \
|
||
--data.workers_per_gpu 0 \
|
||
2>&1 | tee "$LOG_FILE"
|
||
|
||
echo ""
|
||
echo "=========================================="
|
||
echo "Phase 3训练完成!"
|
||
echo "日志: $LOG_FILE"
|
||
echo "下一步: 运行 bash scripts/start_phase4.sh"
|
||
echo "=========================================="
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|