Gorilla-Lab-SCUT/frustum-convnet

No module named ops.pybind11.rbbox_iou, even I can see the file under ops/pybind11/rbbox_iou.py

pat-CIMAR-UF opened this issue · 14 comments

Successfully run the the clean and make shell scripts, however cannot run through the first stage:

python kitti/prepare_data.py --car_only --gen_train --gen_val --gen_val_rgb_detection

error as:
ImportError: No module named ops.pybind11.rbbox_iou
I could see this rbbox_iou.py under my ops/pybind11 folder.
I have installed pybind11 and successfully run the clean.sh and make.sh.

I edited the path and that error is gone. Now new error:
ImportError: /home/yq/frustum-convnet/ops/pybind11/box_ops_cc.so: undefined symbol: PyInstanceMethod_Type

This is referring to the 3rd line of rbbox_iou.py in ops/pybind11

Hi! Have you installed pyblind11 lib? Have you complied the extension?

cd ops
bash clean.sh
bash make.sh

Yes I have done both. It is giving me trouble about importing the box_ops_cc.so in the ops/pybind11/rbbox_iou.py

Hi! Have you installed pyblind11 lib? Have you complied the extension?

cd ops
bash clean.sh
bash make.sh

Is everything run by default fine with you?

yes

yes

Can you tell me your settings?
I am on Ubuntu 18.04, with CUDA 10.1 and PyTorch 1.2 and python 3.6. Doesn't work that well as it should.

Many thanks.

Ubuntu 18.04, with CUDA 10.0, PyTorch 1.0 and python 3.6

This error might come from a python version mismatch between the version used to compile and the version used to run.
You could try to see which python version used to compile and which version used to run. Make sure both have same version. @pat-CIMAR-UF

Ubuntu 18.04, with CUDA 10.0, PyTorch 1.0 and python 3.6

Hi, my cuda version is also 10 but when I run the "bash make.sh". I get the issue "nvcc fatal : Unsupported gpu architecture 'compute_75'" Have u faced the problem .If yes ,please tell me .

Successfully run the the clean and make shell scripts, however cannot run through the first stage:
python kitti/prepare_data.py --car_only --gen_train --gen_val --gen_val_rgb_detection

error as:
ImportError: No module named ops.pybind11.rbbox_iou
I could see this rbbox_iou.py under my ops/pybind11 folder.
I have installed pybind11 and successfully run the clean.sh and make.sh.

Hi,I think I got the same problem. Have you solved it now ?

"ImportError: cannot import name 'box_ops_cc' from 'ops.pybind11' (D:\Git\frustum-convnet-master\ops\pybind11_init_.py)"

Successfully run the the clean and make shell scripts, however cannot run through the first stage:
python kitti/prepare_data.py --car_only --gen_train --gen_val --gen_val_rgb_detection
error as:
ImportError: No module named ops.pybind11.rbbox_iou
I could see this rbbox_iou.py under my ops/pybind11 folder.
I have installed pybind11 and successfully run the clean.sh and make.sh.

Hi,I think I got the same problem. Have you solved it now ?
"ImportError: cannot import name 'box_ops_cc' from 'ops.pybind11' (D:\Git\frustum-convnet-master\ops\pybind11_init_.py)"

by the way ,I'm win10

@BasserJason Current the compilation of pybind11 wrapper is not support Window system because we use the g++ command to compile the cpp file. Maybe you can refer to this doc (https://pybind11.readthedocs.io/en/master/basics.html#creating-bindings-for-a-simple-function).
Using Python’s setuptools to build the module can be a good way.

Hey,
after giving bash make.sh command it gives below error.
I am running on the virtual environment and already have a python3.7.4 version. I don't know why it is taking the python2.7 path. is this the problem I see the error? if yes, could you please tell me how to fix this. @zhixinwang
#############################################################
warnings.warn(ABI_INCOMPATIBILITY_WARNING.format(compiler))
building 'query_depth_point_cuda' extension
creating build
creating build/temp.linux-x86_64-2.7
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/local/lib/python2.7/dist-packages/torch/lib/include -I/usr/local/lib/python2.7/dist-packages/torch/lib/include/TH -I/usr/local/lib/python2.7/dist-packages/torch/lib/include/THC -I/usr/local/cuda/include -I/usr/include/python2.7 -c query_depth_point_cuda.cpp -o build/temp.linux-x86_64-2.7/query_depth_point_cuda.o -DTORCH_EXTENSION_NAME=query_depth_point_cuda -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++11
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
/usr/local/cuda/bin/nvcc -I/usr/local/lib/python2.7/dist-packages/torch/lib/include -I/usr/local/lib/python2.7/dist-packages/torch/lib/include/TH -I/usr/local/lib/python2.7/dist-packages/torch/lib/include/THC -I/usr/local/cuda/include -I/usr/include/python2.7 -c query_depth_point_cuda_kernel.cu -o build/temp.linux-x86_64-2.7/query_depth_point_cuda_kernel.o -DTORCH_EXTENSION_NAME=query_depth_point_cuda -D_GLIBCXX_USE_CXX11_ABI=0 --compiler-options '-fPIC' -std=c++11
query_depth_point_cuda_kernel.cu(72): error: name followed by "::" must be a class or namespace name

1 error detected in the compilation of "/tmp/tmpxft_0000783a_00000000-6_query_depth_point_cuda_kernel.cpp1.ii".
error: command '/usr/local/cuda/bin/nvcc' failed with exit status 1
running build_ext
/usr/local/lib/python2.7/dist-packages/torch/utils/cpp_extension.py:118: UserWarning:

                           !! WARNING !!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Your compiler (c++) may be ABI-incompatible with PyTorch!
Please use a compiler that is ABI-compatible with GCC 4.9 and above.
See https://gcc.gnu.org/onlinedocs/libstdc++/manual/abi.html.

See https://gist.github.com/goldsborough/d466f43e8ffc948ff92de7486c5216d6
for instructions on how to install GCC 4.9 or higher.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

                          !! WARNING !!

warnings.warn(ABI_INCOMPATIBILITY_WARNING.format(compiler))
building 'query_depth_point_cuda' extension
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/local/lib/python2.7/dist-packages/torch/lib/include -I/usr/local/lib/python2.7/dist-packages/torch/lib/include/TH -I/usr/local/lib/python2.7/dist-packages/torch/lib/include/THC -I/usr/local/cuda/include -I/usr/include/python2.7 -c query_depth_point_cuda.cpp -o build/temp.linux-x86_64-2.7/query_depth_point_cuda.o -DTORCH_EXTENSION_NAME=query_depth_point_cuda -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++11
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
/usr/local/cuda/bin/nvcc -I/usr/local/lib/python2.7/dist-packages/torch/lib/include -I/usr/local/lib/python2.7/dist-packages/torch/lib/include/TH -I/usr/local/lib/python2.7/dist-packages/torch/lib/include/THC -I/usr/local/cuda/include -I/usr/include/python2.7 -c query_depth_point_cuda_kernel.cu -o build/temp.linux-x86_64-2.7/query_depth_point_cuda_kernel.o -DTORCH_EXTENSION_NAME=query_depth_point_cuda -D_GLIBCXX_USE_CXX11_ABI=0 --compiler-options '-fPIC' -std=c++11
query_depth_point_cuda_kernel.cu(72): error: name followed by "::" must be a class or namespace name

1 error detected in the compilation of "/tmp/tmpxft_00007876_00000000-6_query_depth_point_cuda_kernel.cpp1.ii".
error: command '/usr/local/cuda/bin/nvcc' failed with exit status 1

Please run following commands to check whether you have true version of python and pytorch.

python --version
python -c "import torch; print(torch.__version__)"