| # ============================================================================== | |
| # TopoMLP Training Script (Atlas Paper Aligned) | |
| # ============================================================================== | |
| # Usage: | |
| # bash train_topomlp.sh [NUM_GPUS] | |
| # | |
| # Examples: | |
| # bash train_topomlp.sh # Default: 4 GPUs | |
| # bash train_topomlp.sh 8 # 8 GPUs | |
| # ============================================================================== | |
| set -e | |
| # 激活 TopoMLP Python 环境 | |
| export PYTHONHOME=/mnt/3dtokenizer/envs/topomlp | |
| export PATH=/mnt/3dtokenizer/envs/topomlp/bin:$PATH | |
| export LD_LIBRARY_PATH=/mnt/3dtokenizer/envs/topomlp/lib:${LD_LIBRARY_PATH:-} | |
| NUM_GPUS=${1:-4} | |
| CONFIG_FILE="/mnt/3dtokenizer/configs/topomlp_atlas_aligned.py" | |
| cd /mnt/3dtokenizer/external/TopoMLP_Repo | |
| echo "============================================================" | |
| echo " TopoMLP Training (Atlas Paper Aligned)" | |
| echo "============================================================" | |
| echo " Config: ${CONFIG_FILE}" | |
| echo " GPUs: ${NUM_GPUS}" | |
| echo " Backbone: EVA-02 ViT-L" | |
| echo " Resolution: 800x1600" | |
| echo "============================================================" | |
| # Check if pretrained weights exist | |
| PRETRAINED_PATH="/mnt/3dtokenizer/pretrained/eva02_L_coco_det_sys_o365_remapped_fixed.pth" | |
| if [ ! -f "${PRETRAINED_PATH}" ]; then | |
| echo "Warning: Pretrained weights not found: ${PRETRAINED_PATH}" | |
| echo "Please download EVA-02 pretrained weights first." | |
| echo "See: external/StreamPETR/docs/ViT_Large.md" | |
| fi | |
| # Run training | |
| bash tools/dist_train.sh "${CONFIG_FILE}" "${NUM_GPUS}" | |