Community
cancel
Showing results for 
Search instead for 
Did you mean: 
idata
Community Manager
460 Views

mvNCCompile Tensorflow graph, how to.....

Hello again. So after running into several road blocks with generating a caffemodel via DIGITS, I ended up switching tracks. I have now trained a Tensorflow graph and was hoping for some insight regarding using the tensorflow graph to compile a movidius graph for the ncs.

 

https://movidius.github.io/ncsdk/tools/compile.html

 

is the support page for the mvNCCompile command, but I'm not entirely sure what is going on

 

mvNCCompile network.meta [-s max_number_of_shaves] [-in input_node_name] [-on output_node_name] [-is input_width input_height] [-o output_graph_filename] [-ec]

 

and the example

 

mvNCCompile inception-v1.meta -s 12 -in=input -on=InceptionV1/Logits/Predictions/Reshape_1 -is 224 224 -o InceptionV1.graph

 

have given me some insight

 

coming from caffe the mvNCCompile command obviously hasnt changed, nor does it appear that -s or -o have any different implications. I didn't use -is before, but it seems simple enough. It seems like if the input dimensions were part of the tfrecords then leaving it out should be just fine. Or is it the fixed_shape_resizer thats part of the .config file?

 

I'm using a pre-built .config file, ssd_mobilenet_v1_pets.config and only made minor changes in order to test. Just the Paths_to_be_configured, etc.

 

I'm also using a pre-trained mobilenet-ssd, ssd_mobilenet_v1_coco_11_06_2017. I know that tensorflow implementations have been talked about and mentioned that they weren't currently supported by movidius. However, looking at the recent version, 2.05, at the release page https://github.com/movidius/ncsdk/releases its showing mobilenet_v1 is supported.

 

I was wondering if someone could provide some insight in the proper formating of the mvNCCompile command to trained the movidius graph.

 

the output for my tensorflow network contains these files

 

checkpoint

 

frozen_inference_graph.pb

 

model.ckpt.data-00000-of-00001

 

model.ckpt.index

 

model.ckpt.meta

 

pipeline.config

 

Thank you for any support you can offer.

 

Best

 

Michael
0 Kudos
3 Replies
idata
Community Manager
87 Views

@mascenzi mobilenet v1 is supported, however it seems like you may be trying to use ssd_mobilenet_v1. mobilenet_v1 is an image classifier which ssd_mobilenet_v1 is an object detector. The "mobilenet" piece in "ssd_mobilenet" comes from ssd_mobilenet using the mobilenet image classifier model as a feature extractor by removing the fully connected layers at the end of the model.

idata
Community Manager
87 Views

@Tome_at_Intel Ok, I'm a little confused as to what you are saying.

 

mobilenet = image classifier

 

ssd_mobilenet = object detector

 

What exactly is the relationship between ssd_mobilenet and mobilenet your talking about. It seems, maybe your saying that mobilnet is a nothing more than ssd_mobilenet, but without the fully connected layers at the end? is that correct?

 

So with the logic, mobilenet & ssd_mobilenet are lossly related, and that the NCSDK V2 supports mobilenet V1 not ssd_mobilenet v1. So object detection is not currently supported by the NCSDK for Tensorflow and mobilenet? correct?

 

I'm assuming thats why I'm experiencing issues with the NCAPPZOO models.

 

so in the directory workspace/ncappzooV2/tensorflow/mobilenets/model there is mobilenet_v1_1.0_224_frozen.pb which I've used to compile a graph for the NCS. I took that graph and ran it in the workspace/ncappzooV2/apps/video_objects directory with python script video_objects.py. Its not working, so it seems the reason why is that the graph I created is meant for image classification and not object detection.

 

I need to use either yolo or Mobilenet for my application. So if I intend on using tensorflow to generate a model I need to use yolo, else I need to jump back to caffe and there I can use ssd_mobilenet.

 

Thank you for your time and help.

 

Michael

idata
Community Manager
87 Views

 

I was wondering if someone could provide some insight in the proper formating of the mvNCCompile command to trained the movidius graph.

 

the output for my tensorflow network contains these files

 

checkpoint

 

frozen_inference_graph.pb

 

model.ckpt.data-00000-of-00001

 

model.ckpt.index

 

model.ckpt.meta

 

pipeline.config

 

 

double it.

 

I trained inception v2 on our custom dataset to make an object detector, how do I convert all of them files to the ncs-compatible graph?

 

the mnist example guidance doesn't seem to cover it. Is there any example of using custom object detector on ncs?
Reply