Changes for 1.12 release
authorEman Copty <eman.copty@intel.com>
Thu, 11 Jan 2018 02:45:23 +0000 (18:45 -0800)
committerEman Copty <eman.copty@intel.com>
Thu, 11 Jan 2018 02:45:23 +0000 (18:45 -0800)
13 files changed:
api/python/mvnc/mvncapi.py
api/src/mvnc_api.c
api/src/usb_link_vsc.c
docs/release_notes.md
docs/tools/check.md
examples/caffe/AlexNet/Makefile
examples/caffe/GoogLeNet/Makefile
examples/caffe/SqueezeNet/Makefile
examples/tensorflow/inception_v1/Makefile
examples/tensorflow/inception_v1/graph
examples/tensorflow/inception_v3/Makefile
examples/tensorflow/inception_v3/graph
install.sh

index 523d6fa18817aa8a2a04207d0b7f4cfedc2c45fe..cfdcace246ac73aa36b528d1e84257293515061f 100644 (file)
@@ -187,8 +187,10 @@ class Device:
             for i in range(40):
                 if v.raw[i * 50] != 0:
                     ss = v.raw[i * 50:]
-                    end = ss.find(0)
-                    l.append(ss[0:end].decode())
+                    end = ss.find(b'\x00')
+                    val = ss[0:end].decode()
+                    if val:
+                        l.append(val)
             return l
         if opt == DeviceOption.THERMAL_STATS:
             return numpy.frombuffer(v.raw, dtype=numpy.float32)
index ff98ef0332cd71adb86591c6938e40bb850e5e52..2975836cdd8ae2408fae510dcf00ae00530e5e17 100644 (file)
@@ -449,7 +449,7 @@ mvncStatus mvncAllocateGraph(void *deviceHandle, void **graphHandle,
                                     (nstages - 1) * STAGE_LENGTH) / 2;
 
        // A reasonable check on graph correctness
-       if (nstages > 1024 || noutputs > 64 * 1024 * 1024)
+       if (noutputs > 64 * 1024 * 1024)
                return MVNC_UNSUPPORTED_GRAPH_FILE;
 
        pthread_mutex_lock(&mm);
index f5d267eeae31d8c6be6b0ce3321ae35ee0a90df0..d9c8f263e075c69e03df8d12baecd91e33485bb4 100644 (file)
@@ -42,6 +42,9 @@
 #define USB_TIMEOUT            10000
 #define USB_MAX_PACKET_SIZE    1024 * 1024 * 10
 
+#define SLEEP_MS       100
+#define ITERATIONS     50
+
 static int usb_write(void *f, const void *data, size_t size)
 {
        while (size > 0) {
@@ -110,7 +113,7 @@ void usblink_resetall()
        struct libusb_device_descriptor desc;
        libusb_device_handle *h;
        size_t i;
-       int rc, reset = 0;
+       int rc, iters = 0, cnt_bootrom = 0, cnt_runtime = 0, cnt_after = 0;
 
        if ((rc = libusb_get_device_list(NULL, &devs)) < 0)
                return;
@@ -118,8 +121,13 @@ void usblink_resetall()
        while ((dev = devs[i++]) != NULL) {
                if (libusb_get_device_descriptor(dev, &desc) < 0)
                        continue;
+               if (desc.idVendor == DEFAULT_VID &&
+                       desc.idProduct == DEFAULT_PID)
+                       cnt_bootrom++;
+               // If Runtime device found, reset it
                if (desc.idVendor == DEFAULT_OPEN_VID &&
                    desc.idProduct == DEFAULT_OPEN_PID) {
+                       cnt_runtime++;
                        rc = libusb_open(dev, &h);
                        if (rc < -1)
                                continue;
@@ -131,11 +139,28 @@ void usblink_resetall()
                        PRINT_DEBUG(stderr, "Found stale device, resetting\n");
                        usblink_resetmyriad(h);
                        usblink_close(h);
-                       reset = 1;
                }
        }
-       if (reset)
-               usleep(1000000);
+       // If some devices needed reset
+       if(cnt_runtime > 0){
+               iters = 0;
+               // Wait until all devices re-enumerate, or timeout occurs
+               while((cnt_after < cnt_bootrom + cnt_runtime) && (iters < ITERATIONS)){
+                       usleep(SLEEP_MS*1000);
+                       cnt_after = 0;
+                       if ((rc = libusb_get_device_list(NULL, &devs)) < 0)
+                               return;
+                       i = 0;
+                       while ((dev = devs[i++]) != NULL) {
+                               if ((rc = libusb_get_device_descriptor(dev, &desc)) < 0)
+                                       continue;
+                               if (desc.idVendor == DEFAULT_VID &&
+                                       desc.idProduct == DEFAULT_PID)
+                                       cnt_after++;
+                       }
+                       iters++;
+               }
+       }
        libusb_free_device_list(devs, 1);
 }
 
index 7e3203dc4cfc60b6ebd4e6ad5e5d59a3533e306b..f8987ea16c8874f7ae2c83b100b55e42295e70c6 100644 (file)
@@ -1,20 +1,15 @@
 ============================================================
 # Movidius Neural Compute SDK Release Notes
-# V1.11.00 2017-12-06
+# V1.12.00 2018-01-10
 ============================================================
 
-As of V1.09.00, SDK has been refactored and contains many new features and structural changes. It is recommended you read the documentation to familiarize with the new features and contents. Please see v1.09.00 release notes, using github tag https://github.com/movidius/ncsdk/tree/v1.09.00.06
-
 ## SDK Notes: 
 ### New features:
-1. Tensorflow 1.4 supported.  Tensorflow 1.4 is automatically installed on Ubuntu.
-2. SSD supported in Caffe.  ssd-caffe is automatically installed with this version.  If a previous version of the SDK is installed, Berkeley Caffe is preserved and the symlink at /opt/movidius/caffe is moved to ssd caffe.
+1. Improved compiler support for custom networks that use variable batch size via Tensorflow. 
+2. Improved description on how to use Tensorflow networks that were built for training.  Please see "Guidence for Compiling TensorFlow Networks" in the SDK documentation
 #### Networks:
-1. SSD Mobilenet v1 for caffe
-2. TinyYolo v2 for Tensorflow via Darkflow transformation of original TinyYolo v2
+1. Facenet based on inception-resnet-v1 (see erratum #12)
 #### Layers:
-1. L2 Normalization
-2. Input
 
 ## API Notes:
 1. No change
@@ -32,7 +27,9 @@ Support for the following networks has been tested.
 7. TinyYolo v1
 8. VGG 16
 9. Resnet 50
-10. SSD Mobilenet v1
+10. Resnet-18
+11. SSD Mobilenet v1
+
 
 
 ### Tensorflow r1.3
@@ -60,6 +57,7 @@ Support for the following networks has been tested.
    - MobileNet_v1_0.25_160
    - MobileNet_v1_0.25_128
 8. TinyYolo v2 via Darkflow tranformation
+9. Facenet based on inception-resnet-v1 (See erratum #12)
 
 ## Firmware Features:
 1. Convolutions
@@ -88,13 +86,11 @@ Support for the following networks has been tested.
 19. Batch Normalization
 20. L2 Normalization
 21. Input Layer
 
 ## Bug Fixes:
-1. Fixed: Most recent version of Inception_v4 run fails with FusedBatchNorm not supported error
-2. Fixed: Installer deletes installation script, making review of installation process difficult
-3. Fixed: Inception Resnet V2 failing with Stage Details Not Supported: FusedBatchNorm error
-4. Fixed: Input layer can't be linked to multiple hidden layers
+1. Fixed: Tensorflow FusedBatchNorm doesn't support fully connected layer inputs
+2. Fixed: Mobilenets on Tensforflow 1.4 provide incorrect classification 
+3. Fixed: Resnet-18 on Caffe providing NaN results
 
 ## Errata:
 1. Python 2.7 is fully supported for making user applications, but only the helloworld_py example runs as-is in both python 2.7 and 3.5 due to dependencies on modules.
@@ -108,6 +104,6 @@ Support for the following networks has been tested.
 9. Depth convolution is tested for 3x3 kernels.
 10. A TanH layer’s “top” & “bottom” blobs must have different names.  This is different from a ReLU layer, whose “top” & “bottom” should be named the same as its previous layer.
 11. On upgrade from previous versions of SDK, the installer will detect if openCV 3.3.0 was installed, for example from http://github.com/movidius/ncappzoo/apps/stream_ty_gn/install-opencv-from_source.sh.  For this release, the installer will prompt to uninstall this specific version of openCV. This is required for ssd-caffe to run correctly.  After 1.11 installation is complete, openCV 3.3.0 can be re-installed and the ssd-caffe will continue to function.
-12. Resnet 18 is showing unexpected behavior for this release, and is being investigated.  To use Resnet 18, please use version 1.10.01 of SDK.
+12. Facenet requires L2 Normalization be inserted to be used, please see the support forum for a saver script example. 
 13. Although mvNCCheck shows per-pixel error for some metrics for mobilenet_v1_224, classification results are not impacted.
-14. Initial validation has been done on SSD Mobilenet v1 and TinyYolo v2 but more thorough evaluation is underway.
+14. Initial validation has been done on SSD Mobilenet v1 and TinyYolo v2 but more thorough evaluation is underway. 
index 9cc61589c1129c8a29bffad807a9fb63ed775cf5..498d6f140e359dabfe08d720c22aa97a1d9385f6 100644 (file)
@@ -8,9 +8,8 @@ Revision|1.08
 See also| [mvNCCompile](compile.md), [mvNCProfile](profile.md), [TensorFlow™ Info](../TensorFlowUsage.md)
 
 ## Overview
-This command line tool compiles the provided network, runs the network on the connected Intel® Movidius™ Neural Compute Stick (Intel® Movidius™ NCS), and creates a text/HTML profiling output. The profiling data contains layer-by-layer stats about the performance of the input network. This is very helpful in determining how much time is spent on each layer, and is helpful in determining changes to the network to improve the total inference time for a network on the Intel Movidius NCS.
+This command line tool checks the results for an inference on the connected Intel® Movidius™ Neural Compute Stick (Intel® Movidius™ NCS) vs. the caffe results on the host computer for the provided network.  
 
-The weights file is not required when profiling a network to determine bottlenecks.
 
 ## Syntax
 
index f6b0c2684ec4f033b2e43f343805e37d82d8a56c..b738de567dad54a3ba585279308eac38a8f0bdad 100644 (file)
@@ -83,7 +83,7 @@ compile: prototxt caffemodel
 check: prototxt caffemodel
        @echo "\nmaking check"
 #-${NCCHECK} -w ${CAFFEMODEL_FILENAME} -i ../../data/images/cat.jpg -s 12 -id 281 ${PROTOTXT_FILENAME} -S 255 -M ../../data/ilsvrc12/ilsvrc_2012_mean.npy
-       -${NCCHECK} -w ${CAFFEMODEL_FILENAME} -i ../../data/images/cat.jpg -s 12 -id 281 ${PROTOTXT_FILENAME} -M 110 -S 255
+       -${NCCHECK} -w ${CAFFEMODEL_FILENAME} -i ../../data/images/cat.jpg -s 12 -id 281 ${PROTOTXT_FILENAME} -M 110 -S 255 -metric top1
 
 .PHONY: run
 run: compile
index 5e2c6fd84864f6e1d7df7fc6b5bc5c7f0d453b8d..8b0b9184be81b077cbf18290a13da729215a9215 100644 (file)
@@ -84,7 +84,7 @@ compile: prototxt caffemodel
 check: prototxt caffemodel
        @echo "\nmaking check"
 #-${NCCHECK} -w ${CAFFEMODEL_FILENAME} -i ../../data/images/cat.jpg -s 12 -id 281 ${PROTOTXT_FILENAME} -S 255 -M ../../data/ilsvrc12/ilsvrc_2012_mean.npy
-       ${NCCHECK} -w ${CAFFEMODEL_FILENAME} -i ../../data/images/nps_electric_guitar.png -s 12 -id 546  ${PROTOTXT_FILENAME} -S 255 -M 110
+       ${NCCHECK} -w ${CAFFEMODEL_FILENAME} -i ../../data/images/nps_electric_guitar.png -s 12 -id 546  ${PROTOTXT_FILENAME} -S 255 -M 110 -metric top1
 
 .PHONY: run
 run: compile
index 6aec28bb146a681e73dcd2079996f614cacc5de6..4d42b16144c4738705a778215db1d47624f0baeb 100644 (file)
@@ -92,7 +92,7 @@ compile: prototxt caffemodel
 check: prototxt caffemodel
        @echo "\nmaking check"
 #-${NCCHECK} -w ${CAFFEMODEL_FILENAME} -i ../../data/images/cat.jpg -s 12 -id 281 ${PROTOTXT_FILENAME} -S 255 -M ../../data/ilsvrc12/ilsvrc_2012_mean.npy
-       ${NCCHECK} -w ${CAFFEMODEL_FILENAME} -i ../../data/images/cat.jpg -s 12 -id 281  ${PROTOTXT_FILENAME} -S 255 -M 120
+       ${NCCHECK} -w ${CAFFEMODEL_FILENAME} -i ../../data/images/cat.jpg -s 12 -id 281  ${PROTOTXT_FILENAME} -S 255 -M 120 -metric top1
 
 .PHONY: run
 run: compile
index 79a4ae604ee103ead493525310131966b2e56b6e..0b9c0573ee8036a92eb3f6ebd7ff2562177d38e7 100644 (file)
@@ -52,7 +52,7 @@ compile: weights
 
 .PHONY: check
 check: weights
-       -${NCCHECK} -s 12 ${MODEL_FILENAME} ${INPUT_NODE_FLAG} ${OUTPUT_NODE_FLAG} -i ../../data/images/cat.jpg -id 829 -S 2 -M 128 -cs 0,1,2
+       -${NCCHECK} -s 12 ${MODEL_FILENAME} ${INPUT_NODE_FLAG} ${OUTPUT_NODE_FLAG} -i ../../data/images/cat.jpg -id 829 -S 2 -M 128 -cs 0,1,2 -metric top1
 
 .PHONY: run
 run: compile
index 3f1850105c4894440ee3d14515f6595c6ab23443..e5d5ae4a9cbbcfb15d2b5683b01fe0025b2267b1 100644 (file)
Binary files a/examples/tensorflow/inception_v1/graph and b/examples/tensorflow/inception_v1/graph differ
index 42aeb7614a7f38e18d8f5fafd4a4a667b6af0cc2..bde24c4549dbf4572389211a107920dc344ad7d4 100644 (file)
@@ -48,7 +48,7 @@ compile: weights
 
 .PHONY: check
 check: weights
-       -${NCCHECK} -s 12 ${MODEL_FILENAME} ${INPUT_NODE_FLAG} ${OUTPUT_NODE_FLAG} -i ../../data/images/cat.jpg -id 917 -M 128 -S 2 -cs 0,1,2
+       -${NCCHECK} -s 12 ${MODEL_FILENAME} ${INPUT_NODE_FLAG} ${OUTPUT_NODE_FLAG} -i ../../data/images/cat.jpg -id 917 -M 128 -S 2 -cs 0,1,2 -metric top1
 
 .PHONY: run
 run: compile
index 35c464829551f94b92208c7b56e9bbd9fe24aed4..3e8ead860921a6af680aba8ce3433e85d2b3baf2 100644 (file)
Binary files a/examples/tensorflow/inception_v3/graph and b/examples/tensorflow/inception_v3/graph differ
index aff80c9ec0075ac7c5f5ef2920852ad545c7b443..9976f012f99727754d55bc184eae6b244e3916b4 100644 (file)
@@ -11,10 +11,10 @@ then
        cd /tmp
 else
        cd /tmp
-       wget --no-cache http://ncs-forum-uploads.s3.amazonaws.com/ncsdk/ncsdk_01_11/ncsdk_redirector.txt
+       wget --no-cache http://ncs-forum-uploads.s3.amazonaws.com/ncsdk/ncsdk_01_12/ncsdk_redirector.txt
 fi
 
-download_filename=NCSDK-1.11.tar.gz
+download_filename=NCSDK-1.12.tar.gz
 
 # redirector is the url from redirector text file
 redirector=$(<ncsdk_redirector.txt)