Closed wgs123 closed 5 years ago
Hi did you re-compile the cuda_functions? What GPU are you using? So when cloning the repo it comes with this file: cuda_functions/nms_2D/_ext/nms/_nms.so Did you somewho lose this?
Thank you for your reply.I using GTX 1080,what is the meaning the follow statement? nvcc -c -o nms_kernel.cu.o nms_kernel.cu -x cu -Xcompiler -fPIC -arch=[arch]
Hi,
You can solve it by recompiling the cuda functions using this code:
cd cuda_functions/roi_align_2D/roi_align/src/cuda/
nvcc -c -o crop_and_resize_kernel.cu.o crop_and_resize_kernel.cu -x cu -Xcompiler -fPIC -arch=compute_61
cd ../../
python build.py
cd ../../
cd roi_align_3D/roi_align/src/cuda/
nvcc -c -o crop_and_resize_kernel.cu.o crop_and_resize_kernel.cu -x cu -Xcompiler -fPIC -arch=compute_61
cd ../../
python build.py
cd ../../
cd nms_2D/src/cuda/
nvcc -c -o nms_kernel.cu.o nms_kernel.cu -x cu -Xcompiler -fPIC -arch=compute_61
cd ../../
python build.py
cd ../
cd nms_3D/src/cuda/
nvcc -c -o nms_kernel.cu.o nms_kernel.cu -x cu -Xcompiler -fPIC -arch=compute_61
cd ../../
python build.py
cd ../
note the compute_61 is the architecture of the GTX 1080. So for other graphics cards you have to change it to a compatible architecute.
Thank you for your help, but I also meet a error using this code C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt.h(10) : fatal error C1083: “vcruntime.h”: No such file or directory Traceback (most recent call last): File "C:\ProgramData\Anaconda3\lib\distutils_msvccompiler.py", line 423, in compile self.spawn(args) File "C:\ProgramData\Anaconda3\lib\distutils_msvccompiler.py", line 542, in spawn return super().spawn(cmd) File "C:\ProgramData\Anaconda3\lib\distutils\ccompiler.py", line 909, in spawn spawn(cmd, dry_run=self.dry_run) File "C:\ProgramData\Anaconda3\lib\distutils\spawn.py", line 38, in spawn _spawn_nt(cmd, search_path, dry_run=dry_run) File "C:\ProgramData\Anaconda3\lib\distutils\spawn.py", line 81, in _spawn_nt "command %r failed with exit status %d" % (cmd, rc)) distutils.errors.DistutilsExecError: command 'C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\BIN\cl.exe' failed with exit status 2
Try to reinstall visual studio.
I reinstall visual studio, but the problem also remain
Did you install the visual c++ build tools with it? Also when launching cmd or anaconda prompt, launch it with administrator privilege.
In mrcnn.py ,I meet a error File "models/mrcnn.py", line 24, in
from cuda_functions.nms_2D.pth_nms import nms_gpu as nms_2D
File "C:\medicaldetectiontoolkit-master\cuda_functions\nms_2D\pth_nms.py", line 2, in
from ._ext import nms
File "C:\medicaldetectiontoolkit-master\cuda_functions\nms_2D_ext\nms__init__.py", line 3, in
from ._nms import lib as _lib, ffi as _ffi
ModuleNotFoundError: No module named 'cuda_functions.nms_2D._ext.nms._nms',
could you help me solve it?