open-mmlab / mmdetection3d

OpenMMLab's next-generation platform for general 3D object detection.
https://mmdetection3d.readthedocs.io/en/latest/
Apache License 2.0
5.36k stars 1.55k forks source link

How to perform PointPillars with my own point cloud? #364

Closed minghaohsu410168 closed 3 years ago

minghaohsu410168 commented 3 years ago

Hello every one : I'm a newer learning 3d object detection, i have tried using the pre-trained pointpillars model and it is done.

python demo/pcd_demo.py demo/kitti_000008.bin configs/pointpillars/hv_pointpillars_secfpn_6x8_160e_kitti-3d-3class.py checkpoints/hv_pointpillars_secfpn_6x8_160e_kitti-3d-3class_20200620_230421-aa0f3adb.pth 

but how can i implement the model in real time data, i have a VLP-16 LiDAR. I have tried this, the original1.bin is convert form my VLP-16 LiDAR.

python demo/pcd_demo.py demo/original1.bin configs/pointpillars/hv_pointpillars_secfpn_6x8_160e_kitti-3d-3class.py checkpoints/hv_pointpillars_secfpn_6x8_160e_kitti-3d-3class_20200620_230421-aa0f3adb.pth 

and it got the RuntimeError: CUDA error: invalid configuration argument

Traceback (most recent call last):
  File "demo/pcd_demo.py", line 28, in <module>
    main()
  File "demo/pcd_demo.py", line 22, in main
    result, data = inference_detector(model, args.pcd)
  File "/home/mh/Desktop/model/mmdetection3d/mmdet3d/apis/inference.py", line 85, in inference_detector
    result = model(return_loss=False, rescale=True, **data)
  File "/home/mh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/nn/modules/module.py", line 550, in __call__
    result = self.forward(*input, **kwargs)
  File "/home/mh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/mmcv/runner/fp16_utils.py", line 84, in new_func
    return old_func(*args, **kwargs)
  File "/home/mh/Desktop/model/mmdetection3d/mmdet3d/models/detectors/base.py", line 60, in forward
    return self.forward_test(**kwargs)
  File "/home/mh/Desktop/model/mmdetection3d/mmdet3d/models/detectors/base.py", line 41, in forward_test
    return self.simple_test(points[0], img_metas[0], img[0], **kwargs)
  File "/home/mh/Desktop/model/mmdetection3d/mmdet3d/models/detectors/voxelnet.py", line 98, in simple_test
    x = self.extract_feat(points, img_metas)
  File "/home/mh/Desktop/model/mmdetection3d/mmdet3d/models/detectors/voxelnet.py", line 40, in extract_feat
    voxels, num_points, coors = self.voxelize(points)
  File "/home/mh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/autograd/grad_mode.py", line 15, in decorate_context
    return func(*args, **kwargs)
  File "/home/mh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/mmcv/runner/fp16_utils.py", line 164, in new_func
    return old_func(*args, **kwargs)
  File "/home/mh/Desktop/model/mmdetection3d/mmdet3d/models/detectors/voxelnet.py", line 55, in voxelize
    res_voxels, res_coors, res_num_points = self.voxel_layer(res)
  File "/home/mh/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/torch/nn/modules/module.py", line 550, in __call__
    result = self.forward(*input, **kwargs)
  File "/home/mh/Desktop/model/mmdetection3d/mmdet3d/ops/voxel/voxelize.py", line 113, in forward
    self.max_num_points, max_voxels)
  File "/home/mh/Desktop/model/mmdetection3d/mmdet3d/ops/voxel/voxelize.py", line 53, in forward
    coors_range, max_points, max_voxels, 3)
RuntimeError: CUDA error: invalid configuration argument

Please give me some advise, thank you very much.

ZwwWayne commented 3 years ago

How many dimensions in your point cloud data? The default setting is 4.

minghaohsu410168 commented 3 years ago

I think i convert the error .bin file, it is no data in the file.

clytze0216 commented 3 years ago

hi .I met the same error. but I read the .bin file .It isnot empty. Could you tell me how you sovle it? Thank you very much