bev-project/archive_scripts/start_phase4a_bev2x_fixed.sh

51 lines
1.8 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
# Phase 4A: BEV 2x分辨率提升训练
# 基于之前成功的训练脚本格式
set -e
export PATH=/opt/conda/bin:$PATH
echo "========================================================================"
echo "Phase 4A: BEV 2x分辨率提升训练"
echo "========================================================================"
echo "配置: BEV 0.15m分辨率 (2倍提升)"
echo "Decoder: 4层完整版 [256, 256, 128, 128]"
echo "从epoch_23.pth加载所有权重"
echo "目标: 20 epochs"
echo ""
echo "关键改进:"
echo " - BEV分辨率: 0.3m → 0.15m (720×720)"
echo " - GT标签: 0.25m → 0.125m (800×800)"
echo " - Decoder深度: 2层 → 4层"
echo " - Deep Supervision: 启用"
echo " - Dice Loss: 启用"
echo ""
echo "预期性能提升:"
echo " - Stop Line IoU: 0.27 → 0.42+ (+55%)"
echo " - Divider IoU: 0.19 → 0.35+ (+84%)"
echo " - 整体mIoU: 0.41 → 0.54+ (+32%)"
echo "========================================================================"
echo ""
# 创建日志文件
LOG_FILE="phase4a_bev2x_$(date +%Y%m%d_%H%M%S).log"
echo "开始训练..."
echo "日志文件: $LOG_FILE"
echo ""
# 启动训练 - 使用与之前成功训练相同的格式
/opt/conda/bin/torchpack dist-run -np 6 /opt/conda/bin/python tools/train.py \
configs/nuscenes/det/transfusion/secfpn/camera+lidar/swint_v0p075/multitask_BEV2X_phase4a.yaml \
--model.encoders.camera.backbone.init_cfg.checkpoint pretrained/swint-nuimages-pretrained.pth \
--load_from runs/enhanced_from_epoch19/epoch_23.pth \
--data.samples_per_gpu 1 \
--data.workers_per_gpu 0 \
2>&1 | tee "$LOG_FILE"
echo ""
echo "========================================================================"
echo "训练完成!日志保存在: $LOG_FILE"
echo "========================================================================"