Home

Awesome

HEDNet & SAFDNet

It is the official code release of HEDNet (NeurIPS 2023) and SAFDNet (CVPR 2024). We unify the codebase for HEDNet and SAFDNet on all datasets based on OpenPCDet. Please note that, since we rebuilt the code, the results are slightly different from those in the original paper.

Results on Waymo Open

Validation set

ModelmAP/mAPH_L1mAP/mAPH_L2Vec_L1Vec_L2Ped_L1Ped_L2Cyc_L1Cyc_L2
HEDNet-1f-1x81.1/79.175.0/73.080.2/79.772.3/71.979.3/76.476.4/71.979.1/78.176.2/75.3
SAFDNet-1f-1x81.2/79.275.1/73.280.2/79.772.2/71.879.9/76.976.8/72.679.1/78.176.2/75.2
HEDNet-1f-2x81.4/79.575.3/73.481.1/80.673.2/72.784.4/80.076.8/72.678.7/77.775.8/74.9
SAFDNet-1f-2x81.6/79.775.5/73.780.7/80.372.8/72.484.8/80.477.3/73.079.4/78.476.6/75.6
HEDNet-4f-2x83.3/82.177.8/76.682.6/82.175.3/74.886.2/83.679.1/76.681.2/80.479.0/78.2
SAFDNet-4f-2x84.1/82.878.6/77.382.6/82.175.1/74.786.7/84.180.0/77.483.0/82.180.7/79.9

Test set

ModelmAP/mAPH_L1mAP/mAPH_L2Vec_L1Vec_L2Ped_L1Ped_L2Cyc_L1Cyc_L2Submission
HEDNet-1f-2x82.2/80.276.9/75.084.2/83.877.0/76.684.1/79.778.3/74.078.2/77.075.4/74.3link
SAFDNet-1f-2x81.9/79.876.5/74.683.9/83.576.6/76.284.3/79.878.3/74.177.5/76.374.6/73.4link

We could not provide the above pretrained models due to Waymo Dataset License Agreement.

Results on NuScenes

Validation set

ModelmATEmASEmAOEmAVEmAAEmAPNDSCheckpoint
HEDNet27.225.126.525.718.067.171.3ckpt & log
SAFDNet27.126.028.024.818.167.071.1ckpt & log

Test set

ModelmATEmASEmAOEmAVEmAAEmAPNDSSubmission
HEDNet25.023.831.724.013.067.572.0json
SAFDNet25.124.231.125.812.768.372.3json

Note: We originally implemented HEDNet on the nuScenes dataset using MMDetection3D. The TransFusion-L in OpenPCDet which uses the hierarchical 3D SECOND as its backbone achieves worse results than that in MMDetection3D. To unify the codebase, we release a single-stride 2D version for both HEDNet and SAFDNet on the nuScenes dataset. This version differs from the hierarchical 3D version described in the original paper but achieves similar results.

Results on Argoverse2

Validation set

ModelmAPCheckpoint
SAFDNet-1x39.4ckpt & log
SAFDNet-2x39.9ckpt & log

Installation and usage

Please refer to INSTALL.md and GETTING_STARTED.md for the installation and usage, respectively. We used python 3.8, pytorch 1.10, cuda11.3, spconv-cu113 2.3.3. We provide a list of Python packages output from pip freeze here, to help configure the environment.

You can create an experiment folder in any location, and organize it like this:

FOLDER_NAME:
├── ${PATH_TO_HEDNet_ROOT}/HEDNet/tools/cfgs
├── ${PATH_TO_HEDNet_ROOT}/HEDNet/data
├── xxx.yaml (copy the yaml file here)
├── dist_train.sh (copy the training script from tools/scripts here)
├── dist_test.sh (copy the testing script from tools/scripts here)

For faster evaluation on the Waymo Open dataset, please download the compute_detection_metrics_main and gt.bin, and then put them under the HEDNet/data/waymo. You may need to excute chmod +x compute_detection_metrics_main to modify the file permission to make it an executable file. If you want to generate these two files on your own, please refer to the this repo.

Then you can train and test models like this:

# Train with 8 gpus
./dist_train.sh xxx.yaml 8

# Test with 8 gpus
./dist_test.sh xxx.yaml 8 output/ckpt/xxx.pth

TODO

<!-- ## FAQ --> <!-- - Since we rebuilt and unified the codebase for all datasets, the model accuracy of HEDNet and SAFDNet is slightly lower than the results released in the paper (by at most 0.3\% L2 mAPH on Waymo Open). You can run the previous branch ``HEDNet`` to get better results. We are trying to fix the gap and will update the code as soon as possible. --> <!-- - Release the model checkpoints on nuScenes and Argoverse2 datasets. -->

Citation

@inproceedings{zhang2023hednet,
  title={{HEDNet}: A Hierarchical Encoder-Decoder Network for 3D Object Detection in Point Clouds},
  author={Zhang, Gang and Chen, Junnan and Gao, Guohuan and Li, Jianmin and Hu, Xiaolin},
  booktitle={Thirty-seventh Conference on Neural Information Processing Systems (NeurIPS)},
  year={2023},
}

@inproceedings{zhang2024cvpr,
    title     = {{SAFDNet}: A Simple and Effective Network for Fully Sparse 3D Object Detection},
    author    = {Zhang, Gang and Chen, Junnan and Gao, Guohuan and Li, Jianmin and Liu, Si and Hu, Xiaolin},
    booktitle = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
    month     = {June},
    year      = {2024},
    pages     = {14477-14486}
}

Acknowleadgement

This two works were supported by the National Key Research and Development Program of China (No. 2021ZD0200301) and the National Natural Science Foundation of China (Nos. U19B2034, 61836014) and THU-Bosch JCML center.