wangguojun2018 / CenterNet3d

CenterNet3D An Anchor free Object Detector for Autonomous Driving
Apache License 2.0
121 stars 15 forks source link

ImportError: cannot import name 'points_op_cpu' #2

Open JonDoe-297 opened 4 years ago

JonDoe-297 commented 4 years ago

Hi, thank you for providing a interesting project.

I kick off CenterNet3d to train my local dataset. However, When I run the following code:

python tools/train.py ./configs/centernet3d.py

I get an error:

Traceback (most recent call last):
  File "tools/train.py", line 15, in <module>
    from mmdet3d.datasets import build_dataset
  File "/home/liqi/Code/CenterNet3d/mmdet3d/datasets/__init__.py", line 2, in <module>
    from .custom_3d import Custom3DDataset
  File "/home/liqi/Code/CenterNet3d/mmdet3d/datasets/custom_3d.py", line 8, in <module>
    from ..core.bbox import get_box_type
  File "/home/liqi/Code/CenterNet3d/mmdet3d/core/__init__.py", line 2, in <module>
    from .bbox import *  # noqa: F401, F403
  File "/home/liqi/Code/CenterNet3d/mmdet3d/core/bbox/__init__.py", line 4, in <module>
    from .iou_calculators import (BboxOverlaps3D, BboxOverlapsNearest3D,
  File "/home/liqi/Code/CenterNet3d/mmdet3d/core/bbox/iou_calculators/__init__.py", line 1, in <module>
    from .iou3d_calculator import (BboxOverlaps3D, BboxOverlapsNearest3D,
  File "/home/liqi/Code/CenterNet3d/mmdet3d/core/bbox/iou_calculators/iou3d_calculator.py", line 3, in <module>
    from ..structures import get_box_type
  File "/home/liqi/Code/CenterNet3d/mmdet3d/core/bbox/structures/__init__.py", line 1, in <module>
    from .base_box3d import BaseInstance3DBoxes
  File "/home/liqi/Code/CenterNet3d/mmdet3d/core/bbox/structures/base_box3d.py", line 5, in <module>
    from mmdet3d.ops.iou3d import iou3d_cuda
  File "/home/liqi/Code/CenterNet3d/mmdet3d/ops/__init__.py", line 18, in <module>
    from .points_op import pts_in_boxes3d,points_to_voxel
  File "/home/liqi/Code/CenterNet3d/mmdet3d/ops/points_op/__init__.py", line 3, in <module>
    from . import points_op_cpu
ImportError: cannot import name 'points_op_cpu'

could you help me with this problem?thanks very much!!!

Environment

Ubuntu16.04、GTX 1080ti 、driver 410.78、cuda 9.2、cudnn 7.4.1 python 3.6、pytorch 1.5.0、torchvision 0.6.0、mmcv-full 1.1.1

wangguojun2018 commented 4 years ago

Hi, thank you for providing a interesting project.

I kick off CenterNet3d to train my local dataset. However, When I run the following code:

python tools/train.py ./configs/centernet3d.py

I get an error:

Traceback (most recent call last):
  File "tools/train.py", line 15, in <module>
    from mmdet3d.datasets import build_dataset
  File "/home/liqi/Code/CenterNet3d/mmdet3d/datasets/__init__.py", line 2, in <module>
    from .custom_3d import Custom3DDataset
  File "/home/liqi/Code/CenterNet3d/mmdet3d/datasets/custom_3d.py", line 8, in <module>
    from ..core.bbox import get_box_type
  File "/home/liqi/Code/CenterNet3d/mmdet3d/core/__init__.py", line 2, in <module>
    from .bbox import *  # noqa: F401, F403
  File "/home/liqi/Code/CenterNet3d/mmdet3d/core/bbox/__init__.py", line 4, in <module>
    from .iou_calculators import (BboxOverlaps3D, BboxOverlapsNearest3D,
  File "/home/liqi/Code/CenterNet3d/mmdet3d/core/bbox/iou_calculators/__init__.py", line 1, in <module>
    from .iou3d_calculator import (BboxOverlaps3D, BboxOverlapsNearest3D,
  File "/home/liqi/Code/CenterNet3d/mmdet3d/core/bbox/iou_calculators/iou3d_calculator.py", line 3, in <module>
    from ..structures import get_box_type
  File "/home/liqi/Code/CenterNet3d/mmdet3d/core/bbox/structures/__init__.py", line 1, in <module>
    from .base_box3d import BaseInstance3DBoxes
  File "/home/liqi/Code/CenterNet3d/mmdet3d/core/bbox/structures/base_box3d.py", line 5, in <module>
    from mmdet3d.ops.iou3d import iou3d_cuda
  File "/home/liqi/Code/CenterNet3d/mmdet3d/ops/__init__.py", line 18, in <module>
    from .points_op import pts_in_boxes3d,points_to_voxel
  File "/home/liqi/Code/CenterNet3d/mmdet3d/ops/points_op/__init__.py", line 3, in <module>
    from . import points_op_cpu
ImportError: cannot import name 'points_op_cpu'

could you help me with this problem?thanks very much!!!

Environment

Ubuntu16.04、GTX 1080ti 、driver 410.78、cuda 9.2、cudnn 7.4.1 python 3.6、pytorch 1.5.0、torchvision 0.6.0、mmcv-full 1.1.1

you need build points_opand pointnet2 ops manually

cd mmdet3d/ops/points_op
$ python setup.py build_ext --inplace