paul007pl / MVP_Benchmark

MVP Benchmark for Multi-View Partial Point Cloud Completion and Registration
https://mvp-dataset.github.io/
Apache License 2.0
119 stars 10 forks source link

ImportError cannot import name 'ball_query_ext' from 'mm3d_pn2.ops.ball_query' 急急急,在线等 #8

Closed xjtuzhjm closed 3 years ago

xjtuzhjm commented 3 years ago

当我运行 python train.py -c ./cfgs/vcrnet.yaml

报错信息是这样的 :ImportError cannot import name 'ball_query_ext' from 'mm3d_pn2.ops.ball_query'

下面是 'mm3d_pn2.ops.ball_query 这个文件夹中的内容,里面确实没有 'ball_query_ext' 这个文件

utils metrics mm3d_pn2 ops ball_query src ball_query.cpp ball_query_cuda.cu init.py ball_query.py

ball_query.py 这个文件里面有这么一条导入语句:

import torch
from torch.autograd import Function

from . import ball_query_ext  // 在当前目录中没有这个模块文件,请问这个错误该咋解决呢?

class BallQuery(Function):
    """Ball Query.

    Find nearby points in spherical space.
    """

    @staticmethod
    def forward(ctx, min_radius: float, max_radius: float, sample_num: int,
                xyz: torch.Tensor, center_xyz: torch.Tensor) -> torch.Tensor:
            ................
            ...................
            .................

from . import ball_query_ext // 在当前目录中没有这个 ball_query_ext.py 模块文件,请问这个错误该咋解决呢?

paul007pl commented 3 years ago

印象中,我没有遇到这个问题… 建议先按readme配置好环境。 如果没有解决,可以考虑把所有和 ball_query相关的语句都 注释掉,因为 VRCNet并没有 ball_query 操作。

xjtuzhjm commented 3 years ago

非常感谢你的答复。这个问题我已经解决了,忘记执行这个命令了 pip install -v -e .

conjuringjha commented 3 years ago

can someone please explain this solution in english... I'm also having the same issue

paul007pl commented 3 years ago

Please install the environment first, then you can try the code

conjuringjha commented 3 years ago

For the environment setup part, in the setup.sh file I've already run till the following lines:

conda create -n mvp python=3.7 -y
conda activate mvp
conda install pytorch==1.5.0 torchvision==0.6.0 cudatoolkit=10.1 -c pytorch -y

# setup completion
cd completion
pip install -r requirements.txt

cd ../utils/mm3d_pn2/
sh setup.sh

the only line I'm unable to run is pip install -v -e because I get an error saying : -e option requires 1 argument and also the above line is just for the SLURM users. So I guess I'm already done with the environment setup, But I still get this error.

paul007pl commented 3 years ago

I think you should try to run "pip install -v -e . " Do not miss the "." And make sure you are in the right directory~

conjuringjha commented 3 years ago

thanks it worked