bevfusion部署服务器超级终极版

论文地址:https://bevfusion.mit.edu/
项目地址:https://github.com/mit-han-lab/bevfusion
话不多说直接干货

conda create -n liu_bevf python=3.8
conda activate liu_bevf
先查看自己的cuda版本(我用10.2试了好几遍一直出各种花式的问题,建议11以上,这里用的11.3)
module load scl/gcc7.3(导入服务器上布置好的gcc)

pip install torch==1.10.0+cu113 torchvision==0.11.0+cu113 -f https://download.pytorch.org/whl/torch_stable.html
pip install mmcv-full==1.4.0 -f https://download.openmmlab.com/mmcv/dist/cu113/torch1.10.0/index.html
pip install mmdet==2.20.0
pip install Pillow==8.4.0
pip install tqdm
pip install torchpack
pip install nuscenes-devkit
conda install openmpi
#######################
设置环境变量: 
vim ~/.bashrc
末尾加入:
OMPI_MCA_opal_cuda_support=true
#######################
conda install mpi4py
pip install ninja
pip install numba
编译一哈!
(我这里用的teslaV100,所以我把setup文件中-gencode=arch=compute_xx,code=sm_xx都删了(其实我感觉应该留下70也行,反正对应gpu算力就ok))
python setup.py develop

ok 环境配好了! 我们来测试一下!
先试试单gpu行不行

python tools/train_single_gpu.py configs/nuscenes/det/transfusion/secfpn/camera+lidar/swint_v0p075/convfuser.yaml --run-dir liu_res/ori

(这里我取消了分布式计算的设置(跳过torchpack等等并行) )
在这里插入图片描述
测试torchpack使用多gpu

测试
torchpack dist-run -np 4 python tools/test.py configs/nuscenes/det/transfusion/secfpn/camera+lidar/swint_v0p075/convfuser.yaml pretrained/bevfusion-det.pth --eval bbox
#这里我用官方的pth能测试但精度很低,这个问题还未解决,还要在测试一下

在这里插入图片描述

目前训练+测试都没问题
在这里插入图片描述

Done

猜你喜欢

转载自blog.csdn.net/ll594282475/article/details/126766116
今日推荐