PointRCNN: 3D Object Proposal Generation and Detection from Point Cloud, CVPR 2019.

Overview

PointRCNN

PointRCNN: 3D Object Proposal Generation and Detection from Point Cloud

teaser

Code release for the paper PointRCNN:3D Object Proposal Generation and Detection from Point Cloud, CVPR 2019.

Authors: Shaoshuai Shi, Xiaogang Wang, Hongsheng Li.

[arXiv]  [Project Page] 

New: We have provided another implementation of PointRCNN for joint training with multi-class in a general 3D object detection toolbox [OpenPCDet].

Introduction

In this work, we propose the PointRCNN 3D object detector to directly generated accurate 3D box proposals from raw point cloud in a bottom-up manner, which are then refined in the canonical coordinate by the proposed bin-based 3D box regression loss. To the best of our knowledge, PointRCNN is the first two-stage 3D object detector for 3D object detection by using only the raw point cloud as input. PointRCNN is evaluated on the KITTI dataset and achieves state-of-the-art performance on the KITTI 3D object detection leaderboard among all published works at the time of submission.

For more details of PointRCNN, please refer to our paper or project page.

Supported features and ToDo list

  • Multiple GPUs for training
  • GPU version rotated NMS
  • Faster PointNet++ inference and training supported by Pointnet2.PyTorch
  • PyTorch 1.0
  • TensorboardX
  • Still in progress

Installation

Requirements

All the codes are tested in the following environment:

  • Linux (tested on Ubuntu 14.04/16.04)
  • Python 3.6+
  • PyTorch 1.0

Install PointRCNN

a. Clone the PointRCNN repository.

git clone --recursive https://github.com/sshaoshuai/PointRCNN.git

If you forget to add the --recursive parameter, just run the following command to clone the Pointnet2.PyTorch submodule.

git submodule update --init --recursive

b. Install the dependent python libraries like easydict,tqdm, tensorboardX etc.

c. Build and install the pointnet2_lib, iou3d, roipool3d libraries by executing the following command:

sh build_and_install.sh

Dataset preparation

Please download the official KITTI 3D object detection dataset and organize the downloaded files as follows:

PointRCNN
├── data
│   ├── KITTI
│   │   ├── ImageSets
│   │   ├── object
│   │   │   ├──training
│   │   │      ├──calib & velodyne & label_2 & image_2 & (optional: planes)
│   │   │   ├──testing
│   │   │      ├──calib & velodyne & image_2
├── lib
├── pointnet2_lib
├── tools

Here the images are only used for visualization and the road planes are optional for data augmentation in the training.

Pretrained model

You could download the pretrained model(Car) of PointRCNN from here(~15MB), which is trained on the train split (3712 samples) and evaluated on the val split (3769 samples) and test split (7518 samples). The performance on validation set is as follows:

Car [email protected], 0.70, 0.70:
bbox AP:96.91, 89.53, 88.74
bev  AP:90.21, 87.89, 85.51
3d   AP:89.19, 78.85, 77.91
aos  AP:96.90, 89.41, 88.54

Quick demo

You could run the following command to evaluate the pretrained model (set RPN.LOC_XZ_FINE=False since it is a little different with the default configuration):

python eval_rcnn.py --cfg_file cfgs/default.yaml --ckpt PointRCNN.pth --batch_size 1 --eval_mode rcnn --set RPN.LOC_XZ_FINE False

Inference

  • To evaluate a single checkpoint, run the following command with --ckpt to specify the checkpoint to be evaluated:
python eval_rcnn.py --cfg_file cfgs/default.yaml --ckpt ../output/rpn/ckpt/checkpoint_epoch_200.pth --batch_size 4 --eval_mode rcnn 
  • To evaluate all the checkpoints of a specific training config file, add the --eval_all argument, and run the command as follows:
python eval_rcnn.py --cfg_file cfgs/default.yaml --eval_mode rcnn --eval_all
  • To generate the results on the test split, please modify the TEST.SPLIT=TEST and add the --test argument.

Here you could specify a bigger --batch_size for faster inference based on your GPU memory. Note that the --eval_mode argument should be consistent with the --train_mode used in the training process. If you are using --eval_mode=rcnn_offline, then you should use --rcnn_eval_roi_dir and --rcnn_eval_feature_dir to specify the saved features and proposals of the validation set. Please refer to the training section for more details.

Training

Currently, the two stages of PointRCNN are trained separately. Firstly, to use the ground truth sampling data augmentation for training, we should generate the ground truth database as follows:

python generate_gt_database.py --class_name 'Car' --split train

Training of RPN stage

  • To train the first proposal generation stage of PointRCNN with a single GPU, run the following command:
python train_rcnn.py --cfg_file cfgs/default.yaml --batch_size 16 --train_mode rpn --epochs 200
  • To use mutiple GPUs for training, simply add the --mgpus argument as follows:
CUDA_VISIBLE_DEVICES=0,1 python train_rcnn.py --cfg_file cfgs/default.yaml --batch_size 16 --train_mode rpn --epochs 200 --mgpus

After training, the checkpoints and training logs will be saved to the corresponding directory according to the name of your configuration file. Such as for the default.yaml, you could find the checkpoints and logs in the following directory:

PointRCNN/output/rpn/default/

which will be used for the training of RCNN stage.

Training of RCNN stage

Suppose you have a well-trained RPN model saved at output/rpn/default/ckpt/checkpoint_epoch_200.pth, then there are two strategies to train the second stage of PointRCNN.

(a) Train RCNN network with fixed RPN network to use online GT augmentation: Use --rpn_ckpt to specify the path of a well-trained RPN model and run the command as follows:

python train_rcnn.py --cfg_file cfgs/default.yaml --batch_size 4 --train_mode rcnn --epochs 70  --ckpt_save_interval 2 --rpn_ckpt ../output/rpn/default/ckpt/checkpoint_epoch_200.pth

(b) Train RCNN network with offline GT augmentation:

  1. Generate the augmented offline scenes by running the following command:
python generate_aug_scene.py --class_name Car --split train --aug_times 4
  1. Save the RPN features and proposals by adding --save_rpn_feature:
  • To save features and proposals for the training, we set TEST.RPN_POST_NMS_TOP_N=300 and TEST.RPN_NMS_THRESH=0.85 as follows:
python eval_rcnn.py --cfg_file cfgs/default.yaml --batch_size 4 --eval_mode rpn --ckpt ../output/rpn/default/ckpt/checkpoint_epoch_200.pth --save_rpn_feature --set TEST.SPLIT train_aug TEST.RPN_POST_NMS_TOP_N 300 TEST.RPN_NMS_THRESH 0.85
  • To save features and proposals for the evaluation, we keep TEST.RPN_POST_NMS_TOP_N=100 and TEST.RPN_NMS_THRESH=0.8 as default:
python eval_rcnn.py --cfg_file cfgs/default.yaml --batch_size 4 --eval_mode rpn --ckpt ../output/rpn/default/ckpt/checkpoint_epoch_200.pth --save_rpn_feature
  1. Now we could train our RCNN network. Note that you should modify TRAIN.SPLIT=train_aug to use the augmented scenes for the training, and use --rcnn_training_roi_dir and --rcnn_training_feature_dir to specify the saved features and proposals in the above step:
python train_rcnn.py --cfg_file cfgs/default.yaml --batch_size 4 --train_mode rcnn_offline --epochs 30  --ckpt_save_interval 1 --rcnn_training_roi_dir ../output/rpn/default/eval/epoch_200/train_aug/detections/data --rcnn_training_feature_dir ../output/rpn/default/eval/epoch_200/train_aug/features

For the offline GT sampling augmentation, the default setting to train the RCNN network is RCNN.ROI_SAMPLE_JIT=True, which means that we sample the RoIs and calculate their GTs in the GPU. I also provide the CPU version proposal sampling, which is implemented in the dataloader, and you could enable this feature by setting RCNN.ROI_SAMPLE_JIT=False. Typically the CPU version is faster but costs more CPU resources since they use mutiple workers.

All the codes supported mutiple GPUs, simply add the --mgpus argument as above. And you could also increase the --batch_size by using multiple GPUs for training.

Note:

  • The strategy (a), online augmentation, is more elegant and easy to train.
  • The best model is trained by the offline augmentation strategy with CPU proposal sampling (set RCNN.ROI_SAMPLE_JIT=False).
  • Theoretically, the online augmentation should be better, but currently the online augmentation is a bit lower than the offline augmentation, and I still didn't know why. All discussions are welcomed.
  • I am still working on this codes to make it more stable.

Citation

If you find this work useful in your research, please consider cite:

@InProceedings{Shi_2019_CVPR,
    author = {Shi, Shaoshuai and Wang, Xiaogang and Li, Hongsheng},
    title = {PointRCNN: 3D Object Proposal Generation and Detection From Point Cloud},
    booktitle = {The IEEE Conference on Computer Vision and Pattern Recognition (CVPR)},
    month = {June},
    year = {2019}
}
Comments
  • Error when inference with other datasest

    Error when inference with other datasest

    Hello, developers. I trained the model on KITTI object dataset and I tried to use it on another point cloud dataset, but the dataloader crashed. May you give some advice on this issus? I made my point cloud dataset KITTI-like: it has identity calibration file and lidar and label folders. but no pictures. I set a flag to ignore the image input. Unfortunately the rpn couldn't get the correct samples. File ".../PointRCNN-master/tools/../lib/datasets/kitti_rcnn_dataset.py", line 238, in getitem return self.get_rpn_sample(index) File ".../PointRCNN-master/tools/../lib/datasets/kitti_rcnn_dataset.py", line 304, in get_rpn_sample extra_choice = np.random.choice(choice, self.npoints - len(pts_rect), replace=False) File "mtrand.pyx", line 1168, in mtrand.RandomState.choice ValueError: Cannot take a larger sample than population when 'replace=False'

    opened by NLCharles 12
  •  fatal error: cuda.h: No such file or directory

    fatal error: cuda.h: No such file or directory

    Thank you for your reply,I have one question,when I run 'sh build_and_install.sh' to build and install the pointnet2_lib, iou3d, roipool3d libraries ,I always receive this" fatal error: cuda.h: No such file or directory",but I do not know why.

    These are the reply by the computer:

    building 'iou3d_cuda' extension gcc -pthread -B /home/user/anaconda/envs/qq/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrrototypes -fPIC -I/home/user/anaconda/envs/qq/lib/python3.7/site-packages/torch/lib/include -I/home/user/anaconda/envs/qq/lib/n3.7/site-packages/torch/lib/include/torch/csrc/api/include -I/home/user/anaconda/envs/qq/lib/python3.7/site-packages/torch/lilude/TH -I/home/user/anaconda/envs/qq/lib/python3.7/site-packages/torch/lib/include/THC -I/usr/local/cuda:/usr/local/cuda-8.0/de -I/home/user/anaconda/envs/qq/include/python3.7m -c src/iou3d.cpp -o build/temp.linux-x86_64-3.7/src/iou3d.o -g -DTORCH_APIUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=iou3d_cuda -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++11 cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ src/iou3d.cpp:4:18: fatal error: cuda.h: No such file or directory compilation terminated. error: command 'gcc' failed with exit status 1 running install running bdist_egg running egg_info writing roipool3d.egg-info/PKG-INFO writing dependency_links to roipool3d.egg-info/dependency_links.txt writing top-level names to roipool3d.egg-info/top_level.txt reading manifest file 'roipool3d.egg-info/SOURCES.txt' writing manifest file 'roipool3d.egg-info/SOURCES.txt' installing library code to build/bdist.linux-x86_64/egg running install_lib running build_ext building 'roipool3d_cuda' extension gcc -pthread -B /home/user/anaconda/envs/qq/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrrototypes -fPIC -I/home/user/anaconda/envs/qq/lib/python3.7/site-packages/torch/lib/include -I/home/user/anaconda/envs/qq/lib/n3.7/site-packages/torch/lib/include/torch/csrc/api/include -I/home/user/anaconda/envs/qq/lib/python3.7/site-packages/torch/lilude/TH -I/home/user/anaconda/envs/qq/lib/python3.7/site-packages/torch/lib/include/THC -I/usr/local/cuda:/usr/local/cuda-8.0/de -I/home/user/anaconda/envs/qq/include/python3.7m -c src/roipool3d.cpp -o build/temp.linux-x86_64-3.7/src/roipool3d.o -g -DTAPI_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=roipool3d_cuda -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++11 cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ /usr/local/cuda:/usr/local/cuda-8.0/bin/nvcc -I/home/user/anaconda/envs/qq/lib/python3.7/site-packages/torch/lib/include -I/hoer/anaconda/envs/qq/lib/python3.7/site-packages/torch/lib/include/torch/csrc/api/include -I/home/user/anaconda/envs/qq/lib/pyt7/site-packages/torch/lib/include/TH -I/home/user/anaconda/envs/qq/lib/python3.7/site-packages/torch/lib/include/THC -I/usr/louda:/usr/local/cuda-8.0/include -I/home/user/anaconda/envs/qq/include/python3.7m -c src/roipool3d_kernel.cu -o build/temp.linu_64-3.7/src/roipool3d_kernel.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --com-options '-fPIC' -O2 -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=roipool3d_cuda -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++ unable to execute '/usr/local/cuda:/usr/local/cuda-8.0/bin/nvcc': No such file or directory error: command '/usr/local/cuda:/usr/local/cuda-8.0/bin/nvcc' failed with exit status 1 Could you help me?Thank you very much.

    opened by FOURIERWANG 8
  • About the results

    About the results

    Hi Shaoshuai,

    Thanks for your great paper and implementation ~ I have tried your provided checkpoint and it reproduced exactly the same results as what is reported in README.md.

    However, when I went through the training process provided in README.md according to your instructions, I got the final results as follows:

    bbox AP:97.4753, 89.2702, 88.8074
    bev  AP:89.1184, 87.2523, 86.3265
    3d   AP:86.1782, 77.1745, 76.6546
    aos  AP:97.46, 89.10, 88.54
    

    I got slightly better results (in terms of 3D AP and BEV) if I used RCNN trained at epoch 23 instead of 30 and RPN trained at epoch 200:

    bbox AP:97.3265, 89.3636, 88.8258
    bev  AP:89.6408, 87.2576, 85.9677
    3d   AP:87.3695, 77.6297, 76.8561
    aos  AP:97.31, 89.22, 88.59
    

    Both results cannot match up with the pretrained model.

    I noticed that the major difference between the model in the provided training pipeline and the official testing pipeline is that the official testing pipeline uses RPN.LOC_XZ_FINE=False. Should I do so if I want to train my model from scratch? Besides, I noticed in the paper that the RCNN stage is trained for 50 epochs. However, in the provided instructions, the epoch number is 30.

    Thanks a lot for your reply~

    Best, Ken

    opened by kentang-mit 8
  • How to generate plane files?

    How to generate plane files?

    Hi, Thanks for sharing!

    I encountered the following problem when running the first stage training without downloading your plane files. FileNotFoundError: [Errno 2] No such file or directory: ../data/KITTI/object/training/planes/005957.txt'

    Can I know how do you get these plane files? btw, how can we turn off the augmentation option so that we can run the code without downloading the plane files?

    Thanks!

    opened by zhby99 7
  • Calibration mismatch when using the Kitti raw dataset

    Calibration mismatch when using the Kitti raw dataset

    Many thanks for the excellent code in the repository, and the great contribution of your research! It's very educational and informative to read through your paper and code.

    I can successfully run your code against the KITTI object test set. I also imported some of your code into my repository and maintained your commit ID and history so that it's only "borrowing" your code.

    • https://github.com/tareeq-av/tareeqav/graphs/contributors
    • https://github.com/tareeq-av/tareeqav/tree/master/python/stage1/perception
    • https://github.com/tareeq-av/tareeqav/blob/master/python/stage1/demo_pipeline.py

    As you know, the KITTI raw dataset uses a different calibration syntax and files for the rotation and translation matrices.

    When I attempt to create your calibration object from the raw dataset, the get_valid_flag method seems to reject all of the points, which leads me to believe that:

    1. Either I have miss understanding on how to create your calibration objects from the raw calibration files as I have done here
    2. There's some other misunderstanding on my part that I am not yet sure what it maybe

    Is there any reason why your network would not work on the raw dataset? Are there configs in the config.py or default.yml that maybe causing this?

    When I run the code I "borrowed" from you repo against a test set sample image and calibration, it works fine, which further leads me to believe its a calibration mismatch

    opened by ghost 5
  • problem when compiling iou3d and roipool3d in Windows

    problem when compiling iou3d and roipool3d in Windows

    I have compiled the codes of iou3d and roipool3d in Ubuntu successfully, but when I tried to compiled iou3d in Windows, the error occurred that showed 'identifier "EPS" is undefined in device code'. Thus, I change the code like below.

    //#define DEBUG
    const int THREADS_PER_BLOCK_NMS = sizeof(unsigned long long) * 8;
    //const float EPS = 1e-8;
    #define EPS 1e-8
    

    However, I met another problem

    iou3d.obj : error LNK2001: 无法解析的外部符号 "public: long * __cdecl at::Tensor::data<long>(void)const " (??$data@J@Tensor@at@@QEBAPEAJXZ)
    build\lib.win-amd64-3.6\iou3d_cuda.cp36-win_amd64.pyd : fatal error LNK1120: 1 个无法解析的外部命令
    error: command 'C:\\Program Files (x86)\\VC\\BIN\\x86_amd64\\link.exe' failed with exit status 1120
    

    Anyone know how to solve it?

    opened by lonely7yk 5
  • train_rcnn failure with a runtime error

    train_rcnn failure with a runtime error

    After finishing training for the first proposal generation stage, I am trying to train the RCNN stage by:

    python3 train_rcnn.py --cfg_file cfgs/default.yaml --batch_size 4 --train_mode rcnn --epochs 70 --ckpt_save_interval 2 --rpn_ckpt ../output/rpn/default/ckpt/checkpoint_epoch_200.pth

    It starts fine until hits this point: .... 2020-01-20 13:36:17,175 INFO Done: filter TRAIN results: 3265 / 3712

    2020-01-20 13:36:28,941 INFO ==> Loading part model from checkpoint '../output/rpn/default/ckpt/checkpoint_epoch_200.pth' 2020-01-20 13:36:29,446 INFO ==> Done (loaded 208/244) 2020-01-20 13:36:29,446 INFO Start training epochs: 0%| | 0/70 [00:06<?, ?it/s] Traceback (most recent call last):
    File "train_rcnn.py", line 250, in lr_scheduler_each_iter=(cfg.TRAIN.OPTIMIZER == 'adam_onecycle') File "/home/everett/DL/PointRCNN/tools/../tools/train_utils/train_utils.py", line 199, in train loss, tb_dict, disp_dict = self._train_it(batch) File "/home/everett/DL/PointRCNN/tools/../tools/train_utils/train_utils.py", line 134, in _train_it loss.backward() File "/home/everett/.local/lib/python3.6/site-packages/torch/tensor.py", line 195, in backward torch.autograd.backward(self, gradient, retain_graph, create_graph) File "/home/everett/.local/lib/python3.6/site-packages/torch/autograd/init.py", line 99, in backward allow_unreachable=True) # allow_unreachable flag RuntimeError: cuDNN error: CUDNN_STATUS_NOT_SUPPORTED. This error may appear if you passed in a non-contiguous input.

    Does it run out of GPU memory? I am using a 1080 TI with 11G. The OS is ubuntu 18.04 with numpy-1.18.1 pillow-7.0.0 six-1.14.0 torch-1.4.0 torchvision-0.5.0, cuda 10.1, nvidia-smi 430.50

    Please help. Thanks in advance.

    Everett

    opened by EverettWang 4
  • Assert error when training on the pseudo-lidar data

    Assert error when training on the pseudo-lidar data

    Thanks for your fantastic work. I've tried your pre-trained PointRCNN model on the pseudo-lidar data(Generate depth map by PSMNet and convert that into point cloud) of the KITTI dataset and got a pretty good result.

    Thus, I want to fine-tune the model on the pseudo-lidar dataset. However, there is an assert error during the training of the RCNN part.

    File "/home/haha/ObjectDetection/PointRCNN/tools/../lib/rpn/proposal_layer.py", line 92, in distance_based_proposal assert i == 2, '%d' % i AssertionError: 1

    It seems like that the RPN detects nothing even in the first ROI(Is this understanding correct?). Did anyone else meet this problem before?

    opened by zhyjiang 4
  • About the network output coordinate

    About the network output coordinate

    I have tried to looking into the origin output of the network, such as:

     input_data = {"pts_input": self.inputs}
     ret_dict = self.net(input_data)       
     roi_scores_raw = ret_dict['roi_scores_raw']
     roi_boxes3d = ret_dict['rois']     # (B, M, 7)
     seg_result = ret_dict['seg_result'].long()
    

    without nms-gpu or scores filter Visualization in ros rviz , the boundingbox position look really strange image Are the boxes in the kitti camera coordinate or in the lidar coordinate? hopefully for any advice @sshaoshuai

    opened by muzi2045 4
  • Cannot download calib file from KITTI

    Cannot download calib file from KITTI

    Hi everyone, there's a tiny problem that I cannot download CALIB file from KITTI. It seems something wrong with the download link KITTI sent to me. Could someone please send "Download camera calibration matrices of object data set (16 MB)" this file to my e-mail? Thanks a lot!

    My email: [email protected]

    Or please tell me how can I solve this download problem.

    opened by SkyeFromKindergarten 4
  • Segmentation fault (core dumped) when run quick demo

    Segmentation fault (core dumped) when run quick demo

    Hello, Thanks for the great work. When run quick demo, I met segmentation fault. I changed gcc version but it didn't work. I'm not sure what caused this error.

    /home/lih/project/PointRCNN/tools/../lib/config.py:187: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
      yaml_cfg = edict(yaml.load(f))
    2019-07-10 22:59:35,903   INFO  **********************Start logging**********************
    2019-07-10 22:59:35,903   INFO  cfg_file         cfgs/default.yaml
    2019-07-10 22:59:35,903   INFO  eval_mode        rcnn
    2019-07-10 22:59:35,903   INFO  eval_all         False
    2019-07-10 22:59:35,903   INFO  test             False
    2019-07-10 22:59:35,903   INFO  ckpt             PointRCNN.pth
    2019-07-10 22:59:35,903   INFO  rpn_ckpt         None
    2019-07-10 22:59:35,904   INFO  rcnn_ckpt        None
    2019-07-10 22:59:35,904   INFO  batch_size       1
    2019-07-10 22:59:35,904   INFO  workers          4
    2019-07-10 22:59:35,904   INFO  extra_tag        default
    2019-07-10 22:59:35,904   INFO  output_dir       None
    2019-07-10 22:59:35,904   INFO  ckpt_dir         None
    2019-07-10 22:59:35,904   INFO  save_result      False
    2019-07-10 22:59:35,904   INFO  save_rpn_feature False
    2019-07-10 22:59:35,904   INFO  random_select    True
    2019-07-10 22:59:35,904   INFO  start_epoch      0
    2019-07-10 22:59:35,904   INFO  rcnn_eval_roi_dir None
    2019-07-10 22:59:35,904   INFO  rcnn_eval_feature_dir None
    2019-07-10 22:59:35,904   INFO  set_cfgs         ['RPN.LOC_XZ_FINE', 'False']
    2019-07-10 22:59:35,904   INFO  cfg.TAG: default
    2019-07-10 22:59:35,904   INFO  cfg.CLASSES: Car
    2019-07-10 22:59:35,904   INFO  cfg.INCLUDE_SIMILAR_TYPE: True
    2019-07-10 22:59:35,904   INFO  cfg.AUG_DATA: True
    2019-07-10 22:59:35,904   INFO  cfg.AUG_METHOD_LIST: ['rotation', 'scaling', 'flip']
    2019-07-10 22:59:35,904   INFO  cfg.AUG_METHOD_PROB: [1.0, 1.0, 0.5]
    2019-07-10 22:59:35,904   INFO  cfg.AUG_ROT_RANGE: 18
    2019-07-10 22:59:35,905   INFO  cfg.GT_AUG_ENABLED: True
    2019-07-10 22:59:35,905   INFO  cfg.GT_EXTRA_NUM: 15
    2019-07-10 22:59:35,905   INFO  cfg.GT_AUG_RAND_NUM: True
    2019-07-10 22:59:35,905   INFO  cfg.GT_AUG_APPLY_PROB: 1.0
    2019-07-10 22:59:35,905   INFO  cfg.GT_AUG_HARD_RATIO: 0.6
    2019-07-10 22:59:35,905   INFO  cfg.PC_REDUCE_BY_RANGE: True
    2019-07-10 22:59:35,905   INFO  cfg.PC_AREA_SCOPE: [[-40.   40. ]
     [ -1.    3. ]
     [  0.   70.4]]
    2019-07-10 22:59:35,905   INFO  cfg.CLS_MEAN_SIZE: [[1.5256319 1.6285675 3.8831165]]
    2019-07-10 22:59:35,905   INFO  
    cfg.RPN = edict()
    2019-07-10 22:59:35,905   INFO  cfg.RPN.ENABLED: True
    2019-07-10 22:59:35,905   INFO  cfg.RPN.FIXED: True
    2019-07-10 22:59:35,905   INFO  cfg.RPN.USE_INTENSITY: False
    2019-07-10 22:59:35,905   INFO  cfg.RPN.LOC_XZ_FINE: False
    2019-07-10 22:59:35,906   INFO  cfg.RPN.LOC_SCOPE: 3.0
    2019-07-10 22:59:35,906   INFO  cfg.RPN.LOC_BIN_SIZE: 0.5
    2019-07-10 22:59:35,906   INFO  cfg.RPN.NUM_HEAD_BIN: 12
    2019-07-10 22:59:35,906   INFO  cfg.RPN.BACKBONE: pointnet2_msg
    2019-07-10 22:59:35,906   INFO  cfg.RPN.USE_BN: True
    2019-07-10 22:59:35,906   INFO  cfg.RPN.NUM_POINTS: 16384
    2019-07-10 22:59:35,906   INFO  
    cfg.RPN.SA_CONFIG = edict()
    2019-07-10 22:59:35,906   INFO  cfg.RPN.SA_CONFIG.NPOINTS: [4096, 1024, 256, 64]
    2019-07-10 22:59:35,906   INFO  cfg.RPN.SA_CONFIG.RADIUS: [[0.1, 0.5], [0.5, 1.0], [1.0, 2.0], [2.0, 4.0]]
    2019-07-10 22:59:35,906   INFO  cfg.RPN.SA_CONFIG.NSAMPLE: [[16, 32], [16, 32], [16, 32], [16, 32]]
    2019-07-10 22:59:35,906   INFO  cfg.RPN.SA_CONFIG.MLPS: [[[16, 16, 32], [32, 32, 64]], [[64, 64, 128], [64, 96, 128]], [[128, 196, 256], [128, 196, 256]], [[256, 256, 512], [256, 384, 512]]]
    2019-07-10 22:59:35,906   INFO  cfg.RPN.FP_MLPS: [[128, 128], [256, 256], [512, 512], [512, 512]]
    2019-07-10 22:59:35,906   INFO  cfg.RPN.CLS_FC: [128]
    2019-07-10 22:59:35,906   INFO  cfg.RPN.REG_FC: [128]
    2019-07-10 22:59:35,906   INFO  cfg.RPN.DP_RATIO: 0.5
    2019-07-10 22:59:35,906   INFO  cfg.RPN.LOSS_CLS: SigmoidFocalLoss
    2019-07-10 22:59:35,906   INFO  cfg.RPN.FG_WEIGHT: 15
    2019-07-10 22:59:35,906   INFO  cfg.RPN.FOCAL_ALPHA: [0.25, 0.75]
    2019-07-10 22:59:35,906   INFO  cfg.RPN.FOCAL_GAMMA: 2.0
    2019-07-10 22:59:35,906   INFO  cfg.RPN.REG_LOSS_WEIGHT: [1.0, 1.0, 1.0, 1.0]
    2019-07-10 22:59:35,907   INFO  cfg.RPN.LOSS_WEIGHT: [1.0, 1.0]
    2019-07-10 22:59:35,907   INFO  cfg.RPN.NMS_TYPE: normal
    2019-07-10 22:59:35,907   INFO  cfg.RPN.SCORE_THRESH: 0.3
    2019-07-10 22:59:35,907   INFO  
    cfg.RCNN = edict()
    2019-07-10 22:59:35,907   INFO  cfg.RCNN.ENABLED: True
    2019-07-10 22:59:35,907   INFO  cfg.RCNN.USE_RPN_FEATURES: True
    2019-07-10 22:59:35,907   INFO  cfg.RCNN.USE_MASK: True
    2019-07-10 22:59:35,907   INFO  cfg.RCNN.MASK_TYPE: seg
    2019-07-10 22:59:35,907   INFO  cfg.RCNN.USE_INTENSITY: False
    2019-07-10 22:59:35,907   INFO  cfg.RCNN.USE_DEPTH: True
    2019-07-10 22:59:35,907   INFO  cfg.RCNN.USE_SEG_SCORE: False
    2019-07-10 22:59:35,907   INFO  cfg.RCNN.ROI_SAMPLE_JIT: True
    2019-07-10 22:59:35,907   INFO  cfg.RCNN.ROI_FG_AUG_TIMES: 10
    2019-07-10 22:59:35,907   INFO  cfg.RCNN.REG_AUG_METHOD: multiple
    2019-07-10 22:59:35,907   INFO  cfg.RCNN.POOL_EXTRA_WIDTH: 1.0
    2019-07-10 22:59:35,907   INFO  cfg.RCNN.LOC_SCOPE: 1.5
    2019-07-10 22:59:35,907   INFO  cfg.RCNN.LOC_BIN_SIZE: 0.5
    2019-07-10 22:59:35,907   INFO  cfg.RCNN.NUM_HEAD_BIN: 9
    2019-07-10 22:59:35,907   INFO  cfg.RCNN.LOC_Y_BY_BIN: False
    2019-07-10 22:59:35,907   INFO  cfg.RCNN.LOC_Y_SCOPE: 0.5
    2019-07-10 22:59:35,907   INFO  cfg.RCNN.LOC_Y_BIN_SIZE: 0.25
    2019-07-10 22:59:35,908   INFO  cfg.RCNN.SIZE_RES_ON_ROI: False
    2019-07-10 22:59:35,908   INFO  cfg.RCNN.USE_BN: False
    2019-07-10 22:59:35,908   INFO  cfg.RCNN.DP_RATIO: 0.0
    2019-07-10 22:59:35,908   INFO  cfg.RCNN.BACKBONE: pointnet
    2019-07-10 22:59:35,908   INFO  cfg.RCNN.XYZ_UP_LAYER: [128, 128]
    2019-07-10 22:59:35,908   INFO  cfg.RCNN.NUM_POINTS: 512
    2019-07-10 22:59:35,908   INFO  
    cfg.RCNN.SA_CONFIG = edict()
    2019-07-10 22:59:35,908   INFO  cfg.RCNN.SA_CONFIG.NPOINTS: [128, 32, -1]
    2019-07-10 22:59:35,908   INFO  cfg.RCNN.SA_CONFIG.RADIUS: [0.2, 0.4, 100]
    2019-07-10 22:59:35,908   INFO  cfg.RCNN.SA_CONFIG.NSAMPLE: [64, 64, 64]
    2019-07-10 22:59:35,908   INFO  cfg.RCNN.SA_CONFIG.MLPS: [[128, 128, 128], [128, 128, 256], [256, 256, 512]]
    2019-07-10 22:59:35,908   INFO  cfg.RCNN.CLS_FC: [256, 256]
    2019-07-10 22:59:35,908   INFO  cfg.RCNN.REG_FC: [256, 256]
    2019-07-10 22:59:35,908   INFO  cfg.RCNN.LOSS_CLS: BinaryCrossEntropy
    2019-07-10 22:59:35,908   INFO  cfg.RCNN.FOCAL_ALPHA: [0.25, 0.75]
    2019-07-10 22:59:35,908   INFO  cfg.RCNN.FOCAL_GAMMA: 2.0
    2019-07-10 22:59:35,908   INFO  cfg.RCNN.CLS_WEIGHT: [1. 1. 1.]
    2019-07-10 22:59:35,908   INFO  cfg.RCNN.CLS_FG_THRESH: 0.6
    2019-07-10 22:59:35,909   INFO  cfg.RCNN.CLS_BG_THRESH: 0.45
    2019-07-10 22:59:35,909   INFO  cfg.RCNN.CLS_BG_THRESH_LO: 0.05
    2019-07-10 22:59:35,909   INFO  cfg.RCNN.REG_FG_THRESH: 0.55
    2019-07-10 22:59:35,909   INFO  cfg.RCNN.FG_RATIO: 0.5
    2019-07-10 22:59:35,909   INFO  cfg.RCNN.ROI_PER_IMAGE: 64
    2019-07-10 22:59:35,909   INFO  cfg.RCNN.HARD_BG_RATIO: 0.8
    2019-07-10 22:59:35,909   INFO  cfg.RCNN.SCORE_THRESH: 0.3
    2019-07-10 22:59:35,909   INFO  cfg.RCNN.NMS_THRESH: 0.1
    2019-07-10 22:59:35,909   INFO  
    cfg.TRAIN = edict()
    2019-07-10 22:59:35,909   INFO  cfg.TRAIN.SPLIT: train
    2019-07-10 22:59:35,909   INFO  cfg.TRAIN.VAL_SPLIT: smallval
    2019-07-10 22:59:35,909   INFO  cfg.TRAIN.LR: 0.002
    2019-07-10 22:59:35,909   INFO  cfg.TRAIN.LR_CLIP: 1e-05
    2019-07-10 22:59:35,909   INFO  cfg.TRAIN.LR_DECAY: 0.5
    2019-07-10 22:59:35,909   INFO  cfg.TRAIN.DECAY_STEP_LIST: [100, 150, 180, 200]
    2019-07-10 22:59:35,909   INFO  cfg.TRAIN.LR_WARMUP: True
    2019-07-10 22:59:35,909   INFO  cfg.TRAIN.WARMUP_MIN: 0.0002
    2019-07-10 22:59:35,909   INFO  cfg.TRAIN.WARMUP_EPOCH: 1
    2019-07-10 22:59:35,909   INFO  cfg.TRAIN.BN_MOMENTUM: 0.1
    2019-07-10 22:59:35,909   INFO  cfg.TRAIN.BN_DECAY: 0.5
    2019-07-10 22:59:35,909   INFO  cfg.TRAIN.BNM_CLIP: 0.01
    2019-07-10 22:59:35,910   INFO  cfg.TRAIN.BN_DECAY_STEP_LIST: [1000]
    2019-07-10 22:59:35,910   INFO  cfg.TRAIN.OPTIMIZER: adam_onecycle
    2019-07-10 22:59:35,910   INFO  cfg.TRAIN.WEIGHT_DECAY: 0.001
    2019-07-10 22:59:35,910   INFO  cfg.TRAIN.MOMENTUM: 0.9
    2019-07-10 22:59:35,910   INFO  cfg.TRAIN.MOMS: [0.95, 0.85]
    2019-07-10 22:59:35,910   INFO  cfg.TRAIN.DIV_FACTOR: 10.0
    2019-07-10 22:59:35,910   INFO  cfg.TRAIN.PCT_START: 0.4
    2019-07-10 22:59:35,910   INFO  cfg.TRAIN.GRAD_NORM_CLIP: 1.0
    2019-07-10 22:59:35,910   INFO  cfg.TRAIN.RPN_PRE_NMS_TOP_N: 9000
    2019-07-10 22:59:35,910   INFO  cfg.TRAIN.RPN_POST_NMS_TOP_N: 512
    2019-07-10 22:59:35,910   INFO  cfg.TRAIN.RPN_NMS_THRESH: 0.85
    2019-07-10 22:59:35,910   INFO  cfg.TRAIN.RPN_DISTANCE_BASED_PROPOSE: True
    2019-07-10 22:59:35,910   INFO  
    cfg.TEST = edict()
    2019-07-10 22:59:35,910   INFO  cfg.TEST.SPLIT: val
    2019-07-10 22:59:35,910   INFO  cfg.TEST.RPN_PRE_NMS_TOP_N: 9000
    2019-07-10 22:59:35,910   INFO  cfg.TEST.RPN_POST_NMS_TOP_N: 100
    2019-07-10 22:59:35,910   INFO  cfg.TEST.RPN_NMS_THRESH: 0.8
    2019-07-10 22:59:35,910   INFO  cfg.TEST.RPN_DISTANCE_BASED_PROPOSE: True
    2019-07-10 22:59:35,912   INFO  Load testing samples from ../data/KITTI/object/training
    2019-07-10 22:59:35,912   INFO  Done: total test samples 3769
    2019-07-10 22:59:37,661   INFO  ==> Loading from checkpoint 'PointRCNN.pth'
    2019-07-10 22:59:37,713   INFO  ==> Done
    2019-07-10 22:59:37,714   INFO  ---- EPOCH no_number JOINT EVALUATION ----
    2019-07-10 22:59:37,714   INFO  ==> Output file: ../output/rcnn/default/eval/epoch_no_number/val
    eval:   0%|                                            | 0/3769 [00:00<?, ?it/s]Segmentation fault (core dumped)
    
    
    opened by lih627 4
  • Problem with installation

    Problem with installation

    Whenever i wish to compile the bash script to install the roi3dpool etc packages i get the error that gcc has failed with exit code 1. I checked some pointrcnn files to which they said that this is being caused due to deprecation of certain cpp packages. Is there any hack to get it to work on ubuntu 20.04, gcc-9 and cuda 11.2?

    opened by shayari21 0
  • Use the point cloud frame generated by Carla for prediction and training

    Use the point cloud frame generated by Carla for prediction and training

    Hi Shaoshuai:

    First of all thank you very much for your contribution, this code is very powerful.

    I am recently trying to use PointRCNN to predict the lidar point cloud frame generated by Carla, but the results are not good. I guess the frame generated by Carla is different from KITTI (I used KITTI to reproduce the results successfully)

    So I tried to collect the dataset (KITTI-format) in Carla for PointRCNN training (rpn+rcnn), but I trained according to the default parameters and found that the result is still not ideal, I would like to ask the point cloud frame Does intensity matter? Because the intensity in Carla only refers to the distance, it is not real.

    Here is the result of the Carla dataset: Car [email protected], 0.70, 0.70: bbox AP:34.6747, 31.2628, 31.0747 bev AP:16.8469, 15.9205, 17.7584 3d AP:13.8553, 12.0301, 14.5156 aos AP:25.04, 23.67, 23.37 Car [email protected], 0.50, 0.50: bbox AP:34.6747, 31.2628, 31.0747 bev AP:51.1212, 42.6968, 43.5934 3d AP:48.2478, 35.7272, 36.8692 aos AP:25.04, 23.67, 23.37

    Looking forward to your reply, thanks!

    opened by S-kewen 0
  • RuntimeError with customized loss while running loss.backward()

    RuntimeError with customized loss while running loss.backward()

    I wrote a simple loss function in {eval_rcnn.py → eval_one_epoch_joint() → for loop (for data in dataloader: ...)}. I have enabled all gradient propagation by replacing "torch.no_grad()" with "torch.set_grad_enabled(True)" and set "inputs.requires_grad = True". Here is the use of my loss:

        Z_rcnn_t = rcnn_cls.float()
        loss_adv_cls = - Z_rcnn_t.sum()
        model.zero_grad()
        loss_adv_cls.backward()
    

    The ".backward()" end up with a Runtime Error:

    File "/home/jqwu/Codes/PointRCNN/tools/simple_attack.py", line 974, in eval_single_ckpt(root_result_dir) File "/home/jqwu/Codes/PointRCNN/tools/simple_attack.py", line 832, in eval_single_ckpt eval_one_epoch(model, test_loader, epoch_id, root_result_dir, logger) File "/home/jqwu/Codes/PointRCNN/tools/simple_attack.py", line 759, in eval_one_epoch ret_dict = eval_one_epoch_joint(model, dataloader, epoch_id, result_dir, logger) File "/home/jqwu/Codes/PointRCNN/tools/simple_attack.py", line 580, in eval_one_epoch_joint loss_adv_cls.backward() File "/home/jqwu/.conda/envs/PointRCNN-py37/lib/python3.7/site-packages/torch/tensor.py", line 195, in backward torch.autograd.backward(self, gradient, retain_graph, create_graph) File "/home/jqwu/.conda/envs/PointRCNN-py37/lib/python3.7/site-packages/torch/autograd/init.py", line 99, in backward allow_unreachable=True) # allow_unreachable flag RuntimeError: Expected isFloatingType(grads[i].type().scalarType()) to be true, but got false. (Could this error message be improved? If so, please report an enhancement request to PyTorch.)

    I have tried the following solutions, but they didn't work in my case:

    https://github.com/qiqihaer/votenet-kitti/issues/5 https://github.com/HaozheQi/P2B/issues/8

    I am using CUDA 10.1, torch 1.4, python 3.7. I have spent a lot of time on this. Anyone has solved a similar problem? 😿

    opened by nowangry 2
  • What't the function of 'images' in training model using PointRCNN?

    What't the function of 'images' in training model using PointRCNN?

    Hello, here I want to train a model using PointRCNN but I only have pointclouds and labels files. And I occured this while training:

    2022-04-25 12:35:12,630   INFO  **********************Start training**********************
    epochs:   0%|                                           | 0/10 [00:01<?, ?it/s]
    train:   0%|                                            | 0/26 [00:00<?, ?it/sTraceback (most recent call last):                                              
      File "train_rcnn.py", line 243, in <module>
        trainer.train(
    
        assert os.path.exists(img_file)
    AssertionError
    

    Is anyone could tell me why images dataset is required during this process? What's more, 'calib' file is also necessary for training but why? PointRCNN train models using only pointcloud data, right?

    opened by OrangeSodahub 0
Owner
Shaoshuai Shi
Ph.D @ MMLab-CUHK
Shaoshuai Shi
Point Cloud Denoising input segmentation output raw point-cloud valid/clear fog rain de-noised Abstract Lidar sensors are frequently used in environme

Point Cloud Denoising input segmentation output raw point-cloud valid/clear fog rain de-noised Abstract Lidar sensors are frequently used in environme

null 75 Nov 24, 2022
Style-based Point Generator with Adversarial Rendering for Point Cloud Completion (CVPR 2021)

Style-based Point Generator with Adversarial Rendering for Point Cloud Completion (CVPR 2021) An efficient PyTorch library for Point Cloud Completion.

Microsoft 119 Jan 2, 2023
Investigating Attention Mechanism in 3D Point Cloud Object Detection (arXiv 2021)

Investigating Attention Mechanism in 3D Point Cloud Object Detection (arXiv 2021) This repository is for the following paper: "Investigating Attention

null 52 Nov 19, 2022
Part-Aware Data Augmentation for 3D Object Detection in Point Cloud

Part-Aware Data Augmentation for 3D Object Detection in Point Cloud This repository contains a reference implementation of our Part-Aware Data Augment

Jaeseok Choi 62 Jan 3, 2023
3D cascade RCNN for object detection on point cloud

3D Cascade RCNN This is the implementation of 3D Cascade RCNN: High Quality Object Detection in Point Clouds. We designed a 3D object detection model

Qi Cai 22 Dec 2, 2022
Weakly Supervised 3D Object Detection from Point Cloud with Only Image Level Annotation

SCCKTIM Weakly Supervised 3D Object Detection from Point Cloud with Only Image-Level Annotation Our code will be available soon. The class knowledge t

null 1 Nov 12, 2021
A pytorch-version implementation codes of paper: "BSN++: Complementary Boundary Regressor with Scale-Balanced Relation Modeling for Temporal Action Proposal Generation"

BSN++: Complementary Boundary Regressor with Scale-Balanced Relation Modeling for Temporal Action Proposal Generation A pytorch-version implementation

null 11 Oct 8, 2022
Implementation of the "PSTNet: Point Spatio-Temporal Convolution on Point Cloud Sequences" paper.

PSTNet: Point Spatio-Temporal Convolution on Point Cloud Sequences Introduction Point cloud sequences are irregular and unordered in the spatial dimen

Hehe Fan 63 Dec 9, 2022
Implementation of the "Point 4D Transformer Networks for Spatio-Temporal Modeling in Point Cloud Videos" paper.

Point 4D Transformer Networks for Spatio-Temporal Modeling in Point Cloud Videos Introduction Point cloud videos exhibit irregularities and lack of or

Hehe Fan 101 Dec 29, 2022
Synthetic LiDAR sequential point cloud dataset with point-wise annotations

SynLiDAR dataset: Learning From Synthetic LiDAR Sequential Point Cloud This is official repository of the SynLiDAR dataset. For technical details, ple

null 78 Dec 27, 2022
[ICCV 2021 Oral] SnowflakeNet: Point Cloud Completion by Snowflake Point Deconvolution with Skip-Transformer

This repository contains the source code for the paper SnowflakeNet: Point Cloud Completion by Snowflake Point Deconvolution with Skip-Transformer (ICCV 2021 Oral). The project page is here.

AllenXiang 65 Dec 26, 2022
(CVPR 2021) Back-tracing Representative Points for Voting-based 3D Object Detection in Point Clouds

BRNet Introduction This is a release of the code of our paper Back-tracing Representative Points for Voting-based 3D Object Detection in Point Clouds,

null 86 Oct 5, 2022
Voxel Set Transformer: A Set-to-Set Approach to 3D Object Detection from Point Clouds (CVPR 2022)

Voxel Set Transformer: A Set-to-Set Approach to 3D Object Detection from Point Clouds (CVPR2022)[paper] Authors: Chenhang He, Ruihuang Li, Shuai Li, L

Billy HE 141 Dec 30, 2022
Semantic Segmentation for Real Point Cloud Scenes via Bilateral Augmentation and Adaptive Fusion (CVPR 2021)

Semantic Segmentation for Real Point Cloud Scenes via Bilateral Augmentation and Adaptive Fusion (CVPR 2021) This repository is for BAAF-Net introduce

null 90 Dec 29, 2022
Code for "PV-RAFT: Point-Voxel Correlation Fields for Scene Flow Estimation of Point Clouds", CVPR 2021

PV-RAFT This repository contains the PyTorch implementation for paper "PV-RAFT: Point-Voxel Correlation Fields for Scene Flow Estimation of Point Clou

Yi Wei 43 Dec 5, 2022
Not All Points Are Equal: Learning Highly Efficient Point-based Detectors for 3D LiDAR Point Clouds (CVPR 2022, Oral)

Not All Points Are Equal: Learning Highly Efficient Point-based Detectors for 3D LiDAR Point Clouds (CVPR 2022, Oral) This is the official implementat

Yifan Zhang 259 Dec 25, 2022
[CVPR 2021] Few-shot 3D Point Cloud Semantic Segmentation

Few-shot 3D Point Cloud Semantic Segmentation Created by Na Zhao from National University of Singapore Introduction This repository contains the PyTor

null 117 Dec 27, 2022
PointNetVLAD: Deep Point Cloud Based Retrieval for Large-Scale Place Recognition, CVPR 2018

PointNetVLAD: Deep Point Cloud Based Retrieval for Large-Scale Place Recognition PointNetVLAD: Deep Point Cloud Based Retrieval for Large-Scale Place

Mikaela Uy 294 Dec 12, 2022
Stratified Transformer for 3D Point Cloud Segmentation (CVPR 2022)

Stratified Transformer for 3D Point Cloud Segmentation Xin Lai*, Jianhui Liu*, Li Jiang, Liwei Wang, Hengshuang Zhao, Shu Liu, Xiaojuan Qi, Jiaya Jia

DV Lab 195 Jan 1, 2023