virtualenv mm_sparse4d --python=python3.8
source mm_sparse4d/bin/activate
sparse4d_path="path/to/sparse4d"
cd ${sparse4d_path}
pip3 install --upgrade pip
pip3 install -r requirement.txt
cd projects/mmdet3d_plugin/ops
python3 setup.py develop
cd ../../../
Download the NuScenes dataset and create symbolic links.
cd ${sparse4d_path}
mkdir data
ln -s path/to/nuscenes ./data/nuscenes
Pack the meta-information and labels of the dataset, and generate the required .pkl files.
pkl_path="data/nuscenes_anno_pkls"
mkdir -p ${pkl_path}
python3 tools/nuscenes_converter.py --version v1.0-mini --info_prefix ${pkl_path}/nuscenes-mini
python3 tools/nuscenes_converter.py --version v1.0-trainval,v1.0-test --info_prefix ${pkl_path}/nuscenes
python3 tools/anchor_generator.py --ann_file ${pkl_path}/nuscenes_infos_train.pkl
Download the required backbone pre-trained weights.
mkdir ckpt
wget https://download.pytorch.org/models/resnet50-19c8e357.pth -O ckpt/resnet50-19c8e357.pth
# train
bash local_train.sh sparse4dv3_temporal_r50_1x8_bs6_256x704
# test
bash local_test.sh sparse4dv3_temporal_r50_1x8_bs6_256x704 path/to/checkpoint
For inference-related guidelines, please refer to the tutorial/tutorial.ipynb.