Pointnet2_PyTorch icon indicating copy to clipboard operation
Pointnet2_PyTorch copied to clipboard

AttributeError: module 'pointnet2._ext' has no attribute 'cylinder_query

Open YQYjin opened this issue 8 months ago • 2 comments

i meet the same question,the error is:

AttributeError: module 'pointnet2._ext' has no attribute 'cylinder_query'

but after run python setup.py install ,the result is

Installed /home/yqyjin/.local/lib/python3.10/site-packages/pointnet2-0.0.0-py3.10-linux-x86_64.egg
Processing dependencies for pointnet2==0.0.0
Finished processing dependencies for pointnet2==0.0.0

and no error occured during the installation

i use ubuntu 22.04, python=3.10,cuda=12.8

YQYjin avatar Apr 01 '25 11:04 YQYjin

请问解决了吗

103240 avatar Apr 07 '25 12:04 103240

请问解决了吗

解决了,我这个cylinder_query不是pointnet自带的,是我下载的那个项目里自己实现的一个cpp用来优化性能的,解决方法就是那个项目里写的有注释,根据输入输出自己写了一个python实现替换这个方法,就行了

YQYjin avatar Apr 15 '25 10:04 YQYjin

Check out graspnet-baseline's pointnet2/_ext_src directory and look for the files cylinder_query.h, cylinder_query.cpp, and cylinder_query_gpu.cu. After adding these files, update bindings.cpp with the lines

#include "cylinder_query.h"

m.def("cylinder_query", &cylinder_query);

Build with pip install pointnet2_ops_lib/. and then confirm:

import pointnet2_ops._ext as _ext
dir(_ext)

The list of strings should contain 'cylinder_query'.

abhishek47kashyap avatar Jul 05 '25 23:07 abhishek47kashyap