faster_rcnn_pytorch icon indicating copy to clipboard operation
faster_rcnn_pytorch copied to clipboard

run demo on cpu?

Open sajjad-askari opened this issue 7 years ago • 7 comments

Hi, my computer non support cuda. I want run demo only cpu. I see this error, when run demo.py: cannot import name 'cython_nms'

sajjad-askari avatar Apr 02 '18 08:04 sajjad-askari

did your make file executed properly?

Ammarah-Farooq avatar Apr 03 '18 06:04 Ammarah-Farooq

I much CPU RAM you have?

Ammarah-Farooq avatar Apr 03 '18 06:04 Ammarah-Farooq

https://github.com/longcw/faster_rcnn_pytorch/issues/5

check this issue. translate its lines by google chinese to enlish translator. you will get your solution.

Ammarah-Farooq avatar Apr 03 '18 06:04 Ammarah-Farooq

Hi Ammarah-Farooq. thanks for reply. I read #5, but not understand reply! please list actions that must be done.

very thanks.

sajjad-askari avatar Apr 03 '18 15:04 sajjad-askari

go to your demo.py file and search all lines where .cuda() is present. then remove only .cuda() from that line. then open your make.sh file and comment out these lines: echo "Compiling roi pooling kernels by nvcc..." nvcc -c -o roi_pooling.cu.o roi_pooling_kernel.cu
-D GOOGLE_CUDA=1 -x cu -Xcompiler -fPIC -arch=sm_52

then go to your faster_rcnn_pytorch/faster_rcnn/roi_pooling/build.py file and comment out: extra_objects = ['src/cuda/roi_pooling.cu.o'] extra_objects = [os.path.join(this_file, fname) for fname in extra_objects]

now execute your make file. then run your demo.

Ammarah-Farooq avatar Apr 04 '18 04:04 Ammarah-Farooq

I did all the things you said but still have this error: cannot import name 'cython_nms'.

I think it's because make.sh is not done correctly.

sajjad-askari avatar Apr 04 '18 04:04 sajjad-askari

open the file where it is indicating error then check the import commands

On Wed, Apr 4, 2018 at 9:20 AM, sajjad-askari [email protected] wrote:

I did all the things you said but still have this error: cannot import name 'cython_nms'.

I think it's because make.sh is not done correctly.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/longcw/faster_rcnn_pytorch/issues/66#issuecomment-378475792, or mute the thread https://github.com/notifications/unsubscribe-auth/AgYakmk2uM4_KssVakgWjKWe3pd_-XnTks5tlEoWgaJpZM4TDRzu .

Ammarah-Farooq avatar Apr 04 '18 05:04 Ammarah-Farooq