tensorflow retrained graph in 3.3.1

asked 2018-01-03 11:47:25 -0500

Robb gravatar image

updated 2018-01-03 12:22:00 -0500

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

edit retag flag offensive close merge delete

Comments

@Robb, please just put a reference to model so we can check it. Thanks!

dkurt gravatar imagedkurt ( 2018-01-08 07:32:34 -0500 )edit