art-programmer / PlaneNet

PlaneNet: Piece-wise Planar Reconstruction from a Single RGB Image
http://art-programmer.github.io/planenet.html
MIT License
400 stars 84 forks source link

About the format of the trained model #8

Open xiaoyangl9413 opened 6 years ago

xiaoyangl9413 commented 6 years ago

Hi author, Your job is amazing. But I have some doubts on your trained model format. You only have checkpoint(.ckpt) file inside the sample_np10_hybrid3_bl0_dl0_ds0_crfrnn5_sm0 folder. I'm wondering could you include tf.GraphDef (.pb) as well? In this way we might be able to do freeze graph things.

Thank you!

art-programmer commented 6 years ago

Thank you for your interests in our work. Correct me if I am wrong but I think you should be able to do freeze graph things with the checkpoint file (.ckpt) as shown here,

https://github.com/tensorflow/models/blob/master/research/slim/export_inference_graph.py

xiaoyangl9413 commented 6 years ago

Thank you for your quick response. I guess right now my issue is that I cannot do tf.train.import_meta_graph("checkpoint/sample_np10_hybrid3_bl0_dl0_ds0_crfrnn5_sm0/checkpoint.ckpt.meta") The error is Traceback (most recent call last): File "writeGraph.py", line 24, in <module> loader = tf.train.import_meta_graph("/home/xiaoyang/project/PlaneNet/checkpoint/sample_np10_hybrid3_bl0_dl0_ds0_crfrnn5_sm0/checkpoint.ckpt.meta") File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/saver.py", line 1941, in import_meta_graph **kwargs) File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/meta_graph.py", line 744, 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 454, in new_func return func(*args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/importer.py", line 391, in import_graph_def _RemoveDefaultAttrs(op_dict, producer_op_list, graph_def) File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/importer.py", line 158, in _RemoveDefaultAttrs op_def = op_dict[node.op] KeyError: u'HighDimFilter'

Do you have any idea why this is happening?

Thank you

xiaoyangl9413 commented 6 years ago

@art-programmer

art-programmer commented 5 years ago

I guess it's due to the fact that HighDimFilter is from a compiled C++ library. I don't know how to freeze that part though.