bev-project/archive_scripts/START_TRAINING.sh

75 lines
2.6 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
# BEVFusion 训练启动脚本
# 使用前请选择要训练的任务(取消注释对应的命令)
set -e
# 设置conda环境
export PATH=/opt/conda/bin:$PATH
# 切换到项目目录
cd /workspace/bevfusion
echo "=========================================="
echo "BEVFusion 训练启动"
echo "=========================================="
echo ""
echo "硬件配置:"
echo " GPU: 8x Tesla V100S (32GB)"
echo " 总显存: 256GB"
echo ""
echo "软件环境:"
echo " Python: $(python --version 2>&1)"
echo " PyTorch: $(python -c 'import torch; print(torch.__version__)')"
echo " CUDA: $(python -c 'import torch; print(torch.cuda.is_available())')"
echo ""
echo "数据集:"
echo " 位置: /data/nuscenes (已软链接到 ./data)"
echo ""
echo "预训练模型:"
echo " Camera Backbone: pretrained/swint-nuimages-pretrained.pth"
echo " LiDAR Model: pretrained/lidar-only-det.pth"
echo ""
echo "=========================================="
echo ""
# ============================================
# 选择要训练的任务(取消注释对应的命令)
# ============================================
# 任务1: 3D目标检测训练推荐
# 预计时间20-24小时预期性能mAP ~68-70%, NDS ~71-72%
echo "开始训练: 3D目标检测 (Camera + LiDAR)"
echo "配置: 8 GPU, TransFusion, SwinTransformer"
echo ""
torchpack dist-run -np 8 python tools/train.py \
configs/nuscenes/det/transfusion/secfpn/camera+lidar/swint_v0p075/convfuser.yaml \
--model.encoders.camera.backbone.init_cfg.checkpoint pretrained/swint-nuimages-pretrained.pth \
--load_from pretrained/lidar-only-det.pth
# ============================================
# 其他训练选项(需要时取消注释)
# ============================================
# 任务2: BEV地图分割训练
# 预计时间12-15小时预期性能mIoU ~62-63%
# echo "开始训练: BEV地图分割 (Camera + LiDAR)"
# torchpack dist-run -np 8 python tools/train.py \
# configs/nuscenes/seg/fusion-bev256d2-lss.yaml \
# --model.encoders.camera.backbone.init_cfg.checkpoint pretrained/swint-nuimages-pretrained.pth
# 任务3: 多任务训练(检测 + 分割)
# 预计时间28-32小时
# echo "开始训练: 多任务 (检测 + 分割)"
# torchpack dist-run -np 8 python tools/train.py \
# configs/nuscenes/multitask/fusion-det-seg-swint.yaml \
# --model.encoders.camera.backbone.init_cfg.checkpoint pretrained/swint-nuimages-pretrained.pth \
# --load_from pretrained/lidar-only-det.pth
echo ""
echo "=========================================="
echo "训练完成!"
echo "=========================================="