zju3dv / disprcnn

Code release for Stereo 3D Object Detection via Shape Prior Guided Instance Disparity Estimation (CVPR 2020, TPAMI 2021)
Apache License 2.0
213 stars 36 forks source link

ImportError: cannot import name '_C' from 'disprcnn' (unknown location) #20

Closed JunjieChen-2020 closed 4 years ago

JunjieChen-2020 commented 4 years ago

When I run the train_net.py , the importError has been occured:(occured in "nms.py" "from disprcnn import _C") ImportError: cannot import name '_C' from 'disprcnn' (unknown location)

Ps: I can not find the '_C' in the disprcnn's init.py,

ootts commented 4 years ago

Run sh build_and_install.sh. Could you find any error message in the output?

JunjieChen-2020 commented 4 years ago

Run sh build_and_install.sh. Could you find any error message in the output?

you means I need followed the step for the intall statement? The steps is execution compeleted,and then execute the train_msrcnn.sh.

The steps:

sudo apt install libwebp-dev git clone https://github.com/zju3dv/disprcnn.git cd disprcnn conda env create -f environment.yaml conda activate disprcnn sh build_and_install.sh

ootts commented 4 years ago

Sure, you should set up the environment step by step. But the installation is not guaranteed to succeed, so you should check the output during the installation step, and check whether there is an error message. According to your description, I guess the "sh build_and_install.sh" step fails. Run it again and paste the output here if necessary.

JunjieChen-2020 commented 4 years ago

/usr/local/cuda:/usr/local/cuda-9.0/bin/nvcc -I/root/miniconda3/envs/disprcnn/lib/python3.7/site-packages/torch/include -I/root/miniconda3/envs/disprcnn/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/root/miniconda3/envs/disprcnn/lib/python3.7/site-packages/torch/include/TH -I/root/miniconda3/envs/disprcnn/lib/python3.7/site-packages/torch/include/THC -I/usr/local/cuda:/usr/local/cuda-9.0/include -I/root/miniconda3/envs/disprcnn/include/python3.7m -c src/roipool3d_kernel.cu -o build/temp.linux-x86_64-3.7/src/roipool3d_kernel.o -DCUDA_NO_HALF_OPERATORS -DCUDA_NO_HALF_CONVERSIONS -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options '-fPIC' -O2 -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=roipool3d_cuda -D_GLIBCXX_USE_CXX11_ABI=1 -std=c++11 unable to execute '/usr/local/cuda:/usr/local/cuda-9.0/bin/nvcc': No such file or directory error: command '/usr/local/cuda:/usr/local/cuda-9.0/bin/nvcc' failed with exit status 1

Can you navigate through these errors

ootts commented 4 years ago

Run the following commands and check the outputs.

echo $CUDA_HOME
echo $LD_LIBRARY_PATH

reference here if necessary.

JunjieChen-2020 commented 4 years ago

perfect!build_and_install.sh is succeeded. can I run train_msrcnn.sh?

ootts commented 4 years ago

Yes, you can start to train the model. Issue closed.