相机+激光雷达融合感知: bevfusion、DeepInteraction等模型配置教程
1. 数据集准备
在这个网站下载 nuScenes V1.0 full dataset data, mini data and CAN bus expansion data,解压至/path/to/nuscenes/。(记得下载metadata)
解压后文件目录如下:
/path/to/nuscenes/
├── can_bus/
├── maps/
├── mini/
│ ├── maps/
│ ├── samples/
│ ├── sweeps/
│ ├── v1.0-mini/
├── samples/
├── sweeps/
├── v1.0-test/
├── v1.0-trainval/
2. 环境配置
基于anaconda进行环境配置,ubuntu 运行命令如下:
conda create -n fusionattack python=3.8
conda activate fusionattack
conda install openmpi=4.0.4 mpi4py=3.0.3 Pillow=8.4.0
conda install pytorch==1.10.1 torchvision==0.11.2 torchaudio==0.10.1 cudatoolkit=11.3 -c pytorch
pip install tqdm torchpack
pip install -U openmim
mim install mmcv-full==1.4.0
pip install mmdet==2.20.0 mmsegmentation==0.14.1
pip install nuscenes-devkit spconv-cu113
pip install numpy==1.19.5 pandas==1.3.5 networkx==2.2 shapely==1.7.1 numba==0.48.0
python -m pip install detectron2 -f https://dl.fbaipublicfiles.com/detectron2/wheels/cu113/torch1.10/index.html
pip install trimesh==2.35.39 scikit-image==0.19.3 tensorboardx timm setuptools==59.5.0
pip install gdown
参考: https://github.com/Bob-cheng/CL-FusionAttack
3. 模型权重下载
wget -P ./pretrained/ https://bevfusion.mit.edu/files/pretrained_updated/bevfusion-det.pth
4. 数据转换
python tools/create_data.py nuscenes --root-path ./data/nuscenes --out-dir ./data/nuscenes --extra-tag nuscenes
python tools/create_data.py nuscenes --root-path ./data/nuscenes/mini --out-dir ./data/nuscenes/mini --extra-tag nuscenes --version v1.0-mini
在bevfusion_original_cfg.yaml修改文件夹路径等信息。