复现PointRCNN

环境要求
~/work/object_detection/PointRCNN-master/
https://github.com/sshaoshuai/PointRCNN

conda activate pointrcnn

Linux (tested on Ubuntu 14.04/16.04)
Python 3.6
PyTorch 1.0
依赖包easydict 、tqdm、tensorboardX 、fire、numba、pyyaml、scikit-image 、shapely

conda install pytorch==1.0.0 torchvision==0.2.1 cuda100 -c pytorch
pip install easydict
pip install tqdm
pip insatll tensorboardX 
pip install fire
pip install numba
pip install pyyaml
pip install scikit-image 
pip install shapely

mkl2018

conda install mkl=2018 -c anaconda

下载后pointnet2后
sh build_and_install.sh

ln -s (PointPillars数据集的路径) object

https://drive.google.com/file/d/1aapMXBkSn5c5hNTDdRNI74Ptxfny7PuC/view?usp=sharing
save at tools

in tools floder

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

question2

AttributeError: ‘version_info’ object has no attribute ‘version

先卸载原有包:pip uninstall pyparsing
再安装指定包:pip install pyparsing==2.4.7

question3

TypeError: load() missing 1 required positional argument: ‘Loader’

pip install pyyaml==5.4.1

question 4

AssertionError: type does not match original type

question 5

/home/siat/Downloads/ENTER/envs/pointrcnn2/lib/python3.6/site-packages/numba/cuda/envvars.py:17: NumbaWarning:
Environment variables with the ‘NUMBAPRO’ prefix are deprecated and consequently ignored, found use of NUMBAPRO_CUDA_DRIVER=/usr/lib/x86_64-linux-gnu/libcuda.so.

For more information about alternatives visit: (‘https://numba.pydata.org/numba-doc/latest/cuda/overview.html’, ‘#cudatoolkit-lookup’)
warnings.warn(errors.NumbaWarning(msg))
/home/siat/Downloads/ENTER/envs/pointrcnn2/lib/python3.6/site-packages/numba/cuda/envvars.py:17: NumbaWarning:
Environment variables with the ‘NUMBAPRO’ prefix are deprecated and consequently ignored, found use of NUMBAPRO_NVVM=/usr/local/cuda-11.4/nvvm/lib64/libnvvm.so.

For more information about alternatives visit: (‘https://numba.pydata.org/numba-doc/latest/cuda/overview.html’, ‘#cudatoolkit-lookup’)
warnings.warn(errors.NumbaWarning(msg))
/home/siat/Downloads/ENTER/envs/pointrcnn2/lib/python3.6/site-packages/numba/cuda/envvars.py:17: NumbaWarning:
Environment variables with the ‘NUMBAPRO’ prefix are deprecated and consequently ignored, found use of NUMBAPRO_LIBDEVICE=/usr/local/cuda-11.4/nvvm/libdevice.

For more information about alternatives visit: (‘https://numba.pydata.org/numba-doc/latest/cuda/overview.html’, ‘#cudatoolkit-lookup’)
warnings.warn(errors.NumbaWarning(msg))
/home/siat/work/object_detection/PointRCNN-master/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))
Traceback (most recent call last):
File “eval_rcnn.py”, line 867, in
cfg_from_list(args.set_cfgs)
File “/home/siat/work/object_detection/PointRCNN-master/tools/…/lib/config.py”, line 240, in cfg_from_list
‘type {} does not match original type {}’.format(type(value), type(d[subkey]))
AssertionError: type does not match original type

yaml.load(input, Loader=yaml.FullLoader)

question1

2023-03-07 14:43:40,008 INFO ==> Output file: …/output/rcnn/default/eval/epoch_no_number/val
eval: 0%| | 0/3769 [00:00 File “eval_rcnn.py”, line 902, in
eval_single_ckpt(root_result_dir)
File “eval_rcnn.py”, line 765, in eval_single_ckpt
eval_one_epoch(model, test_loader, epoch_id, root_result_dir, logger)
File “eval_rcnn.py”, line 692, in eval_one_epoch
ret_dict = eval_one_epoch_joint(model, dataloader, epoch_id, result_dir, logger)
File “eval_rcnn.py”, line 495, in eval_one_epoch_joint
ret_dict = model(input_data)
File “/home/siat/Downloads/ENTER/envs/pointrcnn/lib/python3.7/site-packages/torch/nn/modules/module.py”, line 489, in call
result = self.forward(*input, **kwargs)
File “/home/siat/work/object_detection/PointRCNN-master/tools/…/lib/net/point_rcnn.py”, line 62, in forward
rcnn_output = self.rcnn_net(rcnn_input_info)
File “/home/siat/Downloads/ENTER/envs/pointrcnn/lib/python3.7/site-packages/torch/nn/modules/module.py”, line 489, in call
result = self.forward(*input, **kwargs)
File “/home/siat/work/object_detection/PointRCNN-master/tools/…/lib/net/rcnn_net.py”, line 152, in forward
batch_rois[k, :, 6])
File “/home/siat/work/object_detection/PointRCNN-master/tools/…/lib/utils/kitti_utils.py”, line 61, in rotate_pc_along_y_torch
pc[:, :, [0, 2]] = torch.matmul(pc_temp, R.permute(0, 2, 1)) # (N, 512, 2)
RuntimeError: cublas runtime error : the GPU program failed to execute at /opt/conda/conda-bld/pytorch_1544202130060/work/aten/src/THC/THCBlas.cu:441

pip install torch===1.7.1+cu110 torchvision===0.8.2+cu110 torchaudio===0.7.2 -f https://download.pytorch.org/whl/torch_stable.html -i https://pypi.douban.com/simple/

question7

(pointrcnn2) siat@siat-Precision-3640-Tower:~/work/object_detection/PointRCNN-master/tools$ python eval_rcnn.py --cfg_file cfgs/default.yaml --ckpt PointRCNN.pth --batch_size 4 --eval_mode rcnn --set RPN.LOC_XZ_FINE false
/home/siat/Downloads/ENTER/envs/pointrcnn2/lib/python3.6/site-packages/numba/cuda/envvars.py:17: NumbaWarning:
Environment variables with the ‘NUMBAPRO’ prefix are deprecated and consequently ignored, found use of NUMBAPRO_CUDA_DRIVER=/usr/lib/x86_64-linux-gnu/libcuda.so.

For more information about alternatives visit: (‘https://numba.pydata.org/numba-doc/latest/cuda/overview.html’, ‘#cudatoolkit-lookup’)
warnings.warn(errors.NumbaWarning(msg))
/home/siat/Downloads/ENTER/envs/pointrcnn2/lib/python3.6/site-packages/numba/cuda/envvars.py:17: NumbaWarning:
Environment variables with the ‘NUMBAPRO’ prefix are deprecated and consequently ignored, found use of NUMBAPRO_NVVM=/usr/local/cuda-11.4/nvvm/lib64/libnvvm.so.

For more information about alternatives visit: (‘https://numba.pydata.org/numba-doc/latest/cuda/overview.html’, ‘#cudatoolkit-lookup’)
warnings.warn(errors.NumbaWarning(msg))
/home/siat/Downloads/ENTER/envs/pointrcnn2/lib/python3.6/site-packages/numba/cuda/envvars.py:17: NumbaWarning:
Environment variables with the ‘NUMBAPRO’ prefix are deprecated and consequently ignored, found use of NUMBAPRO_LIBDEVICE=/usr/local/cuda-11.4/nvvm/libdevice.

For more information about alternatives visit: (‘https://numba.pydata.org/numba-doc/latest/cuda/overview.html’, ‘#cudatoolkit-lookup’)
warnings.warn(errors.NumbaWarning(msg))
Traceback (most recent call last):
File “eval_rcnn.py”, line 867, in
cfg_from_list(args.set_cfgs)
File “/home/siat/work/object_detection/PointRCNN-master/tools/…/lib/config.py”, line 240, in cfg_from_list
‘type {} does not match original type {}’.format(type(value), type(d[subkey]))
AssertionError: type does not match original type

chognxinpeihuanjing

pytorch 1.8.0 torchvision 0.9.0 cuda 11.1

conda install pytorch==1.8.0 torchvision==0.9.0 torchaudio==0.8.0 cudatoolkit=11.1 -c pytorch -c conda-forge

ok run!!!
复现PointRCNN_第1张图片
检测结果放在以下路径下:

PointRCNN/output/rcnn/default/eval/epoch_no_number/val/final_result/

reference:
https://blog.csdn.net/Callme_TeacherPi/article/details/125963061

你可能感兴趣的:(object,detection,python,深度学习,开发语言)