frame

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Convert Tensorflow "retrained_graph.pb" and "retrained_labels.txt" to Movidius Graph

Hi @Tome_at_Intel ,

I followed this tutorial https://codelabs.developers.google.com/codelabs/tensorflow-for-poets/index.html?index=../../index#0, to classify images based on my own dataset. However, I am not able to convert the ".pb" and labels to the graph file. I have not found the exact command to generate the graph file. Would you be so kind to help me with this issue?

Thank You

Comments

  • 8 Comments sorted by Votes Date Added
  • @kranok I forgot that there is currently a bug with the current NCSDK (1.12). This bug is preventing some custom/retrained networks from running on the NC devices. That being said we are working on a release candidate at the moment that may fix this issue, but I don't have an ETA at the moment.

  • @kranok Yes I can. Can you post a link to your pb file?

  • @kranok You can use the command below to compile the graph file, however I am receiving an Index out of range error. It looks like maybe this could be because the code uses a None in the shape size and TensorFlowParser.py is trying to check the shape in line 251 (/opt/movidius/NCSDK/ncsdk-x86_64/tk/Controllers/TensorFlowParser.py). You can see the TensorFlow for Poets code is using a None for the input shape: https://github.com/googlecodelabs/tensorflow-for-poets-2/blob/master/scripts/retrain.py#L760. Can you try changing the None to a constant like 1?

    Command to compile the network: mvNCCompile -s 12 retrained_graph.pb -in DecodeJpeg/contents -on final_result

  • Hi @Tome_at_Intel ,

    The training could not be done by changing the "None" to "1". It marked an error. Does the bug occur when trying the "mvNCCompile..." command?

    I tried inputting this command: "$ mvNCCompile retrained_graph.pb -in=input/BottleneckInputPlaceholder -on=DecodeJpeg". It does generate the graph file but the classification is not done correctly.

    Thank You,

  • @kranok Thanks for the feedback. Can you do me a favor and try this: mvNCCompile retrained_graph.pb -in=input/BottleneckInputPlaceholder -on= final_result?

  • @Tome_at_Intel - ran mvNCCompile retrained_graph.pb -in=input_1/BottleneckInputPlaceholder -on= final_result -o flowergraph using the poets-2 retrained_graph.pb and got the flowergraph generated. Tried using this graph in the ncs_realtime_objectdetection.py as follows: python ncs_realtime_objectdetection.py -g graphs/flowergraph -d 1
    This does not error but there are no bounding boxes or labels. Works fine when I use the mobilenetgraph. Any idea? Appreciate your help. This is run on a RPi with a movidius NCS plugged in.

  • @manopaul I'm not familiar with the ncs_realtime_objectdetection.py sample. Is this your own sample? If you can provide a link to the code, I can try to reproduce the issue and help with troubleshooting.

Sign In or Register to comment.