smallcorgi / Faster-RCNN_TF

Faster-RCNN in Tensorflow
MIT License
2.34k stars 1.12k forks source link

NameError : global name 'gpu_nms' is not defined #151

Open ShuLongShiWo opened 7 years ago

ShuLongShiWo commented 7 years ago

2017-05-17 17:23:39.182601: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:893] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero 2017-05-17 17:23:39.182917: I tensorflow/core/common_runtime/gpu/gpu_device.cc:906] Found device 0 with properties: name: Graphics Device major: 6 minor: 1 memoryClockRate (GHz) 1.721 pciBusID 0000:01:00.0 Total memory: 10.91GiB Free memory: 10.72GiB 2017-05-17 17:23:39.182926: I tensorflow/core/common_runtime/gpu/gpu_device.cc:927] DMA: 0 2017-05-17 17:23:39.182929: I tensorflow/core/common_runtime/gpu/gpu_device.cc:937] 0: Y 2017-05-17 17:23:39.182932: I tensorflow/core/common_runtime/gpu/gpu_device.cc:996] Creating TensorFlow device (/gpu:0) -> (device: 0, name: Graphics Device, pci bus id: 0000:01:00.0) Loading model weights from /home/shulong/tensorflow/Faster-RCNN_TF/output/faster_rcnn_end2end/voc_2007_trainval/VGGnet_fast_rcnn_iter_10.ckpt 2017-05-17 17:23:40.410898: W tensorflow/core/framework/op_kernel.cc:1155] Unknown: exceptions.NameError: global name 'gpu_nms' is not defined Traceback (most recent call last): File "./tools/test_net.py", line 97, in test_net(sess, network, imdb, weights_filename) File "/home/shulong/tensorflow/Faster-RCNN_TF/tools/../lib/fast_rcnn/test.py", line 302, in test_net scores, boxes = im_detect(sess, net, im, box_proposals) File "/home/shulong/tensorflow/Faster-RCNN_TF/tools/../lib/fast_rcnn/test.py", line 179, in im_detect run_metadata=run_metadata) File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py", line 789, in run run_metadata_ptr) File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py", line 997, in _run feed_dict_string, options, run_metadata) File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py", line 1132, in _do_run target_list, options, run_metadata) File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py", line 1152, in _do_call raise type(e)(node_def, op, message) tensorflow.python.framework.errors_impl.UnknownError: exceptions.NameError: global name 'gpu_nms' is not defined ------------------------------

./experiments/scripts/faster_rcnn_end2end.sh gpu 0 VGG16 pascal_voc when i test my train mode by :"test_net.py ", it shows error NameError, how to define the gpu_nms?

siiyiii commented 7 years ago

Did you know how to fix it? I got the same problem. Thank you very much.

sconglee commented 6 years ago

It works for me without sudo

sanlang commented 6 years ago

Have you addressed this problem? @ShuLongShiWo @nanancy I tried several ways, but can not solve it.

bhuvaneshp2403 commented 6 years ago

i am also facing similar issue. could you please help to fix this Traceback (most recent call last): File "/usr/bin/targetcli", line 121, in main() File "/usr/bin/targetcli", line 111, in main shell.run_interactive() File "/usr/lib/python2.7/site-packages/configshell_fb/shell.py", line 905, in run_interactive self._cli_loop() File "/usr/lib/python2.7/site-packages/configshell_fb/shell.py", line 734, in _cli_loop self.run_cmdline(cmdline) File "/usr/lib/python2.7/site-packages/configshell_fb/shell.py", line 848, in run_cmdline self._execute_command(path, command, pparams, kparams) File "/usr/lib/python2.7/site-packages/configshell_fb/shell.py", line 823, in _execute_command result = target.execute_command(command, pparams, kparams) File "/usr/lib/python2.7/site-packages/configshell_fb/node.py", line 1406, in execute_command return method(*pparams, **kparams) File "/usr/lib/python2.7/site-packages/configshell_fb/node.py", line 710, in ui_command_ls tree = self._render_tree(target, depth=depth) File "/usr/lib/python2.7/site-packages/configshell_fb/node.py", line 861, in _render_tree

LannCX commented 6 years ago

I changed ./tools/test_net.py at row 86: cfg.USE_GPU_NMS = False.

FanQC commented 6 years ago

@LannCX It works for me, but takes a lot of time for testing

hz-fengpeng commented 5 years ago

I comment the if cfg.USE_GPU_NMS: from nms.gpu_nms import gpu_nms and just add from nms.gpu_nms import gpu_nms