-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dynamic Voxelization on NuScenes #135
Comments
Have you ever tried to run the original config (hard voxelization version)? In addition, did you refer to the configs in the |
The config is here.
|
I investigated, but the reason for the error may be out of memory. |
Yes, but there is also a minor bug in your config. Since you change the voxel size and point cloud range, you need to modify the BTW, I think the voxel size does not need to be so large if you just want to make it use less memory. For example, I guess [0.4, 0.4, 6] should be enough. |
I tried to change the config and then another error was occured.
2020-09-29 16:38:45,661 - mmdet - INFO - Start running, host: shigenaka@7ad97b789b1e, work_dir: /home/shigenaka/workspace/mmdetection3d/work_dirs/dv_pointpillars_fpn_sbn-all_4x8_2x_nus-3d Aborted (core dumped) |
Please remember to change the range for anchors when the point cloud range is modified. In addition, the point cloud range in the dataset and model config should be both modified correspondingly. |
Thank you for your help. And the problem was solved after modifying the voxel size and sweeps_num to fit in memory capacity. |
* Add tests * lint * add data * Remove redundant code
Describe the bug
I have changed the voxelization method in pointpillars/hv_pointpillars_fpn_sbn-all_4x8_2x_nus-3d.py from hard voxelization into dynamic voxelization.
Then an illegal memory access error was occurred.
Does the dynamic voxelization support nuscenes dataset?
Reproduction
What command or script did you run?
python ./tools/train.py ./configs/dynamic_voxelization/dv_pointpillars_fpn_sbn-all_4x8_2x_nus-3d.py
Did you make any modifications on the code or config? Did you understand what you have modified?
dv_pointpillars_fpn_sbn-all_4x8_2x_nus-3d.py was made based on pointpillars/hv_pointpillars_fpn_sbn-all_4x8_2x_nus-3d.py.
The type of model was changed from MVXFasterRCNN to DynamicMVXFasterRCNN and the type of pts_voxel_encoder was changed from HardVFE to DynamicVFE.
What dataset did you use?
NuScenes dataset.
Environment
TorchVision: 0.7.0
OpenCV: 4.4.0
MMCV: 1.1.3
MMCV Compiler: GCC 7.3
MMCV CUDA Compiler: 10.1
MMDetection: 2.4.0
MMDetection3D: 0.6.0+30cec23
Error traceback
Traceback (most recent call last):
File "./tools/train.py", line 166, in
main()
File "./tools/train.py", line 162, in main
meta=meta)
File "/opt/conda/lib/python3.6/site-packages/mmdet/apis/train.py", line 143, in train_detector
runner.run(data_loaders, cfg.workflow, cfg.total_epochs)
File "/opt/conda/lib/python3.6/site-packages/mmcv/runner/epoch_based_runner.py", line 125, in run
epoch_runner(data_loaders[i], **kwargs)
File "/opt/conda/lib/python3.6/site-packages/mmcv/runner/epoch_based_runner.py", line 34, in train
**kwargs)
File "/opt/conda/lib/python3.6/site-packages/mmcv/parallel/data_parallel.py", line 67, in train_step
return self.module.train_step(*inputs[0], **kwargs[0])
File "/opt/conda/lib/python3.6/site-packages/mmdet/models/detectors/base.py", line 234, in train_step
losses = self(**data)
File "/opt/conda/lib/python3.6/site-packages/torch/nn/modules/module.py", line 722, in _call_impl
result = self.forward(*input, **kwargs)
File "/home/shigenaka/workspace/mmdetection3d/mmdet3d/models/detectors/base.py", line 57, in forward
return self.forward_train(**kwargs)
File "/home/shigenaka/workspace/mmdetection3d/mmdet3d/models/detectors/mvx_two_stage.py", line 267, in forward_train
points, img=img, img_metas=img_metas)
File "/home/shigenaka/workspace/mmdetection3d/mmdet3d/models/detectors/mvx_two_stage.py", line 202, in extract_feat
pts_feats = self.extract_pts_feat(points, img_feats, img_metas)
File "/home/shigenaka/workspace/mmdetection3d/mmdet3d/models/detectors/mvx_faster_rcnn.py", line 52, in extract_pts_feat
voxels, coors, points, img_feats, img_metas)
File "/opt/conda/lib/python3.6/site-packages/torch/nn/modules/module.py", line 722, in _call_impl
result = self.forward(*input, **kwargs)
File "/home/shigenaka/workspace/mmdetection3d/mmdet3d/models/voxel_encoders/voxel_encoder.py", line 267, in forward
voxel_feats, voxel_coors = self.vfe_scatter(point_feats, coors)
File "/opt/conda/lib/python3.6/site-packages/torch/nn/modules/module.py", line 722, in _call_impl
result = self.forward(*input, *kwargs)
File "/home/shigenaka/workspace/mmdetection3d/mmdet3d/ops/voxel/scatter_points.py", line 113, in forward
points[inds], coors[inds][:, 1:])
File "/home/shigenaka/workspace/mmdetection3d/mmdet3d/ops/voxel/scatter_points.py", line 92, in forward_single
self.point_cloud_range)
File "/home/shigenaka/workspace/mmdetection3d/mmdet3d/ops/voxel/scatter_points.py", line 38, in forward
coors_range)
RuntimeError: CUDA error: an illegal memory access was encountered
terminate called after throwing an instance of 'c10::Error'
what(): CUDA error: an illegal memory access was encountered
Exception raised from create_event_internal at /opt/conda/conda-bld/pytorch_1595629416375/work/c10/cuda/CUDACachingAllocator.cpp:687 (most recent call first):
frame #0: c10::Error::Error(c10::SourceLocation, std::string) + 0x4d (0x7f073c9ca77d in /opt/conda/lib/python3.6/site-packages/torch/lib/libc10.so)
frame #1: c10::cuda::CUDACachingAllocator::raw_delete(void) + 0xb5d (0x7f073cc1ad9d in /opt/conda/lib/python3.6/site-packages/torch/lib/libc10_cuda.so)
frame #2: c10::TensorImpl::release_resources() + 0x4d (0x7f073c9b6b1d in /opt/conda/lib/python3.6/site-packages/torch/lib/libc10.so)
frame #3: + 0x53e7fa (0x7f077624c7fa in /opt/conda/lib/python3.6/site-packages/torch/lib/libtorch_python.so)
frame #22: __libc_start_main + 0xf0 (0x7f079acc0830 in /lib/x86_64-linux-gnu/libc.so.6)
Aborted (core dumped)
The text was updated successfully, but these errors were encountered: