Skip to content

adityamwagh/3d-object-detection

Repository files navigation

Benchmarking of PointNet++, VoxelNet & PointPillars on KITTI Dataset

Setup environment

Make sure you have CUDA version 11.3 installed locally and in the virtual environment. Also make sure you are using python 3.8, or else there would be dependency issues.

conda create -n 3d-object-detection python=3.8 pytorch cudatoolkit=11.3 torchvision -c pytorch -y
conda activate 3d-object-detection
pip3 install openmim
mim install mmcv-full
mim install mmdet
mim install mmsegmentation
git clone https://github.com/open-mmlab/mmdetection3d.git
cd mmdetection3d
pip3 install -e .

If there are issues with installation, downgrade the necessary packages. For example, the click package might throw a version issue, because it's a dependency for black (a python code formatter).

Remove the mmdetection3d folder (optional)

rm -rf mmdetection3d

Clone the Project Repository

Once the package installation is succesful, clone the project repository.

git clone https://github.com/adityamwagh/3d-object-detection.git
cd 3d-object-detection

Download Dataset & Weights

Download the data folder and the weights folder (Must use an NYU Affiliated Email): Dataset and Weights. The dataset has been proprocessed to generate the required file format.

Dataset

  • Make a folder named data in the root of 3d-object-detection.
  • Unzip the kitti.zip folder into data. The folder structure should look like this:

└── data
    ├── kitti
       ├── training    
       |   ├── image_2 
       |   ├── calib
       |   ├── label_2
       |   ├── velodyne
       |   └── velodyne_reduced
       └── testing     
           ├── image_2
           ├── calib
           ├── velodyne
           └── velodyne_reduced
       ├── kitti_dbinfos_train.pkl
       ├── kitti_infos_test.pkl
       ├── kitti_infos_train.pkl
       ├── kitti_infos_trainval.pkl
       ├── kitti_infos_val.pkl
       ├── gt_database
       

Weights

  • Download the checkpoints folder from Google Drive.
  • Unzip checkpoints.zip
  • Copy the checkpoints folder into the root of 3d-object-detection folder.

Evaluation

Run the test.py script in the tools folder in 3d-object-detection.

python tools/test.py \ 
configs/pointpillars/hv_pointpillars_secfpn_6x8_160e_kitti-3d-car.py \
checkpoints/epoch_2.pth \
--show --show-dir ./data/kitti/show_results