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

Is there any instruction to train my own model?

Hi,

 

I'm a newer to use ncs. About one month ago I purchased my ncs stick but with no idea to apply my own model.

 

Description

 

_Goal and What I did_

 

Goal: I'm trying to train a vgg_16 model to detect object, I'll be very happy if faster-rcnn is also available.

 

What I did: I have a stable version of vgg16 model trained by Faster RCNN with my own dataset. I generated a vgg16 graphDef by using export_inference_graph.py, and then use freeze_graph.py but something seems wrong (because I met rhs lhs issue) and I even don't know what is the output node for vgg16. Then I thought maybe it's important to train a smaller model by using TensorFlow's Object Detection API firstly, and that is my first step.

 

_Steps_

 

I'd like to apply Tensorflow's Object detection API with ssd_mobilenet v1 onto ncs. By following https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/running_locally.md I got a saved_model.pb file from ssd_mobile_v1.ckpt, then I ran

 

mvNCCompile saved_model.pb -in=input -on=MobilenetV1/Predictions/Reshape_1 -is 224 224 -o graph

 

Maybe there are some error arguments, I got an issue like

 

Traceback (most recent call last): File "/usr/local/bin/mvNCCompile", line 118, in <module> create_graph(args.network, args.inputnode, args.outputnode, args.outfile, args.nshaves, args.inputsize, args.weights) File "/usr/local/bin/mvNCCompile", line 104, in create_graph net = parse_tensor(args, myriad_config) File "/usr/local/bin/ncsdk/Controllers/TensorFlowParser.py", line 210, in parse_tensor graph_def.ParseFromString(f.read()) google.protobuf.message.DecodeError: Error parsing message

 

I got this unexpected error in my first step. Could anyone give me some direction? Thanks.

Tags (1)
0 Kudos
1 Reply
idata
Community Manager
136 Views

Hello,

 

I'm also facing the same problem, i trained a object detection network using Google's Tensorflow Object detection API, in my case I used the "faster_rcnn_inception_resnet_v2" architecture. Once trained I froze the ckpt.data, ckpt.index and ckpt.meta files into a saved_model.pb

 

After running:

 

mvNCCompile saved_model.pb -s 12 -in=image_tensor -on=detection_boxes -is 1920 1080 -o out.graph

 

I got the exact same error as @ZxqCreations.

 

Any idea on how to solve it?

 

Thanks.

Reply