Coder Social home page Coder Social logo

fidler-lab / polyrnn-pp Goto Github PK

View Code? Open in Web Editor NEW
730.0 47.0 159.0 1.51 MB

Inference Code for Polygon-RNN++ (CVPR 2018)

License: GNU General Public License v3.0

Python 11.23% Jupyter Notebook 88.48% Shell 0.29%
cvpr2018 tensorflow deep-learning instance-segmentation instance-annotation polygon-rnn polyrnn annotation labelling

polyrnn-pp's People

Contributors

amlankar avatar arieling avatar davidjesusacu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

polyrnn-pp's Issues

Training code release date

Hi, when do you approximately expect the training code to be released? At least approximately, like "in one month from now"?

I was greatly disappointed with the original PolyRNN paper, which had "code coming soon" on the project website (and also in the paper itself: "We plan to release our code and create a web-annotation interface running our model at the backend.") for quite a long time. I have checked frequently only to find, that this promise has simply disappeared one day. Hope this won't be the case with this paper.

Jupyter project demo error

Can you please check the jupiter demo, I could not make it work
.
It stuck in this step :
#Initializing and restoring the evaluator net. with evalGraph.as_default(): with tf.variable_scope("discriminator_network"): evaluator = EvalNet(_BATCH_SIZE) evaluator.build_graph() saver = tf.train.Saver()

# Start session evalSess = tf.Session(config=tf.ConfigProto( allow_soft_placement=True ), graph=evalGraph) saver.restore(evalSess, EvalNet_checkpoint`

Davis dataset

Why have you excluded an evaluation on very high quality annotations like Davis dataset and related F measure on boundaries?

Fine-tuning network

Excellent repo 👍 Could you please provide some guidance on how to fine-tune the network for new objects?

Thanks,
Dani

demo not responding

the online demo doesn't create annotation on the demo images. Looks like gpu backend is not working.

the environment

hello, I want to konw the environment of python and Cuda, because when I run the requirements,it is successful,but it can't tho run the demo.

ValueError: graph_def is invalid at node u'GatherTree': Input types mismatch

When I restore the PolygonRNN++ model, it raised the following error:

INFO:tensorflow:Building PolygonRNN++ ...
Traceback (most recent call last):
  File "src/inference.py", line 135, in <module>
    tf.app.run(inference)
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/platform/app.py", line 124, in run
    _sys.exit(main(argv))
  File "src/inference.py", line 79, in inference
    model = PolygonModel(FLAGS.PolyRNN_metagraph, polyGraph)
  File "/home/konghaiyang/polygon/polyrnn-pp/src/PolygonModel.py", line 43, in __init__
    self._restore_graph(meta_graph_path)
  File "/home/konghaiyang/polygon/polyrnn-pp/src/PolygonModel.py", line 47, in _restore_graph
    self.saver = tf.train.import_meta_graph(meta_graph_path, clear_devices=True)
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/saver.py", line 1838, in import_meta_graph
    **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/meta_graph.py", line 660, in import_scoped_meta_graph
    producer_op_list=producer_op_list)
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/util/deprecation.py", line 316, in new_func
    return func(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/importer.py", line 657, in import_graph_def
    ', '.join(x.name for x in op._input_dtypes))))
ValueError: graph_def is invalid at node u'GatherTree': Input types mismatch (expected 'int32, int32, int32, int32' but got 'int32, int32, int32').

Could anybody tell me what's the reason and how to fix it?
Thank you.

how can I convert pth to ckpt

I got the training code,however the weight file is .pth,how can I convert pth to ckpt so that I can resume train and use this tensorflow demo.
thank you!

Upgrading to Pytorch 1.3/Python3

Hi, I'm trying to update the code to use python 3 and pytorch 1.3.

When running inference, I'm getting a different output than python 2 and pytorch 0.4.

Do you know what needs to change?
I can get SkipResnet outputs to match by setting the "align_corners=False" on the Upsample layers.

However, if use_ggnn=True, the output is completely different.
There must be something in PolyGGNN that breaks on upgrade.

Visualizing the polygon model

I had some trouble attempting to visualise the 'poly' model using tensorboard although I can visualise the evalnet and the ggnn model. It still isn't clear to me that I made an error so I'll list the steps I followed before trying to load the polygon model meta graph.

  1. On my Macbook air(OS Sierra), I setup a virtual environment using Conda as follows:

conda create -n tf13 python=3.6 anaconda

  1. I then proceeded to install tensorflow version 1.3 as follows:

pip install --ignore-installed --upgrade tensorflow==1.3
3. Once in the environment, I cloned your repository and tried to install requirements. Everything installed without a problem except for tensorflow-gpu==1.3:

Collecting tensorflow-gpu==1.3.0
Could not find a version that satisfies the requirement tensorflow-gpu==1.3.0 (from versions: 0.12.1, 1.0.0, 1.0.1, 1.1.0rc0, 1.1.0rc1, 1.1.0rc2, 1.1.0)
No matching distribution found for tensorflow-gpu==1.3.0

  1. Now, I proceed to launch iPython and execute the following:
import tensorflow as tf

g = tf.Graph() 

model_path = './polyrnn-pp/models/poly/polygonplusplus.ckpt.meta'

with g.as_default() as g: 
    tf.train.import_meta_graph(model_path) 

this returns the following error:

---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-1-9aa8b0584d3e> in <module>()
     10 ## restoring checkpoints:
     11 tf.reset_default_graph()
---> 12 imported_meta = tf.train.import_meta_graph(model_path)

~/anaconda/envs/tf13/lib/python3.6/site-packages/tensorflow/python/training/saver.py in import_meta_graph(meta_graph_or_file, clear_devices, import_scope, **kwargs)
   1696                                       clear_devices=clear_devices,
   1697                                       import_scope=import_scope,
-> 1698                                       **kwargs)
   1699   if meta_graph_def.HasField("saver_def"):
   1700     return Saver(saver_def=meta_graph_def.saver_def, name=import_scope)

~/anaconda/envs/tf13/lib/python3.6/site-packages/tensorflow/python/framework/meta_graph.py in import_scoped_meta_graph(meta_graph_or_file, clear_devices, graph, import_scope, input_map, unbound_inputs_col_name, restore_collections_predicate)
    654     importer.import_graph_def(
    655         input_graph_def, name=(import_scope or ""), input_map=input_map,
--> 656         producer_op_list=producer_op_list)
    657 
    658     scope_to_prepend_to_names = "/".join(

~/anaconda/envs/tf13/lib/python3.6/site-packages/tensorflow/python/framework/importer.py in import_graph_def(graph_def, input_map, return_elements, name, op_dict, producer_op_list)
    283       # Set any default attr values that aren't present.
    284       if node.op not in op_dict:
--> 285         raise ValueError('No op named %s in defined operations.' % node.op)
    286       op_def = op_dict[node.op]
    287       for attr_def in op_def.attr:

ValueError: No op named GatherTree in defined operations.
  1. When I do the exact same thing for the evalnet model or the ggnn model, I don't encounter this problem.

Update: I checked issues 2 and 3 and can confirm that besides using TF version 1.3.0 I'm also using CUDA version 8.0:

(tf13) Aidans-MacBook-Air:models aidanrockea$
(tf13) Aidans-MacBook-Air:models aidanrockea$ cat /usr/local/cuda/version.txt
CUDA Version 8.0.62

Does the demo generate the annotation files for the test images?

Hi, sorry to bother you with this question, I know that i have to downgrade my tf to 1.3 and cuda to 8.0 , however I'm just wondering if the demo generates the annotation files.
I'm a PhD researcher and I'm working on food segmentation and your tool will be a great help and boost forward.
wonder if the tool is released soon.. or should I downgrade and start with the demo?
thanks for your help in advance

Training code request

I am a student at the University of Engineering. I am very interested in your article, but at the beginning of my study, can you provide the source code of the training process? I would like to use it to compare the study of the article.

ValueError in demo_polyrnn

I am receiving following error while initializing polygon rnn m odel in cell 5 line 2.
graph_def is invalid at node 'GatherTree': Input types mismatch (expected 'int32, int32, int32, int32' but got 'int32, int32, int32').

Traceback of the error is:
`ValueError                                Traceback (most recent call last)
<ipython-input-5-680ad34db7a9> in <module>()
      1 #Initializing and restoring PolyRNN++
----> 2 model = PolygonModel(PolyRNN_metagraph, polyGraph)
      3 model.register_eval_fn(lambda input_: evaluator.do_test(evalSess, input_))
      4 polySess = tf.Session(config=tf.ConfigProto(
      5     allow_soft_placement=True

D:\SUVIDHA\polyrnn-pp-master\src\PolygonModel.py in __init__(self, meta_graph_path, graph)
     30         self.saver = None
     31         self.eval_pred_fn = None
---> 32         self._restore_graph(meta_graph_path)
     33 
     34     def _restore_graph(self, meta_graph_path):

D:\SUVIDHA\polyrnn-pp-master\src\PolygonModel.py in _restore_graph(self, meta_graph_path)
     34     def _restore_graph(self, meta_graph_path):
     35         with self.graph.as_default():
---> 36             self.saver = tf.train.import_meta_graph(meta_graph_path, clear_devices=True)
     37 
     38     def _prediction(self):

~\Anaconda3\lib\site-packages\tensorflow\python\training\saver.py in import_meta_graph(meta_graph_or_file, clear_devices, import_scope, **kwargs)
   1925                                       clear_devices=clear_devices,
   1926                                       import_scope=import_scope,
-> 1927                                       **kwargs)
   1928   if meta_graph_def.HasField("saver_def"):
   1929     return Saver(saver_def=meta_graph_def.saver_def, name=import_scope)

~\Anaconda3\lib\site-packages\tensorflow\python\framework\meta_graph.py in import_scoped_meta_graph(meta_graph_or_file, clear_devices, graph, import_scope, input_map, unbound_inputs_col_name, restore_collections_predicate)
    739     importer.import_graph_def(
    740         input_graph_def, name=(import_scope or ""), input_map=input_map,
--> 741         producer_op_list=producer_op_list)
    742 
    743     # Restores all the other collections.

~\Anaconda3\lib\site-packages\tensorflow\python\util\deprecation.py in new_func(*args, **kwargs)
    430                 'in a future version' if date is None else ('after %s' % date),
    431                 instructions)
--> 432       return func(*args, **kwargs)
    433     return tf_decorator.make_decorator(func, new_func, 'deprecated',
    434                                        _add_deprecated_arg_notice_to_docstring(

~\Anaconda3\lib\site-packages\tensorflow\python\framework\importer.py in import_graph_def(graph_def, input_map, return_elements, name, op_dict, producer_op_list)
    678                   'Input types mismatch (expected %r but got %r)'
    679                   % (', '.join(dtypes.as_dtype(x).name for x in input_types),
--> 680                      ', '.join(x.name for x in op._input_types))))
    681         # pylint: enable=protected-access
    682 

ValueError: graph_def is invalid at node 'GatherTree': Input types mismatch (expected 'int32, int32, int32, int32' but got 'int32, int32, int32').`

I have setup the environment in anaconda on windows machine.

demo error

After I changed the version of tf to 1.3.0, it turned out to be
2018-06-25 3 37 51

How can I fix with it?

I have a problem, can you help me?


ValueError Traceback (most recent call last)
in ()
1 #Initializing and restoring PolyRNN++
----> 2 model = PolygonModel(PolyRNN_metagraph, polyGraph)
3 model.register_eval_fn(lambda input_: evaluator.do_test(evalSess, input_))
4 polySess = tf.Session(config=tf.ConfigProto(
5 allow_soft_placement=True

~\polyrnn-pp\src\PolygonModel.py in init(self, meta_graph_path, graph)
30 self.saver = None
31 self.eval_pred_fn = None
---> 32 self._restore_graph(meta_graph_path)
33
34 def _restore_graph(self, meta_graph_path):

~\polyrnn-pp\src\PolygonModel.py in _restore_graph(self, meta_graph_path)
34 def _restore_graph(self, meta_graph_path):
35 with self.graph.as_default():
---> 36 self.saver = tf.train.import_meta_graph(meta_graph_path, clear_devices=True)
37
38 def _prediction(self):

D:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\training\saver.py in import_meta_graph(meta_graph_or_file, clear_devices, import_scope, **kwargs)
1907 clear_devices=clear_devices,
1908 import_scope=import_scope,
-> 1909 **kwargs)
1910 if meta_graph_def.HasField("saver_def"):
1911 return Saver(saver_def=meta_graph_def.saver_def, name=import_scope)

D:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\framework\meta_graph.py in import_scoped_meta_graph(meta_graph_or_file, clear_devices, graph, import_scope, input_map, unbound_inputs_col_name, restore_collections_predicate)
735 importer.import_graph_def(
736 input_graph_def, name=(import_scope or ""), input_map=input_map,
--> 737 producer_op_list=producer_op_list)
738
739 # Restores all the other collections.

D:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\util\deprecation.py in new_func(*args, **kwargs)
430 'in a future version' if date is None else ('after %s' % date),
431 instructions)
--> 432 return func(*args, **kwargs)
433 return tf_decorator.make_decorator(func, new_func, 'deprecated',
434 _add_deprecated_arg_notice_to_docstring(

D:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\framework\importer.py in import_graph_def(graph_def, input_map, return_elements, name, op_dict, producer_op_list)
654 'Input types mismatch (expected %r but got %r)'
655 % (', '.join(dtypes.as_dtype(x).name for x in input_types),
--> 656 ', '.join(x.name for x in op._input_types))))
657 # pylint: enable=protected-access
658

ValueError: graph_def is invalid at node 'GatherTree': Input types mismatch (expected 'int32, int32, int32, int32' but got 'int32, int32, int32').

Error initializing and restonring PolyRNN

Hello, I have tried running the demos for polyrnn++ following the instructions in the readme however, I keep getting an error when trying to restore polyrnn metagraph. I would appreciate any help on this, more details regarding the error is the following:

Code:
#Initializing and restoring PolyRNN++
model = PolygonModel(PolyRNN_metagraph, polyGraph)
model.register_eval_fn(lambda input_: evaluator.do_test(evalSess, input_))
polySess = tf.Session(config=tf.ConfigProto(
allow_soft_placement=True
), graph=polyGraph)
model.saver.restore(polySess, PolyRNN_checkpoint)

Error:
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
in ()
1 #Initializing and restoring PolyRNN++
----> 2 model = PolygonModel(PolyRNN_metagraph, polyGraph)
3 model.register_eval_fn(lambda input_: evaluator.do_test(evalSess, input_))
4 polySess = tf.Session(config=tf.ConfigProto(
5 allow_soft_placement=True

/media/nelson/Workspace1/Projects/building_reconstruction/polyrnn/src/PolygonModel.py in init(self, meta_graph_path, graph)
30 self.saver = None
31 self.eval_pred_fn = None
---> 32 self._restore_graph(meta_graph_path)
33
34 def _restore_graph(self, meta_graph_path):

/media/nelson/Workspace1/Projects/building_reconstruction/polyrnn/src/PolygonModel.py in _restore_graph(self, meta_graph_path)
34 def _restore_graph(self, meta_graph_path):
35 with self.graph.as_default():
---> 36 self.saver = tf.train.import_meta_graph(meta_graph_path, clear_devices=False)
37
38 def _prediction(self):

/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/saver.pyc in import_meta_graph(meta_graph_or_file, clear_devices, import_scope, **kwargs)
1925 clear_devices=clear_devices,
1926 import_scope=import_scope,
-> 1927 **kwargs)
1928 if meta_graph_def.HasField("saver_def"):
1929 return Saver(saver_def=meta_graph_def.saver_def, name=import_scope)

/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/meta_graph.pyc in import_scoped_meta_graph(meta_graph_or_file, clear_devices, graph, import_scope, input_map, unbound_inputs_col_name, restore_collections_predicate)
739 importer.import_graph_def(
740 input_graph_def, name=(import_scope or ""), input_map=input_map,
--> 741 producer_op_list=producer_op_list)
742
743 # Restores all the other collections.

/usr/local/lib/python2.7/dist-packages/tensorflow/python/util/deprecation.pyc in new_func(*args, **kwargs)
430 'in a future version' if date is None else ('after %s' % date),
431 instructions)
--> 432 return func(*args, **kwargs)
433 return tf_decorator.make_decorator(func, new_func, 'deprecated',
434 _add_deprecated_arg_notice_to_docstring(

/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/importer.pyc in import_graph_def(graph_def, input_map, return_elements, name, op_dict, producer_op_list)
678 'Input types mismatch (expected %r but got %r)'
679 % (', '.join(dtypes.as_dtype(x).name for x in input_types),
--> 680 ', '.join(x.name for x in op._input_types))))
681 # pylint: enable=protected-access
682

ValueError: graph_def is invalid at node u'GatherTree': Input types mismatch (expected 'int32, int32, int32, int32' but got 'int32, int32, int32').

Windows Scripts Needed

I am having trouble running the scripts in a windows environment. It would be great if you can prepare a windows exclusive scripts folder for people to get it running.

Stride and Dilation?

In the paper, it says

In order to alleviate this issue, we follow [7] and modify the ResNet-50 architecture [13] by reducing the stride of the network and introducing dilation factors.

However, the "dilation factors" nor the "stride" is explicitly stated in the paper (I failed to calculate both of these factors based on the feature maps' shapes provided on page 3 of the paper). Looking into paper #7, Deeplab: Semantic image segmentation with deep convolutional nets, atrous convolution, and fully connected crfs (Deeplab v2), the Resnet it proposed is all but regarding Resnet-101 but not Resnet-50. Is it possible for you to release the stride and dilation (tf.nn.atrous) factor you used in the experiment?

Thanks!
Max

while running demo on my own data

When I replaced the demo images with my own data, an error occurred and it told me the shape of my images tensor is not the required shape:[1,224,224], so if I want to run demo on my own data, the only way I can choose is change the size of my data, because if I change the default tensor in the code, I will encounter more troubles, something like changing the pretrained model.
So if the code is only suitable for the images in the shape of 224*224? I'm confused.

error downloading requirements

I have this error warning when I do the pip install -r requirements.txt step. Do you have any idea how to fix this?

Building wheels for collected packages: subprocess32
Building wheel for subprocess32 (setup.py) ... error
Complete output from command /home/ai/polyrnn-pp-master/env/bin/python2 -u -c "import setuptools, tokenize;file='/tmp/pip-install-lH9QHe/subprocess32/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" bdist_wheel -d /tmp/pip-wheel-r5982Y --python-tag cp27:
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
copying subprocess32.py -> build/lib.linux-x86_64-2.7
running build_ext
building '_posixsubprocess' extension
creating build/temp.linux-x86_64-2.7
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c _posixsubprocess.c -o build/temp.linux-x86_64-2.7/_posixsubprocess.o
_posixsubprocess.c:3:20: fatal error: Python.h: 没有那个文件或目录
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1


Failed building wheel for subprocess32
Running setup.py clean for subprocess32
Failed to build subprocess32
Installing collected packages: subprocess32, pytz, python-dateutil, numpy, matplotlib, pbr, mock, networkx, opencv-python, Pillow, protobuf, PyWavelets, scipy, scikit-image, Werkzeug, tensorflow-tensorboard, tensorflow-gpu, tqdm
Running setup.py install for subprocess32 ... error
Complete output from command /home/ai/polyrnn-pp-master/env/bin/python2 -u -c "import setuptools, tokenize;file='/tmp/pip-install-lH9QHe/subprocess32/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-record-4VN9NO/install-record.txt --single-version-externally-managed --compile --install-headers /home/ai/polyrnn-pp-master/env/include/site/python2.7/subprocess32:
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
copying subprocess32.py -> build/lib.linux-x86_64-2.7
running build_ext
building '_posixsubprocess' extension
creating build/temp.linux-x86_64-2.7
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c _posixsubprocess.c -o build/temp.linux-x86_64-2.7/_posixsubprocess.o
_posixsubprocess.c:3:20: fatal error: Python.h: 没有那个文件或目录
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

----------------------------------------

Command "/home/ai/polyrnn-pp-master/env/bin/python2 -u -c "import setuptools, tokenize;file='/tmp/pip-install-lH9QHe/subprocess32/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-record-4VN9NO/install-record.txt --single-version-externally-managed --compile --install-headers /home/ai/polyrnn-pp-master/env/include/site/python2.7/subprocess32" failed with error code 1 in /tmp/pip-install-lH9QHe/subprocess32/

Bug in demo_inference.sh

ValueError: graph_def is invalid at node u'GatherTree': Input types mismatch (expected 'int32, int32, int32, int32' but got 'int32, int32, int32').

screenshot from 2018-04-12 22-07-12

Demo not running

Hey!

I'm trying to run the demo, which fails with:

./src/demo_inference.sh 
Traceback (most recent call last):
  File "src/inference.py", line 9, in <module>
    from EvalNet import EvalNet
  File "/home/anika/Documents/workspace/markup_tools/polyrnn/src/EvalNet.py", line 1, in <module>
    import tensorflow.contrib.layers as layers
  File "/home/anika/Documents/workspace/markup_tools/polyrnn/env/local/lib/python2.7/site-packages/tensorflow/contrib/__init__.py", line 22, in <module>
    from tensorflow.contrib import bayesflow
  File "/home/anika/Documents/workspace/markup_tools/polyrnn/env/local/lib/python2.7/site-packages/tensorflow/contrib/bayesflow/__init__.py", line 24, in <module>
    from tensorflow.contrib.bayesflow.python.ops import csiszar_divergence
  File "/home/anika/Documents/workspace/markup_tools/polyrnn/env/local/lib/python2.7/site-packages/tensorflow/contrib/bayesflow/python/ops/csiszar_divergence.py", line 26, in <module>
    from tensorflow.contrib.bayesflow.python.ops.csiszar_divergence_impl import *
  File "/home/anika/Documents/workspace/markup_tools/polyrnn/env/local/lib/python2.7/site-packages/tensorflow/contrib/bayesflow/python/ops/csiszar_divergence_impl.py", line 42, in <module>
    from tensorflow.contrib import framework as contrib_framework
  File "/home/anika/Documents/workspace/markup_tools/polyrnn/env/local/lib/python2.7/site-packages/tensorflow/contrib/framework/__init__.py", line 89, in <module>
    from tensorflow.contrib.framework.python.ops import *
  File "/home/anika/Documents/workspace/markup_tools/polyrnn/env/local/lib/python2.7/site-packages/tensorflow/contrib/framework/python/ops/__init__.py", line 24, in <module>
    from tensorflow.contrib.framework.python.ops.checkpoint_ops import *
  File "/home/anika/Documents/workspace/markup_tools/polyrnn/env/local/lib/python2.7/site-packages/tensorflow/contrib/framework/python/ops/checkpoint_ops.py", line 22, in <module>
    from tensorflow.contrib.framework.python.ops import gen_checkpoint_ops
  File "/home/anika/Documents/workspace/markup_tools/polyrnn/env/local/lib/python2.7/site-packages/tensorflow/contrib/framework/python/ops/gen_checkpoint_ops.py", line 248, in <module>
    _op_def_lib = _InitOpDefLibrary(b"\n\223\001\n\026GenerateVocabRemapping\022\022\n\016new_vocab_file\030\007\022\022\n\016old_vocab_file\030\007\032\r\n\tremapping\030\t\032\017\n\013num_present\030\003\"\031\n\020new_vocab_offset\022\003int(\001\"\026\n\rnum_new_vocab\022\003int(\001\n\335\001\n\022LoadAndRemapMatrix\022\r\n\tckpt_path\030\007\022\023\n\017old_tensor_name\030\007\022\021\n\rrow_remapping\030\t\022\021\n\rcol_remapping\030\t\022\027\n\023initializing_values\030\001\032\021\n\routput_matrix\030\001\"\021\n\010num_rows\022\003int(\001\"\023\n\010num_cols\022\003int(\0010\001\"&\n\022max_rows_in_memory\022\003int\032\013\030\377\377\377\377\377\377\377\377\377\001\210\001\001")
  File "/home/anika/Documents/workspace/markup_tools/polyrnn/env/local/lib/python2.7/site-packages/tensorflow/contrib/framework/python/ops/gen_checkpoint_ops.py", line 167, in _InitOpDefLibrary
    _op_def_registry.register_op_list(op_list)
  File "/home/anika/Documents/workspace/markup_tools/polyrnn/env/local/lib/python2.7/site-packages/tensorflow_core/python/framework/op_def_registry.py", line 38, in register_op_list
    % (op_def.name, _registered_ops[op_def.name], op_def))
ValueError: Registered op_def for GenerateVocabRemapping (name: "GenerateVocabRemapping"
input_arg {
  name: "new_vocab_file"
  type: DT_STRING
}
input_arg {
  name: "old_vocab_file"
  type: DT_STRING
}
output_arg {
  name: "remapping"
  type: DT_INT64
}
output_arg {
  name: "num_present"
  type: DT_INT32
}
attr {
  name: "new_vocab_offset"
  type: "int"
  has_minimum: true
}
attr {
  name: "num_new_vocab"
  type: "int"
  has_minimum: true
}
attr {
  name: "old_vocab_size"
  type: "int"
  default_value {
    i: -1
  }
  has_minimum: true
  minimum: -1
}
) not equal to op_def to register (name: "GenerateVocabRemapping"
input_arg {
  name: "new_vocab_file"
  type: DT_STRING
}
input_arg {
  name: "old_vocab_file"
  type: DT_STRING
}
output_arg {
  name: "remapping"
  type: DT_INT64
}
output_arg {
  name: "num_present"
  type: DT_INT32
}
attr {
  name: "new_vocab_offset"
  type: "int"
  has_minimum: true
}
attr {
  name: "num_new_vocab"
  type: "int"
  has_minimum: true
}
)
Traceback (most recent call last):
  File "src/vis_predictions.py", line 9, in <module>
    from poly_utils import vis_polys
  File "/home/anika/Documents/workspace/markup_tools/polyrnn/src/poly_utils.py", line 5, in <module>
    import skimage.draw as draw
  File "/home/anika/Documents/workspace/markup_tools/polyrnn/env/local/lib/python2.7/site-packages/skimage/__init__.py", line 158, in <module>
    from .util.dtype import *
  File "/home/anika/Documents/workspace/markup_tools/polyrnn/env/local/lib/python2.7/site-packages/skimage/util/__init__.py", line 7, in <module>
    from .arraycrop import crop
  File "/home/anika/Documents/workspace/markup_tools/polyrnn/env/local/lib/python2.7/site-packages/skimage/util/arraycrop.py", line 8, in <module>
    from numpy.lib.arraypad import _validate_lengths
ImportError: cannot import name _validate_lengths

What am I missing?

Tensorflow CPU Mode - Value Error in Demo Inference

When execute the demo script (./src/demo_inference.s) on tensorflow cpu mode, I have experienced the following error.

INFO:tensorflow:Building EvalNet...
2018-06-13 16:46:45.885704: I tensorflow/core/platform/cpu_feature_guard.cc:140] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
INFO:tensorflow:Restoring parameters from models/evalnet/evalnet.ckpt
INFO:tensorflow:Building PolygonRNN++ ...
Traceback (most recent call last):
  File "src/inference.py", line 115, in <module>
    tf.app.run(inference)
  File "/home/beemelmanns/Dokumente/polyrnn/env/local/lib/python2.7/site-packages/tensorflow/python/platform/app.py", line 126, in run
    _sys.exit(main(argv))
  File "src/inference.py", line 69, in inference
    model = PolygonModel(FLAGS.PolyRNN_metagraph, polyGraph)
  File "/home/beemelmanns/Dokumente/polyrnn/src/PolygonModel.py", line 32, in __init__
    self._restore_graph(meta_graph_path)
  File "/home/beemelmanns/Dokumente/polyrnn/src/PolygonModel.py", line 36, in _restore_graph
    self.saver = tf.train.import_meta_graph(meta_graph_path, clear_devices=True)
  File "/home/beemelmanns/Dokumente/polyrnn/env/local/lib/python2.7/site-packages/tensorflow/python/training/saver.py", line 1955, in import_meta_graph
    **kwargs)
  File "/home/beemelmanns/Dokumente/polyrnn/env/local/lib/python2.7/site-packages/tensorflow/python/framework/meta_graph.py", line 743, in import_scoped_meta_graph
    producer_op_list=producer_op_list)
  File "/home/beemelmanns/Dokumente/polyrnn/env/local/lib/python2.7/site-packages/tensorflow/python/util/deprecation.py", line 432, in new_func
    return func(*args, **kwargs)
  File "/home/beemelmanns/Dokumente/polyrnn/env/local/lib/python2.7/site-packages/tensorflow/python/framework/importer.py", line 493, in import_graph_def
    raise ValueError(str(e))
ValueError: NodeDef expected inputs 'int32, int32, int32, int32' do not match 3 inputs specified; Op<name=GatherTree; signature=step_ids:T, parent_ids:T, max_sequence_lengths:int32, end_token:T -> beams:T; attr=T:type,allowed=[DT_INT32]>; NodeDef: GatherTree = GatherTree[T=DT_INT32, _output_shapes=[[?,1,8]]](TensorArrayStack_1/TensorArrayGatherV3, TensorArrayStack_2/TensorArrayGatherV3, Select_69)

0it [00:00, ?it/s]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.