Retraining Inception5h Model from TensorFlow Camera Demo

The TensorFlow camera demo uses the Inception5h Model to recognize live images that provide exceptional performance. Since I did not have a successful retraining of Inception5h, I went with the InceptionV3 model , but this is not quite as fast as image recognition. So I started trying again to retrain (or translate to learn) the Inception5h model. I tried modifying retrain.py , but it is clearly written for the v3 model. Model 5h does not contain "pool_3 / _reshape: 0", "DecodeJpeg / contents: 0", or "ResizeBilinear: 0" to start with. There are other differences.

I am a little new to learning cars and TensorFlow, so I really appreciate the clear steps regarding what I need to do.

Thank!

+4
source share
2 answers

It looks like a retrain.pyscript and tutorial has been updated to work with mobilenet .

So, to solve the first part of your problem, this is not actually inception5h, but it works well on mobile devices with much greater accuracy than inception5h.

In order to actually make it work in the android example, you still need to update these settings .

, , , script, .


, retrain.py, , , , TensorBoard.

, 5h, :

curl -O https://storage.googleapis.com/download.tensorflow.org/models/inception5h.zip
unzip -d inception5h inception5h.zip

script, Tensorflow Poets: 2 codelab repo, .pb , :

curl -O https://raw.githubusercontent.com/googlecodelabs/tensorflow-for-poets-2/master/scripts/graph_pb2tb.py

.pb:

mkdir tb_graph
python graph_pb2tb.py tb/inception5h inception5h/tensorflow_inception_graph.pb 

:

tensorboard --logdir tb_graph

, , model_info dict.

, node, bottleneck_tensor:

TensorBoard screenshot from the very beginning 5h with avgpool0 / reshape backlight

+1

retrain.py script :

output_graph_def = graph_util.convert_variables_to_constants(
  sess, graph.as_graph_def(), [FLAGS.final_tensor_name])
with gfile.FastGFile(FLAGS.output_graph, 'wb') as f:
   f.write(output_graph_def.SerializeToString())

(pb), ('wb'). . , Android, 2 "" android . , begin-v3, : https://github.com/tensorflow/tensorflow/issues/1269 , !

+1

Source: https://habr.com/ru/post/1668633/


All Articles