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