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.

NCS support for multidimensional output

idata
Employee
568 Views

Hi there,

 

Does anyone have any examples of how to use the Tensor Descriptor class documented here on fifo output:

 

https://movidius.github.io/ncsdk/ncapi/ncapi2/py_api/TensorDescriptor.html

 

I'm currently getting output from a model as a single row vector of 1,082,109, but I need it to be shaped as 1 x 3 x 227 x 227

 

Many thanks..

0 Kudos
8 Replies
idata
Employee
314 Views

@Jay What model are you using? The output from a model is usually not equal to the input dimensions. Like with gendernet, the output is a tensor of length 2, one for each category of the model (male/female).

0 Kudos
idata
Employee
314 Views

Hi @Tome_at_Intel, its a simple segmentation model based on Alexnet. Currently getting the correct number of values back, but they appear to be quite different with a version run on the PC. I didn't manually configure the Tensor Descriptor class in the end, but just used a simple numpy reshape. Let me know if you can think of any issues that might crop up! Thanks!

0 Kudos
idata
Employee
314 Views

@Jay I see. Sorry if I misunderstood you. Is there any way you can provide me a link to the model for testing? Thanks.

0 Kudos
idata
Employee
314 Views

Hi @Tome_at_Intel,

 

The prototxt file is here: https://1drv.ms/u/s!AosBHN3IHTLWhoBSD20uV4cQcxAH5A

 

The weights file is here: http://dl.caffe.berkeleyvision.org/fcn-alexnet-pascal.caffemodel

 

Still having some difficulty matching the PC and NCS output values, so any help appreciated!

 

Many thanks..

0 Kudos
idata
Employee
314 Views

@Jay What kind of results were you seeing? Using mvNCCheck, I received the following results (mvNCCheck runs an inference on the NCS and on the framework and compares the two):

 

mvNCCheck AlexDeploy.prototxt -w fcn-alexnet-pascal.caffemodel - s 12 /usr/lib/python3/dist-packages/scipy/stats/morestats.py:16: DeprecationWarning: Importing from numpy.testing.decorators is deprecated, import from numpy.testing instead. from numpy.testing.decorators import setastest /usr/lib/python3.5/importlib/_bootstrap.py:222: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88 return f(*args, **kwds) /usr/local/bin/ncsdk/Controllers/Parsers/TensorFlowParser/Convolution.py:44: SyntaxWarning: assertion is always true, perhaps remove parentheses? assert(False, "Layer type not supported by Convolution: " + obj.type) mvNCCheck v02.00, Copyright @ Intel Corporation 2017 /usr/local/bin/ncsdk/Controllers/FileIO.py:65: UserWarning: You are using a large type. Consider reducing your data sizes for best performance Blob generated USB: Transferring Data... /usr/local/lib/python3.5/dist-packages/mvnc/mvncapi.py:420: DeprecationWarning: The binary mode of fromstring is deprecated, as it behaves surprisingly on unicode inputs. Use frombuffer instead USB: Myriad Execution Finished USB: Myriad Connection Closing. USB: Myriad Connection Closed. Result: (21, 227, 227) 1) 24852 2.338 2) 24851 2.332 3) 24853 2.332 4) 25079 2.328 5) 24625 2.328 Expected: (21, 227, 227) 1) 24852 2.338 2) 24853 2.332 3) 24851 2.332 4) 24625 2.328 5) 25079 2.328 ------------------------------------------------------------ Obtained values ------------------------------------------------------------ Obtained Min Pixel Accuracy: 0.41771093383431435% (max allowed=2%), Pass Obtained Average Pixel Accuracy: 0.041398050962015986% (max allowed=1%), Pass Obtained Percentage of wrong values: 0.0% (max allowed=0%), Pass Obtained Pixel-wise L2 error: 0.057202097278205216% (max allowed=1%), Pass Obtained Global Sum Difference: 1047.3095703125 ------------------------------------------------------------

 

It seems like the NCS values (Result) are matching the Caffe ones (Expected). Can you provide your python app for further debugging?

0 Kudos
idata
Employee
314 Views

Thanks for the update @Tome_at_Intel

 

Sent you on links there for further investigation..

0 Kudos
idata
Employee
314 Views

Any update for this @Tome_at_Intel

 

Heard nothing back from PM..

0 Kudos
idata
Employee
314 Views

@Jay Still looking into your request. I'll update you as soon as I find something. Thanks for your patience.

0 Kudos
Reply