Difference between revisions of "GstInference/Supported backends/NCSDK"

From RidgeRun Developer Connection
Jump to: navigation, search
Line 38: Line 38:
  
 
<syntaxhighlight>
 
<syntaxhighlight>
mvNCCheck v02.00, Copyright @ Intel Corporation 2017
+
lob generated
 
+
USB: Transferring Data...
usage: mvNCCheck [-h] [-w WEIGHTS] [-in INPUTNODE] [-on OUTPUTNODE] [-i IMAGE]
+
USB: Myriad Execution Finished
                [-s NSHAVES] [-is INPUTSIZE INPUTSIZE] [-S SCALE] [-M MEAN]
+
USB: Myriad Connection Closing.
                [-id EXPECTEDID] [-cs [CHANNEL_SWAP]] [-dn ] [-ec]
+
USB: Myriad Connection Closed.
                [--accuracy_adjust [ACCURACY_ADJUST]] [--ma2480]
+
Result:  (1000,)
                [--scheduler SCHEDULER] [--new-parser] [-of SAVE_OUTPUT]
+
1) 546 0.99609
                [-rof SAVE_REF_OUTPUT] [-metric METRIC]
+
2) 402 0.0038853
                network
+
3) 420 8.9228e-05
 
+
4) 327 0.0
mvNCCheck.py validates a Caffe or Tensorflow network on the Movidius Neural
+
5) 339 0.0
Compute Stick
+
Expected: (1000,)
 
+
1) 546 0.99609
positional arguments:
+
2) 402 0.0039177
  network              Network file (.prototxt, .meta, .pb, .protobuf)
+
3) 420 9.0837e-05
 
+
4) 889 1.2875e-05
optional arguments:
+
5) 486 5.3644e-06
  -h, --help            show this help message and exit
+
------------------------------------------------------------
  -w WEIGHTS            Weights file (override default same name of .protobuf)
+
Obtained values
  -in INPUTNODE        Input node name
+
------------------------------------------------------------
  -on OUTPUTNODE        Output node name
+
Obtained Min Pixel Accuracy: 0.0032552085031056777% (max allowed=2%), Pass
  -i IMAGE              Image to process
+
Obtained Average Pixel Accuracy: 7.264380030846951e-06% (max allowed=1%), Pass
  -s NSHAVES            Number of shaves (default 1)
+
Obtained Percentage of wrong values: 0.0% (max allowed=0%), Pass
  -is INPUTSIZE INPUTSIZE
+
Obtained Pixel-wise L2 error: 0.00011369892179413199% (max allowed=1%), Pass
                        Input size for networks that don't provide an input
+
Obtained Global Sum Difference: 7.236003875732422e-05
                        shape, width and height expected
+
------------------------------------------------------------
  -S SCALE              Scale the input by this amount, before mean
 
  -M MEAN              Numpy file or constant to subtract from the image,
 
                        after scaling
 
  -id EXPECTEDID        Expected output id for validation
 
  -cs [CHANNEL_SWAP]    default: 2,1,0 for RGB-to-BGR; no swap: 0,1,2
 
  -dn []                Experimental flag to run on a specified stick.
 
  -ec                  Force explicit concat
 
  --accuracy_adjust [ACCURACY_ADJUST]
 
                        Scale the output by this amount
 
  --ma2480              Dev flag
 
  --scheduler SCHEDULER
 
                        Dev flag
 
  --new-parser          Dev flag
 
  -of SAVE_OUTPUT      File name for the myriad result output in numpy
 
                        format.
 
  -rof SAVE_REF_OUTPUT  File name for the reference result in numpy format
 
  -metric METRIC        Metric to be used for validation. Options: top1, top5
 
                        or accuracy_metrics, ssd_pred_metric
 
 
</syntaxhighlight>
 
</syntaxhighlight>
  

Revision as of 10:12, 19 December 2018



Previous: Supported backends Index Next: Example pipelines




The NCSDK Intel® Movidius™ Neural Compute SDK (Intel® Movidius™ NCSDK) enables deployment of deep neural networks on compatible devices such as the Intel® Movidius™ Neural Compute Stick. The NCSDK includes a set of software tools to compile, profile, and validate DNNs (Deep Neural Networks) as well as APIs on C/C++ and Python for application development.

The NCSDK has two general usages:

  • Profiling, tuning, and compiling a DNN models.
  • Prototyping user applications, that run accelerated with a neural compute device hardware, using the NCAPI.

Installation

You can install the NCSDK on a system running Linux directly, downloading a Docker container, on a virtual machine or using a Python virtual environment. Al the possible installation paths are documented on the official installation guide.

Tools

mvNCCheck

Checks the validity of a Caffe or TensorFlow model on a neural compute device. The check is done by running an inference on both the device and in software and then comparing the results to determine a if the network passes or fails. This tool works best with image classification networks. You can check all the available options on the official documentation.

For example lets test the googlenet caffe model downloaded by the ncappzoo repo:

mvNCCheck -w bvlc_googlenet.caffemodel -i ../../data/images/nps_electric_guitar.png -s 12 -id 546  deploy.prototxt -S 255 -M 110
  • -w indicates the weights file
  • -i the input image
  • -s the number of shaves
  • -id the expected label id for the input image (you can find the id for any imagenet model here)
  • -S is the scaling sice
  • -M is the substracted mean after scaling

Most of these parameters are available from the model documentation. The command produces the following result:

lob generated
USB: Transferring Data...
USB: Myriad Execution Finished
USB: Myriad Connection Closing.
USB: Myriad Connection Closed.
Result:  (1000,)
1) 546 0.99609
2) 402 0.0038853
3) 420 8.9228e-05
4) 327 0.0
5) 339 0.0
Expected:  (1000,)
1) 546 0.99609
2) 402 0.0039177
3) 420 9.0837e-05
4) 889 1.2875e-05
5) 486 5.3644e-06
------------------------------------------------------------
 Obtained values 
------------------------------------------------------------
 Obtained Min Pixel Accuracy: 0.0032552085031056777% (max allowed=2%), Pass
 Obtained Average Pixel Accuracy: 7.264380030846951e-06% (max allowed=1%), Pass
 Obtained Percentage of wrong values: 0.0% (max allowed=0%), Pass
 Obtained Pixel-wise L2 error: 0.00011369892179413199% (max allowed=1%), Pass
 Obtained Global Sum Difference: 7.236003875732422e-05
------------------------------------------------------------

mvNCCompile

mvNCProfile

API

Previous: Supported backends Index Next: Example pipelines