BEVFormer代码复现

该文描述了如何在Ubuntu20.04系统中,利用PyCharm、WSL和Anaconda3创建一个名为bevformer的环境,安装包括torch、mmcv、mmdet等在内的多个依赖包。然后,从GitHub克隆mmdetection3d仓库并安装,接着设置数据集链接,特别是nuscenes数据集,并下载预训练模型。在执行生成数据集信息的脚本时遇到了tools模块未找到的问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

环境

  • 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()
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值