argman / EAST

A tensorflow implementation of EAST text detector
GNU General Public License v3.0
3.01k stars 1.05k forks source link

Does anyone know the output_node_names? #185

Open caijimin opened 6 years ago

caijimin commented 6 years ago

Thanks very much for your tensorflow re-implementation of EAST. I want to freeze the graph with the checkpoint using freeze_graph.py, and I don't know the exact name of --output_node_names.

I tried "feature_fusion/Conv_7/Sigmoid" and it fails, could any kindly tell me? python tensorflow/python/tools/freeze_graph.py --input_meta_graph=model.ckpt-49491.meta --input_checkpoint=model.ckpt-49491 --output_graph=model_frozen.pb --input_binary=true --output_node_names="feature_fusion/Conv_7/Sigmoid"

File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/graph_util_impl.py", line 133, in _assert_nodes_are_present assert d in name_to_node, "%s is not in graph" % d AssertionError: feature_fusion/Conv_7/Sigmoid is not in graph

Thanks, Jimin

ghost commented 6 years ago
  output_graph = "frozen_model.pb"
        output_graph_def = tf.graph_util.convert_variables_to_constants(
            sess,  # The session is used to retrieve the weights
            tf.get_default_graph().as_graph_def(),  # The graph_def is used to retrieve the nodes
            ["feature_fusion/Conv_7/Sigmoid", "feature_fusion/concat_3"]
        )

        with tf.gfile.GFile(output_graph, "wb") as f:
            f.write(output_graph_def.SerializeToString())

Insert this code in here(https://github.com/argman/EAST/blob/master/eval.py#L148)

mohammedayub44 commented 3 years ago

@argman I froze the graph this way and tried to load and test it. The frozen graph is giving really bad predictions. Is there a better way to freeze the graph , I saw some issues where they suggested to include MovingAverage params as well.

Any help appreciated. Thanks!

ehsanro commented 3 months ago

@argman I froze the graph this way and tried to load and test it. The frozen graph is giving really bad predictions. Is there a better way to freeze the graph , I saw some issues where they suggested to include MovingAverage params as well.

Any help appreciated. Thanks!

Hi I have the same problem, did you find any solution?