Description
Please go to Stack Overflow for help and support:
http://stackoverflow.com/questions/tagged/tensorflow
Also, please understand that many of the models included in this repository are experimental and research-style code. If you open a GitHub issue, here is our policy:
- It must be a bug, a feature request, or a significant problem with documentation (for small docs fixes please send a PR instead).
- The form below must be filled out.
Here's why we have that policy: TensorFlow developers respond to issues. We want to focus on work that benefits the whole community, e.g., fixing bugs and adding features. Support only helps individuals. GitHub also notifies thousands of people when issues are filed. We want them to see you communicating an interesting problem, rather than being redirected to Stack Overflow.
System information
- What is the top-level directory of the model you are using:deeplabv3_pascal_trainval
- Have I written custom code (as opposed to using a stock example script provided in TensorFlow):No
- OS Platform and Distribution (e.g., Linux Ubuntu 16.04):Linux Ubuntu 16.04
- TensorFlow installed from (source or binary):binary
- TensorFlow version (use command below):1.6
- Bazel version (if compiling from source):
- CUDA/cuDNN version:9.0/7.0
- GPU model and memory:11G
- Exact command to reproduce:
You can collect some of this information using our environment capture script:
https://github.com/tensorflow/tensorflow/tree/master/tools/tf_env_collect.sh
You can obtain the TensorFlow version with
python -c "import tensorflow as tf; print(tf.GIT_VERSION, tf.VERSION)"
Describe the problem
Describe the problem clearly here. Be sure to convey here why it's a bug in TensorFlow or a feature request.
When I run "Jupyter notebook for off-the-shelf inference.",Set the INPUT_SIZE=769 which tell the code to resie the input image.When run the code,error comeout:
Caused by op u'aspp1_depthwise/depthwise/SpaceToBatchND', defined at:
File "mytry.py", line 130, in
model = DeepLabModel(download_path)
File "mytry.py", line 98, in init
tf.import_graph_def(graph_def, name='')
File "/home/george/anaconda2/lib/python2.7/site-packages/tensorflow/python/util/deprecation.py", line 432, in new_func
return func(*args, **kwargs)
File "/home/george/anaconda2/lib/python2.7/site-packages/tensorflow/python/framework/importer.py", line 553, in import_graph_def
op_def=op_def)
File "/home/george/anaconda2/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 3271, in create_op
op_def=op_def)
File "/home/george/anaconda2/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 1650, in init
self._traceback = self._graph._extract_stack() # pylint: disable=protected-access
InvalidArgumentError (see above for traceback): padded_shape[1]=128 is not divisible by block_shape[1]=12
[[Node: aspp1_depthwise/depthwise/SpaceToBatchND = SpaceToBatchND[T=DT_FLOAT, Tblock_shape=DT_INT32, Tpaddings=DT_INT32, _device="/job:localhost/replica:0/task:0/device:GPU:0"](xception_65/exit_flow/block2/unit_1/xception_module/separable_conv3_pointwise/Relu, aspp1_depthwise/depthwise/SpaceToBatchND/block_shape, aspp1_depthwise/depthwise/SpaceToBatchND/paddings)]]
[[Node: ArgMax/_37 = _Recvclient_terminated=false, recv_device="/job:localhost/replica:0/task:0/device:CPU:0", send_device="/job:localhost/replica:0/task:0/device:GPU:0", send_device_incarnation=1, tensor_name="edge_1637_ArgMax", tensor_type=DT_INT64, _device="/job:localhost/replica:0/task:0/device:CPU:0"]]
Can't I process arbitrary size of image?
Source code / logs
Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached. Try to provide a reproducible test case that is the bare minimum necessary to generate the problem.
Activity
GeorgeBohw commentedon Mar 23, 2018
How can i use the model to predict for bigger image like 720p?
GeorgeBohw commentedon Mar 23, 2018
need i to train using the same size image,like 720p?
GeorgeBohw commentedon Mar 27, 2018
I have resolved it.
By now I think you should fine-tuning the models to make it fit for big size image,but the m_iou decrease.
Aliennandy commentedon Mar 14, 2019
Hi George ... Could you pls elaborate on how to resolved it? I am stuck here!
lxs802lxs8858 commentedon Apr 3, 2019
lxs802lxs8858 commentedon Apr 3, 2019
Did u solve it? I also has the problem
aliennandy13 commentedon Apr 3, 2019
No, i couldn't
northeastsquare commentedon Apr 25, 2019
I met this problem after train deeplab model.
This is caused by, deferent image size of train and test.
For example, train with (513,513), in input_preprocess.py preprocess_image_and_label function.
if is_training and label is not None
will crop the image.
but in test phase, is_training is False.
So the image size will not be changed.
So my temple solution is that, add else branch:
*In detail, if you choose xception, in xception.py:
inputs = fixed_padding(inputs, kernel_size, rate)
muxizju commentedon Apr 30, 2019
it works for the eval.py and vis.py of deeplab!
but one mistake: the cast of neww and newh should be tf.int32
wrong:
right:
and the visualize result is crop region of original image which may not be the purpose of the auther. here is a reference about the explaination of the auther:
https://github.com/tensorflow/models/issues/3939
wszwedaEP commentedon May 9, 2019
@northeastsquare , @muxizju
Big thanks guys, now it works. After hours of struggling your else branch did the job :)
mohhao commentedon Jul 25, 2019
what does In detail mean? need to change something ?
rishab-sharma commentedon Oct 28, 2019
@mohhao Did you figure out what to do with the xception.py file?
rishab-sharma commentedon Oct 28, 2019
@northeastsquare Can you explain the changes to be maid to xception.py file?
3 remaining items