【段错误(核心已转储)——运行PV-RCNN代码 python demo.py】

段错误(核心已转储)——运行PV-RCNN代码 python demo. py :

废话不多说,直接写问题


问题描述:在跑pvrcnn demo时候的 ——段错误(核心已转储)

(pcdet) auto@auto-System-Product-Name:~/OpenPCDet/tools$ python demo.py --cfg_file cfgs/kitti_models/pv_rcnn.yaml --ckpt pv_rcnn_8369.pth --data_path ../data/kitti/testing/velodyne/000008.bin 
2022-03-06 21:32:26,628   INFO  -----------------Quick Demo of OpenPCDet-------------------------
2022-03-06 21:32:26,628   INFO  Total number of samples:        1
/home/auto/anaconda3/envs/pcdet/lib/python3.7/site-packages/torch/functional.py:445: UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing argument. (Triggered internally at  ../aten/src/ATen/native/TensorShape.cpp:2157.)
  return _VF.meshgrid(tensors, **kwargs)  # type: ignore[attr-defined]
2022-03-06 21:32:29,122   INFO  ==> Loading parameters from checkpoint pv_rcnn_8369.pth to CPU
2022-03-06 21:32:29,154   INFO  ==> Done (loaded 367/367)
2022-03-06 21:32:29,300   INFO  Visualized sample index:        1
段错误 (核心已转储)


原因分析:尝试了很多方法,例如

ulimit -a  
ulimit -s  102400
ulimit -c unlimited

最后都没有解决问题。

解决方案:

找到了运行的文件,把里面的内容进行了修改 demo.py

原文件

import argparse
import glob
from pathlib import Path

try:
    import open3d
    from visual_utils import open3d_vis_utils as V
    OPEN3D_FLAG = True
except:
    import mayavi.mlab as mlab
    from visual_utils import visualize_utils as V
    OPEN3D_FLAG = False

import numpy as np
import torch

from pcdet.config import cfg, cfg_from_yaml_file
from pcdet.datasets import DatasetTemplate
from pcdet.models import build_network, load_data_to_gpu
from pcdet.utils import common_utils

....

修改后

import argparse
import glob
from pathlib import Path
import mayavi.mlab as mlab
from visual_utils import visualize_utils as V
OPEN3D_FLAG = False

import numpy as np
import torch

from pcdet.config import cfg, cfg_from_yaml_file
from pcdet.datasets import DatasetTemplate
from pcdet.models import build_network, load_data_to_gpu
from pcdet.utils import common_utils
......

也就是将这一块去除,后面就运行成功了

try:
    import open3d
    from visual_utils import open3d_vis_utils as V
    OPEN3D_FLAG = True
except:

前提是你的环境中已经安装好了 mayavi

最后结果:【段错误(核心已转储)——运行PV-RCNN代码 python demo.py】_第1张图片

你可能感兴趣的:(小知识,笔记,点云处理,深度学习,计算机视觉,机器学习,pytorch,自动驾驶)