-
Notifications
You must be signed in to change notification settings - Fork 45.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
object_detection_tutorial.ipynb detection error #1581
Comments
It seems that the data_format attribute for the operation was added in Tensorflow v1.1. Could you install a new version of Tensorflow (v 1.1 or above) to see if it resolves your issue? |
After upgrade to tensorflow 1.2, it now works fine. Closing the issue. much thanks!! |
In Ubuntu 14.04 ,after upgrade to tensorflow 1.2, still the same problem. Need I try to install Ubuntu 16.04? Update: It's my python notebook env. wrong setting ; In Ubuntu 14.04 ,after upgrade to tensorflow 1.2 , it now works fine. |
@DrChungAlbert try Ubuntu 16.04. If it still fails, could you copy the error output? |
when I run the python file with spyder, encountered the following errors. runfile('E:/Projects/Tensorflow/example/object_detection/detectobject.py', wdir='E:/Projects/Tensorflow/example/object_detection') File "", line 1, in File "C:\Program Files\Anaconda3\envs\tensorflow\lib\site-packages\spyder\utils\site\sitecustomize.py", line 688, in runfile File "C:\Program Files\Anaconda3\envs\tensorflow\lib\site-packages\spyder\utils\site\sitecustomize.py", line 101, in execfile File "E:/Projects/Tensorflow/example/object_detection/detectobject.py", line 106, in |
@DrChungAlbert What was the error, Even I am not able to get it to work on tf version 1.2 |
@hardik124 In Ubuntu 14.04, it's my python notebook env. wrong setting to tf 1.0, the error same as jwnsu's. |
If anyone still has a problem then, I guess it's because you have downloaded the wrong model. |
TimeoutError Traceback (most recent call last) c:\users\innaeli\anaconda3\envs\tfp3.6\lib\urllib\request.py in open_http(self, url, data) c:\users\innaeli\anaconda3\envs\tfp3.6\lib\urllib\request.py in _open_generic_http(self, connection_factory, url, data) c:\users\innaeli\anaconda3\envs\tfp3.6\lib\http\client.py in request(self, method, url, body, headers, encode_chunked) c:\users\innaeli\anaconda3\envs\tfp3.6\lib\http\client.py in _send_request(self, method, url, body, headers, encode_chunked) c:\users\innaeli\anaconda3\envs\tfp3.6\lib\http\client.py in endheaders(self, message_body, encode_chunked) c:\users\innaeli\anaconda3\envs\tfp3.6\lib\http\client.py in _send_output(self, message_body, encode_chunked) c:\users\innaeli\anaconda3\envs\tfp3.6\lib\http\client.py in send(self, data) c:\users\innaeli\anaconda3\envs\tfp3.6\lib\http\client.py in connect(self) c:\users\innaeli\anaconda3\envs\tfp3.6\lib\socket.py in create_connection(address, timeout, source_address) c:\users\innaeli\anaconda3\envs\tfp3.6\lib\socket.py in create_connection(address, timeout, source_address) TimeoutError: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond During handling of the above exception, another exception occurred: OSError Traceback (most recent call last) c:\users\innaeli\anaconda3\envs\tfp3.6\lib\urllib\request.py in retrieve(self, url, filename, reporthook, data) c:\users\innaeli\anaconda3\envs\tfp3.6\lib\urllib\request.py in open(self, fullurl, data) c:\users\innaeli\anaconda3\envs\tfp3.6\lib\urllib\request.py in open(self, fullurl, data) c:\users\innaeli\anaconda3\envs\tfp3.6\lib\urllib\request.py in open_http(self, url, data) c:\users\innaeli\anaconda3\envs\tfp3.6\lib\urllib\request.py in _open_generic_http(self, connection_factory, url, data) c:\users\innaeli\anaconda3\envs\tfp3.6\lib\http\client.py in request(self, method, url, body, headers, encode_chunked) c:\users\innaeli\anaconda3\envs\tfp3.6\lib\http\client.py in _send_request(self, method, url, body, headers, encode_chunked) c:\users\innaeli\anaconda3\envs\tfp3.6\lib\http\client.py in endheaders(self, message_body, encode_chunked) c:\users\innaeli\anaconda3\envs\tfp3.6\lib\http\client.py in _send_output(self, message_body, encode_chunked) c:\users\innaeli\anaconda3\envs\tfp3.6\lib\http\client.py in send(self, data) c:\users\innaeli\anaconda3\envs\tfp3.6\lib\http\client.py in connect(self) c:\users\innaeli\anaconda3\envs\tfp3.6\lib\socket.py in create_connection(address, timeout, source_address) c:\users\innaeli\anaconda3\envs\tfp3.6\lib\socket.py in create_connection(address, timeout, source_address) OSError: [Errno socket error] [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond Can anyone tell what could be causing this error? |
Running tensor flow 1.0 CPU version on Ubuntu 16.04.
Checkout latest models (which fixed a previous test_ckpt download issue). Got following error at end of detection (bear with me the long cut-and-paste):
InvalidArgumentError Traceback (most recent call last)
in ()
19 (boxes, scores, classes, num_detections) = sess.run(
20 [boxes, scores, classes, num_detections],
---> 21 feed_dict={image_tensor: image_np_expanded})
22 # Visualization of the results of a detection.
23 vis_util.visualize_boxes_and_labels_on_image_array(
/home/dsu/tf/local/lib/python2.7/site-packages/tensorflow/python/client/session.pyc in run(self, fetches, feed_dict, options, run_metadata)
765 try:
766 result = self._run(None, fetches, feed_dict, options_ptr,
--> 767 run_metadata_ptr)
768 if run_metadata:
769 proto_data = tf_session.TF_GetBuffer(run_metadata_ptr)
/home/dsu/tf/local/lib/python2.7/site-packages/tensorflow/python/client/session.pyc in _run(self, handle, fetches, feed_dict, options, run_metadata)
963 if final_fetches or final_targets:
964 results = self._do_run(handle, final_targets, final_fetches,
--> 965 feed_dict_string, options, run_metadata)
966 else:
967 results = []
/home/dsu/tf/local/lib/python2.7/site-packages/tensorflow/python/client/session.pyc in _do_run(self, handle, target_list, fetch_list, feed_dict, options, run_metadata)
1013 if handle is None:
1014 return self._do_call(_run_fn, self._session, feed_dict, fetch_list,
-> 1015 target_list, options, run_metadata)
1016 else:
1017 return self._do_call(_prun_fn, self._session, handle, feed_dict,
/home/dsu/tf/local/lib/python2.7/site-packages/tensorflow/python/client/session.pyc in _do_call(self, fn, *args)
1033 except KeyError:
1034 pass
-> 1035 raise type(e)(node_def, op, message)
1036
1037 def _extend_graph(self):
InvalidArgumentError: NodeDef mentions attr 'data_format' not in Op<name=DepthwiseConv2dNative; signature=input:T, filter:T -> output:T; attr=T:type,allowed=[DT_FLOAT, DT_DOUBLE]; attr=strides:list(int); attr=padding:string,allowed=["SAME", "VALID"]>; NodeDef: FeatureExtractor/MobilenetV1/MobilenetV1/Conv2d_1_depthwise/depthwise = DepthwiseConv2dNative[T=DT_FLOAT, data_format="NHWC", padding="SAME", strides=[1, 1, 1, 1], _device="/job:localhost/replica:0/task:0/cpu:0"](FeatureExtractor/MobilenetV1/MobilenetV1/Conv2d_0/Relu6, FeatureExtractor/MobilenetV1/Conv2d_1_depthwise/depthwise_weights/read)
[[Node: FeatureExtractor/MobilenetV1/MobilenetV1/Conv2d_1_depthwise/depthwise = DepthwiseConv2dNative[T=DT_FLOAT, data_format="NHWC", padding="SAME", strides=[1, 1, 1, 1], _device="/job:localhost/replica:0/task:0/cpu:0"](FeatureExtractor/MobilenetV1/MobilenetV1/Conv2d_0/Relu6, FeatureExtractor/MobilenetV1/Conv2d_1_depthwise/depthwise_weights/read)]]
Caused by op u'FeatureExtractor/MobilenetV1/MobilenetV1/Conv2d_1_depthwise/depthwise', defined at:
File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
"main", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/usr/local/lib/python2.7/dist-packages/ipykernel/main.py", line 3, in
app.launch_new_instance()
File "/home/dsu/.local/lib/python2.7/site-packages/traitlets/config/application.py", line 658, in launch_instance
app.start()
File "/usr/local/lib/python2.7/dist-packages/ipykernel/kernelapp.py", line 474, in start
ioloop.IOLoop.instance().start()
File "/usr/lib/python2.7/dist-packages/zmq/eventloop/ioloop.py", line 162, in start
super(ZMQIOLoop, self).start()
File "/usr/lib/python2.7/dist-packages/tornado/ioloop.py", line 866, in start
handler_func(fd_obj, events)
File "/usr/lib/python2.7/dist-packages/tornado/stack_context.py", line 275, in null_wrapper
return fn(*args, **kwargs)
File "/usr/lib/python2.7/dist-packages/zmq/eventloop/zmqstream.py", line 440, in _handle_events
self._handle_recv()
File "/usr/lib/python2.7/dist-packages/zmq/eventloop/zmqstream.py", line 472, in _handle_recv
self._run_callback(callback, msg)
File "/usr/lib/python2.7/dist-packages/zmq/eventloop/zmqstream.py", line 414, in _run_callback
callback(*args, **kwargs)
File "/usr/lib/python2.7/dist-packages/tornado/stack_context.py", line 275, in null_wrapper
return fn(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/ipykernel/kernelbase.py", line 276, in dispatcher
return self.dispatch_shell(stream, msg)
File "/usr/local/lib/python2.7/dist-packages/ipykernel/kernelbase.py", line 228, in dispatch_shell
handler(stream, idents, msg)
File "/usr/local/lib/python2.7/dist-packages/ipykernel/kernelbase.py", line 390, in execute_request
user_expressions, allow_stdin)
File "/usr/local/lib/python2.7/dist-packages/ipykernel/ipkernel.py", line 196, in do_execute
res = shell.run_cell(code, store_history=store_history, silent=silent)
File "/usr/local/lib/python2.7/dist-packages/ipykernel/zmqshell.py", line 501, in run_cell
return super(ZMQInteractiveShell, self).run_cell(*args, **kwargs)
File "/home/dsu/.local/lib/python2.7/site-packages/IPython/core/interactiveshell.py", line 2717, in run_cell
interactivity=interactivity, compiler=compiler, result=result)
File "/home/dsu/.local/lib/python2.7/site-packages/IPython/core/interactiveshell.py", line 2821, in run_ast_nodes
if self.run_code(code, result):
File "/home/dsu/.local/lib/python2.7/site-packages/IPython/core/interactiveshell.py", line 2881, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "", line 7, in
tf.import_graph_def(od_graph_def, name='')
File "/home/dsu/tf/local/lib/python2.7/site-packages/tensorflow/python/framework/importer.py", line 287, in import_graph_def
op_def=op_def)
File "/home/dsu/tf/local/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 2395, in create_op
original_op=self._default_original_op, op_def=op_def)
File "/home/dsu/tf/local/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 1264, in init
self._traceback = _extract_stack()
InvalidArgumentError (see above for traceback): NodeDef mentions attr 'data_format' not in Op<name=DepthwiseConv2dNative; signature=input:T, filter:T -> output:T; attr=T:type,allowed=[DT_FLOAT, DT_DOUBLE]; attr=strides:list(int); attr=padding:string,allowed=["SAME", "VALID"]>; NodeDef: FeatureExtractor/MobilenetV1/MobilenetV1/Conv2d_1_depthwise/depthwise = DepthwiseConv2dNative[T=DT_FLOAT, data_format="NHWC", padding="SAME", strides=[1, 1, 1, 1], _device="/job:localhost/replica:0/task:0/cpu:0"](FeatureExtractor/MobilenetV1/MobilenetV1/Conv2d_0/Relu6, FeatureExtractor/MobilenetV1/Conv2d_1_depthwise/depthwise_weights/read)
[[Node: FeatureExtractor/MobilenetV1/MobilenetV1/Conv2d_1_depthwise/depthwise = DepthwiseConv2dNative[T=DT_FLOAT, data_format="NHWC", padding="SAME", strides=[1, 1, 1, 1], _device="/job:localhost/replica:0/task:0/cpu:0"](FeatureExtractor/MobilenetV1/MobilenetV1/Conv2d_0/Relu6, FeatureExtractor/MobilenetV1/Conv2d_1_depthwise/depthwise_weights/read)]
The text was updated successfully, but these errors were encountered: