环境
- pycharm 2023.1.2
- wsl + ubuntu20.04
- anaconda3
创建环境
# 创建环境
conda create -n bevformer python=3.8
conda activate bevformer
添加依赖
# 添加依赖包
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.14.0
pip install mmsegmentation==0.14.1
pip install ninja
pip install tensorboard==2.13.0
pip install nuscenes-devkit==1.1.10
pip install scikit-image==0.19.0
pip install lyft-dataset-sdk==0.0.8
pip install numpy==1.19.5
pip install pandas==1.4.4
pip install llvmlite==0.31.0
pip install timm
pip install setuptools==59.5.0
安装mmdet3d
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
添加数据集
用的 windows 系统,创建链接。数据集中未包含 test
数据集,若需要请自行配置。
单独拷贝文件夹 v1.0-trainval
mklink /j D:\edusoftware\coding\BEVFormer\data\can_bus E:\datasets\can_bus
mklink /j D:\edusoftware\coding\BEVFormer\data\nuscenes\maps E:\datasets\nuscenes\maps
mklink /j D:\edusoftware\coding\BEVFormer\data\nuscenes\samples E:\datasets\nuscenes\samples
mklink /j D:\edusoftware\coding\BEVFormer\data\nuscenes\sweeps E:\datasets\nuscenes\sweeps
目录完整结构如下:
下载预训练模型
github
下载速度慢的话,可从 百度网盘 下载。
cd bevformer
mkdir ckpts
cd ckpts & wget https://github.com/zhiqi-li/storage/releases/download/v1.0/r101_dcn_fcos3d_pretrain.pth
生成数据集信息
python tools/create_data.py nuscenes --root-path ./data/nuscenes --out-dir ./data/nuscenes --extra-tag nuscenes --version v1.0 --canbus ./data
ModuleNotFoundError: No module named ‘tools’
export PYTHONPATH=./
断点调试
import pdb
pdb.set_trace()