Faster-RCNN_TF icon indicating copy to clipboard operation
Faster-RCNN_TF copied to clipboard

NameError : global name 'gpu_nms' is not defined

Open ShuLongShiWo opened this issue 7 years ago • 7 comments

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?

ShuLongShiWo avatar May 17 '17 09:05 ShuLongShiWo

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

siiyiii avatar Oct 25 '17 12:10 siiyiii

It works for me without sudo

sconglee avatar Jan 03 '18 07:01 sconglee

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

sanlang avatar Jan 16 '18 13:01 sanlang

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 + self._render_tree(children[i], margin, depth) File "/usr/lib/python2.7/site-packages/configshell_fb/node.py", line 861, in _render_tree + self._render_tree(children[i], margin, depth) File "/usr/lib/python2.7/site-packages/configshell_fb/node.py", line 861, in _render_tree + self._render_tree(children[i], margin, depth) File "/usr/lib/python2.7/site-packages/configshell_fb/node.py", line 765, in _render_tree (description, is_healthy) = root.summary() File "/usr/lib/python2.7/site-packages/targetcli/ui_backstore.py", line 688, in summary return ("%s (%s) %s %s" % (so.udev_path, bytes_to_human(so.size), File "/usr/lib/python2.7/site-packages/rtslib_fb/tcm.py", line 641, in _get_size return (get_size_for_blk_dev(self._parse_info('File')) * File "/usr/lib/python2.7/site-packages/rtslib_fb/utils.py", line 152, in get_size_for_blk_dev device = Device.from_device_file(_CONTEXT, os.path.realpath(str(path))) NameError: global name 'Device' is not defined

bhuvaneshp2403 avatar Mar 02 '18 16:03 bhuvaneshp2403

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

LannCX avatar Apr 09 '18 05:04 LannCX

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

FanQC avatar May 18 '18 08:05 FanQC

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

hz-fengpeng avatar Mar 19 '19 07:03 hz-fengpeng