From 834ad1581594c76f389a2204e9a8bef75f99d956 Mon Sep 17 00:00:00 2001 From: Eman Copty Date: Wed, 15 Nov 2017 17:55:51 -0800 Subject: [PATCH] Changes for 1.10.01 release --- Makefile | 2 +- README.md | 4 ++ api/src/97-usbboot.rules | 2 +- api/src/Makefile | 2 + api/src/common.h | 2 +- api/src/mvnc_api.c | 2 +- docs/TOC.md | 10 +++-- docs/VirtualMachineConfig.md | 16 +++---- docs/c_api/mvncAllocateGraph.md | 20 ++++----- docs/c_api/mvncCloseDevice.md | 10 ++--- docs/c_api/mvncDeallocateGraph.md | 16 +++---- docs/c_api/mvncDeviceOptions.md | 6 +-- docs/c_api/mvncGetDeviceName.md | 12 +++--- docs/c_api/mvncGetDeviceOption.md | 8 ++-- docs/c_api/mvncGetGlobalOption.md | 6 +-- docs/c_api/mvncGetGraphOption.md | 16 +++---- docs/c_api/mvncGetResult.md | 28 ++++++------- docs/c_api/mvncGlobalOptions.md | 4 +- docs/c_api/mvncGraphOptions.md | 6 +-- docs/c_api/mvncLoadTensor.md | 42 +++++++++---------- docs/c_api/mvncOpenDevice.md | 16 +++---- docs/c_api/mvncSetDeviceOption.md | 8 ++-- docs/c_api/mvncSetGraphOption.md | 18 ++++---- docs/c_api/mvncStatus.md | 2 +- docs/c_api/readme.md | 24 +++++------ docs/configure_network.md | 10 ++--- docs/install.md | 5 ++- docs/manifest.md | 2 +- docs/py_api/Device.AllocateGraph.md | 8 ++-- docs/py_api/Device.CloseDevice.md | 2 +- docs/py_api/Device.GetDeviceOption.md | 6 +-- docs/py_api/Device.OpenDevice.md | 4 +- docs/py_api/Device.SetDeviceOption.md | 8 ++-- docs/py_api/Device.__init__.md | 4 +- docs/py_api/Device.md | 22 +++++----- docs/py_api/DeviceOption.md | 11 ++--- docs/py_api/EnumerateDevices.md | 8 ++-- docs/py_api/GetGlobalOption.md | 6 +-- docs/py_api/GlobalOption.md | 12 +++--- docs/py_api/Graph.DeallocateGraph.md | 6 +-- docs/py_api/Graph.GetGraphOption.md | 6 +-- docs/py_api/Graph.GetResult.md | 2 +- docs/py_api/Graph.LoadTensor.md | 8 ++-- docs/py_api/Graph.SetGraphOption.md | 6 +-- docs/py_api/Graph.md | 20 ++++----- docs/py_api/GraphOption.md | 8 ++-- docs/py_api/SetGlobalOption.md | 10 ++--- docs/py_api/Status.md | 6 +-- docs/py_api/readme.md | 26 ++++++------ docs/readme.md | 9 +++- docs/release_notes.md | 70 +++++++++++++++---------------- docs/tools/check.md | 20 ++++----- docs/tools/compile.md | 11 ++--- docs/tools/profile.md | 10 ++--- examples/Makefile | 2 +- examples/apps/Makefile | 2 +- examples/caffe/AlexNet/Makefile | 2 +- examples/caffe/GoogLeNet/Makefile | 2 +- examples/caffe/Makefile | 2 +- examples/caffe/SqueezeNet/Makefile | 2 +- examples/data/Makefile | 2 +- examples/tensorflow/Makefile | 2 +- examples/tensorflow/inception_v1/Makefile | 2 +- examples/tensorflow/inception_v3/Makefile | 2 +- install.sh | 4 +- 65 files changed, 327 insertions(+), 305 deletions(-) diff --git a/Makefile b/Makefile index 3123a7c..96f59c5 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ ifneq ($(findstring movidius, $(PYTHONPATH)), movidius) - export PYTHONPATH:=/opt/movidius/caffe/python:/opt/movidius/mvnc/python:$(PYTHONPATH) + export PYTHONPATH:=/opt/movidius/caffe/python:$(PYTHONPATH) endif diff --git a/README.md b/README.md index ac2eca4..e7225d8 100644 --- a/README.md +++ b/README.md @@ -24,3 +24,7 @@ The complete Intel Movidius Neural Compute SDK documentation can be viewed at [h # Getting Started Video For installation and general instructions to get started with the NCSDK, take a look at this [video](https://www.youtube.com/watch?v=fESFVNcQVVA) +# Troubleshooting and Tech Support +Be sure to check the [NCS Troubleshooting Guide](https://ncsforum.movidius.com/discussion/370/intel-ncs-troubleshooting-help-and-guidelines#latest) if you run into any issues with the NCS or NCSDK. + +Also for general tech support issues the [NCS User Forum](https://developer.movidius.com/forums) is recommended and contains community discussions on many issues and resolutions. diff --git a/api/src/97-usbboot.rules b/api/src/97-usbboot.rules index 3d11e4d..eb61fa4 100644 --- a/api/src/97-usbboot.rules +++ b/api/src/97-usbboot.rules @@ -1,3 +1,3 @@ SUBSYSTEM=="usb", ATTRS{idProduct}=="2150", ATTRS{idVendor}=="03e7", GROUP="users", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1" -SUBSYSTEM=="usb", ATTRS{idProduct}=="f63b", ATTRS{idVendor}=="040e", GROUP="users", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1" +SUBSYSTEM=="usb", ATTRS{idProduct}=="f63b", ATTRS{idVendor}=="03e7", GROUP="users", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1" SUBSYSTEM=="tty", ATTRS{idProduct}=="2150", ATTRS{idVendor}=="03e7", GROUP="users", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1" diff --git a/api/src/Makefile b/api/src/Makefile index 0c92879..5d6b45d 100644 --- a/api/src/Makefile +++ b/api/src/Makefile @@ -24,6 +24,8 @@ LDFLAGS += -shared OBJS := $(SRCS:%.c=$(OBJDIR)/%.o) DEPS := $(OBJS:.o=.d) +all: obj-$(ARCH)/libmvnc.so.0 + $(OBJDIR)/$(OUT): $(OBJS) $(CC) $(LDFLAGS) $(OBJS) -o $@ $(LIBS) ln -fs $(OBJDIR)/$(OUT) libmvnc.so diff --git a/api/src/common.h b/api/src/common.h index cfb9157..7385f0c 100644 --- a/api/src/common.h +++ b/api/src/common.h @@ -30,5 +30,5 @@ // Common defines #define DEFAULT_VID 0x03E7 #define DEFAULT_PID 0x2150 // Myriad2v2 ROM -#define DEFAULT_OPEN_VID 0x040e +#define DEFAULT_OPEN_VID DEFAULT_VID #define DEFAULT_OPEN_PID 0xf63b // Once opened in VSC mode, VID/PID change diff --git a/api/src/mvnc_api.c b/api/src/mvnc_api.c index b2743ee..ff98ef0 100644 --- a/api/src/mvnc_api.c +++ b/api/src/mvnc_api.c @@ -249,7 +249,7 @@ mvncStatus mvncOpenDevice(const char *name, void **deviceHandle) free(temp); return rc; } - if (strlen(saved_name) > 0) { + if (saved_name && strlen(saved_name) > 0) { device_name = strtok_r(NULL, ":", &saved_name); second_name_available = 1; } diff --git a/docs/TOC.md b/docs/TOC.md index 555f164..b38d04d 100644 --- a/docs/TOC.md +++ b/docs/TOC.md @@ -1,17 +1,17 @@ # NC SDK Documentation Table of Contents - Introduction - - [NCS Architecture](ncs1arch.md) + - [Intel® Movidius™ NCS Architecture](ncs1arch.md) - Frameworks - [Caffe Support](Caffe.md) - - [TensorFlow Support](TensorFlow.md) + - [TensorFlow™ Support](TensorFlow.md) - [Configure Networks for NCS](configure_network.md) - Installation and examples - [Detailed Installation Instructions](install.md) - [Virtual Machine Configuration](VirtualMachineConfig.md) - - [Installation manifiest](manifest.md) + - [Installation Manifiest](manifest.md) - NC SDK Tools - [mvNCCompile](tools/compile.md) @@ -27,3 +27,7 @@ - Examples - Neural Compute App Zoo + +- Troubleshooting + +- Release Notes diff --git a/docs/VirtualMachineConfig.md b/docs/VirtualMachineConfig.md index 95056a2..c239372 100644 --- a/docs/VirtualMachineConfig.md +++ b/docs/VirtualMachineConfig.md @@ -1,15 +1,15 @@ # Virtual Machine Configurations -The following configuration has been tested with the 1.09 SDK release +The following configuration has been tested with the 1.09 SDK release. ## General Requirements -- Virtualbox 5.1.28 (later releases should be fine but not tested) +- Virtualbox 5.1.28 (later releases should be fine, but have not been tested) - Guest Extensions installed -- You will need to select usb3.0 and create two filters: +- You will need to select USB 3.0 and create two filters: - USB2 filter with vendor ID 03e7 and product ID 2150 - USB3 filter with vendor ID 040e and product ID f63b - Host OS (these have been tested, other may work): - - OSX Yosemite 10.10.5 + - OS X Yosemite 10.10.5 - Windows 10 Enterprise - Ubuntu 16.04 Desktop - Guest OS: @@ -21,9 +21,9 @@ The following configuration has been tested with the 1.09 SDK release - Install guest extensions (virtualbox menu devices / Insert guest additions CD image) - Setup USB filters - Install NCSDK with 'make install' ([Installation Instructions](install.md)) -- Insert NCS device to USB port -- Install examples with 'make examples' if doesn’t work re-insert key and try again +- Insert Intel® Movidius™ NCS device to USB port +- Install examples with 'make examples'; if it doesn’t work, re-insert key and try again ## Notes -- During operation applications will need 2s delay between close and re-openign NCS device -- VM RAM needs to be 2GB or caffe compile will likely fail +- During operation applications, will need 2s delay between close and re-opening NCS device +- VM RAM needs to be 2 GB, or caffe compile will likely fail diff --git a/docs/c_api/mvncAllocateGraph.md b/docs/c_api/mvncAllocateGraph.md index a563e5b..ae90548 100644 --- a/docs/c_api/mvncAllocateGraph.md +++ b/docs/c_api/mvncAllocateGraph.md @@ -9,7 +9,7 @@ Version|1.0 See also|[mvncOpenDevice](mvncOpenDevice.md), [mvncDeallocateGraph](mvncDeallocateGraph.md) ## Overview -This function allocates a graph on the specified device and creates a handle to the graph which can be passed to other API functions such as mvncLoadTensor() and mvncGetResult(). When the caller is done with the graph the mvncDeallocateGraph() function should be called to free the resources associated with the graph. +This function allocates a graph on the specified device and creates a handle to the graph that can be passed to other API functions such as mvncLoadTensor() and mvncGetResult(). When the caller is done with the graph, the mvncDeallocateGraph() function should be called to free the resources associated with the graph. ## Prototype @@ -20,9 +20,9 @@ mvncStatus mvncAllocateGraph(void *deviceHandle, void **graphHandle, const void Name|Type|Description ----|----|----------- -deviceHandle|void \*|The deviceHandle pointer to the opaque device datatype (which was created via mvncOpenDevice()) on which the graph should be allocated. -graphHandle|void\*\*|Address of a pointer that will be set to point to an opaque graph datatype. Upon successful return this graphHandle can be passed to other API funtions. -graphFile|const void\* | Pointer to a buffer that contains the contents of a graph file. The graph file is a compiled neural network file that gets created by the MvNCCompile SDK tool. +deviceHandle|void\*|The deviceHandle pointer to the opaque device datatype (which was created via mvncOpenDevice()) on which the graph should be allocated. +graphHandle|void\*\*|Address of a pointer that will be set to point to an opaque graph datatype. Upon successful return, this graphHandle can be passed to other API funtions. +graphFile|const void\* | Pointer to a buffer that contains the contents of a graph file. The graph file is a compiled neural network file that gets created by the MvNCCompile SDK tool. graphFileLength|unsigned int|The number of bytes allocated for the buffer that graphFile points to. ## Return @@ -34,7 +34,7 @@ This function returns an appropriate value from the [mvncStatus](mvncStatus.md) ## Example ```C -// graph file name +// Graph file name #define GRAPH_FILE_NAME "graphfile" int main(int argc, char** argv) @@ -42,7 +42,7 @@ int main(int argc, char** argv) void* deviceHandle; // - // Assume NCS device opened here and deviceHandle is valid now + // Assume NCS device opened here and deviceHandle is valid now. // // Now read in a graph file so graphFileBuf will point to the @@ -51,16 +51,16 @@ int main(int argc, char** argv) unsigned int graphFileLen; void* graphFileBuf = LoadFile(GRAPH_FILE_NAME, &graphFileLen); - // allocate the graph + // Allocate the graph void* graphHandle; retCode = mvncAllocateGraph(deviceHandle, &graphHandle, graphFileBuf, graphFileLen); if (retCode != MVNC_OK) - { // error allocating graph + { // Error allocating graph printf("Could not allocate graph for file: %s\n", GRAPH_FILE_NAME); } else - { // successfully allocated graph. Now graphHandle is ready to go. - // use graphHandle for other API calls and call mvncDeallocateGraph + { // Successfully allocated graph. Now graphHandle is ready to go. + // Use graphHandle for other API calls and call mvncDeallocateGraph // when done with it. printf("Successfully allocated graph for %s\n", GRAPH_FILE_NAME); diff --git a/docs/c_api/mvncCloseDevice.md b/docs/c_api/mvncCloseDevice.md index e8e56ac..eb70d8f 100644 --- a/docs/c_api/mvncCloseDevice.md +++ b/docs/c_api/mvncCloseDevice.md @@ -20,7 +20,7 @@ mvncStatus mvncCloseDevice(void *deviceHandle); Name|Type|Description ----|----|----------- -deviceHandle|void*|Pointer to the opaque NCS Device structure that was allocated and returned from the mvncOpenDevice function. +deviceHandle|void*|Pointer to the opaque NCS device structure that was allocated and returned from the mvncOpenDevice function. ## Return This function returns an appropriate value from the [mvncStatus](mvncStatus.md) enumeration. @@ -36,7 +36,7 @@ extern "C" { #include } -// somewhat arbitrary buffer size for the device name +// Somewhat arbitrary buffer size for the device name. #define NAME_SIZE 100 int main(int argc, char** argv) { @@ -50,10 +50,10 @@ int main(int argc, char** argv) exit(-1); } - // Try to open the NCS device via the device name + // Try to open the NCS device via the device name. retCode = mvncOpenDevice(devName, &deviceHandle); if (retCode != MVNC_OK) - { // failed to open the device. + { // Failed to open the device. printf("Could not open NCS device\n"); exit(-1); } @@ -62,7 +62,7 @@ int main(int argc, char** argv) // Pass it to other NC API calls as needed and close it when finished. printf("Successfully opened NCS device!\n"); - // Close the device previously opened by mvncOpenDevice() + // Close the device previously opened by mvncOpenDevice(). retCode = mvncCloseDevice(deviceHandle); } ``` diff --git a/docs/c_api/mvncDeallocateGraph.md b/docs/c_api/mvncDeallocateGraph.md index ea5ec94..6d96e6c 100644 --- a/docs/c_api/mvncDeallocateGraph.md +++ b/docs/c_api/mvncDeallocateGraph.md @@ -9,7 +9,7 @@ Version|1.0 See also|[mvncOpenDevice](mvncOpenDevice.md), [mvncAllocateGraph](mvncAllocateGraph.md) ## Overview -This function deallocates a graph that was previously allocated with mvncAllocateGraph(). After successful return from this function the passed graphHandle will be invalid and should not be used. +This function deallocates a graph that was previously allocated with mvncAllocateGraph(). After successful return from this function, the passed graphHandle will be invalid and should not be used. ## Prototype @@ -26,7 +26,7 @@ graphHandle|void\*\*|Pointer to opaque graph data type that was initialized with This function returns an appropriate value from the [mvncStatus](mvncStatus.md) enumeration. ## Known Issues -Using a deallocated graph handle can lead to hard to find bugs. To prevent this it's good practice to set the handle to NULL (or nullptr for C++ 11) after deallocating as shown in this code snippet. +Using a deallocated graph handle can lead to hard-to-find bugs. To prevent this, it's good practice to set the handle to NULL (or nullptr for C++ 11) after deallocating, as shown in this code snippet: ```C++ mvncDeallocateGraph(graphHandle); graphHandle = NULL; @@ -34,7 +34,7 @@ graphHandle = NULL; ## Example ```C -// graph file name +// Graph file name #define GRAPH_FILE_NAME "graphfile" int main(int argc, char** argv) @@ -48,19 +48,19 @@ int main(int argc, char** argv) // // Assume NCS device opened here and deviceHandle is valid now // and the graph file is in graphFileBuf and length in bytes - // is in graphFileLen + // is in graphFileLen. // - // allocate the graph + // Allocate the graph void* graphHandle; retCode = mvncAllocateGraph(deviceHandle, &graphHandle, graphFileBuf, graphFileLen); if (retCode != MVNC_OK) - { // error allocating graph + { // Error allocating graph printf("Could not allocate graph for file: %s\n", GRAPH_FILE_NAME); } else - { // successfully allocated graph. Now graphHandle is ready to go. - // use graphHandle for other API calls and call mvncDeallocateGraph + { // Successfully allocated graph. Now graphHandle is ready to go. + // Use graphHandle for other API calls, and call mvncDeallocateGraph // when done with it. printf("Successfully allocated graph for %s\n", GRAPH_FILE_NAME); diff --git a/docs/c_api/mvncDeviceOptions.md b/docs/c_api/mvncDeviceOptions.md index ead35f1..c706abe 100644 --- a/docs/c_api/mvncDeviceOptions.md +++ b/docs/c_api/mvncDeviceOptions.md @@ -8,8 +8,8 @@ See also|[mvncGetDeviceOption](mvncGetDeviceOption.md), [mvncSetDeviceOption](mv ## Overview -This enumeration is used to specify an option on the NCS device that can be written or read via mvncGetDeviceOption() and mvncSetDeviceOption(). The table below provides details on the meaning of each of the values in the enumeration. +This enumeration is used to specify an option on the Intel® Movidius™ NCS device that can be written or read via mvncGetDeviceOption() and mvncSetDeviceOption(). The table below provides details on the meaning of each of the values in the enumeration. -constant | Option Type | Possible Values | get/set | Description +Constant | Option Type | Possible Values | Get/Set | Description -------- | ------------| --------------- | ------- | ----------- -MVNC_THERMAL_THROTTLING_LEVEL|int|1, or 2|get|Returns 1 if lower guard temperature threshold of chip sensor is reached. This indicates short throttling time is in action between inferences to protect the device. Returns 2 if upper guard temperature of chip sensor is reached. This indicates long throttling time is in action between inferences to protect the device. +MVNC_THERMAL_THROTTLING_LEVEL|int|1, 2|get|1: if lower guard temperature threshold of chip sensor is reached. This indicates short throttling time is in action between inferences to protect the device.
2: if upper guard temperature of chip sensor is reached. This indicates long throttling time is in action between inferences to protect the device. diff --git a/docs/c_api/mvncGetDeviceName.md b/docs/c_api/mvncGetDeviceName.md index 81bf1e5..77f0099 100644 --- a/docs/c_api/mvncGetDeviceName.md +++ b/docs/c_api/mvncGetDeviceName.md @@ -9,7 +9,7 @@ Version|1.0 See also|[mvncOpenDevice](mvncOpenDevice.md) ## Overview -This function is used to get the name of a particular NCS device. Typical usage is to call the function repeatedly starting with index = 0 and incrementing the index each time until an error is returned. These successive calls will give you the names of all the devices in the system. +This function is used to get the name of a particular Intel® Movidius™ NCS device. Typical usage is to call the function repeatedly, starting with index = 0, and incrementing the index each time until an error is returned. These successive calls will give you the names of all the devices in the system. ## Prototype @@ -20,9 +20,9 @@ mvncStatus mvncGetDeviceName(int index, char* name, unsigned int nameSize); Name|Type|Description ----|----|----------- -index|int|index of the device for which the name should be retrieved. -name|char\*|pointer to a character buffer into which the name will be copied. This buffer should be allocated by the caller. -nameSize|unsigned int| the number of characters allocated to the buffer pointed to by the name parameter. +index|int|Index of the device for which the name should be retrieved. +name|char\*|Pointer to a character buffer into which the name will be copied. This buffer should be allocated by the caller. +nameSize|unsigned int|The number of characters allocated to the buffer pointed to by the name parameter. ## Return This function returns an appropriate value from the [mvncStatus](mvncStatus.md) enumeration. @@ -30,7 +30,7 @@ This function returns an appropriate value from the [mvncStatus](mvncStatus.md) ## Known Issues ## Example -The following example shows how to get the name of all NCS devices attached to the system. mvncGetDeviceName is called repeatedly until it returns MVNC_DEVICE_NOT_FOUND. +The following example shows how to get the name of all Intel Movidius NCS devices attached to the system. mvncGetDeviceName is called repeatedly until it returns MVNC_DEVICE_NOT_FOUND. ```C++ #include @@ -53,7 +53,7 @@ int main(int argc, char** argv) printf("Total number of NCS devices found: %d\n", deviceCount); } ``` -Output from the example code above with two NCS devices in the system. +Output from the example code above with two Intel Movidius NCS devices in the system. ``` Found NCS device named: "2.3" diff --git a/docs/c_api/mvncGetDeviceOption.md b/docs/c_api/mvncGetDeviceOption.md index ce96992..d9b2693 100644 --- a/docs/c_api/mvncGetDeviceOption.md +++ b/docs/c_api/mvncGetDeviceOption.md @@ -9,7 +9,7 @@ Version|1.0 See also|[mvncOpenDevice](mvncOpenDevice.md), [mvncDeviceOptions](mvncDeviceOptions.md), [mvncSetDeviceOption](mvncSetDeviceOption.md) ## Overview -This function gets the current value of an option for an NCS device. The available options and their data types can be found in the [DeviceOptions](mvncDeviceOptions.md) enumeration documentation. +This function gets the current value of an option for an Intel® Movidius™ Neural Compute Stick (Intel® Movidius™ NCS) device. The available options and their data types can be found in the [DeviceOptions](mvncDeviceOptions.md) enumeration documentation. ## Prototype @@ -22,8 +22,8 @@ Name|Type|Description ----|----|----------- deviceHandle|void\*|Pointer to opaque device data type that was initialized with the mvncOpenDevice() function. This specifies which NCS device's option will be retrieved. option|int|A value from the DeviceOptions enumeration that specifies which option will be retrieved. -data|void\*|Pointer to a buffer where the value of the option will be copied. The type of data this points to will depend on the option that is specified. Check mvncDeviceOptions for the data types that each option requires. -dataLength|unsigned int \*| Pointer to an unsigned int which must point to the size, in bytes, of the buffer allocated to the data parameter when called. Upon successfull return it will be set to the number of bytes copied to the data buffer. +data|void\*|Pointer to a buffer where the value of the option will be copied. The type of data this points to will depend on the option that is specified. Check mvncDeviceOptions for the data types that each option requires. +dataLength|unsigned int\*|Pointer to an unsigned int which must point to the size, in bytes, of the buffer allocated to the data parameter when called. Upon successfull return, it will be set to the number of bytes copied to the data buffer. ## Return This function returns an appropriate value from the [mvncStatus](mvncStatus.md) enumeration. @@ -32,5 +32,5 @@ This function returns an appropriate value from the [mvncStatus](mvncStatus.md) ## Example ```C -TODO +TBD ``` diff --git a/docs/c_api/mvncGetGlobalOption.md b/docs/c_api/mvncGetGlobalOption.md index 529fcaf..b2e94d7 100644 --- a/docs/c_api/mvncGetGlobalOption.md +++ b/docs/c_api/mvncGetGlobalOption.md @@ -10,7 +10,7 @@ Version|1.09 See also|[mvncGlobalOptions](mvncGlobalOptions.md), [mvncSetGlobalOption](mvncSetGlobalOption.md) ## Overview -This function gets the current value of an option that is global to the SDK. The available options and their data types can be found in the [mvncGlobalOptions](mvncGlobalOptions.md) enumeration documentation. +This function gets the current value of an option that is global to the SDK. The available options and their data types can be found in the [mvncGlobalOptions](mvncGlobalOptions.md) enumeration documentation. ## Prototype @@ -22,8 +22,8 @@ mvncStatus mvncGetGlobalOption(int option, void *data, unsigned int *datalength) Name|Type|Description ----|----|----------- option|int|A value from the GlobalOptions enumeration that specifies which option will be retrieved. -data|void\*|Pointer to a buffer where the value of the option will be copied. The type of data this points to will depend on the option that is specified. Check mvncGlobalOptions for the data types that each option requires. -dataLength|unsigned int \*| Pointer to an unsigned int which must point to the size, in bytes, of the buffer allocated to the data parameter when called. Upon successfull return it will be set to the number of bytes copied to the data buffer. +data|void\*|Pointer to a buffer where the value of the option will be copied. The type of data this points to will depend on the option that is specified. Check mvncGlobalOptions for the data types that each option requires. +dataLength|unsigned int\*|Pointer to an unsigned int which must point to the size, in bytes, of the buffer allocated to the data parameter when called. Upon successfull return, it will be set to the number of bytes copied to the data buffer. ## Return This function returns an appropriate value from the [mvncStatus](mvncStatus.md) enumeration. diff --git a/docs/c_api/mvncGetGraphOption.md b/docs/c_api/mvncGetGraphOption.md index 7d499f2..7ac7a26 100644 --- a/docs/c_api/mvncGetGraphOption.md +++ b/docs/c_api/mvncGetGraphOption.md @@ -9,7 +9,7 @@ Version|1.0 See also|[mvncAllocateGraph](mvncAllocateGraph.md), [mvncGraphOptions](mvncGraphOptions.md), [mvncSetGraphOption](mvncSetGraphOption.md) ## Overview -This function gets the current value of an option for a graph. The available options can be found in the GraphOptions enumeration. +This function gets the current value of an option for a graph. The available options can be found in the GraphOptions enumeration. ## Prototype @@ -20,10 +20,10 @@ mvncStatus mvncGetGraphOption(void *graphHandle, int option, void **data, unsign Name|Type|Description ----|----|----------- -graphHandle|void\*|Pointer to opaque graph data type that was initialized with the mvncAllocateGraph() function which represents the neural network. This specifies which graph's option value will be retrieved. +graphHandle|void\*|Pointer to opaque graph data type that was initialized with the mvncAllocateGraph() function, which represents the neural network. This specifies which graph's option value will be retrieved. option|int|A value from the GraphOptions enumeration that specifies which option will be retrieved. -data|void\*|Pointer to a buffer where the value of the option will be copied. The type of data this points to will depend on the option that is specified. Check mvncGraphOptions for the data types that each option requires. -dataLength|unsigned int \*| Pointer to an unsigned int which must point to the size, in bytes, of the buffer allocated to the data parameter when called. Upon successfull return it will be set to the number of bytes copied to the data buffer. +data|void\*|Pointer to a buffer where the value of the option will be copied. The type of data this points to will depend on the option that is specified. Check mvncGraphOptions for the data types that each option requires. +dataLength|unsigned int\*|Pointer to an unsigned int, which must point to the size, in bytes, of the buffer allocated to the data parameter when called. Upon successfull return, it will be set to the number of bytes copied to the data buffer. ## Return This function returns an appropriate value from the [mvncStatus](mvncStatus.md) enumeration. @@ -35,10 +35,10 @@ This function returns an appropriate value from the [mvncStatus](mvncStatus.md) . . . - // open device to get device handle, - // allocate the graph to get graph handle + // Open device to get device handle, + // allocate the graph to get graph handle. - // set the graph option for blocking calls + // Set the graph option for blocking calls int dontBlockValue; unsigned int sizeOfValue; retCode = mvncGetGraphOption(graphHandle, MVNC_DONTBLOCK, (void**)(&dontBlockValue), &sizeOfValue); @@ -52,7 +52,7 @@ This function returns an appropriate value from the [mvncStatus](mvncStatus.md) printf("Error returned from mvncGetGraphOption: %d\n", retCode); } - // use graph, deallocate graph, close device etc. + // Use graph, deallocate graph, close device, etc. . . diff --git a/docs/c_api/mvncGetResult.md b/docs/c_api/mvncGetResult.md index 30e07ee..84520ef 100644 --- a/docs/c_api/mvncGetResult.md +++ b/docs/c_api/mvncGetResult.md @@ -3,7 +3,7 @@ Type|Function ------------ | ------------- Header|mvnc.h -Library| libmvnc.so +Library|libmvnc.so Return|[mvncStatus](mvncStatus.md) Version|1.0 See also|[mvncOpenDevice](mvncOpenDevice.md), [mvncAllocateGraph](mvncAllocateGraph.md), [mvncLoadTensor](mvncLoadTensor.md) @@ -21,9 +21,9 @@ mvncStatus mvncGetResult(void *graphHandle, void **outputData, unsigned int *out Name|Type|Description ----|----|----------- graphHandle|void\*|Pointer to opaque graph data type that was initialized with the mvncAllocateGraph() function that represents the neural network for which an inference was initiated. -outputData|void\*\*|Address of the pointer that will be set to a buffer of 16 bit floats which contain the result of the inference. The buffer will contain one 16 bit float for each network category, the values of which are the results of the output node. Typically these values are the probabilities that an image belongs to the category. +outputData|void\*\*|Address of the pointer that will be set to a buffer of 16-bit floats, which contain the result of the inference. The buffer will contain one 16-bit float for each network category, the values of which are the results of the output node. Typically these values are the probabilities that an image belongs to the category. outputDataLength|unsigned int\*|Pointer to an unsigned int that will be set to the number of bytes in the outputData buffer. -userParam|void \*\*| Address of a pointer that will be set to the user parameter for this inference. This corresponds to the userParam that was passed to the LoadTensor() function which initiated the inference. +userParam|void\*\*|Address of a pointer that will be set to the user parameter for this inference. This corresponds to the userParam that was passed to the LoadTensor() function, which initiated the inference. ## Return This function returns an appropriate value from the [mvncStatus](mvncStatus.md) enumeration. @@ -36,8 +36,8 @@ This function returns an appropriate value from the [mvncStatus](mvncStatus.md) . . -// use a 16 bit unsigned type to represent half precision floats since C++ has no -// built in support for 16 but floats. +// Use a 16-bit unsigned type to represent half precision floats since C++ has no +// built-in support for 16-bit floats. typedef unsigned short half; int main(int argc, char** argv) @@ -46,23 +46,23 @@ int main(int argc, char** argv) . . // - // Open NCS device and set deviceHandle to the valid handle + // Open NCS device and set deviceHandle to the valid handle. // // - // Read graph from disk and call mvncAllocateGraph to set graphHandle appropriately + // Read graph from disk and call mvncAllocateGraph to set graphHandle appropriately. // // // Load an image.png from disk and preprocess it to match network - // requirements so that imageBufFp16 list to 16 bit floats + // requirements so that imageBufFp16 list to 16-bit floats. // - // start the inference with call to mvncLoadTensor() + // Start the inference with call to mvncLoadTensor(). retCode = mvncLoadTensor(graphHandle, imageBufFp16, lenBufFp16, NULL); if (retCode == MVNC_OK) - { // the inference has been started, now call mvncGetResult() for the - // inference result + { // The inference has been started, now call mvncGetResult() for the + // inference result. printf("Successfully loaded the tensor for image %s\n", "image.png"); void* resultData16; @@ -70,7 +70,7 @@ int main(int argc, char** argv) unsigned int lenResultData; retCode = mvncGetResult(graphHandle, &resultData16, &lenResultData, &userParam); if (retCode == MVNC_OK) - { // Successfully got the result. The inference result is in the buffer pointed to by resultData + { // Successfully got the result. The inference result is in the buffer pointed to by resultData. printf("Successfully got the inference result for image %s\n", IMAGE_FILE_NAME); printf("resultData is %d bytes which is %d 16-bit floats.\n", lenResultData, lenResultData/(int)sizeof(half)); @@ -97,8 +97,8 @@ int main(int argc, char** argv) } // - // call mvncDeallocateGraph to free the resources tied to graphHandle - // close the device with mvncCloseDevice() + // Call mvncDeallocateGraph to free the resources tied to graphHandle. + // Close the device with mvncCloseDevice(). // } diff --git a/docs/c_api/mvncGlobalOptions.md b/docs/c_api/mvncGlobalOptions.md index a3255ab..f918d9a 100644 --- a/docs/c_api/mvncGlobalOptions.md +++ b/docs/c_api/mvncGlobalOptions.md @@ -10,6 +10,6 @@ See also|[mvncGetGlobalOption](mvncGetGlobalOption.md), [mvncSetGlobalOption](mv This enumeration is used to specify a global option that can be written or read via mvncGetDeviceOption() and mvncSetDeviceOption(). The table below provides details on the meaning of each of the values in the enumeration. -constant | Option Type | Possible Values | get/set | Description +Constant | Option Type | Possible Values | Get/Set | Description -------- | ------------| --------------- | ------- | ----------- -MVNC_LOGLEVEL | int | 0, 1, 2 |get, set|The logging level for application Value meanings are: 0 = log nothing (default), 1 = log errors only, 2 = log all, verbose logging. +MVNC_LOGLEVEL | int | 0, 1, 2 |get, set|The logging level for application Value meanings are:
0: log nothing (default)
1: log errors only
2: log all, verbose logging. diff --git a/docs/c_api/mvncGraphOptions.md b/docs/c_api/mvncGraphOptions.md index d2bdfc8..889dab5 100644 --- a/docs/c_api/mvncGraphOptions.md +++ b/docs/c_api/mvncGraphOptions.md @@ -9,10 +9,10 @@ See also|[mvncGetGraphOption](mvncGetGraphOption.md), [mvncSetGraphOption](mvncS ## Overview -This enumeration is used to specify an option on the a graph that can be written or read via mvncGetGraphOption() and mvncSetGraphOption(). The table below provides details on the meaning of each of the values in the enumeration. +This enumeration is used to specify an option on the graph that can be written or read via mvncGetGraphOption() and mvncSetGraphOption(). The table below provides details on the meaning of each of the values in the enumeration. -constant | Option Type | Possible Values | get/set | Description +Constant | Option Type | Possible Values | Get/Set | Description -------- | ------------| --------------- | ------- | ----------- -MVNC_DONT_BLOCK| int |0, 1|get, set|0: Calls to mvncLoadTensor and mvncGetResult block, 1: calls to those functions don't block. +MVNC_DONT_BLOCK| int |0, 1|get, set|0: Calls to mvncLoadTensor and mvncGetResult will block (won't return until the action is completed) (Default)
1: Calls to those functions don't block (they will return immediately). If the action coudn't be completed the return value will indicate why. mvncLoadTensor() will return MVNC_BUSY when the NCS isn't able to perform the action because its busy, try again later. mvncGetResult() will return MVNC_NO_DATA unless there is an inference that is ready to be returned. In this case try again later and when there is a completed inference the results will be returned. MVNC_TIME_TAKEN| float\* | any | get |Time taken for the last inference returned by mvncGetResult. MVNC_DEBUG_INFO| char\* | any | get | A string that provides more details when the result of a function call was MVNC_MYRIADERROR. diff --git a/docs/c_api/mvncLoadTensor.md b/docs/c_api/mvncLoadTensor.md index ecb1543..a735dfc 100644 --- a/docs/c_api/mvncLoadTensor.md +++ b/docs/c_api/mvncLoadTensor.md @@ -9,7 +9,7 @@ Version|1.0 See also|[mvncOpenDevice](mvncOpenDevice.md), [mvncAllocateGraph](mvncAllocateGraph.md), [mvncGetResult](mvncGetResult.md) ## Overview -This function initiates an inference on the specified graph via the associated NCS device. After calling this function use the mvncGetResult() function to retrieve the inference result. +This function initiates an inference on the specified graph via the associated Intel® Movidius™ Neural Compute Stick (Intel® Movidius™ NCS) device. After calling this function, use the mvncGetResult() function to retrieve the inference result. ## Prototype @@ -21,9 +21,9 @@ mvncStatus mvncLoadTensor(void *graphHandle, const void *inputTensor, unsigned i Name|Type|Description ----|----|----------- graphHandle|void\*|Pointer to opaque graph data type that was initialized with the mvncAllocateGraph() function that represents the neural network for which an inference will be initiated. -inputTensor|const void\*|Pointer to tensor data buffer which contains 16 bit half precision floats (per IEEE 754 half precision binary floating-point format: binary16). The values in the buffer are dependent on the neural network (graph) but are typically representations of each color channel of each pixel of an image. +inputTensor|const void\*|Pointer to tensor data buffer, which contains 16-bit half precision floats (per IEEE 754 half precision binary floating-point format: binary16). The values in the buffer are dependent on the neural network (graph), but are typically representations of each color channel of each pixel of an image. inputTensorLength|unsigned int|The length, in bytes, of the buffer pointed to by the inputTensor parameter. -userParam|void \*| Pointer to user data that will be returned along with the inference result from the GetResult() function. +userParam|void\*|Pointer to user data that will be returned along with the inference result from the GetResult() function. ## Return This function returns an appropriate value from the [mvncStatus](mvncStatus.md) enumeration. @@ -36,11 +36,11 @@ This function returns an appropriate value from the [mvncStatus](mvncStatus.md) . . -// use a 16 bit unsigned type to represent half precision floats since C++ has no -// built in support for 16 but floats. +// Use a 16-bit unsigned type to represent half precision floats, since C++ has no +// built-in support for 16-bit floats. typedef unsigned short half; -// GoogleNet image dimensions and network mean values for each channel. This information is specific +// GoogleNet image dimensions and network mean values for each channel. This information is specific // for each network, and usually available from network creators. const int networkDim = 224; float networkMean[] = {0.40787054*255.0, 0.45752458*255.0, 0.48109378*255.0}; @@ -51,39 +51,39 @@ int main(int argc, char** argv) . . // - // Open NCS device and set deviceHandle to the valid handle + // Open NCS device and set deviceHandle to the valid handle. // // - // Read graph from disk and call mvncAllocateGraph to set graphHandle appropriately + // Read graph from disk and call mvncAllocateGraph to set graphHandle appropriately. // // - // Load an image from disk - // LoadImage will read image from disk, convert channels to floats - // subtract network mean for each value in each channel. Then convert + // Load an image from disk. + // LoadImage will read image from disk, convert channels to floats. + // Subtract network mean for each value in each channel. Then convert // floats to half precision floats. - // return pointer to the buffer of half precision floats + // Return pointer to the buffer of half precision floats. half* imageBufFp16 = LoadImage("image.png", networkDim, networkMean); - // calculate the length of the buffer that contains the half precision floats. - // 3 channels * width * height * sizeof a 16bit float + // Calculate the length of the buffer that contains the half precision floats. + // 3 channels * width * height * sizeof a 16-bit float unsigned int lenBufFp16 = 3*networkDim*networkDim*sizeof(*imageBufFp16); - // start the inference with mvncLoadTensor() + // Start the inference with mvncLoadTensor() retCode = mvncLoadTensor(graphHandle, imageBufFp16, lenBufFp16, NULL); if (retCode == MVNC_OK) - { // the inference has been started, now call mvncGetResult() for the - // inference result + { // The inference has been started, now call mvncGetResult() for the + // inference result. printf("Successfully loaded the tensor for image %s\n", "image.png"); - // here mvncGetResult() can be called to get the result of the inference - // that was started with mvncLoadTensor() above + // Here mvncGetResult() can be called to get the result of the inference + // that was started with mvncLoadTensor() above. } // - // call mvncDeallocateGraph to free the resources tied to graphHandle - // close the device with mvncCloseDevice() + // Call mvncDeallocateGraph to free the resources tied to graphHandle. + // Close the device with mvncCloseDevice(). // } diff --git a/docs/c_api/mvncOpenDevice.md b/docs/c_api/mvncOpenDevice.md index 048253a..eadb29f 100644 --- a/docs/c_api/mvncOpenDevice.md +++ b/docs/c_api/mvncOpenDevice.md @@ -9,7 +9,7 @@ Version|1.0 See also|[mvncCloseDevice](mvncCloseDevice.md), [mvncGetDeviceName](mvncGetDeviceName.md) [mvncGetDeviceOption](mvncGetDeviceOption.md), [mvncSetDeviceOption](mvncSetDeviceOption.md) ## Overview -This function is used to initialize the NCS device and return a device handle that can be passed to other API functions. +This function is used to initialize the Intel® Movidius™ NCS device and return a device handle that can be passed to other API functions. ## Prototype @@ -22,7 +22,7 @@ mvncStatus mvncOpenDevice(const char *name, void **deviceHandle); Name|Type|Description ----|----|------------ name|const char\*|Pointer to a constant array of chars that contains the name of the device to open. This value is obtained from mvncGetDeviceName. -deviceHandle|void \*\*|Address of a pointer that will be set to point to an opaque structure representing an NCS device. +deviceHandle|void\*\*|Address of a pointer that will be set to point to an opaque structure representing an NCS device. ## Return This function returns an appropriate value from the [mvncStatus](mvncStatus.md) enumeration. @@ -30,7 +30,7 @@ This function returns an appropriate value from the [mvncStatus](mvncStatus.md) ## Known Issues ## Example -In the example below the code gets the name of the first device and then calls mvncOpenDevice to open the device and set the deviceHandle variable for use to other API calls that expect a device handle for an open device. +In the example below, the code gets the name of the first device and then calls mvncOpenDevice to open the device and set the deviceHandle variable for use to other API calls that expect a device handle for an open device. ```C++ #include #include @@ -39,7 +39,7 @@ extern "C" { #include } -// somewhat arbitrary buffer size for the device name +// Somewhat arbitrary buffer size for the device name. #define NAME_SIZE 100 int main(int argc, char** argv) { @@ -48,21 +48,21 @@ int main(int argc, char** argv) char devName[NAME_SIZE]; retCode = mvncGetDeviceName(0, devName, NAME_SIZE); if (retCode != MVNC_OK) - { // failed to get device name, maybe none plugged in. + { // If failed to get device name, may be none plugged in. printf("No NCS devices found\n"); exit(-1); } - // Try to open the NCS device via the device name + // Try to open the NCS device via the device name. retCode = mvncOpenDevice(devName, &deviceHandle); if (retCode != MVNC_OK) - { // failed to open the device. + { // Failed to open the device. printf("Could not open NCS device\n"); exit(-1); } // deviceHandle is ready to use now. - // Pass it to other NC API calls as needed and close it when finished. + // Pass it to other NC API calls as needed, and close it when finished. printf("Successfully opened NCS device!\n"); retCode = mvncCloseDevice(deviceHandle); diff --git a/docs/c_api/mvncSetDeviceOption.md b/docs/c_api/mvncSetDeviceOption.md index 56801d7..ff2eed8 100644 --- a/docs/c_api/mvncSetDeviceOption.md +++ b/docs/c_api/mvncSetDeviceOption.md @@ -9,7 +9,7 @@ Version|1.0 See also|[mvncOpenDevice](mvncOpenDevice.md), [mvncDeviceOptions](mvncDeviceOptions.md), [mvncGetDeviceOption](mvncGetDeviceOption.md) ## Overview -This function sets an option for a specific NCS device. The available options can be found in the [DeviceOptions](mvncDeviceOptions.md) enumeration. +This function sets an option for a specific Intel® Movidius™ Neural Compute Stick (Intel® Movidius™ NCS) device. The available options can be found in the [DeviceOptions](mvncDeviceOptions.md) enumeration. ## Prototype @@ -20,10 +20,10 @@ mvncStatus mvncSetDeviceOption(void *deviceHandle, int option, const void *data, Name|Type|Description ----|----|----------- -deviceHandle|void\*|Pointer to opaque device data type that was initialized with the mvncOpenDevice() function. This specifies which device's option will be set. +deviceHandle|void\*|Pointer to opaque device data type that was initialized with the mvncOpenDevice() function. This specifies which device's option will be set. option|int|A value from the DeviceOptions enumeration that specifies which option will be set. -data|const void\*|Pointer to the data for the new value for the option. The type of data this points to depends on the option that is being set. Check mvncDeviceOptions for the data types that each option requires. -dataLength|unsigned int| An unsigned int that contains the length, in bytes, of the buffer that the data parameter points to. +data|const void\*|Pointer to the data for the new value for the option. The type of data this points to depends on the option that is being set. Check mvncDeviceOptions for the data types that each option requires. +dataLength|unsigned int|An unsigned int that contains the length, in bytes, of the buffer that the data parameter points to. ## Return This function returns an appropriate value from the [mvncStatus](mvncStatus.md) enumeration. diff --git a/docs/c_api/mvncSetGraphOption.md b/docs/c_api/mvncSetGraphOption.md index e03b75b..caf782c 100644 --- a/docs/c_api/mvncSetGraphOption.md +++ b/docs/c_api/mvncSetGraphOption.md @@ -35,23 +35,23 @@ This function returns an appropriate value from the [mvncStatus](mvncStatus.md) . . . - // open NCS device to initialize deviceHandle. - // read compiled graph file into graphFileBuf and put length of it in graphFileLen + // Open NCS device to initialize deviceHandle. + // Read compiled graph file into graphFileBuf and put length of it in graphFileLen - // allocate the graph + // Allocate the graph void* graphHandle; retCode = mvncAllocateGraph(deviceHandle, &graphHandle, graphFileBuf, graphFileLen); if (retCode != MVNC_OK) - { // error allocating graph + { // Error allocating graph printf("Could not allocate graph for file: %s\n", GRAPH_FILE_NAME); } else - { // successfully allocated graph. Now graphHandle is ready to go. - // use graphHandle for other API calls and call mvncDeallocateGraph + { // Successfully allocated graph. Now graphHandle is ready to go. + // Use graphHandle for other API calls and call mvncDeallocateGraph // when done with it. printf("Successfully allocated graph for %s\n", GRAPH_FILE_NAME); - // set the graph option for blocking calls + // Set the graph option for blocking calls int dontBlockValue = 0; retCode = mvncSetGraphOption(graphHandle, MVNC_DONTBLOCK, &dontBlockValue, sizeof(int)); if (retCode == MVNC_OK) @@ -64,8 +64,8 @@ This function returns an appropriate value from the [mvncStatus](mvncStatus.md) printf("Error returned from mvncSetGraphOption: %d\n", retCode); } - // use graphHandle here with the option set above. - // then deallocate the graph and close the device + // Use graphHandle here with the option set above. + // Then deallocate the graph and close the device. } . . diff --git a/docs/c_api/mvncStatus.md b/docs/c_api/mvncStatus.md index 3b528c4..1102c79 100644 --- a/docs/c_api/mvncStatus.md +++ b/docs/c_api/mvncStatus.md @@ -22,4 +22,4 @@ MVNC_MVCMD_NOT_FOUND | The file named MvNCAPI.mvcmd should be installed in the m MVNC_NO_DATA | No data to return. MVNC_GONE | The graph or device has been closed during the operation. MVNC_UNSUPPORTED_GRAPH_FILE | The graph file may have been created with an incompatible prior version of the Toolkit. Try to recompile the graph file with the version of the Toolkit that corresponds to the API version. -MVNC_MYRIAD_ERROR | An error has been reported by Movidius™ VPU. Use MVNC_DEBUGINFO to get more information. +MVNC_MYRIAD_ERROR | An error has been reported by Intel® Movidius™ VPU. Use MVNC_DEBUGINFO to get more information. diff --git a/docs/c_api/readme.md b/docs/c_api/readme.md index 342c927..0d8d5b3 100644 --- a/docs/c_api/readme.md +++ b/docs/c_api/readme.md @@ -1,25 +1,25 @@ -# Movidius™ Neural Compute SDK C API +# Intel® Movidius™ Neural Compute SDK C API -The SDK comes with a C Language API that enables developers to create applications in C or C++ which utilize hardware-accelerated Deep Neural Networks via the Movidius™ Neural Compute Stick (NCS.) The C API is provided as a header file (mvnc.h) and an associated library file (libmvnc.so) both of which are placed on the development computer when the SDK is installed. Details of the C API are provided below and within the documentation linked from here. +The SDK comes with a C language API that enables developers to create applications in C or C++ that utilize hardware-accelerated Deep Neural Networks via the Intel® Movidius™ Neural Compute Stick (Intel® Movidius™ NCS). The C API is provided as a header file (mvnc.h) and an associated library file (libmvnc.so), both of which are placed on the development computer when the SDK is installed. Details of the C API are provided below and within the documentation avilable via the link in each line. ## Enumerations - [mvncStatus](mvncStatus.md): Contains possible return values for API functions. -- [mvncDeviceOptions](mvncDeviceOptions.md): Contains all possible options to get/set for an NCS device, and their data types. +- [mvncDeviceOptions](mvncDeviceOptions.md): Contains all possible options to get/set for an Intel Movidius NCS device, and their data types. - [mvncGraphOptions](mvncGraphOptions.md): Contains all possible options to get/set for a graph, and their data types. -- [mvncGlobalOptions](mvncGlobalOptions.md): Contains all possible global options to get/set and their data types. +- [mvncGlobalOptions](mvncGlobalOptions.md): Contains all possible global options to get/set, and their data types. ## Functions -- [mvncGetDeviceName](mvncGetDeviceName.md): Retrieves the name of an NCS device that can be opened. -- [mvncOpenDevice](mvncOpenDevice.md): Opens an NCS device for use by the application. -- [mvncAllocateGraph](mvncAllocateGraph.md): Allocates a graph for a specific NCS device in preparation for computing inferences. +- [mvncGetDeviceName](mvncGetDeviceName.md): Retrieves the name of an Intel Movidius NCS device that can be opened. +- [mvncOpenDevice](mvncOpenDevice.md): Opens an Intel Movidius NCS device for use by the application. +- [mvncAllocateGraph](mvncAllocateGraph.md): Allocates a graph for a specific Intel Movidius NCS device in preparation for computing inferences. - [mvncDeallocateGraph](mvncDeallocateGraph.md): Deallocates and frees resouces associated with a graph. - [mvncLoadTensor](mvncLoadTensor.md): Initiates an inference by providing input to the neural network. - [mvncGetResult](mvncGetResult.md): Retrieves the result of an inference that was previously initiated. - [mvncSetGraphOption](mvncSetGraphOption.md): Sets an option for a graph. -- [mvncGetGraphOption](mvncGetGraphOption.md): Retrieves an the current value of an option for a graph. -- [mvncSetDeviceOption](mvncSetDeviceOption.md): Sets an option for an NCS device. -- [mvncGetDeviceOption](mvncGetDeviceOption.md): Retrieves the current value of an option for an NCS device. -- [mvncSetGlobalOption](mvncSetGlobalOption.md): Sets a global option for an application +- [mvncGetGraphOption](mvncGetGraphOption.md): Retrieves the current value of an option for a graph. +- [mvncSetDeviceOption](mvncSetDeviceOption.md): Sets an option for an Intel Movidius NCS device. +- [mvncGetDeviceOption](mvncGetDeviceOption.md): Retrieves the current value of an option for an Intel Movidius NCS device. +- [mvncSetGlobalOption](mvncSetGlobalOption.md): Sets a global option for an application. - [mvncGetGlobalOption](mvncGetGlobalOption.md): Retrieves the current value of a global option for an application. -- [mvncCloseDevice](mvncCloseDevice.md): Closes a previously opened NCS device. +- [mvncCloseDevice](mvncCloseDevice.md): Closes a previously opened Intel Movidius NCS device. diff --git a/docs/configure_network.md b/docs/configure_network.md index 745dd06..f0069c6 100644 --- a/docs/configure_network.md +++ b/docs/configure_network.md @@ -121,7 +121,7 @@ labels_offset=0 ``` Code snippet: ``` -#load the label files +#Load the label files labels_offset=0 # no background class offset labels_file='./synset_words.txt' labels=numpy.loadtxt(labels_file,str,delimiter='\t') @@ -134,7 +134,7 @@ iterations = graph.GetGraphOption(mvnc.GraphOption.ITERATIONS) img = cv2.imread('./dog.jpg') # using OpenCV for reading the image, it will be in BGR img=cv2.resize(img,(224,224)) # resize to 224x224 img-=[104,117,124] # subtract mean -#run, get the result and print results per the synset_words.txt +#Run, get the result and print results per the synset_words.txt graph.LoadTensor(img.astype(numpy.float16), 'user object') output, userobj = graph.GetResult() order = output.argsort()[::-1][:6] @@ -155,7 +155,7 @@ labels_offset=1 ``` Code snippet: ``` -#load the label files +#Load the label files labels_offset=1 # background class offset of 1 labels_file='./synset_words.txt' labels=numpy.loadtxt(labels_file,str,delimiter='\t') @@ -165,13 +165,13 @@ with open('./inceptionv3.blob', mode='rb') as f: graph = device.AllocateGraph(blob) graph.SetGraphOption(mvnc.GraphOption.ITERATIONS, 1) iterations = graph.GetGraphOption(mvnc.GraphOption.ITERATIONS) -#import the image and do the proper scaling +#Import the image and do the proper scaling img = cv2.imread('./dog.jpg').astype(numpy.float32) # using OpenCV for reading the image, it will be in BGR img=cv2.resize(img,(299,299)) # resize to 299x299 img=cv2.cvtColor(img,cv2.COLOR_BGR2RGB) # need to convert to RBG img-=[128,128,128] # subtract mean img /=128. # scale the image -#run, get the result and print results per the synset_words.txt +#Run, get the result and print results per the synset_words.txt graph.LoadTensor(img.astype(numpy.float16), 'user object') output, userobj = graph.GetResult() order = output.argsort()[::-1][:6] diff --git a/docs/install.md b/docs/install.md index cfeb4d2..e5f105d 100644 --- a/docs/install.md +++ b/docs/install.md @@ -19,10 +19,13 @@ The Intel Movidius NCS connects to the development computer over a USB 2.0 High ![](images/ncs_plugged.jpg) ## Installation of SDK and Examples -To install the SDK along with the examples in this repository, use the following command on your development computer. This is the typical installation. If you haven't already installed the SDK on your development computer, you should use this command to install: +To install the SDK along with the examples in this repository, use the following command on your development computer. This is the typical installation. If your development machine already has caffe installed see the note below. If you haven't already installed the SDK on your development computer, you should use this command to install: ``` git clone http://github.com/Movidius/ncsdk && cd ncsdk && make install && make examples ``` +Note: if you are installing on a machine that already has caffe installed and it's directory is already in the PYTHONPATH environment variable you will need to manually remove the existing directory from the PYTHONPATH environment variable prior to installing the ncsdk. Also, you will need to manually adjust the PYTHONPATH to match your development needs such that it points to the caffe version installed with the NCSDK when using the NCSDK, and it points to other caffe versions when using those. + +Note: The installation will only set the PYTHONPATH environment variable for the current user. It will do so by modifying the .bashrc file for that user. To use the sdk as other users on the machine you will need to manually set the PYTHONPATH for those other users. ## Installation of Examples without SDK To install only the examples and not the SDK on your development computer, use the following command to clone the repository and then make appropriate examples for your development computer. If you already have the SDK installed and only need the examples on your machine, you should use this command to install the examples: diff --git a/docs/manifest.md b/docs/manifest.md index fbf251a..85c33d2 100644 --- a/docs/manifest.md +++ b/docs/manifest.md @@ -1,5 +1,5 @@ -# NC SDK installation manifest +# NC SDK Installation Manifest These are the files and directories installed outside of repository directory as part of the NC SDK. - /usr/local/include/mvnc.h diff --git a/docs/py_api/Device.AllocateGraph.md b/docs/py_api/Device.AllocateGraph.md index 45f59a6..779eca8 100644 --- a/docs/py_api/Device.AllocateGraph.md +++ b/docs/py_api/Device.AllocateGraph.md @@ -5,10 +5,10 @@ |Package | mvnc | |Module | mvncapi | |Version | 1.0 | -|See also|Graph
Graph.DeallocateGraph
| +|See also|[Graph](Graph.md)
[Graph.DeallocateGraph()](Graph.DeallocateGraph.md)
| ## Overview -This function is used to create an instance of a Graph that represents a neural network which can be used to infer results via methods Graph.LoadTensor() and Graph.GetResult(). +This function is used to create an instance of a Graph that represents a neural network, which can be used to infer results via methods Graph.LoadTensor() and Graph.GetResult(). ## Syntax @@ -20,13 +20,13 @@ dev.AllocateGraph(graphPath) |Parameter | Description | |---------------|---------------| -|graphPath | A string that is the path to the graph file. The graph file must have been created with the NC SDK graph compiler.| +|graphPath | A string that is the path to the graph file. The graph file must have been created with the NC SDK graph compiler.| ## Return Returns an instance of a Graph object that is ready to use. ## Known Issues -After the Graph that is created is no longer needed Graph.DeallocateGraph() must be called to free the graph resources. +After the Graph that is created is no longer needed, Graph.DeallocateGraph() must be called to free the graph resources. ## Example ```python diff --git a/docs/py_api/Device.CloseDevice.md b/docs/py_api/Device.CloseDevice.md index f4cf8bf..6c5dc47 100644 --- a/docs/py_api/Device.CloseDevice.md +++ b/docs/py_api/Device.CloseDevice.md @@ -5,7 +5,7 @@ |Package | mvnc | |Module | mvncapi | |Version | 1.0 | -|See also|Device.\_\_init\_\_()
Device.OpenDevice()| +|See also|[Device.\_\_init\_\_()](Device.__init__.md)
[Device.OpenDevice()](Device.OpenDevice.md)| ## Overview This function is used to cease communication and reset the device. diff --git a/docs/py_api/Device.GetDeviceOption.md b/docs/py_api/Device.GetDeviceOption.md index a671552..f3850c2 100644 --- a/docs/py_api/Device.GetDeviceOption.md +++ b/docs/py_api/Device.GetDeviceOption.md @@ -5,10 +5,10 @@ |Package | mvnc | |Module | mvncapi | |Version | 1.0 | -|See also |Device.SetDeviceOption
DeviceOption| +|See also |[Device.SetDeviceOption()](Device.SetDeviceOption.md)
[DeviceOption](DeviceOption.md)| ## Overview -This function is used to get an option for the device. The options can be found in the DeviceOption enumeration table. +This function is used to get an option for the device. The options can be found in the [DeviceOption](DeviceOption.md) enumeration table. ## Syntax ```python @@ -22,7 +22,7 @@ GetDeviceOption(option) | option | Member of the DeviceOption enumeration that specifies which option to get.| ## Return -The value for the specified device option. The type of the returned value depends on the option specified. See the DeviceOption enumeration for the type that will be returned for each option. +The value for the specified device option. The type of the returned value depends on the option specified. See the [DeviceOption](DeviceOption.md) enumeration for the type that will be returned for each option. ## Known Issues diff --git a/docs/py_api/Device.OpenDevice.md b/docs/py_api/Device.OpenDevice.md index fe17132..d36befc 100644 --- a/docs/py_api/Device.OpenDevice.md +++ b/docs/py_api/Device.OpenDevice.md @@ -5,7 +5,7 @@ |Package | mvnc | |Module | mvncapi | |Version | 1.0 | -|See also|Device.\_\_init\_\_()
Device.CloseDevice()| +|See also|[Device.\_\_init\_\_()](Device.__init__.md)
[Device.CloseDevice()](Device.CloseDevice.md)| ## Overview This function is used to initialize the device. @@ -31,7 +31,7 @@ import mvnc.mvncapi as ncs deviceNames = ncs.EnumerateDevices() firstDevice = ncs.Device(deviceNames[0]) firstDevice.OpenDevice() -# use device +# Use device firstDevice.CloseDevice() ############################################# diff --git a/docs/py_api/Device.SetDeviceOption.md b/docs/py_api/Device.SetDeviceOption.md index 22d7aa6..6200dd9 100644 --- a/docs/py_api/Device.SetDeviceOption.md +++ b/docs/py_api/Device.SetDeviceOption.md @@ -5,10 +5,10 @@ |Package | mvnc | |Module | mvncapi | |Version | 1.0 | -|See also|Device.GetDeviceOption()
DeviceOption| +|See also |[Device.GetDeviceOption()](Device.GetDeviceOption.md)
[DeviceOption](DeviceOption.md)| ## Overview -This function is used to set an option for the device. The options can be found in the DeviceOption enumeration class. +This function is used to set an option for the device. The options can be found in the [DeviceOption](DeviceOption.md) enumeration class. ## Syntax ```python @@ -19,8 +19,8 @@ SetDeviceOption(option, value) |Parameter | Description | |-----------|---------------| -|option | Member of the DeviceOption enumeration class that specifies which device option to set | -|value | The new value to which the device option will be set. The type to pass for this parameter depends on which option is being set. See the DeviceOption enumeration class for the types that correspond to each option.| +|option | Member of the DeviceOption enumeration class that specifies which device option to set. | +|value | The new value to which the device option will be set. The type to pass for this parameter depends on which option is being set. See the [DeviceOption](DeviceOption.md) enumeration class for the types that correspond to each option.| ## Return diff --git a/docs/py_api/Device.__init__.md b/docs/py_api/Device.__init__.md index 4a057b6..e1260ba 100644 --- a/docs/py_api/Device.__init__.md +++ b/docs/py_api/Device.__init__.md @@ -20,7 +20,7 @@ mvnc.Device("device name here") |Parameter | Description | |---------------|---------------| -|deviceName | The name of the device to initialize. This must come from calling mvncapi module function EnumerateDevices()| +|deviceName | The name of the device to initialize. This must come from calling mvncapi module function EnumerateDevices().| ## Return None. @@ -34,7 +34,7 @@ import mvnc.mvncapi as ncs # Enumerate devices deviceNames = ncs.EnumerateDevices() -# create and init a Device instance. +# Create and init a device instance ncsDevice = ncs.Device(deviceNames[0]) # Open device, use device, close device diff --git a/docs/py_api/Device.md b/docs/py_api/Device.md index b84d630..c7f3bca 100644 --- a/docs/py_api/Device.md +++ b/docs/py_api/Device.md @@ -1,14 +1,14 @@ -# Device class +# Device Class -The Device class represents the NCS device. Typically one instance of this class is created for each physical NCS device that is plugged into the system so multiple instances may exist if you have multiple devices attached ot your system. +The Device class represents the Intel® Movidius™ Neural Compute Stick (Intel® Movidius™ NCS) device. Typically one instance of this class is created for each physical NCS device that is plugged into the system, so multiple instances may exist if you have multiple devices attached to your system. -# Usage -To use the Device class you must create and initialize it by name. The valid names to use can be determined by calling the mvncapi module function EnumerateDevices(). Once you have successfully created an instance of this class the typical usage is to call OpenDevice(), AllocateGraph(), use the graph, CloseDevice(). +## Usage +To use the Device class, you must create and initialize it by name. The valid names to use can be determined by calling the mvncapi module function EnumerateDevices(). Once you have successfully created an instance of this class, the typical usage is to call OpenDevice(), AllocateGraph(), use the graph, and CloseDevice(). -# Device methods -## [\_\_init\_\_](Device.__init__.md) -## [OpenDevice](Device.OpenDevice.md) -## [CloseDevice](Device.CloseDevice.md) -## [SetDeviceOption](Device.SetDeviceOption.md) -## [GetDeviceOption](Device.GetDeviceOption.md) -## [AllocateGraph](Device.AllocateGraph.md) +## Device methods +- [\_\_init\_\_](Device.__init__.md) +- [OpenDevice](Device.OpenDevice.md) +- [CloseDevice](Device.CloseDevice.md) +- [SetDeviceOption](Device.SetDeviceOption.md) +- [GetDeviceOption](Device.GetDeviceOption.md) +- [AllocateGraph](Device.AllocateGraph.md) diff --git a/docs/py_api/DeviceOption.md b/docs/py_api/DeviceOption.md index b1dc59b..2d6ec16 100644 --- a/docs/py_api/DeviceOption.md +++ b/docs/py_api/DeviceOption.md @@ -1,11 +1,11 @@ -# DeviceOption enumeration class +# DeviceOption Enumeration Class |Info | Value | |----------|---------------| |Package | mvnc | |Module | mvncapi | |Version | 1.0 | -|See also |Device.SetDeviceOption()
Device.GetDeviceOption()| +|See also |[Device.SetDeviceOption()](Device.SetDeviceOption.md)
[Device.GetDeviceOption()](Device.GetDeviceOption.md)| @@ -13,6 +13,7 @@ The DeviceOption class is an enumeration class that defines the options that are passed to and received from the SetDeviceOption and the GetDeviceOption functions. -Enumerator Values|Description ------------- | ------------- -THERMAL_THROTTLING_LEVEL |Returns 1 if lower guard temperature threshold of chip sensor is reached. This indicates short throttling time is in action between inferences to protect the device. Returns 2 if upper guard temperature of chip sensor is reached. This indicates long throttling time is in action between inferences to protect the device. +enum | option type | possible values|get/set|Description +------------------------ | ----------- | -------------- |-------|----------- +THERMAL_THROTTLING_LEVEL | int | 1, 2 | get |1: if lower guard temperature threshold of chip sensor is reached. This indicates short throttling time is in action between inferences to protect the device.
2: if upper guard temperature of chip sensor is reached. This indicates long throttling time is in action between inferences to protect the device. + diff --git a/docs/py_api/EnumerateDevices.md b/docs/py_api/EnumerateDevices.md index ad9d4f5..2f88186 100644 --- a/docs/py_api/EnumerateDevices.md +++ b/docs/py_api/EnumerateDevices.md @@ -5,10 +5,10 @@ |Package | mvnc | |Module | mvncapi | |Version | 1.0 | -|See also | Device | +|See also | [Device](Device.md) | ## Overview -This function is used to get a list of the names of the devices present in the system. Each of the returned names can be used to create an instance of the Device class. +This function is used to get a list of the names of the devices present in the system. Each of the names returned can be used to create an instance of the Device class. ## Syntax @@ -20,7 +20,7 @@ deviceNames = EnumerateDevices() None. ## Return -An array of device names each of which can be used to create a new instance of the Device class. +An array of device names, each of which can be used to create a new instance of the Device class. ## Known Issues @@ -32,7 +32,7 @@ if len(deviceNames) == 0: print("Error - No devices detected.") quit() -# open first NCS device found +# Open first NCS device found device = ncs.Device(deviceNames[0]) # Allocate graph / otherwise use device as needed diff --git a/docs/py_api/GetGlobalOption.md b/docs/py_api/GetGlobalOption.md index bd6c852..950cac7 100644 --- a/docs/py_api/GetGlobalOption.md +++ b/docs/py_api/GetGlobalOption.md @@ -5,10 +5,10 @@ |Package | mvnc | |Module | mvncapi | |Version | 1.0 | -|See also | GlobalOption
SetGlobalOption()| +|See also | [GlobalOption](GlobalOption.md)
[SetGlobalOption()](SetGlobalOption.md)| ## Overview -This function is used to get a global option. The available options can be found in the GlobalOption enumeration section. +This function is used to get a Global option. The available options can be found in the [GlobalOption](GlobalOption.md) enumeration section. ## Syntax @@ -23,7 +23,7 @@ value = GetGlobalOption(option) |option |Member of the GlobalOption enumeration that specifies which option to get.| ## Return -The value for the specified option. The type of the returned value depends on the option specified. See the GlobalOption enumeration for the type that will be returned for each option. +The value for the specified option. The type of the returned value depends on the option specified. See the [GlobalOption](GlobalOption.md) enumeration for the type that will be returned for each option. ## Known Issues diff --git a/docs/py_api/GlobalOption.md b/docs/py_api/GlobalOption.md index 3df0d99..54ea6b9 100644 --- a/docs/py_api/GlobalOption.md +++ b/docs/py_api/GlobalOption.md @@ -1,11 +1,11 @@ -# GlobalOption enumeration class +# GlobalOption Enumeration Class |Info | Value | |----------|---------------| |Package | mvnc | |Module | mvncapi | |Version | 1.0 | -|See also | SetGlobalOption()
GetGlobalOption()| +|See also | [SetGlobalOption()](SetGlobalOption.md)
[GetGlobalOption()](GetGlobalOption.md)| @@ -13,8 +13,10 @@ The GlobalOption class is an enumeration class that defines the options that are passed to and received from the SetGlobalOption and the GetGlobalOption functions. -Enumerator Values|Description ------------- | ------------- -LOGLEVEL |0=Nothing is printed.
1=Print errors only.
2=Verbose. +enum | option type | possible values|get/set |Description +-------- | ----------- | -------------- |----------|----------- +LOGLEVEL | int | 0, 1, 2 | get, set | 0 = Nothing is printed (default)
1 = Print errors only
2 = Verbose + + diff --git a/docs/py_api/Graph.DeallocateGraph.md b/docs/py_api/Graph.DeallocateGraph.md index adf6d8f..202e8f2 100644 --- a/docs/py_api/Graph.DeallocateGraph.md +++ b/docs/py_api/Graph.DeallocateGraph.md @@ -5,10 +5,10 @@ |Package | mvnc | |Module | mvncapi | |Version | 1.0 | -|See also|Device.AllocateGraph()| +|See also|[Device.AllocateGraph()](Device.AllocateGraph.md)| ## Overview -This function is used to deallocate a graph that was allocated for an NCS device with the Device.AllocateGraph() method. This should be called for every graph that is created to free resources associated with the graph. +This function is used to deallocate a graph that was allocated for an Intel® Movidius™ NCS device with the Device.AllocateGraph() method. This should be called for every graph that is created to free resources associated with the graph. ## Syntax @@ -33,7 +33,7 @@ if len(deviceNames) == 0: print("Error - No devices detected.") quit() -# open first NCS device found +# Open first NCS device found device = mvnc.Device(devices[0]) # Allocate the graph diff --git a/docs/py_api/Graph.GetGraphOption.md b/docs/py_api/Graph.GetGraphOption.md index c0649d8..1514b63 100644 --- a/docs/py_api/Graph.GetGraphOption.md +++ b/docs/py_api/Graph.GetGraphOption.md @@ -5,10 +5,10 @@ |Package | mvnc | |Module | mvncapi | |Version | 1.0 | -|See also|Graph.SetGraphOption()
GraphOption| +|See also|[Graph.SetGraphOption()](Graph.SetGraphOption.md)
[GraphOption](GraphOption.md)| ## Overview -This function is used to get a graph option. The available options can be found in GraphOption enumeration class. +This function is used to get a graph option. The available options can be found in [GraphOption](GraphOption.md) enumeration class. ## Syntax ```python @@ -22,7 +22,7 @@ value = graph.GetGraphOption(option) |option | A value from the GraphOption enumeration to specify which option's value should be returned. | ## Return -The value for the specified GraphOption is returned. The type of the returned value depends on the option specified. See the GraphOption class for the value types for each option. +The value for the specified GraphOption is returned. The type of the returned value depends on the option specified. See the [GraphOption](GraphOption.md) class for the value types for each option. ## Known Issues diff --git a/docs/py_api/Graph.GetResult.md b/docs/py_api/Graph.GetResult.md index 5ca1755..04eab4a 100644 --- a/docs/py_api/Graph.GetResult.md +++ b/docs/py_api/Graph.GetResult.md @@ -5,7 +5,7 @@ |Package | mvnc | |Module | mvncapi | |Version | 1.0 | -|See also |Graph.LoadTensor()| +|See also |[Graph.LoadTensor()](Graph.LoadTensor.md)| ## Overview This function retrieves the result of an inference that was initiated via Graph.LoadTensor() on the specified graph. diff --git a/docs/py_api/Graph.LoadTensor.md b/docs/py_api/Graph.LoadTensor.md index 64e2111..602d9dd 100644 --- a/docs/py_api/Graph.LoadTensor.md +++ b/docs/py_api/Graph.LoadTensor.md @@ -5,10 +5,10 @@ |Package | mvnc | |Module | mvncapi | |Version | 1.0 | -|See also |Graph.GetResult()| +|See also |[Graph.GetResult()](Graph.GetResult.md)| ## Overview -This function initiates an inference on the specified graph via the associated NCS device. After calling this function use the Graph.GetResult() function to retrieve the inference result. +This function initiates an inference on the specified graph via the associated Intel® Movidius™ NCS device. After calling this function, use the Graph.GetResult() function to retrieve the inference result. ## Syntax @@ -19,11 +19,11 @@ graph.LoadTensor(inputTensor, userObject) |Parameter | Description | |---------------|---------------| -|inputTensor | Input data on which an inderence will be run. The data must be passed in a NumPy ndarray of half precision floats (float 16) | | +|inputTensor | Input data on which an inference will be run. The data must be passed in a NumPy ndarray of half precision floats (float 16). | | |userObject | A user-defined parameter that is returned by the GetResult function along with the inference result for this tensor.| ## Return -Returns True if the function works, False if not. When the graph is in non blocking mode (GraphOption.DONTBLOCK) this function will return False if the device is busy. +Returns True if the function works, False if not. When the graph is in non-blocking mode (GraphOption.DONTBLOCK), this function will return False if the device is busy. ## Known Issues diff --git a/docs/py_api/Graph.SetGraphOption.md b/docs/py_api/Graph.SetGraphOption.md index 907aeed..91e5a86 100644 --- a/docs/py_api/Graph.SetGraphOption.md +++ b/docs/py_api/Graph.SetGraphOption.md @@ -5,10 +5,10 @@ |Package | mvnc | |Module | mvncapi | |Version | 1.0 | -|See also|Graph.GetGraphOption()
GraphOption| +|See also|[Graph.GetGraphOption()](Graph.GetGraphOption.md)
[GraphOption](GraphOption.md)| ## Overview -This function is used to set a graph option. The available options can be found in the GraphOption enumeration class. +This function is used to set a graph option. The available options can be found in the [GraphOption](GraphOption.md) enumeration class. ## Syntax ```python @@ -20,7 +20,7 @@ graph.SetGraphOption(option, value) Parameter | Description ---------------|--------------- option | Member of the GraphOption enumeration specifying which option's value will be set. -value | The new value to which the specified graph option will be set. See the GraphOption enumeration class for the type of value for each option. +value | The new value to which the specified graph option will be set. See the [GraphOption](GraphOption.md) enumeration class for the type of value for each option. ## Return diff --git a/docs/py_api/Graph.md b/docs/py_api/Graph.md index 8d62029..b9c3b30 100644 --- a/docs/py_api/Graph.md +++ b/docs/py_api/Graph.md @@ -1,13 +1,13 @@ -# Graph class +# Graph Class -The Graph class is a container for a neural network graph file that is associated with a particular NCS device. +The Graph class is a container for a neural network graph file that is associated with a particular Intel® Movidius™ Neural Compute Stick (Intel® Movidius™ NCS) device. -# Usage -To use the Graph class you must create a graph handle by calling AllocateGraph() from the Device class. The location of the graph file will be passed to AllocateGraph() and it will return an instance of the Graph class. Once you have successfully created an instance of this class, the typical usage is to optionally get/set graph options, then call LoadTensor() and GetResult(), to perform inferencing with the graph that was allocated, and finally call DeallocateGraph() when the neural network is no longer needed. +## Usage +To use the Graph class, you must create a graph handle by calling AllocateGraph() from the Device class. The location of the graph file will be passed to AllocateGraph(), and it will return an instance of the Graph class. Once you have successfully created an instance of this class, the typical usage is to optionally get/set graph options, then call LoadTensor() and GetResult() to perform inferencing with the graph that was allocated. Finally, call DeallocateGraph() when the neural network is no longer needed. -# Graph methods -## [DeallocateGraph](Graph.DeallocateGraph.md) -## [SetGraphOption](Graph.SetGraphOption.md) -## [GetGraphOption](Graph.GetGraphOption.md) -## [LoadTensor](Graph.LoadTensor.md) -## [GetResult](Graph.GetResult.md) +## Graph methods +- [DeallocateGraph](Graph.DeallocateGraph.md) +- [SetGraphOption](Graph.SetGraphOption.md) +- [GetGraphOption](Graph.GetGraphOption.md) +- [LoadTensor](Graph.LoadTensor.md) +- [GetResult](Graph.GetResult.md) diff --git a/docs/py_api/GraphOption.md b/docs/py_api/GraphOption.md index 190bcaa..05eee91 100644 --- a/docs/py_api/GraphOption.md +++ b/docs/py_api/GraphOption.md @@ -1,11 +1,11 @@ -# GraphOption enumeration class +# GraphOption Enumeration Class |Info | Value | |----------|---------------| |Package | mvnc | |Module | mvncapi | |Version | 1.0 | -|See also | Graph.SetGraphOption()
Graph.GetGraphOption()| +|See also | [Graph.SetGraphOption()](Graph.SetGraphOption.md)
[Graph.GetGraphOption()](Graph.GetGraphOption.md)| @@ -15,6 +15,6 @@ The GraphOption class is an enumeration class that defines the options that are enum| option type | possible values|get/set|Description --- | ----------- | -------------- |-------|----------- -DONTBLOCK |integer |0 or 1|get/set|0: LoadTensor and GetResult Block
1: LoadTensor returns BUSY instead of blocking. GetResult will return NODATA instead of blocking. +DONTBLOCK |int |0 or 1|get/set|0: Calls to Graph.LoadTensor() and Graph.GetResult() will block (won't return until the action is completed) (Default)
1: Calls to those functions don't block (they will return immediately). If the action coudn't be completed the return value will indicate why. Graph.LoadTensor() will return MVNC_BUSY when the NCS isn't able to perform the action because its busy, try again later. Graph.GetResult() will return MVNC_NO_DATA unless there is an inference that is ready to be returned. In this case try again later and when there is a completed inference the results will be returned. TIMETAKEN |string |any|get|Return a NumPy float array [numpy.array()] of inference times per layer in float data type. -DEBUGINFO | string |any|get|Return a string with the error text as returned by the device. +DEBUGINFO |string |any|get|Return a string with the error text as returned by the device. diff --git a/docs/py_api/SetGlobalOption.md b/docs/py_api/SetGlobalOption.md index abfa611..09959eb 100644 --- a/docs/py_api/SetGlobalOption.md +++ b/docs/py_api/SetGlobalOption.md @@ -5,10 +5,10 @@ |Package | mvnc | |Module | mvncapi | |Version | 1.0 | -|See also | GlobalOption
GetGlobalOption()| +|See also | [GlobalOption](GlobalOption.md)
[GetGlobalOption()](GetGlobalOption.md)| ## Overview -This function is used to set a global option. The available Global options and possible values can be found in the documentation for the GlobalOption enumeration. +This function is used to set a Global option. The available Global options and possible values can be found in the documentation for the [GlobalOption](GlobalOption.md) enumeration. ## Syntax @@ -20,8 +20,8 @@ SetGlobalOption(option, value) |Parameter | Description | |---------------|---------------| -|option|Member of the GlobalOptions enumeration which specifies which option to set.| -|value |The new value to which the option will be set. See the GlobalOption enumeration class for the type of value for each option.| +|option|Member of the GlobalOptions enumeration that specifies which option to set.| +|value |The new value to which the option will be set. See the [GlobalOption](GlobalOption.md) enumeration class for the type of value for each option.| ## Known Issues @@ -29,6 +29,6 @@ SetGlobalOption(option, value) ```Python import mvnc.mvncapi as ncs -# set the global logging level to verbose +# Set the global logging level to verbose ncs.SetGlobalOption(ncs.GlobalOption.LOGLEVEL, 2) ``` diff --git a/docs/py_api/Status.md b/docs/py_api/Status.md index ea0d4a2..8713b49 100644 --- a/docs/py_api/Status.md +++ b/docs/py_api/Status.md @@ -1,4 +1,4 @@ -# Status enumeration class +# Status Enumeration Class |Info | Value | |----------|---------------| @@ -24,6 +24,6 @@ MVNC_TIMEOUT |Timeout in the communication with the device MVNC_MVCMD_NOT_FOUND |The file named MvNCAPI.mvcmd is installed in the mvnc directory. This message means that the file has been moved or installer failed. MVNC_NO_DATA |No data to return. MVNC_GONE |The graph or device has been closed during the operation. -MVNC_UNSUPPORTED_GRAPH_FILE |The graph file is corrupt or may have been created with an incompatible prior version of the NCS toolkit. Try to recompile the graph file with the version of the Toolkit that corresponds to the API version. -MVNC_MYRIAD_ERROR |An error has been reported by the Movidius™ VPU. Use MVNC_DEBUGINFO. +MVNC_UNSUPPORTED_GRAPH_FILE |The graph file is corrupt or may have been created with an incompatible prior version of the NCS toolkit. Try to recompile the graph file with the version of the toolkit that corresponds to the API version. +MVNC_MYRIAD_ERROR |An error has been reported by the Intel® Movidius™ VPU. Use MVNC_DEBUGINFO. diff --git a/docs/py_api/readme.md b/docs/py_api/readme.md index 169dc3c..c0880d2 100644 --- a/docs/py_api/readme.md +++ b/docs/py_api/readme.md @@ -1,28 +1,28 @@ -# Movidius™ Neural Compute SDK Python API +# Intel® Movidius™ Neural Compute SDK Python API -The SDK comes with a Python3 Language API that enables applications that utilize hardware accelerated Deep Neural Networks via the Movidius™ Neural Compute Stick (NCS.) The API is provided as a single python script (mvncapi.py) which is placed on the development computer when the SDK is installed. Details of the Python API are provided below and within the documents linked from here. +The Intel® Movidius™ Neural Compute SDK comes with a Python3 Language API that enables applications that utilize hardware accelerated Deep Neural Networks via the Intel® Movidius™ Neural Compute Stick (Intel® Movidius™ NCS). The API is provided as a single Python script (mvncapi.py), which is placed on the development computer when the SDK is installed. Details of the Python API are provided below and within the documents linked from here. ## Class Diagram -The Python class diagram follows. In this diagram it is shown that the entire python api is in the mvnc Python package. Within the mvnc package there is one Python module which is mvncapi. The mvncapi module is defined by the contents of the mvncapi.py file. +The Python class diagram follows. In this diagram, it is shown that the entire Python API is in the mvnc Python package. Within the mvnc package, there is one Python module, which is mvncapi. The mvncapi module is defined by the contents of the mvncapi.py file. ![](../images/python_api_class_diagram.jpg) -In the sections that follow, the details of the elements within the mvncapi module are provided. This includes module level enumerations, functions that are global to the module, and the classes defined in the module. +The details of the elements within the mvncapi module are provided in the lists that follow. These include module level enumerations, functions that are global to the module, and the classes defined in the module. ## Enumerations -### [GlobalOption](GlobalOption.md) -### [DeviceOption](DeviceOption.md) -### [GraphOption](GraphOption.md) -### [Status](Status.md) +- [GlobalOption](GlobalOption.md) +- [DeviceOption](DeviceOption.md) +- [GraphOption](GraphOption.md) +- [Status](Status.md) ## Global Functions -### [EnumerateDevices](EnumerateDevices.md) -### [SetGlobalOption](SetGlobalOption.md) -### [GetGlobalOption](GetGlobalOption.md) +- [EnumerateDevices](EnumerateDevices.md) +- [SetGlobalOption](SetGlobalOption.md) +- [GetGlobalOption](GetGlobalOption.md) ## Classes -### [Device](Device.md) -### [Graph](Graph.md) +- [Device](Device.md) +- [Graph](Graph.md) diff --git a/docs/readme.md b/docs/readme.md index efd60ee..0ed35b0 100644 --- a/docs/readme.md +++ b/docs/readme.md @@ -93,5 +93,12 @@ The Neural Compute App Zoo is a GitHub repository at [http://github.com/Movidius See [The Neural Compute App Zoo README](https://github.com/Movidius/ncappzoo/blob/master/README.md) for more information. + +# Troubleshooting and Tech Support +Be sure to check the [NCS Troubleshooting Guide](https://ncsforum.movidius.com/discussion/370/intel-ncs-troubleshooting-help-and-guidelines#latest) if you run into any issues with the NCS or NCSDK. -[Release Notes](release_notes.md) +Also for general tech support issues the [NCS User Forum](https://developer.movidius.com/forums) is recommended and contains community discussions on many issues and resolutions. + + +# Release Notes +See the latests [Release Notes](release_notes.md) for detailed information of the specific release. diff --git a/docs/release_notes.md b/docs/release_notes.md index b7d6d97..fa8b9d5 100644 --- a/docs/release_notes.md +++ b/docs/release_notes.md @@ -1,22 +1,17 @@ ============================================================ # Movidius Neural Compute SDK Release Notes -# V1.10.00 2017-10-31 +# V1.10.01 2017-11-15 ============================================================ -###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 +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: -Networks: - Inception-v2 - Optimized mobilenet (down to 42ms from 110 ms on 12 shaves, for the 224x224 version) -Layers: - Dilated convolution - Optimized depth convolution: still supporting only 3x3 convolution - 1x1 pooling with stride 2, acting as up-sampling - Fix for TF-like padding for convolution. May fail for large input channels (more than 200). - - +### New features: +#### Networks: +1. VGG 16 for both Caffe and Tensorflow +2. Resnet 18 for Caffe +3. Resnet 50 for Caffe + ## API Notes: 1. No change @@ -31,6 +26,9 @@ Support for the following networks has been tested. 5. VGG (Sousmith VGG_A) 6. Alexnet 7. TinyYolo v1 +8. VGG 16 +9. Resnet 18 +10. Resnet 50 ### Tensorflow r1.3 1. inception-v1 @@ -38,23 +36,24 @@ Support for the following networks has been tested. 3. inception-v3 4. inception-v4 5. Inception ResNet v2 -6. Mobilenet_V1_1.0 variants: -MobileNet_v1_1.0_224 -MobileNet_v1_1.0_192 -MobileNet_v1_1.0_160 -MobileNet_v1_1.0_128 -MobileNet_v1_0.75_224 -MobileNet_v1_0.75_192 -MobileNet_v1_0.75_160 -MobileNet_v1_0.75_128 -MobileNet_v1_0.5_224 -MobileNet_v1_0.5_192 -MobileNet_v1_0.5_160 -MobileNet_v1_0.5_128 -MobileNet_v1_0.25_224 -MobileNet_v1_0.25_192 -MobileNet_v1_0.25_160 -MobileNet_v1_0.25_128 +6. VGG 16 +7. Mobilenet_V1_1.0 variants: + - MobileNet_v1_1.0_224 + - MobileNet_v1_1.0_192 + - MobileNet_v1_1.0_160 + - MobileNet_v1_1.0_128 + - MobileNet_v1_0.75_224 + - MobileNet_v1_0.75_192 + - MobileNet_v1_0.75_160 + - MobileNet_v1_0.75_128 + - MobileNet_v1_0.5_224 + - MobileNet_v1_0.5_192 + - MobileNet_v1_0.5_160 + - MobileNet_v1_0.5_128 + - MobileNet_v1_0.25_224 + - MobileNet_v1_0.25_192 + - MobileNet_v1_0.25_160 + - MobileNet_v1_0.25_128 ## Firmware Features: 1. Convolutions @@ -84,18 +83,17 @@ MobileNet_v1_0.25_128 ## Bug Fixes: -1. Fixed -- mvNCProfile gives wrong results for MFLOPs for depthwise_convolution layer. -2. Fixed -- apps report NaN or wrong results, with input dimension not multiple of 8. -3. Fixed -- API reports timeout error if input dimension < 8. -4. Fixed -- SDK can not be installed by root user in Ubuntu. + Fixed: Installation does not succeed as root user + Fixed: Support for larger convolutions, enabling VGG 16 support + Fixed: Issues blocking Resnet 18 and Resnet 50 ## 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. -2. SDK tools for tensorflow on Rasbpian Stretch are not supported for this release, due to erlack of an integrated tensorflow installer for Rasbpian in the SDK. TF examples are provided with pre-compiled graph files to allow them to run on Rasperry Pi, however the compile, profile, and check functions will not be available on Raspberry Pi, and 'make examples' will generate failures for the tensorflow examples on Raspberry Pi. +2. SDK tools for tensorflow on Rasbpian Stretch are not supported for this release, due to lack of an integrated tensorflow installer for Rasbpian in the SDK. TF examples are provided with pre-compiled graph files to allow them to run on Rasperry Pi, however the compile, profile, and check functions will not be available on Raspberry Pi, and 'make examples' will generate failures for the tensorflow examples on Raspberry Pi. 3. Depth-wise convolution may not be supported if channel multiplier > 1. 4. If working behind proxy, proper proxy settings must be applied for the installer to succeed. 5. Although improved, the installer is known to take a long time on Raspberry Pi. Date/time must be correct for SDK installation to succeed on Raspberry Pi. -6. Default system virtual memory swap file size is too small to compile AlexNet on Raspberry Pi. +6. Default system virtual memory swap file size is too small to compile AlexNet on Raspberry Pi. VGG 16 not verified to compile on Pi. 7. Raspberry Pi users will need to upgrade to Raspbian Stretch for releases after 1.09. 8. Convolution may fail to find a solution for very large inputs. 9. Depth convolution is tested for 3x3 kernels. diff --git a/docs/tools/check.md b/docs/tools/check.md index 6335736..9cc6158 100644 --- a/docs/tools/check.md +++ b/docs/tools/check.md @@ -8,7 +8,7 @@ Revision|1.08 See also| [mvNCCompile](compile.md), [mvNCProfile](profile.md), [TensorFlow™ Info](../TensorFlowUsage.md) ## Overview -This commandline tool compiles the provided network, runs the network on the connected Neural Compute Stick (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 Neural Compute Stick. +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. The weights file is not required when profiling a network to determine bottlenecks. @@ -27,17 +27,17 @@ mvNCCheck network.meta [-s Max Number of Shaves] [-in Input Node Name] [-on Outp Argument|Description ------------ | ------------- network.prototxt(caffe)
network.meta(TensorFlow™)|Name of the network file. -[-w weights_file]|Weights filename from training (Only applies to Caffe, not to be used with TensorFlow™.) If omitted zero weights will be used. -[-s Max # of Shaves]|Default: 1

Selects the maximum number of SHAVEs (1,2,4,8 or 12.) to use for network layers.

Note: The NCS runtime code may use less than the MAX SHAVE value for some layers where measurements have typically shown no inference performance degradation (and consequently a power benefit) of using fewer SHAVEs. -[-in Input Node Name]|By default the network is processed from the input tensor. This option allows a user to select an alternative start point in the network.

This enables partial network processing. When used together with the -on option a user can isolate one or more layers in a network for analysis. -[-on Output Node Name]|By default the network is processed through to the output tensor. This option allows a user to select an alternative end point in the network.

This enables partial network processing. When used together with the -in option a user can isolate one or more layers in a network for analysis. +[-w weights_file]|Weights filename from training. (Only applies to Caffe, not to be used with TensorFlow™.) If omitted, zero weights will be used. +[-s Max # of Shaves]|Default: 1

Selects the maximum number of SHAVEs (1,2,4,8, or 12) to use for network layers.

Note: The NCS runtime code may use less than the MAX SHAVE value for some layers where measurements have typically shown no inference performance degradation (and consequently a power benefit) of using fewer SHAVEs. +[-in Input Node Name]|By default the network is processed from the input tensor. This option allows a user to select an alternative start point in the network.

This enables partial network processing. When used together with the -on option, a user can isolate one or more layers in a network for analysis. +[-on Output Node Name]|By default the network is processed through to the output tensor. This option allows a user to select an alternative end point in the network.

This enables partial network processing. When used together with the -in option, a user can isolate one or more layers in a network for analysis. [-is Input-Width Input-Height]|Input size is typically described as a part of the network. For networks that do not have dimension constraints on the input tensor, this option can be used to set the desired input dimensions.

Only two dimensions are defined because the batch size is always 1 and the number of color planes is assumed to be 3. [-o Output Graph Filename]|Default: "graph"

Output graph container filename. If not provided, “graph” will be used. -[-i image filename]|Image to use as input to validation run.
If not set, a randomly generated image will be used -[-id Top-1 Validation ID]|Expected id for Top-1 validation -[-S scale factor]|Scale each value of the input by this amount.
E.g. if the network expects input values in the range 0-255, put 255 here (1 is default, as the range 0-1 is the default). -[-M Mean Subtraction Number or npy filename]|Subtract this from the input (applied after scale). E.g. If the network expects a mean file to be subtracted from the input image, put it here. -[-cs Color Sequence]|Color Sequence of Input channels
2,1,0: BGR (Default)
0,1,2 : RGB +[-i image filename]|Image to use as input to validation run.
If not set, a randomly generated image will be used. +[-id Top-1 Validation ID]|Expected id for Top-1 validation. +[-S scale factor]|Scale each value of the input by this amount.
E.g., if the network expects input values in the range 0-255, put 255 here (1 is default, as the range 0-1 is the default). +[-M Mean Subtraction Number or npy filename]|Subtract this from the input (applied after scale). E.g., if the network expects a mean file to be subtracted from the input image, put it here. +[-cs Color Sequence]|Color Sequence of Input channels:
2,1,0: BGR (Default)
0,1,2 : RGB ## Known Issues diff --git a/docs/tools/compile.md b/docs/tools/compile.md index 4374028..7143d88 100644 --- a/docs/tools/compile.md +++ b/docs/tools/compile.md @@ -8,7 +8,8 @@ Revision|1.08 See also| [mvNCProfile](profile.md), [mvNCCheck](check.md), [TensorFlow™ Info](../TensorFlow.md) ## Overview -This commandline tool compiles and converts the network file and weights file described in Caffe or TensorFlow™ into Movidius™ internal Graphfile format. The graph file is loaded into the Neural Compute Stick during runtime using the NCSDK API. The graph file then can be executed by sending an image to the NCS for inferencing. +This command line tool compiles and converts the network file and weights file described in Caffe or TensorFlow™ into Intel® Movidius™ internal Graphfile format. The graph file is loaded into the Intel® Movidius™ Neural Compute Stick (Intel® Movidius™ NCS) +during runtime using the NCSDK API. The graph file then can be executed by sending an image to the Intel Movidius NCS for inferencing. ## Syntax @@ -24,10 +25,10 @@ mvNCCompile network.meta [-s Max Number of Shaves] [-in Input Node Name] [-on Ou Argument|Description ------------ | ------------- network.prototxt(Caffe)
network.meta(TensorFlow™)|Name of the network file. -[-w weights_file]|Weights filename from training (only applies to Caffe, not to be used with TensorFlow™.) If omitted zero weights will be used. -[-s Max # of Shaves]|Default: 1

Selects the maximum number of SHAVEs (1, 2, 4, 8 or 12.) to use for network layers.

Note: The NCS runtime code may use less than the MAX SHAVE value for some layers where measurements have typically shown no inference performance degradation (and consequently a power benefit) of using fewer SHAVEs. -[-in Input Node Name]|By default the network is processed from the input tensor. This option allows a user to select an alternative start point in the network.

This enables partial network processing. When used together with the -on option a user can isolate one or more layers in a network for analysis. -[-on Output Node Name]|By default the network is processed through to the output tensor. This option allows a user to select an alternative end point in the network.

This enables partial network processing. When used together with the -in option a user can isolate one or more layers in a network for analysis. Note: beware that the parser stops at the first instance of the output node name (e.g., a Relu following a Conv will not be processed if it shares the same name). +[-w weights_file]|Weights filename from training (only applies to Caffe, not to be used with TensorFlow™.) If omitted, zero weights will be used. +[-s Max # of Shaves]|Default: 1

Selects the maximum number of SHAVEs (1, 2, 4, 8, or 12) to use for network layers.

Note: The NCS runtime code may use less than the MAX SHAVE value for some layers where measurements have typically shown no inference performance degradation (and consequently a power benefit) of using fewer SHAVEs. +[-in Input Node Name]|By default the network is processed from the input tensor. This option allows a user to select an alternative start point in the network.

This enables partial network processing. When used together with the -on option, a user can isolate one or more layers in a network for analysis. +[-on Output Node Name]|By default the network is processed through to the output tensor. This option allows a user to select an alternative end point in the network.

This enables partial network processing. When used together with the -in option, a user can isolate one or more layers in a network for analysis. Note: Beware that the parser stops at the first instance of the output node name (e.g., a Relu following a Conv will not be processed if it shares the same name). [-is Input-Width Input-Height]|Input size is typically described as a part of the network. For networks that do not have dimension constraints on the input tensor, this option can be used to set the desired input dimensions.

Only two dimensions are defined because the batch size is always 1 and the number of color planes is assumed to be 3. [-o Output Graph Filename]|Default: "graph"

Output graph container filename. If not provided, “graph” will be used. diff --git a/docs/tools/profile.md b/docs/tools/profile.md index a55a256..c0c67cc 100644 --- a/docs/tools/profile.md +++ b/docs/tools/profile.md @@ -8,7 +8,7 @@ Revision|1.08 See also| [mvNCCompile](compile.md), [mvNCCheck](check.md), [TensorFlow™ info](../TensorFlow.md) ## Overview -This commandline tool compiles the provided network, runs the network on the connected Neural Compute Stick (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 Neural Compute Stick. +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. The weights file is not required when profiling a network to determine bottlenecks. @@ -26,10 +26,10 @@ mvNCProfile network.meta [-s Max Number of Shaves] [-in Input Node Name] [-on Ou Argument|Description ------------ | ------------- network.prototxt(caffe)
network.meta(TensorFlow™)|Name of the network file. -[-w weights_file]|Weights filename from training (Only applies to Caffe, not to be used with TensorFlow™.) If omitted zero weights will be used. -[-s Max # of Shaves]|Default: 1

Selects the maximum number of SHAVEs (1,2,4,8 or 12.) to use for network layers.

Note: The NCS runtime code may use less than the MAX SHAVE value for some layers where measurements have typically shown no inference performance degradation (and consequently a power benefit) of using fewer SHAVEs. +[-w weights_file]|Weights filename from training. (Only applies to Caffe, not to be used with TensorFlow™.) If omitted, zero weights will be used. +[-s Max # of Shaves]|Default: 1

Selects the maximum number of SHAVEs (1,2,4,8, or 12.) to use for network layers.

Note: The NCS runtime code may use less than the MAX SHAVE value for some layers where measurements have typically shown no inference performance degradation (and consequently a power benefit) of using fewer SHAVEs. [-in Input Node Name]|By default the network is processed from the input tensor. This option allows a user to select an alternative start point in the network.

This enables partial network processing. When used together with the -on option a user can isolate one or more layers in a network for analysis. -[-on Output Node Name]|By default the network is processed through to the output tensor. This option allows a user to select an alternative end point in the network.

This enables partial network processing. When used together with the -in option a user can isolate one or more layers in a network for analysis. +[-on Output Node Name]|By default the network is processed through to the output tensor. This option allows a user to select an alternative end point in the network.

This enables partial network processing. When used together with the -in option, a user can isolate one or more layers in a network for analysis. [-is Input-Width Input-Height]|Input size is typically described as a part of the network. For networks that do not have dimension constraints on the input tensor, this option can be used to set the desired input dimensions.

Only two dimensions are defined because the batch size is always 1 and the number of color planes is assumed to be 3. [-o Output Graph Filename]|Default: "graph"

Output graph container filename. If not provided, “graph” will be used. @@ -141,7 +141,7 @@ Layer Name MFLOPs Bandwidth MB/s ``` ## Graphical Format -The mvNCProfile also creates the output_report.html and output.gv.svg files which contain a graphcial representation of the profile information as shown below. +The mvNCProfile also creates the output_report.html and output.gv.svg files, which contain a graphcial representation of the profile information as shown below. ![](../images/GoogLeNet_gv.png) diff --git a/examples/Makefile b/examples/Makefile index 691d6f1..c1dc89e 100644 --- a/examples/Makefile +++ b/examples/Makefile @@ -1,6 +1,6 @@ ifneq ($(findstring movidius, $(PYTHONPATH)), movidius) - export PYTHONPATH:=/opt/movidius/caffe/python:/opt/movidius/mvnc/python:$(PYTHONPATH) + export PYTHONPATH:=/opt/movidius/caffe/python:$(PYTHONPATH) endif TOPTARGETS := all clean check profile compile run diff --git a/examples/apps/Makefile b/examples/apps/Makefile index a53de79..3eebe57 100644 --- a/examples/apps/Makefile +++ b/examples/apps/Makefile @@ -1,6 +1,6 @@ ifneq ($(findstring movidius, $(PYTHONPATH)), movidius) - export PYTHONPATH:=/opt/movidius/caffe/python:/opt/movidius/mvnc/python:$(PYTHONPATH) + export PYTHONPATH:=/opt/movidius/caffe/python:$(PYTHONPATH) endif TOPTARGETS := all clean diff --git a/examples/caffe/AlexNet/Makefile b/examples/caffe/AlexNet/Makefile index 29ad0e7..f6b0c26 100644 --- a/examples/caffe/AlexNet/Makefile +++ b/examples/caffe/AlexNet/Makefile @@ -1,6 +1,6 @@ ifneq ($(findstring movidius, $(PYTHONPATH)), movidius) - export PYTHONPATH:=/opt/movidius/caffe/python:/opt/movidius/mvnc/python:$(PYTHONPATH) + export PYTHONPATH:=/opt/movidius/caffe/python:$(PYTHONPATH) endif NCCOMPILE = mvNCCompile diff --git a/examples/caffe/GoogLeNet/Makefile b/examples/caffe/GoogLeNet/Makefile index c330c15..5e2c6fd 100644 --- a/examples/caffe/GoogLeNet/Makefile +++ b/examples/caffe/GoogLeNet/Makefile @@ -1,6 +1,6 @@ ifneq ($(findstring movidius, $(PYTHONPATH)), movidius) - export PYTHONPATH:=/opt/movidius/caffe/python:/opt/movidius/mvnc/python:$(PYTHONPATH) + export PYTHONPATH:=/opt/movidius/caffe/python:$(PYTHONPATH) endif NCCOMPILE = mvNCCompile diff --git a/examples/caffe/Makefile b/examples/caffe/Makefile index 719db55..9bb8bf1 100644 --- a/examples/caffe/Makefile +++ b/examples/caffe/Makefile @@ -1,6 +1,6 @@ ifneq ($(findstring movidius, $(PYTHONPATH)), movidius) - export PYTHONPATH:=/opt/movidius/caffe/python:/opt/movidius/mvnc/python:$(PYTHONPATH) + export PYTHONPATH:=/opt/movidius/caffe/python:$(PYTHONPATH) endif TOPTARGETS := all clean check compile profile run diff --git a/examples/caffe/SqueezeNet/Makefile b/examples/caffe/SqueezeNet/Makefile index af22a3c..6aec28b 100644 --- a/examples/caffe/SqueezeNet/Makefile +++ b/examples/caffe/SqueezeNet/Makefile @@ -1,6 +1,6 @@ ifneq ($(findstring movidius, $(PYTHONPATH)), movidius) - export PYTHONPATH:=/opt/movidius/caffe/python:/opt/movidius/mvnc/python:$(PYTHONPATH) + export PYTHONPATH:=/opt/movidius/caffe/python:$(PYTHONPATH) endif NCCOMPILE = mvNCCompile diff --git a/examples/data/Makefile b/examples/data/Makefile index ed0a976..1e6f99d 100644 --- a/examples/data/Makefile +++ b/examples/data/Makefile @@ -1,6 +1,6 @@ ifneq ($(findstring movidius, $(PYTHONPATH)), movidius) - export PYTHONPATH:=/opt/movidius/caffe/python:/opt/movidius/mvnc/python:$(PYTHONPATH) + export PYTHONPATH:=/opt/movidius/caffe/python:$(PYTHONPATH) endif .PHONY: help diff --git a/examples/tensorflow/Makefile b/examples/tensorflow/Makefile index 6f0af84..0262179 100644 --- a/examples/tensorflow/Makefile +++ b/examples/tensorflow/Makefile @@ -1,6 +1,6 @@ ifneq ($(findstring movidius, $(PYTHONPATH)), movidius) - export PYTHONPATH:=/opt/movidius/caffe/python:/opt/movidius/mvnc/python:$(PYTHONPATH) + export PYTHONPATH:=/opt/movidius/caffe/python:$(PYTHONPATH) endif diff --git a/examples/tensorflow/inception_v1/Makefile b/examples/tensorflow/inception_v1/Makefile index bba4dbf..79a4ae6 100644 --- a/examples/tensorflow/inception_v1/Makefile +++ b/examples/tensorflow/inception_v1/Makefile @@ -1,6 +1,6 @@ ifneq ($(findstring movidius, $(PYTHONPATH)), movidius) - export PYTHONPATH:=/opt/movidius/caffe/python:/opt/movidius/mvnc/python:$(PYTHONPATH) + export PYTHONPATH:=/opt/movidius/caffe/python:$(PYTHONPATH) endif NCCOMPILE = mvNCCompile diff --git a/examples/tensorflow/inception_v3/Makefile b/examples/tensorflow/inception_v3/Makefile index da84808..42aeb76 100644 --- a/examples/tensorflow/inception_v3/Makefile +++ b/examples/tensorflow/inception_v3/Makefile @@ -1,6 +1,6 @@ ifneq ($(findstring movidius, $(PYTHONPATH)), movidius) - export PYTHONPATH:=/opt/movidius/caffe/python:/opt/movidius/mvnc/python:$(PYTHONPATH) + export PYTHONPATH:=/opt/movidius/caffe/python:$(PYTHONPATH) endif NCCOMPILE = mvNCCompile diff --git a/install.sh b/install.sh index cbf23ae..bb02bcd 100644 --- a/install.sh +++ b/install.sh @@ -11,10 +11,10 @@ then cd /tmp else cd /tmp - wget --no-cache http://ncs-forum-uploads.s3.amazonaws.com/ncsdk/ncsdk_01_10/ncsdk_redirector.txt + wget --no-cache http://ncs-forum-uploads.s3.amazonaws.com/ncsdk/ncsdk_01_10_01/ncsdk_redirector.txt fi -download_filename=NCSDK-1.10.tar.gz +download_filename=NCSDK-1.10.01.tar.gz # redirector is the url from redirector text file redirector=$(