Intel® Distribution of OpenVINO™ Toolkit
Community assistance about the Intel® Distribution of OpenVINO™ toolkit, OpenCV, and all aspects of computer vision-related on Intel® platforms.
6401 Discussions

TypeError When Compiling Mobilenet V1 in Tensorflow

idata
Employee
793 Views

Hi,

 

I am working on deploying a modified version of Openpose library (pose estimation) from Github

 

https://github.com/ildoonet/tf-pose-estimation

 

The author migrated the original pose estimation from Caffe into Tensorflow, and export his model. I am compiling the .pd model under "./models/graph/mobilenet_thin/graph_opt.pb"

 

https://github.com/ildoonet/tf-pose-estimation/tree/master/models/graph/mobilenet_thin

 

but got a Type-error like below. (with virtualbox and Ubuntu 16.04, NCSDK v1)

 

 

tcwei@tcwei-VirtualBox:~/workspace/tfpose_test/models/graph/mobilenet_thin$ mvNCCompile graph_opt.pb -s 12 -in image -on Openpose/concat_stage7 -o graph_opt.graph

 

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 259, in parse_tensor

 

input_data = np.random.uniform(0, 1, shape)

 

File "mtrand.pyx", line 1302, in mtrand.RandomState.uniform

 

File "mtrand.pyx", line 242, in mtrand.cont2_array_sc

 

TypeError: 'NoneType' object cannot be interpreted as an integer

 

 

I checked some other discussions. It seems that most of time, the TypeError comes up with a unsupported issue and NCSDK doesn't support SSD-mobilenet. However, I am not sure if the model is using mobilenet v1 or SSD-mobilenet.

 

Also, through Tensorboard visualization as below:

 

https://imgur.com/a/RCqsEbN

 

I found that the model file includes mobilenet-V1 namescope and Openpose namescope. Would the other libraries/architectures like Openpose in my situation result in compiling failed? How to solve the problem?

 

Thanks.

0 Kudos
2 Replies
idata
Employee
469 Views

I tried some simple architectures with my own layers and compiled them successfully. Hence, I am sure NCSDK supports customized architectures if they are successfully parsed. Just don't know which part of this tf-openpose library could result in compilation failed. Could anyone give us a suggestion?

 

Thanks.
0 Kudos
idata
Employee
469 Views

Hi,

 

I found that "if statements" in the file of /usr/local/bin/ncsdk/Controllers/TensorFlowParser.py

 

For example:

 

"if shape.dims is None"

 

"if input_shape.dims is None"

 

For my graph input: (?, ?, ?, 3),

 

[Dimension(None), Dimension(None), Dimension(None), Dimension(3)]

 

Although element [0][1][2] are all None, the statements always return False and skip the value assigning inside the statement.

 

Therefore, the problem happens when it calls to acquire the value and find None_type.

 

Also, I am not sure if these can help me resolve the whole issue.

 

Could anyone help me for that?
0 Kudos
Reply