BEVFormer 源码解读及本地环境配置

一、环境配置

由于 BEVFormer 对配置要求比较高,本地普通电脑难以满足要求,所以,我们租用云算力平台进行 BEVFormer 的代码复现。

BEVFormer源码:

环境配置:

file

file

file

这里按 小时租或按天租, 费用还是挺便宜的。

使用 VNC 连接:
file

https://gpu.ai-galaxy.cn/console/dashboard

二、安装依赖

由于云环境已经自带了 cuda 等基本的依赖,所以,我们只需要安装其他依赖即可:

切换环境:

# 切换为root用户,否则下载会遇到问题
su root

 # 1、Create a conda virtual environment and activate it.
conda create -n open-mmlab python=3.8 -y
conda activate open-mmlab

# 2、Install PyTorch and torchvision following the official instructions. (云环境已安装)
# pip install torch==1.9.1+cu111 torchvision==0.10.1+cu111 torchaudio==0.9.1 -f https://download.pytorch.org/whl/torch_stable.html
# Recommended torch>=1.9

# 3、gcc>=5
# conda install -c omgarcia gcc-6 # gcc-6.2

# 4、Install mmcv-full. (按照你的显卡去装,用下边的链接找到对应的版本)
# pip install mmcv-full==1.4.0
#  pip install mmcv-full==1.4.0 -f https://download.openmmlab.com/mmcv/dist/cu111/torch1.9.0/index.html

# d. Install mmdet and mmseg.
pip install mmdet==2.14.0
pip install mmsegmentation==0.14.1

# Install mmdet3d from source code.
git clone https://github.com/open-mmlab/mmdetection3d.git
cd mmdetection3d
git checkout v0.17.1 # Other versions may not be compatible.
# python setup.py install
# 这个环境安装最重要,上边的安装报错,请通过该方法进行安装;
pip install -e  .

file

file

file


学习视频:
全网讲解最通俗的【BEVformer】原理+源码解读,基于Transformer的自动驾驶技术只需三小时即可轻松吃透!
fundamentalvision/BEVFormer

为者常成,行者常至