Our code is tested on the following environment:
- Linux
- Python 3.8
- PyTorch 2.0.1
- Cudatoolkit 11.7
- mmdet3d 1.4.0
PyTorch version 2.0 or higher and mmdetection3d, which relies on mmengine, are mandatory requirements.
Setup Environment
conda create -n roadnet python=3.8 -y
conda activate roadnet
conda install pytorch==2.0.1 torchvision==0.15.2 torchaudio==2.0.2 pytorch-cuda=11.7 -c pytorch -c nvidia
Install mmdetection3d correctly. please visit the official documentation.
git clone git@github.com:open-mmlab/mmdetection3d.git
cd mmdetection 3d
git checkout v1.4.0
pip install -U openmim
mim install mmengine
mim install 'mmcv>=2.0.0rc4'
mim install 'mmdet>=3.0.0'
pip install -v -e .
Install some extra envirnment
pip install mmsegmentation
pip install einops
pip install bezier # for bezier curve
Add our projects to mmdetection3d projects
cd ${any path outside mmdetection3d}
git clone git@github.com:fudan-zvg/RoadNet.git
cp -r RoadNet/RoadNetwork-2.0.1/ mmdetection3d/projects/RoadNetwork/
Please refer to nuScenes for initial preparation
Run the following code to generate .pkl
file.
python projects/RoadNetwork/tools/create_data_pon_centerline.py nuscenes
mkdir ckpts
Download ResNet-50 Deeplab-V3-Plus checkpoint from MMSegmentation.