Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

tensorflow retrained graph in 3.3.1

Hi, I still can't seem get a retrained graph working in Opencv it is either not loading or not accurate (completely false). so basically a continuation for this thread: link text While i can load now ,most of, my non mobile, retrained Nets, the accuracy on those he can load is close to zero (while they seem fine in python up until the last step ).

It is a expanded Tutorial net ( retrained also with some other Objects)

Has anyone had any success with a retrained graph in OpenCv?

My steps:

  1. retrain it with 10000 , 5000 and 3000 steps

  2. Optimize for inference

    python ~/tensorflow/tensorflow/python/tools/optimize_for_inference.py \ --input graph.pb \ --output opt_graph.pb \ --input_names Mul\ --output_names final_result

  3. transorm_graph (this seems to destroy the accuracy, but without it the graphs will not load?!)

~/tensorflow/bazel-bin/tensorflow/tools/graph_transforms/transform_graph \ --in_graph=opt_graph.pb --out_graph=final_graph.pb --inputs=Mul --outputs=final_result --transforms="remove_nodes(op=PlaceholderWithDefault) strip_unused_nodes(type=float, shape=\"1,299,299,3\") sort_by_execution_order"

tensorflow retrained graph in 3.3.1

Hi, I still can't seem get a retrained graph working in Opencv it is either not loading or not accurate (completely false). so basically a continuation for this thread: link text While i can load now ,most of, my non mobile, retrained Nets, the accuracy on those he can load is close to zero (while they seem fine in python python(Tensorflow) up until the last step ).

It is a expanded Tutorial net ( retrained also with some other Objects)

Has anyone had any success with a retrained graph in OpenCv?

My steps:

  1. retrain it with 10000 , 5000 and 3000 steps

  2. Optimize for inference

    python ~/tensorflow/tensorflow/python/tools/optimize_for_inference.py \ --input graph.pb \ --output opt_graph.pb \ --input_names Mul\ --output_names final_result

  3. transorm_graph (this seems to destroy the accuracy, but without it the graphs will not load?!)

~/tensorflow/bazel-bin/tensorflow/tools/graph_transforms/transform_graph \ --in_graph=opt_graph.pb --out_graph=final_graph.pb --inputs=Mul --outputs=final_result --transforms="remove_nodes(op=PlaceholderWithDefault) strip_unused_nodes(type=float, shape=\"1,299,299,3\") sort_by_execution_order"

tensorflow retrained graph in 3.3.1

Hi, I still can't seem get a retrained graph working in Opencv it is either not loading or not accurate (completely false). so basically a continuation for this thread: link text While i can load now ,most of, my non mobile, retrained Nets, the accuracy on those he can load is close to zero (while they seem fine in python(Tensorflow) up until the last step ).

It is a expanded Tutorial net ( retrained also with some other Objects)

Has anyone had any success with a retrained graph in OpenCv?

My steps:

  1. retrain it with 10000 , 5000 and 3000 steps

  2. Optimize for inference

    python ~/tensorflow/tensorflow/python/tools/optimize_for_inference.py \ --input graph.pb \ --output opt_graph.pb \ --input_names Mul\ --output_names final_result

  3. transorm_graph (this seems to destroy the accuracy, but without it the graphs will not load?!)

~/tensorflow/bazel-bin/tensorflow/tools/graph_transforms/transform_graph \ --in_graph=opt_graph.pb --out_graph=final_graph.pb --inputs=Mul --outputs=final_result --transforms="remove_nodes(op=PlaceholderWithDefault) strip_unused_nodes(type=float, shape=\"1,299,299,3\") sort_by_execution_order"

The Input still seems to be off (leftgraph on each side is before the transform step...):

leftside output/ right side input