Xharlie / BtcDet

Behind the Curtain: Learning Occluded Shapes for 3D Object Detection
Apache License 2.0
195 stars 42 forks source link
3d 3d-object-detection aaai-2022 aaai2022 autonomous-driving autonomous-vehicles computer-vision deep-learning generative-model lidar lidar-point-cloud object-detection occlusion occlusion-handling point-cloud pytorch self-driving self-driving-car

Behind the Curtain: Learning Occluded Shapes for 3D Object Detection (AAAI-2022)

Reference

Please cite our paper if you are interested to use this implementation,
Behind the Curtain: Learning Occluded Shapes for 3D Object Detection.

@article{xu2021behind,
  title={Behind the Curtain: Learning Occluded Shapes for 3D Object Detection},
  author={Xu, Qiangeng and Zhong, Yiqi and Neumann, Ulrich},
  journal={arXiv preprint arXiv:2112.02205},
  year={2021}
}

The implementatin is also inspired by the ICCV-2021 paper,
SPG: Unsupervised domain adaptation for 3d object detection via semantic point generation.

@inproceedings{xu2021spg,
  title={Spg: Unsupervised domain adaptation for 3d object detection via semantic point generation},
  author={Xu, Qiangeng and Zhou, Yin and Wang, Weiyue and Qi, Charles R and Anguelov, Dragomir},
  booktitle={Proceedings of the IEEE/CVF International Conference on Computer Vision},
  pages={15446--15456},
  year={2021}
}

Acknowledgement

Our model, BtcDet, is implemented based on [OpenPcdet 0.3.0]. We thank Shaohuai Shi for the discussion during our implementation.

Installation

Requirements

All the codes are tested in the following environment:

Install

b. Install the dependent libraries as follows:

c. Install the operators in BtcDet by running the following command:

cd BtcDet
python setup.py develop

Preparation

Use Our Preprocessed Data:

you can use our generated kitti's data including the generated complete object points, download it [here (about 31GBs)] and put the zip file inside data/kitti/ and unzip it as detection3d directory.

Alternatively, Generate Data by Yourself:

KITTI Dataset

Run Training:

cd tools/

Single gpu training

mkdir output

mkdir output/kitti_car

python train.py --cfg_file ./cfgs/model_configs/btcdet_kitti_car.yaml --output_dir ../output/kitti_car/ --batch_size 2 --gpu_str "0"

Multi gpu training, assuming you have 4 gpus:

bash scripts/dist_train.sh 4  --batch_size 8 --gpu_str "0,1,2,3" --cfg_file ./cfgs/model_configs/btcdet_kitti_car.yaml --output_dir ../output/kitti_car/

Run Testing:

cd tools/

Single gpu testing for all saved checkpoints, assuming you have 4 gpus:

python test.sh 4 --eval-all --cfg_file ./cfgs/model_configs/btcdet_kitti_car.yaml --gpu_str "0" --batch_size 2 --output_dir ../output/kitti_car/ --ckpt_dir  ../output/kitti_car/ckpt/

Multi gpu testing for all saved checkpoints, assuming you have 4 gpus:

bash scripts/dist_test.sh 4 --eval-all --cfg_file ./cfgs/model_configs/btcdet_kitti_car.yaml --gpu_str "0,1,2,3" --batch_size 8 --output_dir ../output/kitti_car/ --ckpt_dir  ../output/kitti_car/ckpt/

Multi gpu testing a specific checkpoint, assuming you have 4 gpus and checkpoint_39 is your best checkpoint :

bash scripts/dist_test.sh 4  --cfg_file ./cfgs/model_configs/btcdet_kitti_car.yaml --gpu_str "0,1,2,3" --batch_size 8 --output_dir ../output/kitti_car/ --ckpt  ../output/kitti_car/ckpt/checkpoint_epoch_39.pth