Following: https://github.com/EdjeElectronics/TensorFlow-Object-Detection-API-Tutorial-Train-Multiple-Objects-W..., I was able to both test and rebuild my own graph.
Now I am getting an error trying to compile the graph for the Movidius. Any help would be appreciated.
root@ubuntuNuc:/opt/checkmail# uname -a
Linux ubuntuNuc 4.15.0-29-generic #31~16.04.1-Ubuntu SMP Wed Jul 18 08:54:04 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
root@ubuntuNuc:/opt/checkmail# ls -all
drwxr-xr-x 2 root root 4096 Jul 30 09:55 .
drwxr-xr-x 4 root root 4096 Jul 30 09:54 ..
-rw-r--r-- 1 root root 52130456 Jul 30 09:55 frozen_inference_graph.pb
root@ubuntuNuc:/opt/checkmail# mvNCCompile frozen_inference_graph.pb -o movidius.pb
mvNCCompile v02.00, Copyright @ Movidius Ltd 2016
/usr/local/lib/python3.5/dist-packages/tensorflow/python/framework/ops.py:766: DeprecationWarning: builtin type EagerTensor has no module attribute
EagerTensor = c_api.TFE_Py_InitEagerTensor(_EagerTensorBase)
/usr/local/lib/python3.5/dist-packages/tensorflow/python/util/tf_inspect.py:45: DeprecationWarning: inspect.getargspec() is deprecated, use inspect.signature() instead
if d.decorator_argspec is not None), _inspect.getargspec(target))
Traceback (most recent call last):
File "/usr/local/bin/mvNCCompile", line 118, in
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 211, in parse_tensor
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/framework/importer.py", line 285, in import_graph_def
raise ValueError('No op named %s in defined operations.' % node.op)
ValueError: No op named NonMaxSuppressionV3 in defined operations.
I'm also experiencing the same issue. I believe it has something to do with the way we trained our model. As the example your following, like the example I followed https://pythonprogramming.net/introduction-use-tensorflow-object-detection-api-tutorial/, doesn't take into consideration that we will be using the Movidius NCS. Movidius provides guidance on compiling a network for use on the NCS here https://movidius.github.io/ncsdk/tf_compile_guidance.html.
I believe one of two things needs to be done. I've posted my thoughts, but I haven't gotten any feedback yet. I'm very new to all of this, so I may be way off base.
1) We have to train our own network, we can't use a pre-trained network that wasn't designed to run on the NCS. The input and output layers must be known, and there shouldn't be any unknown placeholders in the model description. (not sure what placeholders are for). Thats the minimum requirements based on the guidlines needed to run a model on the NCS
2) The second option is we use a pre-trained network that we know will run on the NCS. We have access to those in the NCAPPZOO, however, I can't find any .config files associated with those models. Based on the tutorials I've seen, we need a .config file to train a new network.
Hopefully, someone can give some insight and either say I'm right on the money or barking up the wrong tree. In either case, some direction would be very appreciated.
@ksaye Thanks for reporting this. For your network, the NCSDK doesn't have support for TensorFlow's non-max suppression op, so that's probably the reason you're getting that error. Currently the NCSDK doesn't have support for all Tensorflow operations yet.
@mascenzi Placeholders are a way of inserting external data into the model at a later time. Since the NCS is an inference only device, it makes sense to have a defined placeholder for the input data.
@Tome_at_Intel Thats an excellent idea, @ksaye, as it doesn't seem to be very straight forward to generate a graph that will work with the NCS. Is there any direction that is available as to what steps would need to be taken in order to train a new model off of a pretrained network?
@ahmed.ezzat great progress!
Would love any code share, as I am pretty new at Object Detection and the modifications you have made. Would love to use the Movidius, but honestly without Object Detection in TensorFlow, it seems pretty limited.
@Tome_at_Intel any suggestions on the last step that @ahmed.ezzat is struggling with?