msracver / FCIS

Fully Convolutional Instance-aware Semantic Segmentation
MIT License
1.57k stars 415 forks source link

ImportError: No module named cpu_nms/gpu_nums #66

Open lnuchiyo opened 7 years ago

lnuchiyo commented 7 years ago

when i run demo.py by python, there is a error: Traceback (most recent call last): File "demo.py", line 29, in from core.tester import im_detect, Predictor File "/home/cs/FCIS/fcis/core/tester.py", line 18, in from nms.nms import py_nms_wrapper File "/home/cs/FCIS/fcis/../lib/nms/nms.py", line 3, in from cpu_nms import cpu_nms ImportError: No module named cpu_nms ####################### and i try to change /FCIS/lib/nms/nms.py to delete cpu but there is a new error:

Traceback (most recent call last): File "demo.py", line 29, in from core.tester import im_detect, Predictor File "/home/cs/FCIS/fcis/core/tester.py", line 18, in from nms.nms import py_nms_wrapper File "/home/cs/FCIS/fcis/../lib/nms/nms.py", line 3, in from gpu_nms import gpu_nms ImportError: No module named gpu_nms

i think it need gpu_nms, how can i deal with this error? thanks a lot for any suggestion.

liyi14 commented 7 years ago

have you compiled the nms, or in other words, have you sh ./init.sh?

sodaGH commented 6 years ago

Hi, when I sh ./init.sh, I got the error as followed:

running build_ext building 'bbox' extension gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/soda/anaconda2/lib/python2.7/site-packages/numpy/core/include -I/home/soda/anaconda2/include/python2.7 -c bbox.c -o build/temp.linux-x86_64-2.7/bbox.o -Wno-cpp -Wno-unused-function gcc: error: bbox.c: 没有那个文件或目录 gcc: fatal error: no input files compilation terminated. error: command 'gcc' failed with exit status 4 running build_ext running build_ext building 'cpu_nms' extension gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/soda/anaconda2/lib/python2.7/site-packages/numpy/core/include -I/home/soda/anaconda2/include/python2.7 -c cpu_nms.c -o build/temp.linux-x86_64-2.7/cpu_nms.o -Wno-cpp -Wno-unused-function gcc: error: cpu_nms.c: 没有那个文件或目录 gcc: fatal error: no input files compilation terminated. error: command 'gcc' failed with exit status 4 running build_ext building 'gpu_mv' extension /usr/local/cuda-8.0/bin/nvcc -I/home/soda/anaconda2/lib/python2.7/site-packages/numpy/core/include -I/usr/local/cuda-8.0/include -I/home/soda/anaconda2/include/python2.7 -c mv_kernel.cu -o build/temp.linux-x86_64-2.7/mv_kernel.o -arch=sm_35 --ptxas-options=-v -c --compiler-options '-fPIC' ptxas info : 0 bytes gmem ptxas info : Compiling entry function '_Z15reduce_mask_rowiPKfiifPb' for 'sm_35' ptxas info : Function properties for _Z15reduce_mask_rowiPKfiifPb 0 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads ptxas info : Used 12 registers, 360 bytes cmem[0] ptxas info : Compiling entry function '_Z17reduce_bounding_yiPKbPii' for 'sm_35' ptxas info : Function properties for _Z17reduce_bounding_yiPKbPii 0 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads ptxas info : Used 15 registers, 348 bytes cmem[0] ptxas info : Compiling entry function '_Z14mask_aggregateiPKfPfPKiS3_S0_iif' for 'sm_35' ptxas info : Function properties for _Z14mask_aggregateiPKfPfPKiS3_S0_iif 0 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads ptxas info : Used 36 registers, 380 bytes cmem[0], 4 bytes cmem[2] ptxas info : Compiling entry function '_Z17reduce_bounding_xiPKbPii' for 'sm_35' ptxas info : Function properties for _Z17reduce_bounding_xiPKbPii 0 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads ptxas info : Used 15 registers, 348 bytes cmem[0] ptxas info : Compiling entry function '_Z11mask_renderiPKfS0_iiiiPf' for 'sm_35' ptxas info : Function properties for _Z11mask_renderiPKfS0_iiiiPf 0 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads ptxas info : Used 33 registers, 368 bytes cmem[0], 12 bytes cmem[2] ptxas info : Compiling entry function '_Z11mask_resizeiPKfPKiS2_Pfiii' for 'sm_35' ptxas info : Function properties for _Z11mask_resizeiPKfPKiS2_Pfiii 0 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads ptxas info : Used 32 registers, 372 bytes cmem[0], 4 bytes cmem[2] ptxas info : Compiling entry function '_Z15reduce_mask_coliPKfiifPb' for 'sm_35' ptxas info : Function properties for _Z15reduce_mask_coliPKfiifPb 0 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads ptxas info : Used 14 registers, 360 bytes cmem[0] gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/soda/anaconda2/lib/python2.7/site-packages/numpy/core/include -I/usr/local/cuda-8.0/include -I/home/soda/anaconda2/include/python2.7 -c gpu_mv.c -o build/temp.linux-x86_64-2.7/gpu_mv.o -Wno-unused-function gcc: error: gpu_mv.c: 没有那个文件或目录 gcc: fatal error: no input files compilation terminated. error: command 'gcc' failed with exit status 4

Do you know how to fix this? Thanks a lot!

nopattern commented 6 years ago

I have the same problem when running "sh ./init.sh". The error is abount bbox.c .Is it generated by code? I can't find it in source code.

nopattern commented 6 years ago

pyx file is used by cython. It seems init.sh can't run in linux. Asimple way is to run command "cython %%.pyx" to generate %%.c file, then run "sh ./init.sh".

betterhalfwzm commented 6 years ago

I have the same problem,ImportError: No module named cpu_nms/gpu_nums #66;Do you know how to fix this? Thanks a lot! @lnuchiyo

DarkShadow-999 commented 4 years ago

@lnuchiyo what did you change in nms.py to resolve cpu_nms not found error?