From c68fee6aa3e9466b142f1723b2ed3eb0cbbb37be Mon Sep 17 00:00:00 2001 From: tomepetty Date: Fri, 1 Mar 2019 14:45:10 -0800 Subject: [PATCH 1/2] Added tf-ssd-config doc html files. Signed-off-by: tomepetty --- docs/tools/check.html | 6 +- docs/tools/compile.html | 8 +- docs/tools/profile.html | 6 +- docs/tools/tf_ssd_config.html | 623 +++++++++++++++++++++++++++++++++ docs/tools/tools_overview.html | 6 +- 5 files changed, 644 insertions(+), 5 deletions(-) mode change 100755 => 100644 docs/tools/check.html mode change 100755 => 100644 docs/tools/compile.html mode change 100755 => 100644 docs/tools/profile.html create mode 100644 docs/tools/tf_ssd_config.html mode change 100755 => 100644 docs/tools/tools_overview.html diff --git a/docs/tools/check.html b/docs/tools/check.html old mode 100755 new mode 100644 index 89fa397..b8b7941 --- a/docs/tools/check.html +++ b/docs/tools/check.html @@ -50,7 +50,7 @@ +{"description":"Documentation for the Intel® Movidius™ Neural Compute SDK and Intel® Movidius™ Neural Compute API.","@type":"WebPage","url":"https://movidius.github.io/ncsdk/tools/check.html","headline":"mvNCCheck","@context":"http://schema.org"} +{"description":"Documentation for the Intel® Movidius™ Neural Compute SDK and Intel® Movidius™ Neural Compute API.","@type":"WebPage","url":"https://movidius.github.io/ncsdk/tools/compile.html","headline":"mvNCCompile","@context":"http://schema.org"} +{"description":"Documentation for the Intel® Movidius™ Neural Compute SDK and Intel® Movidius™ Neural Compute API.","@type":"WebPage","url":"https://movidius.github.io/ncsdk/tools/profile.html","headline":"mvNCProfile","@context":"http://schema.org"} + + + + + + + + + + + + + + + + + + +TensorFlow SSD config file + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ + + +
+ + + + + + + +
+ + + + +
+

TensorFlow SSD config file

+ +

Overview

+ +

In order to use TensorFlow* SSD networks with the NCSDK Toolkit commands (mvNCCompile, mvNCCheck, mvNCProfile), users will need to create a new config file and use the --tf-ssd-config option with the associated command.

+ +

NCSDK SSD Config File Example

+ +

Here is an example of an NCSDK compatible TensorFlow SSD config file that shows how to set the different parameters:

+ +
input_height: 300
+input_width: 300
+
+postprocessing_params {
+    num_classes: 91
+    background_label_id: 0
+    max_detections: 100
+
+    nms_params {
+        score_threshold: 0.300000011921
+        iou_threshold: 0.600000023842
+        max_detections_per_class: 100
+    }
+
+    box_params {
+        var: 0.1
+        var: 0.1
+        var: 0.2
+        var: 0.2
+  }
+}
+
+score_converter: SIGMOID
+
+ +

The NCSDK SSD config file contains information relevent to the network:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterDescription
input_heightInput height of the network.
input_widthInput width of the network.
num_classesNumber of different labels/objects that the model will be able to detect. Includes the background label.
background_label_idId of the background label.
max_detectionsTotal number of objects that can be detected in a single image.
score_thresholdMinimum score for detected objects. The model will ignore all detected objects with a score lower than the specified threshold. Scores range from 0.0 to 1.0.
iou_thresholdIntersection over union threshold value. Used to eliminate potential duplicate objects that are detected.
box_paramVariance of the bounding box. This affects the size and position of the bounding boxes.

1. The first value (0.1 in the example) is the variance for the Y position for the center of the boxes.
2. The second value (0.1 in the example) is the variance for the X position for the center of the boxes.
3. The third value (0.2 in the example) is the variance for the height of the boxes.
4. The fourth value (0.2 in the example) is the variance for the width of the boxes.

Note: If you use other values than those in the example, you may want to also adjust the iou_threshold value since the box overlaps wil be affected.
score_converterFunction that will convert/normalize the output scores. Available options: SIGMOID, SOFTMAX.
+ +

Example of a mvNCCheck command using the –tf-ssd-config option:

+ +
mvNCCheck -s 12 frozen_inference_graph.pb --tf-ssd-config ssd_mob.config -i 300_Cellphone.jpg -cs 0,1,2 -M "123,117,104" -S 255
+
+

NOTE: In order to use mvNCCheck with a TensorFlow SSD network, an image must be specified as input. This image must also be the same input resolution as required by the TensorFlow SSD network. The following Python code snippet may be useful in resizing an image to be used with mvNCCheck.

+ +
import cv2
+img = cv2.imread('IMAGE_FILENAME.jpg')
+new_img = cv2.resize(img, (300, 300))
+cv2.imwrite('NEW_FILENAME.jpg', new_img)
+
+ +

Example of a mvNCCompile command using the –tf-ssd-config option:

+ +
mvNCCompile -s 12 frozen_inference_graph.pb --tf-ssd-config ssd_mob.config
+
+ +

Example of a mvNCProfile command using the –tf-ssd-config option:

+ +
mvNCProfile -s 12 frozen_inference_graph.pb --tf-ssd-config ssd_mob.config 
+
+ + +
+ +
+ +
+ +
+ + + +
+
+ +
+
+ + diff --git a/docs/tools/tools_overview.html b/docs/tools/tools_overview.html old mode 100755 new mode 100644 index 65aa631..e46aafe --- a/docs/tools/tools_overview.html +++ b/docs/tools/tools_overview.html @@ -50,7 +50,7 @@ +{"description":"Documentation for the Intel® Movidius™ Neural Compute SDK and Intel® Movidius™ Neural Compute API.","@type":"WebPage","url":"https://movidius.github.io/ncsdk/tools/tools_overview.html","headline":"Intel® Movidius™ Neural Compute SDK Toolkit","@context":"http://schema.org"}